From bee3e185f70f6139bafd8a339a7e1ce612179a2b Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sun, 11 Oct 2020 16:27:57 +0200 Subject: [PATCH] Merge tdlib and tdlight branches into a single source directory --- README.md | 6 +- .../tdlight/common}/utils/LibraryVersion.java | 3 +- .../tdlight/common/utils/LibraryVersion.java | 5 + .../{tdlight => common}/ClientState.java | 2 +- .../ConstructorDetector.java | 2 +- .../it/tdlight/{tdlight => common}/Init.java | 15 +- .../it/tdlight/{tdlight => common}/Log.java | 3 +- .../tdlight/{tdlight => common}/Request.java | 2 +- .../tdlight/{tdlight => common}/Response.java | 2 +- .../{tdlight => common}/ResponseArray.java | 2 +- .../{tdlight => common}/TelegramClient.java | 2 +- .../{tdlight => common}/utils/Arch.java | 2 +- .../utils/CantLoadLibrary.java | 2 +- .../utils/CloseCallback.java | 2 +- .../utils/ErrorCallback.java | 4 +- .../utils/LoadLibrary.java | 4 +- .../utils/NativeErrorCallback.java | 4 +- .../tdlight/{tdlight => common}/utils/Os.java | 2 +- .../utils/ReceiveCallback.java | 4 +- .../utils/ScannerUtils.java | 2 +- src/main/java/it/tdlight/jni/TdApi.java | 54456 ++++++++++++++++ src/main/java/it/tdlight/tdlib/Client.java | 248 + src/main/java/it/tdlight/tdlight/Client.java | 5 + tdlib/pom.xml | 137 + pom.xml => tdlight/pom.xml | 12 + 25 files changed, 54894 insertions(+), 34 deletions(-) rename src/main/{java-templates/it/tdlight/tdlight => java-templates-tdlib/it/tdlight/common}/utils/LibraryVersion.java (52%) create mode 100644 src/main/java-templates-tdlight/it/tdlight/common/utils/LibraryVersion.java rename src/main/java/it/tdlight/{tdlight => common}/ClientState.java (98%) rename src/main/java/it/tdlight/{tdlight => common}/ConstructorDetector.java (98%) rename src/main/java/it/tdlight/{tdlight => common}/Init.java (74%) rename src/main/java/it/tdlight/{tdlight => common}/Log.java (98%) rename src/main/java/it/tdlight/{tdlight => common}/Request.java (98%) rename src/main/java/it/tdlight/{tdlight => common}/Response.java (98%) rename src/main/java/it/tdlight/{tdlight => common}/ResponseArray.java (97%) rename src/main/java/it/tdlight/{tdlight => common}/TelegramClient.java (99%) rename src/main/java/it/tdlight/{tdlight => common}/utils/Arch.java (96%) rename src/main/java/it/tdlight/{tdlight => common}/utils/CantLoadLibrary.java (96%) rename src/main/java/it/tdlight/{tdlight => common}/utils/CloseCallback.java (96%) rename src/main/java/it/tdlight/{tdlight => common}/utils/ErrorCallback.java (93%) rename src/main/java/it/tdlight/{tdlight => common}/utils/LoadLibrary.java (97%) rename src/main/java/it/tdlight/{tdlight => common}/utils/NativeErrorCallback.java (93%) rename src/main/java/it/tdlight/{tdlight => common}/utils/Os.java (96%) rename src/main/java/it/tdlight/{tdlight => common}/utils/ReceiveCallback.java (93%) rename src/main/java/it/tdlight/{tdlight => common}/utils/ScannerUtils.java (92%) create mode 100644 src/main/java/it/tdlight/jni/TdApi.java create mode 100644 src/main/java/it/tdlight/tdlib/Client.java create mode 100644 tdlib/pom.xml rename pom.xml => tdlight/pom.xml (91%) diff --git a/README.md b/README.md index 812c28e..9366b75 100644 --- a/README.md +++ b/README.md @@ -89,11 +89,11 @@ dependencies { ## Usage Simple initialization of a native TDLib client ```java -import java.io.File; + import it.tdlight.tdlight.Client; -import it.tdlight.tdlight.Init; -import it.tdlight.tdlight.Log; +import it.tdlight.common.Init; +import it.tdlight.common.Log; public class Example { public static void main(String[] args) { diff --git a/src/main/java-templates/it/tdlight/tdlight/utils/LibraryVersion.java b/src/main/java-templates-tdlib/it/tdlight/common/utils/LibraryVersion.java similarity index 52% rename from src/main/java-templates/it/tdlight/tdlight/utils/LibraryVersion.java rename to src/main/java-templates-tdlib/it/tdlight/common/utils/LibraryVersion.java index a614927..dae80c3 100644 --- a/src/main/java-templates/it/tdlight/tdlight/utils/LibraryVersion.java +++ b/src/main/java-templates-tdlib/it/tdlight/common/utils/LibraryVersion.java @@ -1,4 +1,5 @@ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; public final class LibraryVersion { public static final String VERSION = "${project.version}"; + public static String IMPLEMENTATION_NAME = "tdlib"; } \ No newline at end of file diff --git a/src/main/java-templates-tdlight/it/tdlight/common/utils/LibraryVersion.java b/src/main/java-templates-tdlight/it/tdlight/common/utils/LibraryVersion.java new file mode 100644 index 0000000..1f41ba1 --- /dev/null +++ b/src/main/java-templates-tdlight/it/tdlight/common/utils/LibraryVersion.java @@ -0,0 +1,5 @@ +package it.tdlight.common.utils; +public final class LibraryVersion { + public static final String VERSION = "${project.version}"; + public static String IMPLEMENTATION_NAME = "tdlight"; +} \ No newline at end of file diff --git a/src/main/java/it/tdlight/tdlight/ClientState.java b/src/main/java/it/tdlight/common/ClientState.java similarity index 98% rename from src/main/java/it/tdlight/tdlight/ClientState.java rename to src/main/java/it/tdlight/common/ClientState.java index 0446f63..29cc1f9 100644 --- a/src/main/java/it/tdlight/tdlight/ClientState.java +++ b/src/main/java/it/tdlight/common/ClientState.java @@ -1,4 +1,4 @@ -package it.tdlight.tdlight; +package it.tdlight.common; import java.util.StringJoiner; diff --git a/src/main/java/it/tdlight/tdlight/ConstructorDetector.java b/src/main/java/it/tdlight/common/ConstructorDetector.java similarity index 98% rename from src/main/java/it/tdlight/tdlight/ConstructorDetector.java rename to src/main/java/it/tdlight/common/ConstructorDetector.java index 020b64a..bc47378 100644 --- a/src/main/java/it/tdlight/tdlight/ConstructorDetector.java +++ b/src/main/java/it/tdlight/common/ConstructorDetector.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight; +package it.tdlight.common; import it.tdlight.jni.TdApi; import java.lang.reflect.Field; diff --git a/src/main/java/it/tdlight/tdlight/Init.java b/src/main/java/it/tdlight/common/Init.java similarity index 74% rename from src/main/java/it/tdlight/tdlight/Init.java rename to src/main/java/it/tdlight/common/Init.java index cac438b..4f8ac55 100644 --- a/src/main/java/it/tdlight/tdlight/Init.java +++ b/src/main/java/it/tdlight/common/Init.java @@ -15,11 +15,11 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight; +package it.tdlight.common; -import it.tdlight.tdlight.utils.CantLoadLibrary; -import it.tdlight.tdlight.utils.LoadLibrary; -import it.tdlight.tdlight.utils.Os; +import it.tdlight.common.utils.CantLoadLibrary; +import it.tdlight.common.utils.LoadLibrary; +import it.tdlight.common.utils.Os; /** * Init class to successfully initialize Tdlib @@ -38,12 +38,7 @@ public class Init { Os os = LoadLibrary.getOs(); if (os == Os.win) { - LoadLibrary.load("libstdc++-6"); - LoadLibrary.load("libwinpthread-1"); - LoadLibrary.load("libgcc_s_seh-1"); - LoadLibrary.load("libcrypto-3-x64"); - LoadLibrary.load("libssl-3-x64"); - LoadLibrary.load("zlib1"); + // Since 3.0.0, libraries for windows are statically compiled into tdjni.dll } LoadLibrary.load("tdjni"); diff --git a/src/main/java/it/tdlight/tdlight/Log.java b/src/main/java/it/tdlight/common/Log.java similarity index 98% rename from src/main/java/it/tdlight/tdlight/Log.java rename to src/main/java/it/tdlight/common/Log.java index ca20d28..4927e68 100644 --- a/src/main/java/it/tdlight/tdlight/Log.java +++ b/src/main/java/it/tdlight/common/Log.java @@ -1,5 +1,6 @@ -package it.tdlight.tdlight; +package it.tdlight.common; +import it.tdlight.common.Init; import it.tdlight.jni.FatalErrorCallbackPtr; import it.tdlight.jni.NativeLog; import it.tdlight.jni.TdApi; diff --git a/src/main/java/it/tdlight/tdlight/Request.java b/src/main/java/it/tdlight/common/Request.java similarity index 98% rename from src/main/java/it/tdlight/tdlight/Request.java rename to src/main/java/it/tdlight/common/Request.java index f0f1afa..431b129 100644 --- a/src/main/java/it/tdlight/tdlight/Request.java +++ b/src/main/java/it/tdlight/common/Request.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight; +package it.tdlight.common; import it.tdlight.jni.TdApi.Function; diff --git a/src/main/java/it/tdlight/tdlight/Response.java b/src/main/java/it/tdlight/common/Response.java similarity index 98% rename from src/main/java/it/tdlight/tdlight/Response.java rename to src/main/java/it/tdlight/common/Response.java index 4c361a0..14bddfb 100644 --- a/src/main/java/it/tdlight/tdlight/Response.java +++ b/src/main/java/it/tdlight/common/Response.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight; +package it.tdlight.common; import it.tdlight.jni.TdApi.Object; diff --git a/src/main/java/it/tdlight/tdlight/ResponseArray.java b/src/main/java/it/tdlight/common/ResponseArray.java similarity index 97% rename from src/main/java/it/tdlight/tdlight/ResponseArray.java rename to src/main/java/it/tdlight/common/ResponseArray.java index 2dd2226..7deb323 100644 --- a/src/main/java/it/tdlight/tdlight/ResponseArray.java +++ b/src/main/java/it/tdlight/common/ResponseArray.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight; +package it.tdlight.common; /** * An array of incoming updates from TDLib. diff --git a/src/main/java/it/tdlight/tdlight/TelegramClient.java b/src/main/java/it/tdlight/common/TelegramClient.java similarity index 99% rename from src/main/java/it/tdlight/tdlight/TelegramClient.java rename to src/main/java/it/tdlight/common/TelegramClient.java index 6794c4a..91b14e0 100644 --- a/src/main/java/it/tdlight/tdlight/TelegramClient.java +++ b/src/main/java/it/tdlight/common/TelegramClient.java @@ -1,4 +1,4 @@ -package it.tdlight.tdlight; +package it.tdlight.common; import java.io.IOException; import java.util.List; diff --git a/src/main/java/it/tdlight/tdlight/utils/Arch.java b/src/main/java/it/tdlight/common/utils/Arch.java similarity index 96% rename from src/main/java/it/tdlight/tdlight/utils/Arch.java rename to src/main/java/it/tdlight/common/utils/Arch.java index b1b5484..0da2c7c 100644 --- a/src/main/java/it/tdlight/tdlight/utils/Arch.java +++ b/src/main/java/it/tdlight/common/utils/Arch.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; /** * Enumeration with all architectures recognized by this library. diff --git a/src/main/java/it/tdlight/tdlight/utils/CantLoadLibrary.java b/src/main/java/it/tdlight/common/utils/CantLoadLibrary.java similarity index 96% rename from src/main/java/it/tdlight/tdlight/utils/CantLoadLibrary.java rename to src/main/java/it/tdlight/common/utils/CantLoadLibrary.java index 1b32e51..735cf30 100644 --- a/src/main/java/it/tdlight/tdlight/utils/CantLoadLibrary.java +++ b/src/main/java/it/tdlight/common/utils/CantLoadLibrary.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; /** * An exception that is thrown when the LoadLibrary class fails to load the library. diff --git a/src/main/java/it/tdlight/tdlight/utils/CloseCallback.java b/src/main/java/it/tdlight/common/utils/CloseCallback.java similarity index 96% rename from src/main/java/it/tdlight/tdlight/utils/CloseCallback.java rename to src/main/java/it/tdlight/common/utils/CloseCallback.java index 23de821..83f66d5 100644 --- a/src/main/java/it/tdlight/tdlight/utils/CloseCallback.java +++ b/src/main/java/it/tdlight/common/utils/CloseCallback.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; /** * Interface of callback for receive notification of closing Tdlib. diff --git a/src/main/java/it/tdlight/tdlight/utils/ErrorCallback.java b/src/main/java/it/tdlight/common/utils/ErrorCallback.java similarity index 93% rename from src/main/java/it/tdlight/tdlight/utils/ErrorCallback.java rename to src/main/java/it/tdlight/common/utils/ErrorCallback.java index 670ba3e..bf4c2a0 100644 --- a/src/main/java/it/tdlight/tdlight/utils/ErrorCallback.java +++ b/src/main/java/it/tdlight/common/utils/ErrorCallback.java @@ -15,9 +15,9 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; -import it.tdlight.tdlight.Response; +import it.tdlight.common.Response; /** * Interface of callback for receive incoming error response. diff --git a/src/main/java/it/tdlight/tdlight/utils/LoadLibrary.java b/src/main/java/it/tdlight/common/utils/LoadLibrary.java similarity index 97% rename from src/main/java/it/tdlight/tdlight/utils/LoadLibrary.java rename to src/main/java/it/tdlight/common/utils/LoadLibrary.java index a6d366f..9c39080 100644 --- a/src/main/java/it/tdlight/tdlight/utils/LoadLibrary.java +++ b/src/main/java/it/tdlight/common/utils/LoadLibrary.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; import java.io.IOException; import java.io.InputStream; @@ -30,7 +30,7 @@ import java.util.concurrent.ConcurrentHashMap; */ public class LoadLibrary { private static ConcurrentHashMap libraryLoaded = new ConcurrentHashMap<>(); - private static Path librariesPath = Paths.get(".tdlight-libs-cache"); + private static Path librariesPath = Paths.get("."+ LibraryVersion.IMPLEMENTATION_NAME + "-libs-cache"); private static final String libsVersion = LibraryVersion.VERSION; static { diff --git a/src/main/java/it/tdlight/tdlight/utils/NativeErrorCallback.java b/src/main/java/it/tdlight/common/utils/NativeErrorCallback.java similarity index 93% rename from src/main/java/it/tdlight/tdlight/utils/NativeErrorCallback.java rename to src/main/java/it/tdlight/common/utils/NativeErrorCallback.java index f5a8835..dbbf91f 100644 --- a/src/main/java/it/tdlight/tdlight/utils/NativeErrorCallback.java +++ b/src/main/java/it/tdlight/common/utils/NativeErrorCallback.java @@ -15,9 +15,9 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; -import it.tdlight.tdlight.Response; +import it.tdlight.common.Response; /** * Interface of callback for receive incoming error response. diff --git a/src/main/java/it/tdlight/tdlight/utils/Os.java b/src/main/java/it/tdlight/common/utils/Os.java similarity index 96% rename from src/main/java/it/tdlight/tdlight/utils/Os.java rename to src/main/java/it/tdlight/common/utils/Os.java index ac4b375..c0f916d 100644 --- a/src/main/java/it/tdlight/tdlight/utils/Os.java +++ b/src/main/java/it/tdlight/common/utils/Os.java @@ -15,7 +15,7 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; /** * Enumeration with all operating systems recognized by this library. diff --git a/src/main/java/it/tdlight/tdlight/utils/ReceiveCallback.java b/src/main/java/it/tdlight/common/utils/ReceiveCallback.java similarity index 93% rename from src/main/java/it/tdlight/tdlight/utils/ReceiveCallback.java rename to src/main/java/it/tdlight/common/utils/ReceiveCallback.java index 78d8df3..a6fc1d8 100644 --- a/src/main/java/it/tdlight/tdlight/utils/ReceiveCallback.java +++ b/src/main/java/it/tdlight/common/utils/ReceiveCallback.java @@ -15,9 +15,9 @@ * along with JTdlib. If not, see . */ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; -import it.tdlight.tdlight.Response; +import it.tdlight.common.Response; /** * Interface of callback for receive incoming update or request response. diff --git a/src/main/java/it/tdlight/tdlight/utils/ScannerUtils.java b/src/main/java/it/tdlight/common/utils/ScannerUtils.java similarity index 92% rename from src/main/java/it/tdlight/tdlight/utils/ScannerUtils.java rename to src/main/java/it/tdlight/common/utils/ScannerUtils.java index acc4fa0..3e7cea0 100644 --- a/src/main/java/it/tdlight/tdlight/utils/ScannerUtils.java +++ b/src/main/java/it/tdlight/common/utils/ScannerUtils.java @@ -1,4 +1,4 @@ -package it.tdlight.tdlight.utils; +package it.tdlight.common.utils; import java.util.Scanner; diff --git a/src/main/java/it/tdlight/jni/TdApi.java b/src/main/java/it/tdlight/jni/TdApi.java new file mode 100644 index 0000000..77c421a --- /dev/null +++ b/src/main/java/it/tdlight/jni/TdApi.java @@ -0,0 +1,54456 @@ +package it.tdlight.jni; + +/** + * This class contains as static nested classes all other TDLib interface + * type-classes and function-classes. + *

+ * It has no inner classes, functions or public members. + */ +public class TdApi { + /** + * This class is a base class for all TDLib interface classes. + */ + public abstract static class Object { + /** + * @return string representation of the object. + */ + public native String toString(); + + /** + * @return identifier uniquely determining type of the object. + */ + public abstract int getConstructor(); + } + + /** + * This class is a base class for all TDLib interface function-classes. + */ + public abstract static class Function extends Object { + /** + * @return string representation of the object. + */ + public native String toString(); + } + + /** + * Contains information about the period of inactivity after which the current user's account will automatically be deleted. + */ + public static class AccountTtl extends Object { + /** + * Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days. + */ + public int days; + + /** + * Contains information about the period of inactivity after which the current user's account will automatically be deleted. + */ + public AccountTtl() { + } + + /** + * Contains information about the period of inactivity after which the current user's account will automatically be deleted. + * + * @param days Number of days of inactivity before the account will be flagged for deletion; should range from 30-366 days. + */ + public AccountTtl(int days) { + this.days = days; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1324495492; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes an address. + */ + public static class Address extends Object { + /** + * A two-letter ISO 3166-1 alpha-2 country code. + */ + public String countryCode; + /** + * State, if applicable. + */ + public String state; + /** + * City. + */ + public String city; + /** + * First line of the address. + */ + public String streetLine1; + /** + * Second line of the address. + */ + public String streetLine2; + /** + * Address postal code. + */ + public String postalCode; + + /** + * Describes an address. + */ + public Address() { + } + + /** + * Describes an address. + * + * @param countryCode A two-letter ISO 3166-1 alpha-2 country code. + * @param state State, if applicable. + * @param city City. + * @param streetLine1 First line of the address. + * @param streetLine2 Second line of the address. + * @param postalCode Address postal code. + */ + public Address(String countryCode, String state, String city, String streetLine1, String streetLine2, String postalCode) { + this.countryCode = countryCode; + this.state = state; + this.city = city; + this.streetLine1 = streetLine1; + this.streetLine2 = streetLine2; + this.postalCode = postalCode; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2043654342; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Animated variant of a chat photo in MPEG4 format. + */ + public static class AnimatedChatPhoto extends Object { + /** + * Animation width and height. + */ + public int length; + /** + * Information about the animation file. + */ + public File file; + /** + * Timestamp of the frame, used as a static chat photo. + */ + public double mainFrameTimestamp; + + /** + * Animated variant of a chat photo in MPEG4 format. + */ + public AnimatedChatPhoto() { + } + + /** + * Animated variant of a chat photo in MPEG4 format. + * + * @param length Animation width and height. + * @param file Information about the animation file. + * @param mainFrameTimestamp Timestamp of the frame, used as a static chat photo. + */ + public AnimatedChatPhoto(int length, File file, double mainFrameTimestamp) { + this.length = length; + this.file = file; + this.mainFrameTimestamp = mainFrameTimestamp; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 191994926; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes an animation file. The animation must be encoded in GIF or MPEG4 format. + */ + public static class Animation extends Object { + /** + * Duration of the animation, in seconds; as defined by the sender. + */ + public int duration; + /** + * Width of the animation. + */ + public int width; + /** + * Height of the animation. + */ + public int height; + /** + * Original name of the file; as defined by the sender. + */ + public String fileName; + /** + * MIME type of the file, usually "image/gif" or "video/mp4". + */ + public String mimeType; + /** + * True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets. + */ + public boolean hasStickers; + /** + * Animation minithumbnail; may be null. + */ + public Minithumbnail minithumbnail; + /** + * Animation thumbnail in JPEG or MPEG4 format; may be null. + */ + public Thumbnail thumbnail; + /** + * File containing the animation. + */ + public File animation; + + /** + * Describes an animation file. The animation must be encoded in GIF or MPEG4 format. + */ + public Animation() { + } + + /** + * Describes an animation file. The animation must be encoded in GIF or MPEG4 format. + * + * @param duration Duration of the animation, in seconds; as defined by the sender. + * @param width Width of the animation. + * @param height Height of the animation. + * @param fileName Original name of the file; as defined by the sender. + * @param mimeType MIME type of the file, usually "image/gif" or "video/mp4". + * @param hasStickers True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets. + * @param minithumbnail Animation minithumbnail; may be null. + * @param thumbnail Animation thumbnail in JPEG or MPEG4 format; may be null. + * @param animation File containing the animation. + */ + public Animation(int duration, int width, int height, String fileName, String mimeType, boolean hasStickers, Minithumbnail minithumbnail, Thumbnail thumbnail, File animation) { + this.duration = duration; + this.width = width; + this.height = height; + this.fileName = fileName; + this.mimeType = mimeType; + this.hasStickers = hasStickers; + this.minithumbnail = minithumbnail; + this.thumbnail = thumbnail; + this.animation = animation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -872359106; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of animations. + */ + public static class Animations extends Object { + /** + * List of animations. + */ + public Animation[] animations; + + /** + * Represents a list of animations. + */ + public Animations() { + } + + /** + * Represents a list of animations. + * + * @param animations List of animations. + */ + public Animations(Animation[] animations) { + this.animations = animations; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 344216945; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes an audio file. Audio is usually in MP3 or M4A format. + */ + public static class Audio extends Object { + /** + * Duration of the audio, in seconds; as defined by the sender. + */ + public int duration; + /** + * Title of the audio; as defined by the sender. + */ + public String title; + /** + * Performer of the audio; as defined by the sender. + */ + public String performer; + /** + * Original name of the file; as defined by the sender. + */ + public String fileName; + /** + * The MIME type of the file; as defined by the sender. + */ + public String mimeType; + /** + * The minithumbnail of the album cover; may be null. + */ + public Minithumbnail albumCoverMinithumbnail; + /** + * The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null. + */ + public Thumbnail albumCoverThumbnail; + /** + * File containing the audio. + */ + public File audio; + + /** + * Describes an audio file. Audio is usually in MP3 or M4A format. + */ + public Audio() { + } + + /** + * Describes an audio file. Audio is usually in MP3 or M4A format. + * + * @param duration Duration of the audio, in seconds; as defined by the sender. + * @param title Title of the audio; as defined by the sender. + * @param performer Performer of the audio; as defined by the sender. + * @param fileName Original name of the file; as defined by the sender. + * @param mimeType The MIME type of the file; as defined by the sender. + * @param albumCoverMinithumbnail The minithumbnail of the album cover; may be null. + * @param albumCoverThumbnail The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null. + * @param audio File containing the audio. + */ + public Audio(int duration, String title, String performer, String fileName, String mimeType, Minithumbnail albumCoverMinithumbnail, Thumbnail albumCoverThumbnail, File audio) { + this.duration = duration; + this.title = title; + this.performer = performer; + this.fileName = fileName; + this.mimeType = mimeType; + this.albumCoverMinithumbnail = albumCoverMinithumbnail; + this.albumCoverThumbnail = albumCoverThumbnail; + this.audio = audio; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1179334690; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Information about the authentication code that was sent. + */ + public static class AuthenticationCodeInfo extends Object { + /** + * A phone number that is being authenticated. + */ + public String phoneNumber; + /** + * Describes the way the code was sent to the user. + */ + public AuthenticationCodeType type; + /** + * Describes the way the next code will be sent to the user; may be null. + */ + public AuthenticationCodeType nextType; + /** + * Timeout before the code should be re-sent, in seconds. + */ + public int timeout; + + /** + * Information about the authentication code that was sent. + */ + public AuthenticationCodeInfo() { + } + + /** + * Information about the authentication code that was sent. + * + * @param phoneNumber A phone number that is being authenticated. + * @param type Describes the way the code was sent to the user. + * @param nextType Describes the way the next code will be sent to the user; may be null. + * @param timeout Timeout before the code should be re-sent, in seconds. + */ + public AuthenticationCodeInfo(String phoneNumber, AuthenticationCodeType type, AuthenticationCodeType nextType, int timeout) { + this.phoneNumber = phoneNumber; + this.type = type; + this.nextType = nextType; + this.timeout = timeout; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -860345416; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Provides information about the method by which an authentication code is delivered to the user. + */ + public abstract static class AuthenticationCodeType extends Object { + } + + /** + * An authentication code is delivered via a private Telegram message, which can be viewed from another active session. + */ + public static class AuthenticationCodeTypeTelegramMessage extends AuthenticationCodeType { + /** + * Length of the code. + */ + public int length; + + /** + * An authentication code is delivered via a private Telegram message, which can be viewed from another active session. + */ + public AuthenticationCodeTypeTelegramMessage() { + } + + /** + * An authentication code is delivered via a private Telegram message, which can be viewed from another active session. + * + * @param length Length of the code. + */ + public AuthenticationCodeTypeTelegramMessage(int length) { + this.length = length; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2079628074; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An authentication code is delivered via an SMS message to the specified phone number. + */ + public static class AuthenticationCodeTypeSms extends AuthenticationCodeType { + /** + * Length of the code. + */ + public int length; + + /** + * An authentication code is delivered via an SMS message to the specified phone number. + */ + public AuthenticationCodeTypeSms() { + } + + /** + * An authentication code is delivered via an SMS message to the specified phone number. + * + * @param length Length of the code. + */ + public AuthenticationCodeTypeSms(int length) { + this.length = length; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 962650760; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An authentication code is delivered via a phone call to the specified phone number. + */ + public static class AuthenticationCodeTypeCall extends AuthenticationCodeType { + /** + * Length of the code. + */ + public int length; + + /** + * An authentication code is delivered via a phone call to the specified phone number. + */ + public AuthenticationCodeTypeCall() { + } + + /** + * An authentication code is delivered via a phone call to the specified phone number. + * + * @param length Length of the code. + */ + public AuthenticationCodeTypeCall(int length) { + this.length = length; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1636265063; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code. + */ + public static class AuthenticationCodeTypeFlashCall extends AuthenticationCodeType { + /** + * Pattern of the phone number from which the call will be made. + */ + public String pattern; + + /** + * An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code. + */ + public AuthenticationCodeTypeFlashCall() { + } + + /** + * An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code. + * + * @param pattern Pattern of the phone number from which the call will be made. + */ + public AuthenticationCodeTypeFlashCall(String pattern) { + this.pattern = pattern; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1395882402; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents the current authorization state of the TDLib client. + */ + public abstract static class AuthorizationState extends Object { + } + + /** + * TDLib needs TdlibParameters for initialization. + */ + public static class AuthorizationStateWaitTdlibParameters extends AuthorizationState { + + /** + * TDLib needs TdlibParameters for initialization. + */ + public AuthorizationStateWaitTdlibParameters() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 904720988; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * TDLib needs an encryption key to decrypt the local database. + */ + public static class AuthorizationStateWaitEncryptionKey extends AuthorizationState { + /** + * True, if the database is currently encrypted. + */ + public boolean isEncrypted; + + /** + * TDLib needs an encryption key to decrypt the local database. + */ + public AuthorizationStateWaitEncryptionKey() { + } + + /** + * TDLib needs an encryption key to decrypt the local database. + * + * @param isEncrypted True, if the database is currently encrypted. + */ + public AuthorizationStateWaitEncryptionKey(boolean isEncrypted) { + this.isEncrypted = isEncrypted; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 612103496; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options. + */ + public static class AuthorizationStateWaitPhoneNumber extends AuthorizationState { + + /** + * TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options. + */ + public AuthorizationStateWaitPhoneNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 306402531; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * TDLib needs the user's authentication code to authorize. + */ + public static class AuthorizationStateWaitCode extends AuthorizationState { + /** + * Information about the authorization code that was sent. + */ + public AuthenticationCodeInfo codeInfo; + + /** + * TDLib needs the user's authentication code to authorize. + */ + public AuthorizationStateWaitCode() { + } + + /** + * TDLib needs the user's authentication code to authorize. + * + * @param codeInfo Information about the authorization code that was sent. + */ + public AuthorizationStateWaitCode(AuthenticationCodeInfo codeInfo) { + this.codeInfo = codeInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 52643073; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link. + */ + public static class AuthorizationStateWaitOtherDeviceConfirmation extends AuthorizationState { + /** + * A tg:// URL for the QR code. The link will be updated frequently. + */ + public String link; + + /** + * The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link. + */ + public AuthorizationStateWaitOtherDeviceConfirmation() { + } + + /** + * The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link. + * + * @param link A tg:// URL for the QR code. The link will be updated frequently. + */ + public AuthorizationStateWaitOtherDeviceConfirmation(String link) { + this.link = link; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 860166378; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration. + */ + public static class AuthorizationStateWaitRegistration extends AuthorizationState { + /** + * Telegram terms of service. + */ + public TermsOfService termsOfService; + + /** + * The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration. + */ + public AuthorizationStateWaitRegistration() { + } + + /** + * The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration. + * + * @param termsOfService Telegram terms of service. + */ + public AuthorizationStateWaitRegistration(TermsOfService termsOfService) { + this.termsOfService = termsOfService; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 550350511; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user has been authorized, but needs to enter a password to start using the application. + */ + public static class AuthorizationStateWaitPassword extends AuthorizationState { + /** + * Hint for the password; may be empty. + */ + public String passwordHint; + /** + * True, if a recovery email address has been set up. + */ + public boolean hasRecoveryEmailAddress; + /** + * Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent. + */ + public String recoveryEmailAddressPattern; + + /** + * The user has been authorized, but needs to enter a password to start using the application. + */ + public AuthorizationStateWaitPassword() { + } + + /** + * The user has been authorized, but needs to enter a password to start using the application. + * + * @param passwordHint Hint for the password; may be empty. + * @param hasRecoveryEmailAddress True, if a recovery email address has been set up. + * @param recoveryEmailAddressPattern Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent. + */ + public AuthorizationStateWaitPassword(String passwordHint, boolean hasRecoveryEmailAddress, String recoveryEmailAddressPattern) { + this.passwordHint = passwordHint; + this.hasRecoveryEmailAddress = hasRecoveryEmailAddress; + this.recoveryEmailAddressPattern = recoveryEmailAddressPattern; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 187548796; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user has been successfully authorized. TDLib is now ready to answer queries. + */ + public static class AuthorizationStateReady extends AuthorizationState { + + /** + * The user has been successfully authorized. TDLib is now ready to answer queries. + */ + public AuthorizationStateReady() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1834871737; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is currently logging out. + */ + public static class AuthorizationStateLoggingOut extends AuthorizationState { + + /** + * The user is currently logging out. + */ + public AuthorizationStateLoggingOut() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 154449270; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received. + */ + public static class AuthorizationStateClosing extends AuthorizationState { + + /** + * TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received. + */ + public AuthorizationStateClosing() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 445855311; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to with error code 500. To continue working, one should create a new instance of the TDLib client. + */ + public static class AuthorizationStateClosed extends AuthorizationState { + + /** + * TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to with error code 500. To continue working, one should create a new instance of the TDLib client. + */ + public AuthorizationStateClosed() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1526047584; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains auto-download settings. + */ + public static class AutoDownloadSettings extends Object { + /** + * True, if the auto-download is enabled. + */ + public boolean isAutoDownloadEnabled; + /** + * The maximum size of a photo file to be auto-downloaded. + */ + public int maxPhotoFileSize; + /** + * The maximum size of a video file to be auto-downloaded. + */ + public int maxVideoFileSize; + /** + * The maximum size of other file types to be auto-downloaded. + */ + public int maxOtherFileSize; + /** + * The maximum suggested bitrate for uploaded videos. + */ + public int videoUploadBitrate; + /** + * True, if the beginning of video files needs to be preloaded for instant playback. + */ + public boolean preloadLargeVideos; + /** + * True, if the next audio track needs to be preloaded while the user is listening to an audio file. + */ + public boolean preloadNextAudio; + /** + * True, if "use less data for calls" option needs to be enabled. + */ + public boolean useLessDataForCalls; + + /** + * Contains auto-download settings. + */ + public AutoDownloadSettings() { + } + + /** + * Contains auto-download settings. + * + * @param isAutoDownloadEnabled True, if the auto-download is enabled. + * @param maxPhotoFileSize The maximum size of a photo file to be auto-downloaded. + * @param maxVideoFileSize The maximum size of a video file to be auto-downloaded. + * @param maxOtherFileSize The maximum size of other file types to be auto-downloaded. + * @param videoUploadBitrate The maximum suggested bitrate for uploaded videos. + * @param preloadLargeVideos True, if the beginning of video files needs to be preloaded for instant playback. + * @param preloadNextAudio True, if the next audio track needs to be preloaded while the user is listening to an audio file. + * @param useLessDataForCalls True, if "use less data for calls" option needs to be enabled. + */ + public AutoDownloadSettings(boolean isAutoDownloadEnabled, int maxPhotoFileSize, int maxVideoFileSize, int maxOtherFileSize, int videoUploadBitrate, boolean preloadLargeVideos, boolean preloadNextAudio, boolean useLessDataForCalls) { + this.isAutoDownloadEnabled = isAutoDownloadEnabled; + this.maxPhotoFileSize = maxPhotoFileSize; + this.maxVideoFileSize = maxVideoFileSize; + this.maxOtherFileSize = maxOtherFileSize; + this.videoUploadBitrate = videoUploadBitrate; + this.preloadLargeVideos = preloadLargeVideos; + this.preloadNextAudio = preloadNextAudio; + this.useLessDataForCalls = useLessDataForCalls; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2144418333; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains auto-download settings presets for the user. + */ + public static class AutoDownloadSettingsPresets extends Object { + /** + * Preset with lowest settings; supposed to be used by default when roaming. + */ + public AutoDownloadSettings low; + /** + * Preset with medium settings; supposed to be used by default when using mobile data. + */ + public AutoDownloadSettings medium; + /** + * Preset with highest settings; supposed to be used by default when connected on Wi-Fi. + */ + public AutoDownloadSettings high; + + /** + * Contains auto-download settings presets for the user. + */ + public AutoDownloadSettingsPresets() { + } + + /** + * Contains auto-download settings presets for the user. + * + * @param low Preset with lowest settings; supposed to be used by default when roaming. + * @param medium Preset with medium settings; supposed to be used by default when using mobile data. + * @param high Preset with highest settings; supposed to be used by default when connected on Wi-Fi. + */ + public AutoDownloadSettingsPresets(AutoDownloadSettings low, AutoDownloadSettings medium, AutoDownloadSettings high) { + this.low = low; + this.medium = medium; + this.high = high; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -782099166; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a chat background. + */ + public static class Background extends Object { + /** + * Unique background identifier. + */ + public long id; + /** + * True, if this is one of default backgrounds. + */ + public boolean isDefault; + /** + * True, if the background is dark and is recommended to be used with dark theme. + */ + public boolean isDark; + /** + * Unique background name. + */ + public String name; + /** + * Document with the background; may be null. Null only for filled backgrounds. + */ + public Document document; + /** + * Type of the background. + */ + public BackgroundType type; + + /** + * Describes a chat background. + */ + public Background() { + } + + /** + * Describes a chat background. + * + * @param id Unique background identifier. + * @param isDefault True, if this is one of default backgrounds. + * @param isDark True, if the background is dark and is recommended to be used with dark theme. + * @param name Unique background name. + * @param document Document with the background; may be null. Null only for filled backgrounds. + * @param type Type of the background. + */ + public Background(long id, boolean isDefault, boolean isDark, String name, Document document, BackgroundType type) { + this.id = id; + this.isDefault = isDefault; + this.isDark = isDark; + this.name = name; + this.document = document; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -429971172; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a fill of a background. + */ + public abstract static class BackgroundFill extends Object { + } + + /** + * Describes a solid fill of a background. + */ + public static class BackgroundFillSolid extends BackgroundFill { + /** + * A color of the background in the RGB24 format. + */ + public int color; + + /** + * Describes a solid fill of a background. + */ + public BackgroundFillSolid() { + } + + /** + * Describes a solid fill of a background. + * + * @param color A color of the background in the RGB24 format. + */ + public BackgroundFillSolid(int color) { + this.color = color; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1010678813; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a gradient fill of a background. + */ + public static class BackgroundFillGradient extends BackgroundFill { + /** + * A top color of the background in the RGB24 format. + */ + public int topColor; + /** + * A bottom color of the background in the RGB24 format. + */ + public int bottomColor; + /** + * Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45. + */ + public int rotationAngle; + + /** + * Describes a gradient fill of a background. + */ + public BackgroundFillGradient() { + } + + /** + * Describes a gradient fill of a background. + * + * @param topColor A top color of the background in the RGB24 format. + * @param bottomColor A bottom color of the background in the RGB24 format. + * @param rotationAngle Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45. + */ + public BackgroundFillGradient(int topColor, int bottomColor, int rotationAngle) { + this.topColor = topColor; + this.bottomColor = bottomColor; + this.rotationAngle = rotationAngle; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1839206017; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the type of a background. + */ + public abstract static class BackgroundType extends Object { + } + + /** + * A wallpaper in JPEG format. + */ + public static class BackgroundTypeWallpaper extends BackgroundType { + /** + * True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12. + */ + public boolean isBlurred; + /** + * True, if the background needs to be slightly moved when device is tilted. + */ + public boolean isMoving; + + /** + * A wallpaper in JPEG format. + */ + public BackgroundTypeWallpaper() { + } + + /** + * A wallpaper in JPEG format. + * + * @param isBlurred True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12. + * @param isMoving True, if the background needs to be slightly moved when device is tilted. + */ + public BackgroundTypeWallpaper(boolean isBlurred, boolean isMoving) { + this.isBlurred = isBlurred; + this.isMoving = isMoving; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1972128891; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user. + */ + public static class BackgroundTypePattern extends BackgroundType { + /** + * Description of the background fill. + */ + public BackgroundFill fill; + /** + * Intensity of the pattern when it is shown above the filled background, 0-100. + */ + public int intensity; + /** + * True, if the background needs to be slightly moved when device is tilted. + */ + public boolean isMoving; + + /** + * A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user. + */ + public BackgroundTypePattern() { + } + + /** + * A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user. + * + * @param fill Description of the background fill. + * @param intensity Intensity of the pattern when it is shown above the filled background, 0-100. + * @param isMoving True, if the background needs to be slightly moved when device is tilted. + */ + public BackgroundTypePattern(BackgroundFill fill, int intensity, boolean isMoving) { + this.fill = fill; + this.intensity = intensity; + this.isMoving = isMoving; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 649993914; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A filled background. + */ + public static class BackgroundTypeFill extends BackgroundType { + /** + * Description of the background fill. + */ + public BackgroundFill fill; + + /** + * A filled background. + */ + public BackgroundTypeFill() { + } + + /** + * A filled background. + * + * @param fill Description of the background fill. + */ + public BackgroundTypeFill(BackgroundFill fill) { + this.fill = fill; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 993008684; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of backgrounds. + */ + public static class Backgrounds extends Object { + /** + * A list of backgrounds. + */ + public Background[] backgrounds; + + /** + * Contains a list of backgrounds. + */ + public Backgrounds() { + } + + /** + * Contains a list of backgrounds. + * + * @param backgrounds A list of backgrounds. + */ + public Backgrounds(Background[] backgrounds) { + this.backgrounds = backgrounds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 724728704; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes an action associated with a bank card number. + */ + public static class BankCardActionOpenUrl extends Object { + /** + * Action text. + */ + public String text; + /** + * The URL to be opened. + */ + public String url; + + /** + * Describes an action associated with a bank card number. + */ + public BankCardActionOpenUrl() { + } + + /** + * Describes an action associated with a bank card number. + * + * @param text Action text. + * @param url The URL to be opened. + */ + public BankCardActionOpenUrl(String text, String url) { + this.text = text; + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -196454267; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Information about a bank card. + */ + public static class BankCardInfo extends Object { + /** + * Title of the bank card description. + */ + public String title; + /** + * Actions that can be done with the bank card number. + */ + public BankCardActionOpenUrl[] actions; + + /** + * Information about a bank card. + */ + public BankCardInfo() { + } + + /** + * Information about a bank card. + * + * @param title Title of the bank card description. + * @param actions Actions that can be done with the bank card number. + */ + public BankCardInfo(String title, BankCardActionOpenUrl[] actions) { + this.title = title; + this.actions = actions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2116647730; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users). + */ + public static class BasicGroup extends Object { + /** + * Group identifier. + */ + public int id; + /** + * Number of members in the group. + */ + public int memberCount; + /** + * Status of the current user in the group. + */ + public ChatMemberStatus status; + /** + * True, if the group is active. + */ + public boolean isActive; + /** + * Identifier of the supergroup to which this group was upgraded; 0 if none. + */ + public int upgradedToSupergroupId; + + /** + * Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users). + */ + public BasicGroup() { + } + + /** + * Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users). + * + * @param id Group identifier. + * @param memberCount Number of members in the group. + * @param status Status of the current user in the group. + * @param isActive True, if the group is active. + * @param upgradedToSupergroupId Identifier of the supergroup to which this group was upgraded; 0 if none. + */ + public BasicGroup(int id, int memberCount, ChatMemberStatus status, boolean isActive, int upgradedToSupergroupId) { + this.id = id; + this.memberCount = memberCount; + this.status = status; + this.isActive = isActive; + this.upgradedToSupergroupId = upgradedToSupergroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -317839045; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains full information about a basic group. + */ + public static class BasicGroupFullInfo extends Object { + /** + * Chat photo; may be null. + */ + public ChatPhoto photo; + /** + * Group description. + */ + public String description; + /** + * User identifier of the creator of the group; 0 if unknown. + */ + public int creatorUserId; + /** + * Group members. + */ + public ChatMember[] members; + /** + * Invite link for this group; available only after it has been generated at least once and only for the group creator. + */ + public String inviteLink; + + /** + * Contains full information about a basic group. + */ + public BasicGroupFullInfo() { + } + + /** + * Contains full information about a basic group. + * + * @param photo Chat photo; may be null. + * @param description Group description. + * @param creatorUserId User identifier of the creator of the group; 0 if unknown. + * @param members Group members. + * @param inviteLink Invite link for this group; available only after it has been generated at least once and only for the group creator. + */ + public BasicGroupFullInfo(ChatPhoto photo, String description, int creatorUserId, ChatMember[] members, String inviteLink) { + this.photo = photo; + this.description = description; + this.creatorUserId = creatorUserId; + this.members = members; + this.inviteLink = inviteLink; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -127204719; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a command supported by a bot. + */ + public static class BotCommand extends Object { + /** + * Text of the bot command. + */ + public String command; + /** + * Description of the bot command. + */ + public String description; + + /** + * Represents a command supported by a bot. + */ + public BotCommand() { + } + + /** + * Represents a command supported by a bot. + * + * @param command Text of the bot command. + * @param description Description of the bot command. + */ + public BotCommand(String command, String description) { + this.command = command; + this.description = description; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1032140601; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Provides information about a bot and its supported commands. + */ + public static class BotInfo extends Object { + /** + * Long description shown on the user info page. + */ + public String description; + /** + * A list of commands supported by the bot. + */ + public BotCommand[] commands; + + /** + * Provides information about a bot and its supported commands. + */ + public BotInfo() { + } + + /** + * Provides information about a bot and its supported commands. + * + * @param description Long description shown on the user info page. + * @param commands A list of commands supported by the bot. + */ + public BotInfo(String description, BotCommand[] commands) { + this.description = description; + this.commands = commands; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1296528907; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a call. + */ + public static class Call extends Object { + /** + * Call identifier, not persistent. + */ + public int id; + /** + * Peer user identifier. + */ + public int userId; + /** + * True, if the call is outgoing. + */ + public boolean isOutgoing; + /** + * True, if the call is a video call. + */ + public boolean isVideo; + /** + * Call state. + */ + public CallState state; + + /** + * Describes a call. + */ + public Call() { + } + + /** + * Describes a call. + * + * @param id Call identifier, not persistent. + * @param userId Peer user identifier. + * @param isOutgoing True, if the call is outgoing. + * @param isVideo True, if the call is a video call. + * @param state Call state. + */ + public Call(int id, int userId, boolean isOutgoing, boolean isVideo, CallState state) { + this.id = id; + this.userId = userId; + this.isOutgoing = isOutgoing; + this.isVideo = isVideo; + this.state = state; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1504070790; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the reason why a call was discarded. + */ + public abstract static class CallDiscardReason extends Object { + } + + /** + * The call wasn't discarded, or the reason is unknown. + */ + public static class CallDiscardReasonEmpty extends CallDiscardReason { + + /** + * The call wasn't discarded, or the reason is unknown. + */ + public CallDiscardReasonEmpty() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1258917949; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call was ended before the conversation started. It was cancelled by the caller or missed by the other party. + */ + public static class CallDiscardReasonMissed extends CallDiscardReason { + + /** + * The call was ended before the conversation started. It was cancelled by the caller or missed by the other party. + */ + public CallDiscardReasonMissed() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1680358012; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call was ended before the conversation started. It was declined by the other party. + */ + public static class CallDiscardReasonDeclined extends CallDiscardReason { + + /** + * The call was ended before the conversation started. It was declined by the other party. + */ + public CallDiscardReasonDeclined() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1729926094; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call was ended during the conversation because the users were disconnected. + */ + public static class CallDiscardReasonDisconnected extends CallDiscardReason { + + /** + * The call was ended during the conversation because the users were disconnected. + */ + public CallDiscardReasonDisconnected() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1342872670; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call was ended because one of the parties hung up. + */ + public static class CallDiscardReasonHungUp extends CallDiscardReason { + + /** + * The call was ended because one of the parties hung up. + */ + public CallDiscardReasonHungUp() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 438216166; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the call identifier. + */ + public static class CallId extends Object { + /** + * Call identifier. + */ + public int id; + + /** + * Contains the call identifier. + */ + public CallId() { + } + + /** + * Contains the call identifier. + * + * @param id Call identifier. + */ + public CallId(int id) { + this.id = id; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 65717769; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the exact type of a problem with a call. + */ + public abstract static class CallProblem extends Object { + } + + /** + * The user heard their own voice. + */ + public static class CallProblemEcho extends CallProblem { + + /** + * The user heard their own voice. + */ + public CallProblemEcho() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 801116548; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user heard background noise. + */ + public static class CallProblemNoise extends CallProblem { + + /** + * The user heard background noise. + */ + public CallProblemNoise() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1053065359; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The other side kept disappearing. + */ + public static class CallProblemInterruptions extends CallProblem { + + /** + * The other side kept disappearing. + */ + public CallProblemInterruptions() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1119493218; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The speech was distorted. + */ + public static class CallProblemDistortedSpeech extends CallProblem { + + /** + * The speech was distorted. + */ + public CallProblemDistortedSpeech() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 379960581; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user couldn't hear the other side. + */ + public static class CallProblemSilentLocal extends CallProblem { + + /** + * The user couldn't hear the other side. + */ + public CallProblemSilentLocal() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 253652790; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The other side couldn't hear the user. + */ + public static class CallProblemSilentRemote extends CallProblem { + + /** + * The other side couldn't hear the user. + */ + public CallProblemSilentRemote() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 573634714; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call ended unexpectedly. + */ + public static class CallProblemDropped extends CallProblem { + + /** + * The call ended unexpectedly. + */ + public CallProblemDropped() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1207311487; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The video was distorted. + */ + public static class CallProblemDistortedVideo extends CallProblem { + + /** + * The video was distorted. + */ + public CallProblemDistortedVideo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 385245706; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The video was pixelated. + */ + public static class CallProblemPixelatedVideo extends CallProblem { + + /** + * The video was pixelated. + */ + public CallProblemPixelatedVideo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2115315411; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Specifies the supported call protocols. + */ + public static class CallProtocol extends Object { + /** + * True, if UDP peer-to-peer connections are supported. + */ + public boolean udpP2p; + /** + * True, if connection through UDP reflectors is supported. + */ + public boolean udpReflector; + /** + * The minimum supported API layer; use 65. + */ + public int minLayer; + /** + * The maximum supported API layer; use 65. + */ + public int maxLayer; + /** + * List of supported libtgvoip versions. + */ + public String[] libraryVersions; + + /** + * Specifies the supported call protocols. + */ + public CallProtocol() { + } + + /** + * Specifies the supported call protocols. + * + * @param udpP2p True, if UDP peer-to-peer connections are supported. + * @param udpReflector True, if connection through UDP reflectors is supported. + * @param minLayer The minimum supported API layer; use 65. + * @param maxLayer The maximum supported API layer; use 65. + * @param libraryVersions List of supported libtgvoip versions. + */ + public CallProtocol(boolean udpP2p, boolean udpReflector, int minLayer, int maxLayer, String[] libraryVersions) { + this.udpP2p = udpP2p; + this.udpReflector = udpReflector; + this.minLayer = minLayer; + this.maxLayer = maxLayer; + this.libraryVersions = libraryVersions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1075562897; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a server for relaying call data. + */ + public static class CallServer extends Object { + /** + * Server identifier. + */ + public long id; + /** + * Server IPv4 address. + */ + public String ipAddress; + /** + * Server IPv6 address. + */ + public String ipv6Address; + /** + * Server port number. + */ + public int port; + /** + * Server type. + */ + public CallServerType type; + + /** + * Describes a server for relaying call data. + */ + public CallServer() { + } + + /** + * Describes a server for relaying call data. + * + * @param id Server identifier. + * @param ipAddress Server IPv4 address. + * @param ipv6Address Server IPv6 address. + * @param port Server port number. + * @param type Server type. + */ + public CallServer(long id, String ipAddress, String ipv6Address, int port, CallServerType type) { + this.id = id; + this.ipAddress = ipAddress; + this.ipv6Address = ipv6Address; + this.port = port; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1865932695; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the type of a call server. + */ + public abstract static class CallServerType extends Object { + } + + /** + * A Telegram call reflector. + */ + public static class CallServerTypeTelegramReflector extends CallServerType { + /** + * A peer tag to be used with the reflector. + */ + public byte[] peerTag; + + /** + * A Telegram call reflector. + */ + public CallServerTypeTelegramReflector() { + } + + /** + * A Telegram call reflector. + * + * @param peerTag A peer tag to be used with the reflector. + */ + public CallServerTypeTelegramReflector(byte[] peerTag) { + this.peerTag = peerTag; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1507850700; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A WebRTC server. + */ + public static class CallServerTypeWebrtc extends CallServerType { + /** + * Username to be used for authentication. + */ + public String username; + /** + * Authentication password. + */ + public String password; + /** + * True, if the server supports TURN. + */ + public boolean supportsTurn; + /** + * True, if the server supports STUN. + */ + public boolean supportsStun; + + /** + * A WebRTC server. + */ + public CallServerTypeWebrtc() { + } + + /** + * A WebRTC server. + * + * @param username Username to be used for authentication. + * @param password Authentication password. + * @param supportsTurn True, if the server supports TURN. + * @param supportsStun True, if the server supports STUN. + */ + public CallServerTypeWebrtc(String username, String password, boolean supportsTurn, boolean supportsStun) { + this.username = username; + this.password = password; + this.supportsTurn = supportsTurn; + this.supportsStun = supportsStun; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1250622821; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the current call state. + */ + public abstract static class CallState extends Object { + } + + /** + * The call is pending, waiting to be accepted by a user. + */ + public static class CallStatePending extends CallState { + /** + * True, if the call has already been created by the server. + */ + public boolean isCreated; + /** + * True, if the call has already been received by the other party. + */ + public boolean isReceived; + + /** + * The call is pending, waiting to be accepted by a user. + */ + public CallStatePending() { + } + + /** + * The call is pending, waiting to be accepted by a user. + * + * @param isCreated True, if the call has already been created by the server. + * @param isReceived True, if the call has already been received by the other party. + */ + public CallStatePending(boolean isCreated, boolean isReceived) { + this.isCreated = isCreated; + this.isReceived = isReceived; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1073048620; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call has been answered and encryption keys are being exchanged. + */ + public static class CallStateExchangingKeys extends CallState { + + /** + * The call has been answered and encryption keys are being exchanged. + */ + public CallStateExchangingKeys() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1848149403; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call is ready to use. + */ + public static class CallStateReady extends CallState { + /** + * Call protocols supported by the peer. + */ + public CallProtocol protocol; + /** + * List of available call servers. + */ + public CallServer[] servers; + /** + * A JSON-encoded call config. + */ + public String config; + /** + * Call encryption key. + */ + public byte[] encryptionKey; + /** + * Encryption key emojis fingerprint. + */ + public String[] emojis; + /** + * True, if peer-to-peer connection is allowed by users privacy settings. + */ + public boolean allowP2p; + + /** + * The call is ready to use. + */ + public CallStateReady() { + } + + /** + * The call is ready to use. + * + * @param protocol Call protocols supported by the peer. + * @param servers List of available call servers. + * @param config A JSON-encoded call config. + * @param encryptionKey Call encryption key. + * @param emojis Encryption key emojis fingerprint. + * @param allowP2p True, if peer-to-peer connection is allowed by users privacy settings. + */ + public CallStateReady(CallProtocol protocol, CallServer[] servers, String config, byte[] encryptionKey, String[] emojis, boolean allowP2p) { + this.protocol = protocol; + this.servers = servers; + this.config = config; + this.encryptionKey = encryptionKey; + this.emojis = emojis; + this.allowP2p = allowP2p; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2000107571; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call is hanging up after discardCall has been called. + */ + public static class CallStateHangingUp extends CallState { + + /** + * The call is hanging up after discardCall has been called. + */ + public CallStateHangingUp() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2133790038; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call has ended successfully. + */ + public static class CallStateDiscarded extends CallState { + /** + * The reason, why the call has ended. + */ + public CallDiscardReason reason; + /** + * True, if the call rating should be sent to the server. + */ + public boolean needRating; + /** + * True, if the call debug information should be sent to the server. + */ + public boolean needDebugInformation; + + /** + * The call has ended successfully. + */ + public CallStateDiscarded() { + } + + /** + * The call has ended successfully. + * + * @param reason The reason, why the call has ended. + * @param needRating True, if the call rating should be sent to the server. + * @param needDebugInformation True, if the call debug information should be sent to the server. + */ + public CallStateDiscarded(CallDiscardReason reason, boolean needRating, boolean needDebugInformation) { + this.reason = reason; + this.needRating = needRating; + this.needDebugInformation = needDebugInformation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -190853167; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The call has ended with an error. + */ + public static class CallStateError extends CallState { + /** + * Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout. + */ + public Error error; + + /** + * The call has ended with an error. + */ + public CallStateError() { + } + + /** + * The call has ended with an error. + * + * @param error Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout. + */ + public CallStateError(Error error) { + this.error = error; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -975215467; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a bot's answer to a callback query. + */ + public static class CallbackQueryAnswer extends Object { + /** + * Text of the answer. + */ + public String text; + /** + * True, if an alert should be shown to the user instead of a toast notification. + */ + public boolean showAlert; + /** + * URL to be opened. + */ + public String url; + + /** + * Contains a bot's answer to a callback query. + */ + public CallbackQueryAnswer() { + } + + /** + * Contains a bot's answer to a callback query. + * + * @param text Text of the answer. + * @param showAlert True, if an alert should be shown to the user instead of a toast notification. + * @param url URL to be opened. + */ + public CallbackQueryAnswer(String text, boolean showAlert, String url) { + this.text = text; + this.showAlert = showAlert; + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 360867933; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a payload of a callback query. + */ + public abstract static class CallbackQueryPayload extends Object { + } + + /** + * The payload for a general callback button. + */ + public static class CallbackQueryPayloadData extends CallbackQueryPayload { + /** + * Data that was attached to the callback button. + */ + public byte[] data; + + /** + * The payload for a general callback button. + */ + public CallbackQueryPayloadData() { + } + + /** + * The payload for a general callback button. + * + * @param data Data that was attached to the callback button. + */ + public CallbackQueryPayloadData(byte[] data) { + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1977729946; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The payload for a callback button requiring password. + */ + public static class CallbackQueryPayloadDataWithPassword extends CallbackQueryPayload { + /** + * The password for the current user. + */ + public String password; + /** + * Data that was attached to the callback button. + */ + public byte[] data; + + /** + * The payload for a callback button requiring password. + */ + public CallbackQueryPayloadDataWithPassword() { + } + + /** + * The payload for a callback button requiring password. + * + * @param password The password for the current user. + * @param data Data that was attached to the callback button. + */ + public CallbackQueryPayloadDataWithPassword(String password, byte[] data) { + this.password = password; + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1340266738; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The payload for a game callback button. + */ + public static class CallbackQueryPayloadGame extends CallbackQueryPayload { + /** + * A short name of the game that was attached to the callback button. + */ + public String gameShortName; + + /** + * The payload for a game callback button. + */ + public CallbackQueryPayloadGame() { + } + + /** + * The payload for a game callback button. + * + * @param gameShortName A short name of the game that was attached to the callback button. + */ + public CallbackQueryPayloadGame(String gameShortName) { + this.gameShortName = gameShortName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1303571512; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents result of checking whether the current session can be used to transfer a chat ownership to another user. + */ + public abstract static class CanTransferOwnershipResult extends Object { + } + + /** + * The session can be used. + */ + public static class CanTransferOwnershipResultOk extends CanTransferOwnershipResult { + + /** + * The session can be used. + */ + public CanTransferOwnershipResultOk() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -89881021; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The 2-step verification needs to be enabled first. + */ + public static class CanTransferOwnershipResultPasswordNeeded extends CanTransferOwnershipResult { + + /** + * The 2-step verification needs to be enabled first. + */ + public CanTransferOwnershipResultPasswordNeeded() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1548372703; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The 2-step verification was enabled recently, user needs to wait. + */ + public static class CanTransferOwnershipResultPasswordTooFresh extends CanTransferOwnershipResult { + /** + * Time left before the session can be used to transfer ownership of a chat, in seconds. + */ + public int retryAfter; + + /** + * The 2-step verification was enabled recently, user needs to wait. + */ + public CanTransferOwnershipResultPasswordTooFresh() { + } + + /** + * The 2-step verification was enabled recently, user needs to wait. + * + * @param retryAfter Time left before the session can be used to transfer ownership of a chat, in seconds. + */ + public CanTransferOwnershipResultPasswordTooFresh(int retryAfter) { + this.retryAfter = retryAfter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 811440913; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The session was created recently, user needs to wait. + */ + public static class CanTransferOwnershipResultSessionTooFresh extends CanTransferOwnershipResult { + /** + * Time left before the session can be used to transfer ownership of a chat, in seconds. + */ + public int retryAfter; + + /** + * The session was created recently, user needs to wait. + */ + public CanTransferOwnershipResultSessionTooFresh() { + } + + /** + * The session was created recently, user needs to wait. + * + * @param retryAfter Time left before the session can be used to transfer ownership of a chat, in seconds. + */ + public CanTransferOwnershipResultSessionTooFresh(int retryAfter) { + this.retryAfter = retryAfter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 984664289; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat. (Can be a private chat, basic group, supergroup, or secret chat.) + */ + public static class Chat extends Object { + /** + * Chat unique identifier. + */ + public long id; + /** + * Type of the chat. + */ + public ChatType type; + /** + * Chat title. + */ + public String title; + /** + * Chat photo; may be null. + */ + public ChatPhotoInfo photo; + /** + * Actions that non-administrator chat members are allowed to take in the chat. + */ + public ChatPermissions permissions; + /** + * Last message in the chat; may be null. + */ + public Message lastMessage; + /** + * Positions of the chat in chat lists. + */ + public ChatPosition[] positions; + /** + * True, if the chat is marked as unread. + */ + public boolean isMarkedAsUnread; + /** + * True, if the chat is blocked by the current user and private messages from the chat can't be received. + */ + public boolean isBlocked; + /** + * True, if the chat has scheduled messages. + */ + public boolean hasScheduledMessages; + /** + * True, if the chat messages can be deleted only for the current user while other users will continue to see the messages. + */ + public boolean canBeDeletedOnlyForSelf; + /** + * True, if the chat messages can be deleted for all users. + */ + public boolean canBeDeletedForAllUsers; + /** + * True, if the chat can be reported to Telegram moderators through reportChat. + */ + public boolean canBeReported; + /** + * Default value of the disableNotification parameter, used when a message is sent to the chat. + */ + public boolean defaultDisableNotification; + /** + * Number of unread messages in the chat. + */ + public int unreadCount; + /** + * Identifier of the last read incoming message. + */ + public long lastReadInboxMessageId; + /** + * Identifier of the last read outgoing message. + */ + public long lastReadOutboxMessageId; + /** + * Number of unread messages with a mention/reply in the chat. + */ + public int unreadMentionCount; + /** + * Notification settings for this chat. + */ + public ChatNotificationSettings notificationSettings; + /** + * Describes actions which should be possible to do through a chat action bar; may be null. + */ + public ChatActionBar actionBar; + /** + * Identifier of the pinned message in the chat; 0 if none. + */ + public long pinnedMessageId; + /** + * Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat. + */ + public long replyMarkupMessageId; + /** + * A draft of a message in the chat; may be null. + */ + public DraftMessage draftMessage; + /** + * Contains application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used. + */ + public String clientData; + + /** + * A chat. (Can be a private chat, basic group, supergroup, or secret chat.) + */ + public Chat() { + } + + /** + * A chat. (Can be a private chat, basic group, supergroup, or secret chat.) + * + * @param id Chat unique identifier. + * @param type Type of the chat. + * @param title Chat title. + * @param photo Chat photo; may be null. + * @param permissions Actions that non-administrator chat members are allowed to take in the chat. + * @param lastMessage Last message in the chat; may be null. + * @param positions Positions of the chat in chat lists. + * @param isMarkedAsUnread True, if the chat is marked as unread. + * @param isBlocked True, if the chat is blocked by the current user and private messages from the chat can't be received. + * @param hasScheduledMessages True, if the chat has scheduled messages. + * @param canBeDeletedOnlyForSelf True, if the chat messages can be deleted only for the current user while other users will continue to see the messages. + * @param canBeDeletedForAllUsers True, if the chat messages can be deleted for all users. + * @param canBeReported True, if the chat can be reported to Telegram moderators through reportChat. + * @param defaultDisableNotification Default value of the disableNotification parameter, used when a message is sent to the chat. + * @param unreadCount Number of unread messages in the chat. + * @param lastReadInboxMessageId Identifier of the last read incoming message. + * @param lastReadOutboxMessageId Identifier of the last read outgoing message. + * @param unreadMentionCount Number of unread messages with a mention/reply in the chat. + * @param notificationSettings Notification settings for this chat. + * @param actionBar Describes actions which should be possible to do through a chat action bar; may be null. + * @param pinnedMessageId Identifier of the pinned message in the chat; 0 if none. + * @param replyMarkupMessageId Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat. + * @param draftMessage A draft of a message in the chat; may be null. + * @param clientData Contains application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used. + */ + public Chat(long id, ChatType type, String title, ChatPhotoInfo photo, ChatPermissions permissions, Message lastMessage, ChatPosition[] positions, boolean isMarkedAsUnread, boolean isBlocked, boolean hasScheduledMessages, boolean canBeDeletedOnlyForSelf, boolean canBeDeletedForAllUsers, boolean canBeReported, boolean defaultDisableNotification, int unreadCount, long lastReadInboxMessageId, long lastReadOutboxMessageId, int unreadMentionCount, ChatNotificationSettings notificationSettings, ChatActionBar actionBar, long pinnedMessageId, long replyMarkupMessageId, DraftMessage draftMessage, String clientData) { + this.id = id; + this.type = type; + this.title = title; + this.photo = photo; + this.permissions = permissions; + this.lastMessage = lastMessage; + this.positions = positions; + this.isMarkedAsUnread = isMarkedAsUnread; + this.isBlocked = isBlocked; + this.hasScheduledMessages = hasScheduledMessages; + this.canBeDeletedOnlyForSelf = canBeDeletedOnlyForSelf; + this.canBeDeletedForAllUsers = canBeDeletedForAllUsers; + this.canBeReported = canBeReported; + this.defaultDisableNotification = defaultDisableNotification; + this.unreadCount = unreadCount; + this.lastReadInboxMessageId = lastReadInboxMessageId; + this.lastReadOutboxMessageId = lastReadOutboxMessageId; + this.unreadMentionCount = unreadMentionCount; + this.notificationSettings = notificationSettings; + this.actionBar = actionBar; + this.pinnedMessageId = pinnedMessageId; + this.replyMarkupMessageId = replyMarkupMessageId; + this.draftMessage = draftMessage; + this.clientData = clientData; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1881489172; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the different types of activity in a chat. + */ + public abstract static class ChatAction extends Object { + } + + /** + * The user is typing a message. + */ + public static class ChatActionTyping extends ChatAction { + + /** + * The user is typing a message. + */ + public ChatActionTyping() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 380122167; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is recording a video. + */ + public static class ChatActionRecordingVideo extends ChatAction { + + /** + * The user is recording a video. + */ + public ChatActionRecordingVideo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 216553362; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is uploading a video. + */ + public static class ChatActionUploadingVideo extends ChatAction { + /** + * Upload progress, as a percentage. + */ + public int progress; + + /** + * The user is uploading a video. + */ + public ChatActionUploadingVideo() { + } + + /** + * The user is uploading a video. + * + * @param progress Upload progress, as a percentage. + */ + public ChatActionUploadingVideo(int progress) { + this.progress = progress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1234185270; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is recording a voice note. + */ + public static class ChatActionRecordingVoiceNote extends ChatAction { + + /** + * The user is recording a voice note. + */ + public ChatActionRecordingVoiceNote() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -808850058; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is uploading a voice note. + */ + public static class ChatActionUploadingVoiceNote extends ChatAction { + /** + * Upload progress, as a percentage. + */ + public int progress; + + /** + * The user is uploading a voice note. + */ + public ChatActionUploadingVoiceNote() { + } + + /** + * The user is uploading a voice note. + * + * @param progress Upload progress, as a percentage. + */ + public ChatActionUploadingVoiceNote(int progress) { + this.progress = progress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -613643666; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is uploading a photo. + */ + public static class ChatActionUploadingPhoto extends ChatAction { + /** + * Upload progress, as a percentage. + */ + public int progress; + + /** + * The user is uploading a photo. + */ + public ChatActionUploadingPhoto() { + } + + /** + * The user is uploading a photo. + * + * @param progress Upload progress, as a percentage. + */ + public ChatActionUploadingPhoto(int progress) { + this.progress = progress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 654240583; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is uploading a document. + */ + public static class ChatActionUploadingDocument extends ChatAction { + /** + * Upload progress, as a percentage. + */ + public int progress; + + /** + * The user is uploading a document. + */ + public ChatActionUploadingDocument() { + } + + /** + * The user is uploading a document. + * + * @param progress Upload progress, as a percentage. + */ + public ChatActionUploadingDocument(int progress) { + this.progress = progress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 167884362; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is picking a location or venue to send. + */ + public static class ChatActionChoosingLocation extends ChatAction { + + /** + * The user is picking a location or venue to send. + */ + public ChatActionChoosingLocation() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2017893596; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is picking a contact to send. + */ + public static class ChatActionChoosingContact extends ChatAction { + + /** + * The user is picking a contact to send. + */ + public ChatActionChoosingContact() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1222507496; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user has started to play a game. + */ + public static class ChatActionStartPlayingGame extends ChatAction { + + /** + * The user has started to play a game. + */ + public ChatActionStartPlayingGame() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -865884164; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is recording a video note. + */ + public static class ChatActionRecordingVideoNote extends ChatAction { + + /** + * The user is recording a video note. + */ + public ChatActionRecordingVideoNote() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 16523393; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is uploading a video note. + */ + public static class ChatActionUploadingVideoNote extends ChatAction { + /** + * Upload progress, as a percentage. + */ + public int progress; + + /** + * The user is uploading a video note. + */ + public ChatActionUploadingVideoNote() { + } + + /** + * The user is uploading a video note. + * + * @param progress Upload progress, as a percentage. + */ + public ChatActionUploadingVideoNote(int progress) { + this.progress = progress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1172364918; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user has cancelled the previous action. + */ + public static class ChatActionCancel extends ChatAction { + + /** + * The user has cancelled the previous action. + */ + public ChatActionCancel() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1160523958; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes actions which should be possible to do through a chat action bar. + */ + public abstract static class ChatActionBar extends Object { + } + + /** + * The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam. + */ + public static class ChatActionBarReportSpam extends ChatActionBar { + /** + * If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings. + */ + public boolean canUnarchive; + + /** + * The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam. + */ + public ChatActionBarReportSpam() { + } + + /** + * The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam. + * + * @param canUnarchive If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings. + */ + public ChatActionBarReportSpam(boolean canUnarchive) { + this.canUnarchive = canUnarchive; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1312758246; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation. + */ + public static class ChatActionBarReportUnrelatedLocation extends ChatActionBar { + + /** + * The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation. + */ + public ChatActionBarReportUnrelatedLocation() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 758175489; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method blockUser, or the other user can be added to the contact list using the method addContact. + */ + public static class ChatActionBarReportAddBlock extends ChatActionBar { + /** + * If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings. + */ + public boolean canUnarchive; + /** + * If non-negative, the current user was found by the peer through searchChatsNearby and this is the distance between the users. + */ + public int distance; + + /** + * The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method blockUser, or the other user can be added to the contact list using the method addContact. + */ + public ChatActionBarReportAddBlock() { + } + + /** + * The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method blockUser, or the other user can be added to the contact list using the method addContact. + * + * @param canUnarchive If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings. + * @param distance If non-negative, the current user was found by the peer through searchChatsNearby and this is the distance between the users. + */ + public ChatActionBarReportAddBlock(boolean canUnarchive, int distance) { + this.canUnarchive = canUnarchive; + this.distance = distance; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -914150419; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat is a private or secret chat and the other user can be added to the contact list using the method addContact. + */ + public static class ChatActionBarAddContact extends ChatActionBar { + + /** + * The chat is a private or secret chat and the other user can be added to the contact list using the method addContact. + */ + public ChatActionBarAddContact() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -733325295; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber. + */ + public static class ChatActionBarSharePhoneNumber extends ChatActionBar { + + /** + * The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber. + */ + public ChatActionBarSharePhoneNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 35188697; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a chat administrator. + */ + public static class ChatAdministrator extends Object { + /** + * User identifier of the administrator. + */ + public int userId; + /** + * Custom title of the administrator. + */ + public String customTitle; + /** + * True, if the user is the owner of the chat. + */ + public boolean isOwner; + + /** + * Contains information about a chat administrator. + */ + public ChatAdministrator() { + } + + /** + * Contains information about a chat administrator. + * + * @param userId User identifier of the administrator. + * @param customTitle Custom title of the administrator. + * @param isOwner True, if the user is the owner of the chat. + */ + public ChatAdministrator(int userId, String customTitle, boolean isOwner) { + this.userId = userId; + this.customTitle = customTitle; + this.isOwner = isOwner; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 487220942; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of chat administrators. + */ + public static class ChatAdministrators extends Object { + /** + * A list of chat administrators. + */ + public ChatAdministrator[] administrators; + + /** + * Represents a list of chat administrators. + */ + public ChatAdministrators() { + } + + /** + * Represents a list of chat administrators. + * + * @param administrators A list of chat administrators. + */ + public ChatAdministrators(ChatAdministrator[] administrators) { + this.administrators = administrators; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2126186435; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a chat event. + */ + public static class ChatEvent extends Object { + /** + * Chat event identifier. + */ + public long id; + /** + * Point in time (Unix timestamp) when the event happened. + */ + public int date; + /** + * Identifier of the user who performed the action that triggered the event. + */ + public int userId; + /** + * Action performed by the user. + */ + public ChatEventAction action; + + /** + * Represents a chat event. + */ + public ChatEvent() { + } + + /** + * Represents a chat event. + * + * @param id Chat event identifier. + * @param date Point in time (Unix timestamp) when the event happened. + * @param userId Identifier of the user who performed the action that triggered the event. + * @param action Action performed by the user. + */ + public ChatEvent(long id, int date, int userId, ChatEventAction action) { + this.id = id; + this.date = date; + this.userId = userId; + this.action = action; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -609912404; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a chat event. + */ + public abstract static class ChatEventAction extends Object { + } + + /** + * A message was edited. + */ + public static class ChatEventMessageEdited extends ChatEventAction { + /** + * The original message before the edit. + */ + public Message oldMessage; + /** + * The message after it was edited. + */ + public Message newMessage; + + /** + * A message was edited. + */ + public ChatEventMessageEdited() { + } + + /** + * A message was edited. + * + * @param oldMessage The original message before the edit. + * @param newMessage The message after it was edited. + */ + public ChatEventMessageEdited(Message oldMessage, Message newMessage) { + this.oldMessage = oldMessage; + this.newMessage = newMessage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -430967304; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message was deleted. + */ + public static class ChatEventMessageDeleted extends ChatEventAction { + /** + * Deleted message. + */ + public Message message; + + /** + * A message was deleted. + */ + public ChatEventMessageDeleted() { + } + + /** + * A message was deleted. + * + * @param message Deleted message. + */ + public ChatEventMessageDeleted(Message message) { + this.message = message; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -892974601; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A poll in a message was stopped. + */ + public static class ChatEventPollStopped extends ChatEventAction { + /** + * The message with the poll. + */ + public Message message; + + /** + * A poll in a message was stopped. + */ + public ChatEventPollStopped() { + } + + /** + * A poll in a message was stopped. + * + * @param message The message with the poll. + */ + public ChatEventPollStopped(Message message) { + this.message = message; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2009893861; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message was pinned. + */ + public static class ChatEventMessagePinned extends ChatEventAction { + /** + * Pinned message. + */ + public Message message; + + /** + * A message was pinned. + */ + public ChatEventMessagePinned() { + } + + /** + * A message was pinned. + * + * @param message Pinned message. + */ + public ChatEventMessagePinned(Message message) { + this.message = message; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 438742298; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message was unpinned. + */ + public static class ChatEventMessageUnpinned extends ChatEventAction { + + /** + * A message was unpinned. + */ + public ChatEventMessageUnpinned() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2002594849; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new member joined the chat. + */ + public static class ChatEventMemberJoined extends ChatEventAction { + + /** + * A new member joined the chat. + */ + public ChatEventMemberJoined() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -235468508; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A member left the chat. + */ + public static class ChatEventMemberLeft extends ChatEventAction { + + /** + * A member left the chat. + */ + public ChatEventMemberLeft() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -948420593; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new chat member was invited. + */ + public static class ChatEventMemberInvited extends ChatEventAction { + /** + * New member user identifier. + */ + public int userId; + /** + * New member status. + */ + public ChatMemberStatus status; + + /** + * A new chat member was invited. + */ + public ChatEventMemberInvited() { + } + + /** + * A new chat member was invited. + * + * @param userId New member user identifier. + * @param status New member status. + */ + public ChatEventMemberInvited(int userId, ChatMemberStatus status) { + this.userId = userId; + this.status = status; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2093688706; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat member has gained/lost administrator status, or the list of their administrator privileges has changed. + */ + public static class ChatEventMemberPromoted extends ChatEventAction { + /** + * Chat member user identifier. + */ + public int userId; + /** + * Previous status of the chat member. + */ + public ChatMemberStatus oldStatus; + /** + * New status of the chat member. + */ + public ChatMemberStatus newStatus; + + /** + * A chat member has gained/lost administrator status, or the list of their administrator privileges has changed. + */ + public ChatEventMemberPromoted() { + } + + /** + * A chat member has gained/lost administrator status, or the list of their administrator privileges has changed. + * + * @param userId Chat member user identifier. + * @param oldStatus Previous status of the chat member. + * @param newStatus New status of the chat member. + */ + public ChatEventMemberPromoted(int userId, ChatMemberStatus oldStatus, ChatMemberStatus newStatus) { + this.userId = userId; + this.oldStatus = oldStatus; + this.newStatus = newStatus; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1887176186; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed. + */ + public static class ChatEventMemberRestricted extends ChatEventAction { + /** + * Chat member user identifier. + */ + public int userId; + /** + * Previous status of the chat member. + */ + public ChatMemberStatus oldStatus; + /** + * New status of the chat member. + */ + public ChatMemberStatus newStatus; + + /** + * A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed. + */ + public ChatEventMemberRestricted() { + } + + /** + * A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed. + * + * @param userId Chat member user identifier. + * @param oldStatus Previous status of the chat member. + * @param newStatus New status of the chat member. + */ + public ChatEventMemberRestricted(int userId, ChatMemberStatus oldStatus, ChatMemberStatus newStatus) { + this.userId = userId; + this.oldStatus = oldStatus; + this.newStatus = newStatus; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 584946294; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat title was changed. + */ + public static class ChatEventTitleChanged extends ChatEventAction { + /** + * Previous chat title. + */ + public String oldTitle; + /** + * New chat title. + */ + public String newTitle; + + /** + * The chat title was changed. + */ + public ChatEventTitleChanged() { + } + + /** + * The chat title was changed. + * + * @param oldTitle Previous chat title. + * @param newTitle New chat title. + */ + public ChatEventTitleChanged(String oldTitle, String newTitle) { + this.oldTitle = oldTitle; + this.newTitle = newTitle; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1134103250; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat permissions was changed. + */ + public static class ChatEventPermissionsChanged extends ChatEventAction { + /** + * Previous chat permissions. + */ + public ChatPermissions oldPermissions; + /** + * New chat permissions. + */ + public ChatPermissions newPermissions; + + /** + * The chat permissions was changed. + */ + public ChatEventPermissionsChanged() { + } + + /** + * The chat permissions was changed. + * + * @param oldPermissions Previous chat permissions. + * @param newPermissions New chat permissions. + */ + public ChatEventPermissionsChanged(ChatPermissions oldPermissions, ChatPermissions newPermissions) { + this.oldPermissions = oldPermissions; + this.newPermissions = newPermissions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1311557720; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat description was changed. + */ + public static class ChatEventDescriptionChanged extends ChatEventAction { + /** + * Previous chat description. + */ + public String oldDescription; + /** + * New chat description. + */ + public String newDescription; + + /** + * The chat description was changed. + */ + public ChatEventDescriptionChanged() { + } + + /** + * The chat description was changed. + * + * @param oldDescription Previous chat description. + * @param newDescription New chat description. + */ + public ChatEventDescriptionChanged(String oldDescription, String newDescription) { + this.oldDescription = oldDescription; + this.newDescription = newDescription; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 39112478; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat username was changed. + */ + public static class ChatEventUsernameChanged extends ChatEventAction { + /** + * Previous chat username. + */ + public String oldUsername; + /** + * New chat username. + */ + public String newUsername; + + /** + * The chat username was changed. + */ + public ChatEventUsernameChanged() { + } + + /** + * The chat username was changed. + * + * @param oldUsername Previous chat username. + * @param newUsername New chat username. + */ + public ChatEventUsernameChanged(String oldUsername, String newUsername) { + this.oldUsername = oldUsername; + this.newUsername = newUsername; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1728558443; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat photo was changed. + */ + public static class ChatEventPhotoChanged extends ChatEventAction { + /** + * Previous chat photo value; may be null. + */ + public ChatPhoto oldPhoto; + /** + * New chat photo value; may be null. + */ + public ChatPhoto newPhoto; + + /** + * The chat photo was changed. + */ + public ChatEventPhotoChanged() { + } + + /** + * The chat photo was changed. + * + * @param oldPhoto Previous chat photo value; may be null. + * @param newPhoto New chat photo value; may be null. + */ + public ChatEventPhotoChanged(ChatPhoto oldPhoto, ChatPhoto newPhoto) { + this.oldPhoto = oldPhoto; + this.newPhoto = newPhoto; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -811572541; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The canInviteUsers permission of a supergroup chat was toggled. + */ + public static class ChatEventInvitesToggled extends ChatEventAction { + /** + * New value of canInviteUsers permission. + */ + public boolean canInviteUsers; + + /** + * The canInviteUsers permission of a supergroup chat was toggled. + */ + public ChatEventInvitesToggled() { + } + + /** + * The canInviteUsers permission of a supergroup chat was toggled. + * + * @param canInviteUsers New value of canInviteUsers permission. + */ + public ChatEventInvitesToggled(boolean canInviteUsers) { + this.canInviteUsers = canInviteUsers; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -62548373; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The linked chat of a supergroup was changed. + */ + public static class ChatEventLinkedChatChanged extends ChatEventAction { + /** + * Previous supergroup linked chat identifier. + */ + public long oldLinkedChatId; + /** + * New supergroup linked chat identifier. + */ + public long newLinkedChatId; + + /** + * The linked chat of a supergroup was changed. + */ + public ChatEventLinkedChatChanged() { + } + + /** + * The linked chat of a supergroup was changed. + * + * @param oldLinkedChatId Previous supergroup linked chat identifier. + * @param newLinkedChatId New supergroup linked chat identifier. + */ + public ChatEventLinkedChatChanged(long oldLinkedChatId, long newLinkedChatId) { + this.oldLinkedChatId = oldLinkedChatId; + this.newLinkedChatId = newLinkedChatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1797419439; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The slowModeDelay setting of a supergroup was changed. + */ + public static class ChatEventSlowModeDelayChanged extends ChatEventAction { + /** + * Previous value of slowModeDelay. + */ + public int oldSlowModeDelay; + /** + * New value of slowModeDelay. + */ + public int newSlowModeDelay; + + /** + * The slowModeDelay setting of a supergroup was changed. + */ + public ChatEventSlowModeDelayChanged() { + } + + /** + * The slowModeDelay setting of a supergroup was changed. + * + * @param oldSlowModeDelay Previous value of slowModeDelay. + * @param newSlowModeDelay New value of slowModeDelay. + */ + public ChatEventSlowModeDelayChanged(int oldSlowModeDelay, int newSlowModeDelay) { + this.oldSlowModeDelay = oldSlowModeDelay; + this.newSlowModeDelay = newSlowModeDelay; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1653195765; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The signMessages setting of a channel was toggled. + */ + public static class ChatEventSignMessagesToggled extends ChatEventAction { + /** + * New value of signMessages. + */ + public boolean signMessages; + + /** + * The signMessages setting of a channel was toggled. + */ + public ChatEventSignMessagesToggled() { + } + + /** + * The signMessages setting of a channel was toggled. + * + * @param signMessages New value of signMessages. + */ + public ChatEventSignMessagesToggled(boolean signMessages) { + this.signMessages = signMessages; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1313265634; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The supergroup sticker set was changed. + */ + public static class ChatEventStickerSetChanged extends ChatEventAction { + /** + * Previous identifier of the chat sticker set; 0 if none. + */ + public long oldStickerSetId; + /** + * New identifier of the chat sticker set; 0 if none. + */ + public long newStickerSetId; + + /** + * The supergroup sticker set was changed. + */ + public ChatEventStickerSetChanged() { + } + + /** + * The supergroup sticker set was changed. + * + * @param oldStickerSetId Previous identifier of the chat sticker set; 0 if none. + * @param newStickerSetId New identifier of the chat sticker set; 0 if none. + */ + public ChatEventStickerSetChanged(long oldStickerSetId, long newStickerSetId) { + this.oldStickerSetId = oldStickerSetId; + this.newStickerSetId = newStickerSetId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1243130481; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The supergroup location was changed. + */ + public static class ChatEventLocationChanged extends ChatEventAction { + /** + * Previous location; may be null. + */ + public ChatLocation oldLocation; + /** + * New location; may be null. + */ + public ChatLocation newLocation; + + /** + * The supergroup location was changed. + */ + public ChatEventLocationChanged() { + } + + /** + * The supergroup location was changed. + * + * @param oldLocation Previous location; may be null. + * @param newLocation New location; may be null. + */ + public ChatEventLocationChanged(ChatLocation oldLocation, ChatLocation newLocation) { + this.oldLocation = oldLocation; + this.newLocation = newLocation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -405930674; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The isAllHistoryAvailable setting of a supergroup was toggled. + */ + public static class ChatEventIsAllHistoryAvailableToggled extends ChatEventAction { + /** + * New value of isAllHistoryAvailable. + */ + public boolean isAllHistoryAvailable; + + /** + * The isAllHistoryAvailable setting of a supergroup was toggled. + */ + public ChatEventIsAllHistoryAvailableToggled() { + } + + /** + * The isAllHistoryAvailable setting of a supergroup was toggled. + * + * @param isAllHistoryAvailable New value of isAllHistoryAvailable. + */ + public ChatEventIsAllHistoryAvailableToggled(boolean isAllHistoryAvailable) { + this.isAllHistoryAvailable = isAllHistoryAvailable; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1599063019; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a set of filters used to obtain a chat event log. + */ + public static class ChatEventLogFilters extends Object { + /** + * True, if message edits should be returned. + */ + public boolean messageEdits; + /** + * True, if message deletions should be returned. + */ + public boolean messageDeletions; + /** + * True, if pin/unpin events should be returned. + */ + public boolean messagePins; + /** + * True, if members joining events should be returned. + */ + public boolean memberJoins; + /** + * True, if members leaving events should be returned. + */ + public boolean memberLeaves; + /** + * True, if invited member events should be returned. + */ + public boolean memberInvites; + /** + * True, if member promotion/demotion events should be returned. + */ + public boolean memberPromotions; + /** + * True, if member restricted/unrestricted/banned/unbanned events should be returned. + */ + public boolean memberRestrictions; + /** + * True, if changes in chat information should be returned. + */ + public boolean infoChanges; + /** + * True, if changes in chat settings should be returned. + */ + public boolean settingChanges; + + /** + * Represents a set of filters used to obtain a chat event log. + */ + public ChatEventLogFilters() { + } + + /** + * Represents a set of filters used to obtain a chat event log. + * + * @param messageEdits True, if message edits should be returned. + * @param messageDeletions True, if message deletions should be returned. + * @param messagePins True, if pin/unpin events should be returned. + * @param memberJoins True, if members joining events should be returned. + * @param memberLeaves True, if members leaving events should be returned. + * @param memberInvites True, if invited member events should be returned. + * @param memberPromotions True, if member promotion/demotion events should be returned. + * @param memberRestrictions True, if member restricted/unrestricted/banned/unbanned events should be returned. + * @param infoChanges True, if changes in chat information should be returned. + * @param settingChanges True, if changes in chat settings should be returned. + */ + public ChatEventLogFilters(boolean messageEdits, boolean messageDeletions, boolean messagePins, boolean memberJoins, boolean memberLeaves, boolean memberInvites, boolean memberPromotions, boolean memberRestrictions, boolean infoChanges, boolean settingChanges) { + this.messageEdits = messageEdits; + this.messageDeletions = messageDeletions; + this.messagePins = messagePins; + this.memberJoins = memberJoins; + this.memberLeaves = memberLeaves; + this.memberInvites = memberInvites; + this.memberPromotions = memberPromotions; + this.memberRestrictions = memberRestrictions; + this.infoChanges = infoChanges; + this.settingChanges = settingChanges; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 941939684; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of chat events. + */ + public static class ChatEvents extends Object { + /** + * List of events. + */ + public ChatEvent[] events; + + /** + * Contains a list of chat events. + */ + public ChatEvents() { + } + + /** + * Contains a list of chat events. + * + * @param events List of events. + */ + public ChatEvents(ChatEvent[] events) { + this.events = events; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -585329664; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a filter of user chats. + */ + public static class ChatFilter extends Object { + /** + * The title of the filter; 1-12 characters without line feeds. + */ + public String title; + /** + * The icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work". If empty, use getChatFilterDefaultIconName to get default icon name for the filter. + */ + public String iconName; + /** + * The chat identifiers of pinned chats in the filtered chat list. + */ + public long[] pinnedChatIds; + /** + * The chat identifiers of always included chats in the filtered chat list. + */ + public long[] includedChatIds; + /** + * The chat identifiers of always excluded chats in the filtered chat list. + */ + public long[] excludedChatIds; + /** + * True, if the muted chats need to be excluded. + */ + public boolean excludeMuted; + /** + * True, if read chats need to be excluded. + */ + public boolean excludeRead; + /** + * True, if archived chats need to be excluded. + */ + public boolean excludeArchived; + /** + * True, if contacts need to be included. + */ + public boolean includeContacts; + /** + * True, if non-contact users need to be included. + */ + public boolean includeNonContacts; + /** + * True, if bots need to be included. + */ + public boolean includeBots; + /** + * True, if basic groups and supergroups need to be included. + */ + public boolean includeGroups; + /** + * True, if channels need to be included. + */ + public boolean includeChannels; + + /** + * Represents a filter of user chats. + */ + public ChatFilter() { + } + + /** + * Represents a filter of user chats. + * + * @param title The title of the filter; 1-12 characters without line feeds. + * @param iconName The icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work". If empty, use getChatFilterDefaultIconName to get default icon name for the filter. + * @param pinnedChatIds The chat identifiers of pinned chats in the filtered chat list. + * @param includedChatIds The chat identifiers of always included chats in the filtered chat list. + * @param excludedChatIds The chat identifiers of always excluded chats in the filtered chat list. + * @param excludeMuted True, if the muted chats need to be excluded. + * @param excludeRead True, if read chats need to be excluded. + * @param excludeArchived True, if archived chats need to be excluded. + * @param includeContacts True, if contacts need to be included. + * @param includeNonContacts True, if non-contact users need to be included. + * @param includeBots True, if bots need to be included. + * @param includeGroups True, if basic groups and supergroups need to be included. + * @param includeChannels True, if channels need to be included. + */ + public ChatFilter(String title, String iconName, long[] pinnedChatIds, long[] includedChatIds, long[] excludedChatIds, boolean excludeMuted, boolean excludeRead, boolean excludeArchived, boolean includeContacts, boolean includeNonContacts, boolean includeBots, boolean includeGroups, boolean includeChannels) { + this.title = title; + this.iconName = iconName; + this.pinnedChatIds = pinnedChatIds; + this.includedChatIds = includedChatIds; + this.excludedChatIds = excludedChatIds; + this.excludeMuted = excludeMuted; + this.excludeRead = excludeRead; + this.excludeArchived = excludeArchived; + this.includeContacts = includeContacts; + this.includeNonContacts = includeNonContacts; + this.includeBots = includeBots; + this.includeGroups = includeGroups; + this.includeChannels = includeChannels; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -664815123; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains basic information about a chat filter. + */ + public static class ChatFilterInfo extends Object { + /** + * Unique chat filter identifier. + */ + public int id; + /** + * The title of the filter; 1-12 characters without line feeds. + */ + public String title; + /** + * The icon name for short filter representation. One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work". + */ + public String iconName; + + /** + * Contains basic information about a chat filter. + */ + public ChatFilterInfo() { + } + + /** + * Contains basic information about a chat filter. + * + * @param id Unique chat filter identifier. + * @param title The title of the filter; 1-12 characters without line feeds. + * @param iconName The icon name for short filter representation. One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work". + */ + public ChatFilterInfo(int id, String title, String iconName) { + this.id = id; + this.title = title; + this.iconName = iconName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -943721165; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a chat invite link. + */ + public static class ChatInviteLink extends Object { + /** + * Chat invite link. + */ + public String inviteLink; + + /** + * Contains a chat invite link. + */ + public ChatInviteLink() { + } + + /** + * Contains a chat invite link. + * + * @param inviteLink Chat invite link. + */ + public ChatInviteLink(String inviteLink) { + this.inviteLink = inviteLink; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -882072492; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a chat invite link. + */ + public static class ChatInviteLinkInfo extends Object { + /** + * Chat identifier of the invite link; 0 if the user has no access to the chat before joining. + */ + public long chatId; + /** + * If non-zero, the remaining time for which read access is granted to the chat, in seconds. + */ + public int accessibleFor; + /** + * Contains information about the type of the chat. + */ + public ChatType type; + /** + * Title of the chat. + */ + public String title; + /** + * Chat photo; may be null. + */ + public ChatPhotoInfo photo; + /** + * Number of members in the chat. + */ + public int memberCount; + /** + * User identifiers of some chat members that may be known to the current user. + */ + public int[] memberUserIds; + /** + * True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup. + */ + public boolean isPublic; + + /** + * Contains information about a chat invite link. + */ + public ChatInviteLinkInfo() { + } + + /** + * Contains information about a chat invite link. + * + * @param chatId Chat identifier of the invite link; 0 if the user has no access to the chat before joining. + * @param accessibleFor If non-zero, the remaining time for which read access is granted to the chat, in seconds. + * @param type Contains information about the type of the chat. + * @param title Title of the chat. + * @param photo Chat photo; may be null. + * @param memberCount Number of members in the chat. + * @param memberUserIds User identifiers of some chat members that may be known to the current user. + * @param isPublic True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup. + */ + public ChatInviteLinkInfo(long chatId, int accessibleFor, ChatType type, String title, ChatPhotoInfo photo, int memberCount, int[] memberUserIds, boolean isPublic) { + this.chatId = chatId; + this.accessibleFor = accessibleFor; + this.type = type; + this.title = title; + this.photo = photo; + this.memberCount = memberCount; + this.memberUserIds = memberUserIds; + this.isPublic = isPublic; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 910695551; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a list of chats. + */ + public abstract static class ChatList extends Object { + } + + /** + * A main list of chats. + */ + public static class ChatListMain extends ChatList { + + /** + * A main list of chats. + */ + public ChatListMain() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -400991316; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives. + */ + public static class ChatListArchive extends ChatList { + + /** + * A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives. + */ + public ChatListArchive() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 362770115; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A list of chats belonging to a chat filter. + */ + public static class ChatListFilter extends ChatList { + /** + * Chat filter identifier. + */ + public int chatFilterId; + + /** + * A list of chats belonging to a chat filter. + */ + public ChatListFilter() { + } + + /** + * A list of chats belonging to a chat filter. + * + * @param chatFilterId Chat filter identifier. + */ + public ChatListFilter(int chatFilterId) { + this.chatFilterId = chatFilterId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2022707655; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of chat lists. + */ + public static class ChatLists extends Object { + /** + * List of chat lists. + */ + public ChatList[] chatLists; + + /** + * Contains a list of chat lists. + */ + public ChatLists() { + } + + /** + * Contains a list of chat lists. + * + * @param chatLists List of chat lists. + */ + public ChatLists(ChatList[] chatLists) { + this.chatLists = chatLists; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -258292771; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a location to which a chat is connected. + */ + public static class ChatLocation extends Object { + /** + * The location. + */ + public Location location; + /** + * Location address; 1-64 characters, as defined by the chat owner. + */ + public String address; + + /** + * Represents a location to which a chat is connected. + */ + public ChatLocation() { + } + + /** + * Represents a location to which a chat is connected. + * + * @param location The location. + * @param address Location address; 1-64 characters, as defined by the chat owner. + */ + public ChatLocation(Location location, String address) { + this.location = location; + this.address = address; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1566863583; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A user with information about joining/leaving a chat. + */ + public static class ChatMember extends Object { + /** + * User identifier of the chat member. + */ + public int userId; + /** + * Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown. + */ + public int inviterUserId; + /** + * Point in time (Unix timestamp) when the user joined the chat. + */ + public int joinedChatDate; + /** + * Status of the member in the chat. + */ + public ChatMemberStatus status; + /** + * If the user is a bot, information about the bot; may be null. Can be null even for a bot if the bot is not the chat member. + */ + public BotInfo botInfo; + + /** + * A user with information about joining/leaving a chat. + */ + public ChatMember() { + } + + /** + * A user with information about joining/leaving a chat. + * + * @param userId User identifier of the chat member. + * @param inviterUserId Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown. + * @param joinedChatDate Point in time (Unix timestamp) when the user joined the chat. + * @param status Status of the member in the chat. + * @param botInfo If the user is a bot, information about the bot; may be null. Can be null even for a bot if the bot is not the chat member. + */ + public ChatMember(int userId, int inviterUserId, int joinedChatDate, ChatMemberStatus status, BotInfo botInfo) { + this.userId = userId; + this.inviterUserId = inviterUserId; + this.joinedChatDate = joinedChatDate; + this.status = status; + this.botInfo = botInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -806137076; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Provides information about the status of a member in a chat. + */ + public abstract static class ChatMemberStatus extends Object { + } + + /** + * The user is the owner of a chat and has all the administrator privileges. + */ + public static class ChatMemberStatusCreator extends ChatMemberStatus { + /** + * A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only. + */ + public String customTitle; + /** + * True, if the creator isn't shown in the chat member list and sends messages anonymously. + */ + public boolean isAnonymous; + /** + * True, if the user is a member of the chat. + */ + public boolean isMember; + + /** + * The user is the owner of a chat and has all the administrator privileges. + */ + public ChatMemberStatusCreator() { + } + + /** + * The user is the owner of a chat and has all the administrator privileges. + * + * @param customTitle A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only. + * @param isAnonymous True, if the creator isn't shown in the chat member list and sends messages anonymously. + * @param isMember True, if the user is a member of the chat. + */ + public ChatMemberStatusCreator(String customTitle, boolean isAnonymous, boolean isMember) { + this.customTitle = customTitle; + this.isAnonymous = isAnonymous; + this.isMember = isMember; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -160019714; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges. + */ + public static class ChatMemberStatusAdministrator extends ChatMemberStatus { + /** + * A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only. + */ + public String customTitle; + /** + * True, if the current user can edit the administrator privileges for the called user. + */ + public boolean canBeEdited; + /** + * True, if the administrator can change the chat title, photo, and other settings. + */ + public boolean canChangeInfo; + /** + * True, if the administrator can create channel posts; applicable to channels only. + */ + public boolean canPostMessages; + /** + * True, if the administrator can edit messages of other users and pin messages; applicable to channels only. + */ + public boolean canEditMessages; + /** + * True, if the administrator can delete messages of other users. + */ + public boolean canDeleteMessages; + /** + * True, if the administrator can invite new users to the chat. + */ + public boolean canInviteUsers; + /** + * True, if the administrator can restrict, ban, or unban chat members. + */ + public boolean canRestrictMembers; + /** + * True, if the administrator can pin messages; applicable to groups only. + */ + public boolean canPinMessages; + /** + * True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them. + */ + public boolean canPromoteMembers; + /** + * True, if the administrator isn't shown in the chat member list and sends messages anonymously. + */ + public boolean isAnonymous; + + /** + * The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges. + */ + public ChatMemberStatusAdministrator() { + } + + /** + * The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges. + * + * @param customTitle A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only. + * @param canBeEdited True, if the current user can edit the administrator privileges for the called user. + * @param canChangeInfo True, if the administrator can change the chat title, photo, and other settings. + * @param canPostMessages True, if the administrator can create channel posts; applicable to channels only. + * @param canEditMessages True, if the administrator can edit messages of other users and pin messages; applicable to channels only. + * @param canDeleteMessages True, if the administrator can delete messages of other users. + * @param canInviteUsers True, if the administrator can invite new users to the chat. + * @param canRestrictMembers True, if the administrator can restrict, ban, or unban chat members. + * @param canPinMessages True, if the administrator can pin messages; applicable to groups only. + * @param canPromoteMembers True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them. + * @param isAnonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously. + */ + public ChatMemberStatusAdministrator(String customTitle, boolean canBeEdited, boolean canChangeInfo, boolean canPostMessages, boolean canEditMessages, boolean canDeleteMessages, boolean canInviteUsers, boolean canRestrictMembers, boolean canPinMessages, boolean canPromoteMembers, boolean isAnonymous) { + this.customTitle = customTitle; + this.canBeEdited = canBeEdited; + this.canChangeInfo = canChangeInfo; + this.canPostMessages = canPostMessages; + this.canEditMessages = canEditMessages; + this.canDeleteMessages = canDeleteMessages; + this.canInviteUsers = canInviteUsers; + this.canRestrictMembers = canRestrictMembers; + this.canPinMessages = canPinMessages; + this.canPromoteMembers = canPromoteMembers; + this.isAnonymous = isAnonymous; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 222495835; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is a member of a chat, without any additional privileges or restrictions. + */ + public static class ChatMemberStatusMember extends ChatMemberStatus { + + /** + * The user is a member of a chat, without any additional privileges or restrictions. + */ + public ChatMemberStatusMember() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 844723285; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is under certain restrictions in the chat. Not supported in basic groups and channels. + */ + public static class ChatMemberStatusRestricted extends ChatMemberStatus { + /** + * True, if the user is a member of the chat. + */ + public boolean isMember; + /** + * Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever. + */ + public int restrictedUntilDate; + /** + * User permissions in the chat. + */ + public ChatPermissions permissions; + + /** + * The user is under certain restrictions in the chat. Not supported in basic groups and channels. + */ + public ChatMemberStatusRestricted() { + } + + /** + * The user is under certain restrictions in the chat. Not supported in basic groups and channels. + * + * @param isMember True, if the user is a member of the chat. + * @param restrictedUntilDate Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever. + * @param permissions User permissions in the chat. + */ + public ChatMemberStatusRestricted(boolean isMember, int restrictedUntilDate, ChatPermissions permissions) { + this.isMember = isMember; + this.restrictedUntilDate = restrictedUntilDate; + this.permissions = permissions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1661432998; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is not a chat member. + */ + public static class ChatMemberStatusLeft extends ChatMemberStatus { + + /** + * The user is not a chat member. + */ + public ChatMemberStatusLeft() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -5815259; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user was banned (and hence is not a member of the chat). Implies the user can't return to the chat or view messages. + */ + public static class ChatMemberStatusBanned extends ChatMemberStatus { + /** + * Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. + */ + public int bannedUntilDate; + + /** + * The user was banned (and hence is not a member of the chat). Implies the user can't return to the chat or view messages. + */ + public ChatMemberStatusBanned() { + } + + /** + * The user was banned (and hence is not a member of the chat). Implies the user can't return to the chat or view messages. + * + * @param bannedUntilDate Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. + */ + public ChatMemberStatusBanned(int bannedUntilDate) { + this.bannedUntilDate = bannedUntilDate; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1653518666; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of chat members. + */ + public static class ChatMembers extends Object { + /** + * Approximate total count of chat members found. + */ + public int totalCount; + /** + * A list of chat members. + */ + public ChatMember[] members; + + /** + * Contains a list of chat members. + */ + public ChatMembers() { + } + + /** + * Contains a list of chat members. + * + * @param totalCount Approximate total count of chat members found. + * @param members A list of chat members. + */ + public ChatMembers(int totalCount, ChatMember[] members) { + this.totalCount = totalCount; + this.members = members; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -497558622; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Specifies the kind of chat members to return in searchChatMembers. + */ + public abstract static class ChatMembersFilter extends Object { + } + + /** + * Returns contacts of the user. + */ + public static class ChatMembersFilterContacts extends ChatMembersFilter { + + /** + * Returns contacts of the user. + */ + public ChatMembersFilterContacts() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1774485671; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the owner and administrators. + */ + public static class ChatMembersFilterAdministrators extends ChatMembersFilter { + + /** + * Returns the owner and administrators. + */ + public ChatMembersFilterAdministrators() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1266893796; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all chat members, including restricted chat members. + */ + public static class ChatMembersFilterMembers extends ChatMembersFilter { + + /** + * Returns all chat members, including restricted chat members. + */ + public ChatMembersFilterMembers() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 670504342; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup. + */ + public static class ChatMembersFilterRestricted extends ChatMembersFilter { + + /** + * Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup. + */ + public ChatMembersFilterRestricted() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1256282813; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel. + */ + public static class ChatMembersFilterBanned extends ChatMembersFilter { + + /** + * Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel. + */ + public ChatMembersFilterBanned() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1863102648; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns bot members of the chat. + */ + public static class ChatMembersFilterBots extends ChatMembersFilter { + + /** + * Returns bot members of the chat. + */ + public ChatMembersFilterBots() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1422567288; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a chat located nearby. + */ + public static class ChatNearby extends Object { + /** + * Chat identifier. + */ + public long chatId; + /** + * Distance to the chat location in meters. + */ + public int distance; + + /** + * Describes a chat located nearby. + */ + public ChatNearby() { + } + + /** + * Describes a chat located nearby. + * + * @param chatId Chat identifier. + * @param distance Distance to the chat location in meters. + */ + public ChatNearby(long chatId, int distance) { + this.chatId = chatId; + this.distance = distance; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 48120405; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about notification settings for a chat. + */ + public static class ChatNotificationSettings extends Object { + /** + * If true, muteFor is ignored and the value for the relevant type of chat is used instead. + */ + public boolean useDefaultMuteFor; + /** + * Time left before notifications will be unmuted, in seconds. + */ + public int muteFor; + /** + * If true, sound is ignored and the value for the relevant type of chat is used instead. + */ + public boolean useDefaultSound; + /** + * The name of an audio file to be used for notification sounds; only applies to iOS applications. + */ + public String sound; + /** + * If true, showPreview is ignored and the value for the relevant type of chat is used instead. + */ + public boolean useDefaultShowPreview; + /** + * True, if message content should be displayed in notifications. + */ + public boolean showPreview; + /** + * If true, disablePinnedMessageNotifications is ignored and the value for the relevant type of chat is used instead. + */ + public boolean useDefaultDisablePinnedMessageNotifications; + /** + * If true, notifications for incoming pinned messages will be created as for an ordinary unread message. + */ + public boolean disablePinnedMessageNotifications; + /** + * If true, disableMentionNotifications is ignored and the value for the relevant type of chat is used instead. + */ + public boolean useDefaultDisableMentionNotifications; + /** + * If true, notifications for messages with mentions will be created as for an ordinary unread message. + */ + public boolean disableMentionNotifications; + + /** + * Contains information about notification settings for a chat. + */ + public ChatNotificationSettings() { + } + + /** + * Contains information about notification settings for a chat. + * + * @param useDefaultMuteFor If true, muteFor is ignored and the value for the relevant type of chat is used instead. + * @param muteFor Time left before notifications will be unmuted, in seconds. + * @param useDefaultSound If true, sound is ignored and the value for the relevant type of chat is used instead. + * @param sound The name of an audio file to be used for notification sounds; only applies to iOS applications. + * @param useDefaultShowPreview If true, showPreview is ignored and the value for the relevant type of chat is used instead. + * @param showPreview True, if message content should be displayed in notifications. + * @param useDefaultDisablePinnedMessageNotifications If true, disablePinnedMessageNotifications is ignored and the value for the relevant type of chat is used instead. + * @param disablePinnedMessageNotifications If true, notifications for incoming pinned messages will be created as for an ordinary unread message. + * @param useDefaultDisableMentionNotifications If true, disableMentionNotifications is ignored and the value for the relevant type of chat is used instead. + * @param disableMentionNotifications If true, notifications for messages with mentions will be created as for an ordinary unread message. + */ + public ChatNotificationSettings(boolean useDefaultMuteFor, int muteFor, boolean useDefaultSound, String sound, boolean useDefaultShowPreview, boolean showPreview, boolean useDefaultDisablePinnedMessageNotifications, boolean disablePinnedMessageNotifications, boolean useDefaultDisableMentionNotifications, boolean disableMentionNotifications) { + this.useDefaultMuteFor = useDefaultMuteFor; + this.muteFor = muteFor; + this.useDefaultSound = useDefaultSound; + this.sound = sound; + this.useDefaultShowPreview = useDefaultShowPreview; + this.showPreview = showPreview; + this.useDefaultDisablePinnedMessageNotifications = useDefaultDisablePinnedMessageNotifications; + this.disablePinnedMessageNotifications = disablePinnedMessageNotifications; + this.useDefaultDisableMentionNotifications = useDefaultDisableMentionNotifications; + this.disableMentionNotifications = disableMentionNotifications; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1503183218; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes actions that a user is allowed to take in a chat. + */ + public static class ChatPermissions extends Object { + /** + * True, if the user can send text messages, contacts, locations, and venues. + */ + public boolean canSendMessages; + /** + * True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies canSendMessages permissions. + */ + public boolean canSendMediaMessages; + /** + * True, if the user can send polls. Implies canSendMessages permissions. + */ + public boolean canSendPolls; + /** + * True, if the user can send animations, games, stickers, and dice and use inline bots. Implies canSendMessages permissions. + */ + public boolean canSendOtherMessages; + /** + * True, if the user may add a web page preview to their messages. Implies canSendMessages permissions. + */ + public boolean canAddWebPagePreviews; + /** + * True, if the user can change the chat title, photo, and other settings. + */ + public boolean canChangeInfo; + /** + * True, if the user can invite new users to the chat. + */ + public boolean canInviteUsers; + /** + * True, if the user can pin messages. + */ + public boolean canPinMessages; + + /** + * Describes actions that a user is allowed to take in a chat. + */ + public ChatPermissions() { + } + + /** + * Describes actions that a user is allowed to take in a chat. + * + * @param canSendMessages True, if the user can send text messages, contacts, locations, and venues. + * @param canSendMediaMessages True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies canSendMessages permissions. + * @param canSendPolls True, if the user can send polls. Implies canSendMessages permissions. + * @param canSendOtherMessages True, if the user can send animations, games, stickers, and dice and use inline bots. Implies canSendMessages permissions. + * @param canAddWebPagePreviews True, if the user may add a web page preview to their messages. Implies canSendMessages permissions. + * @param canChangeInfo True, if the user can change the chat title, photo, and other settings. + * @param canInviteUsers True, if the user can invite new users to the chat. + * @param canPinMessages True, if the user can pin messages. + */ + public ChatPermissions(boolean canSendMessages, boolean canSendMediaMessages, boolean canSendPolls, boolean canSendOtherMessages, boolean canAddWebPagePreviews, boolean canChangeInfo, boolean canInviteUsers, boolean canPinMessages) { + this.canSendMessages = canSendMessages; + this.canSendMediaMessages = canSendMediaMessages; + this.canSendPolls = canSendPolls; + this.canSendOtherMessages = canSendOtherMessages; + this.canAddWebPagePreviews = canAddWebPagePreviews; + this.canChangeInfo = canChangeInfo; + this.canInviteUsers = canInviteUsers; + this.canPinMessages = canPinMessages; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1584650463; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a chat or user profile photo. + */ + public static class ChatPhoto extends Object { + /** + * Unique photo identifier. + */ + public long id; + /** + * Point in time (Unix timestamp) when the photo has been added. + */ + public int addedDate; + /** + * Photo minithumbnail; may be null. + */ + public Minithumbnail minithumbnail; + /** + * Available variants of the photo in JPEG format, in different size. + */ + public PhotoSize[] sizes; + /** + * Animated variant of the photo in MPEG4 format; may be null. + */ + public AnimatedChatPhoto animation; + + /** + * Describes a chat or user profile photo. + */ + public ChatPhoto() { + } + + /** + * Describes a chat or user profile photo. + * + * @param id Unique photo identifier. + * @param addedDate Point in time (Unix timestamp) when the photo has been added. + * @param minithumbnail Photo minithumbnail; may be null. + * @param sizes Available variants of the photo in JPEG format, in different size. + * @param animation Animated variant of the photo in MPEG4 format; may be null. + */ + public ChatPhoto(long id, int addedDate, Minithumbnail minithumbnail, PhotoSize[] sizes, AnimatedChatPhoto animation) { + this.id = id; + this.addedDate = addedDate; + this.minithumbnail = minithumbnail; + this.sizes = sizes; + this.animation = animation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -113003577; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains basic information about the photo of a chat. + */ + public static class ChatPhotoInfo extends Object { + /** + * A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed. + */ + public File small; + /** + * A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed. + */ + public File big; + /** + * True, if the photo has animated variant. + */ + public boolean hasAnimation; + + /** + * Contains basic information about the photo of a chat. + */ + public ChatPhotoInfo() { + } + + /** + * Contains basic information about the photo of a chat. + * + * @param small A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed. + * @param big A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed. + * @param hasAnimation True, if the photo has animated variant. + */ + public ChatPhotoInfo(File small, File big, boolean hasAnimation) { + this.small = small; + this.big = big; + this.hasAnimation = hasAnimation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 404510091; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of chat or user profile photos. + */ + public static class ChatPhotos extends Object { + /** + * Total number of photos. + */ + public int totalCount; + /** + * List of photos. + */ + public ChatPhoto[] photos; + + /** + * Contains a list of chat or user profile photos. + */ + public ChatPhotos() { + } + + /** + * Contains a list of chat or user profile photos. + * + * @param totalCount Total number of photos. + * @param photos List of photos. + */ + public ChatPhotos(int totalCount, ChatPhoto[] photos) { + this.totalCount = totalCount; + this.photos = photos; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1510699180; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a position of a chat in a chat list. + */ + public static class ChatPosition extends Object { + /** + * The chat list. + */ + public ChatList list; + /** + * A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order. + */ + public long order; + /** + * True, if the chat is pinned in the chat list. + */ + public boolean isPinned; + /** + * Source of the chat in the chat list; may be null. + */ + public ChatSource source; + + /** + * Describes a position of a chat in a chat list. + */ + public ChatPosition() { + } + + /** + * Describes a position of a chat in a chat list. + * + * @param list The chat list. + * @param order A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order. + * @param isPinned True, if the chat is pinned in the chat list. + * @param source Source of the chat in the chat list; may be null. + */ + public ChatPosition(ChatList list, long order, boolean isPinned, ChatSource source) { + this.list = list; + this.order = order; + this.isPinned = isPinned; + this.source = source; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -622557355; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the reason why a chat is reported. + */ + public abstract static class ChatReportReason extends Object { + } + + /** + * The chat contains spam messages. + */ + public static class ChatReportReasonSpam extends ChatReportReason { + + /** + * The chat contains spam messages. + */ + public ChatReportReasonSpam() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -510848863; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat promotes violence. + */ + public static class ChatReportReasonViolence extends ChatReportReason { + + /** + * The chat promotes violence. + */ + public ChatReportReasonViolence() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1330235395; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat contains pornographic messages. + */ + public static class ChatReportReasonPornography extends ChatReportReason { + + /** + * The chat contains pornographic messages. + */ + public ChatReportReasonPornography() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 722614385; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat has child abuse related content. + */ + public static class ChatReportReasonChildAbuse extends ChatReportReason { + + /** + * The chat has child abuse related content. + */ + public ChatReportReasonChildAbuse() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1070686531; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat contains copyrighted content. + */ + public static class ChatReportReasonCopyright extends ChatReportReason { + + /** + * The chat contains copyrighted content. + */ + public ChatReportReasonCopyright() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 986898080; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The location-based chat is unrelated to its stated location. + */ + public static class ChatReportReasonUnrelatedLocation extends ChatReportReason { + + /** + * The location-based chat is unrelated to its stated location. + */ + public ChatReportReasonUnrelatedLocation() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2632403; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A custom reason provided by the user. + */ + public static class ChatReportReasonCustom extends ChatReportReason { + /** + * Report text. + */ + public String text; + + /** + * A custom reason provided by the user. + */ + public ChatReportReasonCustom() { + } + + /** + * A custom reason provided by the user. + * + * @param text Report text. + */ + public ChatReportReasonCustom(String text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 544575454; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a reason why an external chat is shown in a chat list. + */ + public abstract static class ChatSource extends Object { + } + + /** + * The chat is sponsored by the user's MTProxy server. + */ + public static class ChatSourceMtprotoProxy extends ChatSource { + + /** + * The chat is sponsored by the user's MTProxy server. + */ + public ChatSourceMtprotoProxy() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 394074115; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat contains a public service announcement. + */ + public static class ChatSourcePublicServiceAnnouncement extends ChatSource { + /** + * The type of the announcement. + */ + public String type; + /** + * The text of the announcement. + */ + public String text; + + /** + * The chat contains a public service announcement. + */ + public ChatSourcePublicServiceAnnouncement() { + } + + /** + * The chat contains a public service announcement. + * + * @param type The type of the announcement. + * @param text The text of the announcement. + */ + public ChatSourcePublicServiceAnnouncement(String type, String text) { + this.type = type; + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -328571244; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains a detailed statistics about a chat. + */ + public abstract static class ChatStatistics extends Object { + } + + /** + * A detailed statistics about a supergroup chat. + */ + public static class ChatStatisticsSupergroup extends ChatStatistics { + /** + * A period to which the statistics applies. + */ + public DateRange period; + /** + * Number of members in the chat. + */ + public StatisticsValue memberCount; + /** + * Number of messages sent to the chat. + */ + public StatisticsValue messageCount; + /** + * Number of users who viewed messages in the chat. + */ + public StatisticsValue viewerCount; + /** + * Number of users who sent messages to the chat. + */ + public StatisticsValue senderCount; + /** + * A graph containing number of members in the chat. + */ + public StatisticsGraph memberCountGraph; + /** + * A graph containing number of members joined and left the chat. + */ + public StatisticsGraph joinGraph; + /** + * A graph containing number of new member joins per source. + */ + public StatisticsGraph joinBySourceGraph; + /** + * A graph containing distribution of active users per language. + */ + public StatisticsGraph languageGraph; + /** + * A graph containing distribution of sent messages by content type. + */ + public StatisticsGraph messageContentGraph; + /** + * A graph containing number of different actions in the chat. + */ + public StatisticsGraph actionGraph; + /** + * A graph containing distribution of message views per hour. + */ + public StatisticsGraph dayGraph; + /** + * A graph containing distribution of message views per day of week. + */ + public StatisticsGraph weekGraph; + /** + * List of users sent most messages in the last week. + */ + public ChatStatisticsMessageSenderInfo[] topSenders; + /** + * List of most active administrators in the last week. + */ + public ChatStatisticsAdministratorActionsInfo[] topAdministrators; + /** + * List of most active inviters of new members in the last week. + */ + public ChatStatisticsInviterInfo[] topInviters; + + /** + * A detailed statistics about a supergroup chat. + */ + public ChatStatisticsSupergroup() { + } + + /** + * A detailed statistics about a supergroup chat. + * + * @param period A period to which the statistics applies. + * @param memberCount Number of members in the chat. + * @param messageCount Number of messages sent to the chat. + * @param viewerCount Number of users who viewed messages in the chat. + * @param senderCount Number of users who sent messages to the chat. + * @param memberCountGraph A graph containing number of members in the chat. + * @param joinGraph A graph containing number of members joined and left the chat. + * @param joinBySourceGraph A graph containing number of new member joins per source. + * @param languageGraph A graph containing distribution of active users per language. + * @param messageContentGraph A graph containing distribution of sent messages by content type. + * @param actionGraph A graph containing number of different actions in the chat. + * @param dayGraph A graph containing distribution of message views per hour. + * @param weekGraph A graph containing distribution of message views per day of week. + * @param topSenders List of users sent most messages in the last week. + * @param topAdministrators List of most active administrators in the last week. + * @param topInviters List of most active inviters of new members in the last week. + */ + public ChatStatisticsSupergroup(DateRange period, StatisticsValue memberCount, StatisticsValue messageCount, StatisticsValue viewerCount, StatisticsValue senderCount, StatisticsGraph memberCountGraph, StatisticsGraph joinGraph, StatisticsGraph joinBySourceGraph, StatisticsGraph languageGraph, StatisticsGraph messageContentGraph, StatisticsGraph actionGraph, StatisticsGraph dayGraph, StatisticsGraph weekGraph, ChatStatisticsMessageSenderInfo[] topSenders, ChatStatisticsAdministratorActionsInfo[] topAdministrators, ChatStatisticsInviterInfo[] topInviters) { + this.period = period; + this.memberCount = memberCount; + this.messageCount = messageCount; + this.viewerCount = viewerCount; + this.senderCount = senderCount; + this.memberCountGraph = memberCountGraph; + this.joinGraph = joinGraph; + this.joinBySourceGraph = joinBySourceGraph; + this.languageGraph = languageGraph; + this.messageContentGraph = messageContentGraph; + this.actionGraph = actionGraph; + this.dayGraph = dayGraph; + this.weekGraph = weekGraph; + this.topSenders = topSenders; + this.topAdministrators = topAdministrators; + this.topInviters = topInviters; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1234327223; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A detailed statistics about a channel chat. + */ + public static class ChatStatisticsChannel extends ChatStatistics { + /** + * A period to which the statistics applies. + */ + public DateRange period; + /** + * Number of members in the chat. + */ + public StatisticsValue memberCount; + /** + * Mean number of times the recently sent messages was viewed. + */ + public StatisticsValue meanViewCount; + /** + * Mean number of times the recently sent messages was shared. + */ + public StatisticsValue meanShareCount; + /** + * A percentage of users with enabled notifications for the chat. + */ + public double enabledNotificationsPercentage; + /** + * A graph containing number of members in the chat. + */ + public StatisticsGraph memberCountGraph; + /** + * A graph containing number of members joined and left the chat. + */ + public StatisticsGraph joinGraph; + /** + * A graph containing number of members muted and unmuted the chat. + */ + public StatisticsGraph muteGraph; + /** + * A graph containing number of message views in a given hour in the last two weeks. + */ + public StatisticsGraph viewCountByHourGraph; + /** + * A graph containing number of message views per source. + */ + public StatisticsGraph viewCountBySourceGraph; + /** + * A graph containing number of new member joins per source. + */ + public StatisticsGraph joinBySourceGraph; + /** + * A graph containing number of users viewed chat messages per language. + */ + public StatisticsGraph languageGraph; + /** + * A graph containing number of chat message views and shares. + */ + public StatisticsGraph messageInteractionGraph; + /** + * A graph containing number of views of associated with the chat instant views. + */ + public StatisticsGraph instantViewInteractionGraph; + /** + * Detailed statistics about number of views and shares of recently sent messages. + */ + public ChatStatisticsMessageInteractionInfo[] recentMessageInteractions; + + /** + * A detailed statistics about a channel chat. + */ + public ChatStatisticsChannel() { + } + + /** + * A detailed statistics about a channel chat. + * + * @param period A period to which the statistics applies. + * @param memberCount Number of members in the chat. + * @param meanViewCount Mean number of times the recently sent messages was viewed. + * @param meanShareCount Mean number of times the recently sent messages was shared. + * @param enabledNotificationsPercentage A percentage of users with enabled notifications for the chat. + * @param memberCountGraph A graph containing number of members in the chat. + * @param joinGraph A graph containing number of members joined and left the chat. + * @param muteGraph A graph containing number of members muted and unmuted the chat. + * @param viewCountByHourGraph A graph containing number of message views in a given hour in the last two weeks. + * @param viewCountBySourceGraph A graph containing number of message views per source. + * @param joinBySourceGraph A graph containing number of new member joins per source. + * @param languageGraph A graph containing number of users viewed chat messages per language. + * @param messageInteractionGraph A graph containing number of chat message views and shares. + * @param instantViewInteractionGraph A graph containing number of views of associated with the chat instant views. + * @param recentMessageInteractions Detailed statistics about number of views and shares of recently sent messages. + */ + public ChatStatisticsChannel(DateRange period, StatisticsValue memberCount, StatisticsValue meanViewCount, StatisticsValue meanShareCount, double enabledNotificationsPercentage, StatisticsGraph memberCountGraph, StatisticsGraph joinGraph, StatisticsGraph muteGraph, StatisticsGraph viewCountByHourGraph, StatisticsGraph viewCountBySourceGraph, StatisticsGraph joinBySourceGraph, StatisticsGraph languageGraph, StatisticsGraph messageInteractionGraph, StatisticsGraph instantViewInteractionGraph, ChatStatisticsMessageInteractionInfo[] recentMessageInteractions) { + this.period = period; + this.memberCount = memberCount; + this.meanViewCount = meanViewCount; + this.meanShareCount = meanShareCount; + this.enabledNotificationsPercentage = enabledNotificationsPercentage; + this.memberCountGraph = memberCountGraph; + this.joinGraph = joinGraph; + this.muteGraph = muteGraph; + this.viewCountByHourGraph = viewCountByHourGraph; + this.viewCountBySourceGraph = viewCountBySourceGraph; + this.joinBySourceGraph = joinBySourceGraph; + this.languageGraph = languageGraph; + this.messageInteractionGraph = messageInteractionGraph; + this.instantViewInteractionGraph = instantViewInteractionGraph; + this.recentMessageInteractions = recentMessageInteractions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -326982581; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains statistics about administrator actions done by a user. + */ + public static class ChatStatisticsAdministratorActionsInfo extends Object { + /** + * Administrator user identifier. + */ + public int userId; + /** + * Number of messages deleted by the administrator. + */ + public int deletedMessageCount; + /** + * Number of users banned by the administrator. + */ + public int bannedUserCount; + /** + * Number of users restricted by the administrator. + */ + public int restrictedUserCount; + + /** + * Contains statistics about administrator actions done by a user. + */ + public ChatStatisticsAdministratorActionsInfo() { + } + + /** + * Contains statistics about administrator actions done by a user. + * + * @param userId Administrator user identifier. + * @param deletedMessageCount Number of messages deleted by the administrator. + * @param bannedUserCount Number of users banned by the administrator. + * @param restrictedUserCount Number of users restricted by the administrator. + */ + public ChatStatisticsAdministratorActionsInfo(int userId, int deletedMessageCount, int bannedUserCount, int restrictedUserCount) { + this.userId = userId; + this.deletedMessageCount = deletedMessageCount; + this.bannedUserCount = bannedUserCount; + this.restrictedUserCount = restrictedUserCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1988384904; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains statistics about number of new members invited by a user. + */ + public static class ChatStatisticsInviterInfo extends Object { + /** + * User identifier. + */ + public int userId; + /** + * Number of new members invited by the user. + */ + public int addedMemberCount; + + /** + * Contains statistics about number of new members invited by a user. + */ + public ChatStatisticsInviterInfo() { + } + + /** + * Contains statistics about number of new members invited by a user. + * + * @param userId User identifier. + * @param addedMemberCount Number of new members invited by the user. + */ + public ChatStatisticsInviterInfo(int userId, int addedMemberCount) { + this.userId = userId; + this.addedMemberCount = addedMemberCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -399517859; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains statistics about interactions with a message. + */ + public static class ChatStatisticsMessageInteractionInfo extends Object { + /** + * Message identifier. + */ + public long messageId; + /** + * Number of times the message was viewed. + */ + public int viewCount; + /** + * Number of times the message was forwarded. + */ + public int forwardCount; + + /** + * Contains statistics about interactions with a message. + */ + public ChatStatisticsMessageInteractionInfo() { + } + + /** + * Contains statistics about interactions with a message. + * + * @param messageId Message identifier. + * @param viewCount Number of times the message was viewed. + * @param forwardCount Number of times the message was forwarded. + */ + public ChatStatisticsMessageInteractionInfo(long messageId, int viewCount, int forwardCount) { + this.messageId = messageId; + this.viewCount = viewCount; + this.forwardCount = forwardCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -765580756; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains statistics about messages sent by a user. + */ + public static class ChatStatisticsMessageSenderInfo extends Object { + /** + * User identifier. + */ + public int userId; + /** + * Number of sent messages. + */ + public int sentMessageCount; + /** + * Average number of characters in sent messages. + */ + public int averageCharacterCount; + + /** + * Contains statistics about messages sent by a user. + */ + public ChatStatisticsMessageSenderInfo() { + } + + /** + * Contains statistics about messages sent by a user. + * + * @param userId User identifier. + * @param sentMessageCount Number of sent messages. + * @param averageCharacterCount Average number of characters in sent messages. + */ + public ChatStatisticsMessageSenderInfo(int userId, int sentMessageCount, int averageCharacterCount) { + this.userId = userId; + this.sentMessageCount = sentMessageCount; + this.averageCharacterCount = averageCharacterCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1716075179; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the type of a chat. + */ + public abstract static class ChatType extends Object { + } + + /** + * An ordinary chat with a user. + */ + public static class ChatTypePrivate extends ChatType { + /** + * User identifier. + */ + public int userId; + + /** + * An ordinary chat with a user. + */ + public ChatTypePrivate() { + } + + /** + * An ordinary chat with a user. + * + * @param userId User identifier. + */ + public ChatTypePrivate(int userId) { + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1700720838; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A basic group (i.e., a chat with 0-200 other users). + */ + public static class ChatTypeBasicGroup extends ChatType { + /** + * Basic group identifier. + */ + public int basicGroupId; + + /** + * A basic group (i.e., a chat with 0-200 other users). + */ + public ChatTypeBasicGroup() { + } + + /** + * A basic group (i.e., a chat with 0-200 other users). + * + * @param basicGroupId Basic group identifier. + */ + public ChatTypeBasicGroup(int basicGroupId) { + this.basicGroupId = basicGroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 21815278; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members). + */ + public static class ChatTypeSupergroup extends ChatType { + /** + * Supergroup or channel identifier. + */ + public int supergroupId; + /** + * True, if the supergroup is a channel. + */ + public boolean isChannel; + + /** + * A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members). + */ + public ChatTypeSupergroup() { + } + + /** + * A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members). + * + * @param supergroupId Supergroup or channel identifier. + * @param isChannel True, if the supergroup is a channel. + */ + public ChatTypeSupergroup(int supergroupId, boolean isChannel) { + this.supergroupId = supergroupId; + this.isChannel = isChannel; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 955152366; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A secret chat with a user. + */ + public static class ChatTypeSecret extends ChatType { + /** + * Secret chat identifier. + */ + public int secretChatId; + /** + * User identifier of the secret chat peer. + */ + public int userId; + + /** + * A secret chat with a user. + */ + public ChatTypeSecret() { + } + + /** + * A secret chat with a user. + * + * @param secretChatId Secret chat identifier. + * @param userId User identifier of the secret chat peer. + */ + public ChatTypeSecret(int secretChatId, int userId) { + this.secretChatId = secretChatId; + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 136722563; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of chats. + */ + public static class Chats extends Object { + /** + * Approximate total count of chats found. + */ + public int totalCount; + /** + * List of chat identifiers. + */ + public long[] chatIds; + + /** + * Represents a list of chats. + */ + public Chats() { + } + + /** + * Represents a list of chats. + * + * @param totalCount Approximate total count of chats found. + * @param chatIds List of chat identifiers. + */ + public Chats(int totalCount, long[] chatIds) { + this.totalCount = totalCount; + this.chatIds = chatIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1809654812; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of chats located nearby. + */ + public static class ChatsNearby extends Object { + /** + * List of users nearby. + */ + public ChatNearby[] usersNearby; + /** + * List of location-based supergroups nearby. + */ + public ChatNearby[] supergroupsNearby; + + /** + * Represents a list of chats located nearby. + */ + public ChatsNearby() { + } + + /** + * Represents a list of chats located nearby. + * + * @param usersNearby List of users nearby. + * @param supergroupsNearby List of location-based supergroups nearby. + */ + public ChatsNearby(ChatNearby[] usersNearby, ChatNearby[] supergroupsNearby) { + this.usersNearby = usersNearby; + this.supergroupsNearby = supergroupsNearby; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 187746081; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents result of checking whether a username can be set for a chat. + */ + public abstract static class CheckChatUsernameResult extends Object { + } + + /** + * The username can be set. + */ + public static class CheckChatUsernameResultOk extends CheckChatUsernameResult { + + /** + * The username can be set. + */ + public CheckChatUsernameResultOk() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1498956964; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The username is invalid. + */ + public static class CheckChatUsernameResultUsernameInvalid extends CheckChatUsernameResult { + + /** + * The username is invalid. + */ + public CheckChatUsernameResultUsernameInvalid() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -636979370; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The username is occupied. + */ + public static class CheckChatUsernameResultUsernameOccupied extends CheckChatUsernameResult { + + /** + * The username is occupied. + */ + public CheckChatUsernameResultUsernameOccupied() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1320892201; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user has too much chats with username, one of them should be made private first. + */ + public static class CheckChatUsernameResultPublicChatsTooMuch extends CheckChatUsernameResult { + + /** + * The user has too much chats with username, one of them should be made private first. + */ + public CheckChatUsernameResultPublicChatsTooMuch() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 858247741; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user can't be a member of a public supergroup. + */ + public static class CheckChatUsernameResultPublicGroupsUnavailable extends CheckChatUsernameResult { + + /** + * The user can't be a member of a public supergroup. + */ + public CheckChatUsernameResultPublicGroupsUnavailable() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -51833641; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about one website the current user is logged in with Telegram. + */ + public static class ConnectedWebsite extends Object { + /** + * Website identifier. + */ + public long id; + /** + * The domain name of the website. + */ + public String domainName; + /** + * User identifier of a bot linked with the website. + */ + public int botUserId; + /** + * The version of a browser used to log in. + */ + public String browser; + /** + * Operating system the browser is running on. + */ + public String platform; + /** + * Point in time (Unix timestamp) when the user was logged in. + */ + public int logInDate; + /** + * Point in time (Unix timestamp) when obtained authorization was last used. + */ + public int lastActiveDate; + /** + * IP address from which the user was logged in, in human-readable format. + */ + public String ip; + /** + * Human-readable description of a country and a region, from which the user was logged in, based on the IP address. + */ + public String location; + + /** + * Contains information about one website the current user is logged in with Telegram. + */ + public ConnectedWebsite() { + } + + /** + * Contains information about one website the current user is logged in with Telegram. + * + * @param id Website identifier. + * @param domainName The domain name of the website. + * @param botUserId User identifier of a bot linked with the website. + * @param browser The version of a browser used to log in. + * @param platform Operating system the browser is running on. + * @param logInDate Point in time (Unix timestamp) when the user was logged in. + * @param lastActiveDate Point in time (Unix timestamp) when obtained authorization was last used. + * @param ip IP address from which the user was logged in, in human-readable format. + * @param location Human-readable description of a country and a region, from which the user was logged in, based on the IP address. + */ + public ConnectedWebsite(long id, String domainName, int botUserId, String browser, String platform, int logInDate, int lastActiveDate, String ip, String location) { + this.id = id; + this.domainName = domainName; + this.botUserId = botUserId; + this.browser = browser; + this.platform = platform; + this.logInDate = logInDate; + this.lastActiveDate = lastActiveDate; + this.ip = ip; + this.location = location; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1538986855; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of websites the current user is logged in with Telegram. + */ + public static class ConnectedWebsites extends Object { + /** + * List of connected websites. + */ + public ConnectedWebsite[] websites; + + /** + * Contains a list of websites the current user is logged in with Telegram. + */ + public ConnectedWebsites() { + } + + /** + * Contains a list of websites the current user is logged in with Telegram. + * + * @param websites List of connected websites. + */ + public ConnectedWebsites(ConnectedWebsite[] websites) { + this.websites = websites; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1727949694; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the current state of the connection to Telegram servers. + */ + public abstract static class ConnectionState extends Object { + } + + /** + * Currently waiting for the network to become available. Use setNetworkType to change the available network type. + */ + public static class ConnectionStateWaitingForNetwork extends ConnectionState { + + /** + * Currently waiting for the network to become available. Use setNetworkType to change the available network type. + */ + public ConnectionStateWaitingForNetwork() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1695405912; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Currently establishing a connection with a proxy server. + */ + public static class ConnectionStateConnectingToProxy extends ConnectionState { + + /** + * Currently establishing a connection with a proxy server. + */ + public ConnectionStateConnectingToProxy() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -93187239; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Currently establishing a connection to the Telegram servers. + */ + public static class ConnectionStateConnecting extends ConnectionState { + + /** + * Currently establishing a connection to the Telegram servers. + */ + public ConnectionStateConnecting() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1298400670; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Downloading data received while the application was offline. + */ + public static class ConnectionStateUpdating extends ConnectionState { + + /** + * Downloading data received while the application was offline. + */ + public ConnectionStateUpdating() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -188104009; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * There is a working connection to the Telegram servers. + */ + public static class ConnectionStateReady extends ConnectionState { + + /** + * There is a working connection to the Telegram servers. + */ + public ConnectionStateReady() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 48608492; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a user contact. + */ + public static class Contact extends Object { + /** + * Phone number of the user. + */ + public String phoneNumber; + /** + * First name of the user; 1-255 characters in length. + */ + public String firstName; + /** + * Last name of the user. + */ + public String lastName; + /** + * Additional data about the user in a form of vCard; 0-2048 bytes in length. + */ + public String vcard; + /** + * Identifier of the user, if known; otherwise 0. + */ + public int userId; + + /** + * Describes a user contact. + */ + public Contact() { + } + + /** + * Describes a user contact. + * + * @param phoneNumber Phone number of the user. + * @param firstName First name of the user; 1-255 characters in length. + * @param lastName Last name of the user. + * @param vcard Additional data about the user in a form of vCard; 0-2048 bytes in length. + * @param userId Identifier of the user, if known; otherwise 0. + */ + public Contact(String phoneNumber, String firstName, String lastName, String vcard, int userId) { + this.phoneNumber = phoneNumber; + this.firstName = firstName; + this.lastName = lastName; + this.vcard = vcard; + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1483002540; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a counter. + */ + public static class Count extends Object { + /** + * Count. + */ + public int count; + + /** + * Contains a counter. + */ + public Count() { + } + + /** + * Contains a counter. + * + * @param count Count. + */ + public Count(int count) { + this.count = count; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1295577348; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about countries. + */ + public static class Countries extends Object { + /** + * The list of countries. + */ + public CountryInfo[] countries; + + /** + * Contains information about countries. + */ + public Countries() { + } + + /** + * Contains information about countries. + * + * @param countries The list of countries. + */ + public Countries(CountryInfo[] countries) { + this.countries = countries; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1854211813; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a country. + */ + public static class CountryInfo extends Object { + /** + * A two-letter ISO 3166-1 alpha-2 country code. + */ + public String countryCode; + /** + * Native name of the country. + */ + public String name; + /** + * English name of the country. + */ + public String englishName; + /** + * True, if the country should be hidden from the list of all countries. + */ + public boolean isHidden; + /** + * List of country calling codes. + */ + public String[] callingCodes; + + /** + * Contains information about a country. + */ + public CountryInfo() { + } + + /** + * Contains information about a country. + * + * @param countryCode A two-letter ISO 3166-1 alpha-2 country code. + * @param name Native name of the country. + * @param englishName English name of the country. + * @param isHidden True, if the country should be hidden from the list of all countries. + * @param callingCodes List of country calling codes. + */ + public CountryInfo(String countryCode, String name, String englishName, boolean isHidden, String[] callingCodes) { + this.countryCode = countryCode; + this.name = name; + this.englishName = englishName; + this.isHidden = isHidden; + this.callingCodes = callingCodes; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1617195722; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the result of a custom request. + */ + public static class CustomRequestResult extends Object { + /** + * A JSON-serialized result. + */ + public String result; + + /** + * Contains the result of a custom request. + */ + public CustomRequestResult() { + } + + /** + * Contains the result of a custom request. + * + * @param result A JSON-serialized result. + */ + public CustomRequestResult(String result) { + this.result = result; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2009960452; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains database statistics. + */ + public static class DatabaseStatistics extends Object { + /** + * Database statistics in an unspecified human-readable format. + */ + public String statistics; + + /** + * Contains database statistics. + */ + public DatabaseStatistics() { + } + + /** + * Contains database statistics. + * + * @param statistics Database statistics in an unspecified human-readable format. + */ + public DatabaseStatistics(String statistics) { + this.statistics = statistics; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1123912880; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a date according to the Gregorian calendar. + */ + public static class Date extends Object { + /** + * Day of the month, 1-31. + */ + public int day; + /** + * Month, 1-12. + */ + public int month; + /** + * Year, 1-9999. + */ + public int year; + + /** + * Represents a date according to the Gregorian calendar. + */ + public Date() { + } + + /** + * Represents a date according to the Gregorian calendar. + * + * @param day Day of the month, 1-31. + * @param month Month, 1-12. + * @param year Year, 1-9999. + */ + public Date(int day, int month, int year) { + this.day = day; + this.month = month; + this.year = year; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -277956960; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a date range. + */ + public static class DateRange extends Object { + /** + * Point in time (Unix timestamp) at which the date range begins. + */ + public int startDate; + /** + * Point in time (Unix timestamp) at which the date range ends. + */ + public int endDate; + + /** + * Represents a date range. + */ + public DateRange() { + } + + /** + * Represents a date range. + * + * @param startDate Point in time (Unix timestamp) at which the date range begins. + * @param endDate Point in time (Unix timestamp) at which the date range ends. + */ + public DateRange(int startDate, int endDate) { + this.startDate = startDate; + this.endDate = endDate; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1360333926; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * File with the date it was uploaded. + */ + public static class DatedFile extends Object { + /** + * The file. + */ + public File file; + /** + * Point in time (Unix timestamp) when the file was uploaded. + */ + public int date; + + /** + * File with the date it was uploaded. + */ + public DatedFile() { + } + + /** + * File with the date it was uploaded. + * + * @param file The file. + * @param date Point in time (Unix timestamp) when the file was uploaded. + */ + public DatedFile(File file, int date) { + this.file = file; + this.date = date; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1840795491; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a tg:// deep link. + */ + public static class DeepLinkInfo extends Object { + /** + * Text to be shown to the user. + */ + public FormattedText text; + /** + * True, if user should be asked to update the application. + */ + public boolean needUpdateApplication; + + /** + * Contains information about a tg:// deep link. + */ + public DeepLinkInfo() { + } + + /** + * Contains information about a tg:// deep link. + * + * @param text Text to be shown to the user. + * @param needUpdateApplication True, if user should be asked to update the application. + */ + public DeepLinkInfo(FormattedText text, boolean needUpdateApplication) { + this.text = text; + this.needUpdateApplication = needUpdateApplication; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1864081662; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org. + */ + public abstract static class DeviceToken extends Object { + } + + /** + * A token for Firebase Cloud Messaging. + */ + public static class DeviceTokenFirebaseCloudMessaging extends DeviceToken { + /** + * Device registration token; may be empty to de-register a device. + */ + public String token; + /** + * True, if push notifications should be additionally encrypted. + */ + public boolean encrypt; + + /** + * A token for Firebase Cloud Messaging. + */ + public DeviceTokenFirebaseCloudMessaging() { + } + + /** + * A token for Firebase Cloud Messaging. + * + * @param token Device registration token; may be empty to de-register a device. + * @param encrypt True, if push notifications should be additionally encrypted. + */ + public DeviceTokenFirebaseCloudMessaging(String token, boolean encrypt) { + this.token = token; + this.encrypt = encrypt; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -797881849; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for Apple Push Notification service. + */ + public static class DeviceTokenApplePush extends DeviceToken { + /** + * Device token; may be empty to de-register a device. + */ + public String deviceToken; + /** + * True, if App Sandbox is enabled. + */ + public boolean isAppSandbox; + + /** + * A token for Apple Push Notification service. + */ + public DeviceTokenApplePush() { + } + + /** + * A token for Apple Push Notification service. + * + * @param deviceToken Device token; may be empty to de-register a device. + * @param isAppSandbox True, if App Sandbox is enabled. + */ + public DeviceTokenApplePush(String deviceToken, boolean isAppSandbox) { + this.deviceToken = deviceToken; + this.isAppSandbox = isAppSandbox; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 387541955; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for Apple Push Notification service VoIP notifications. + */ + public static class DeviceTokenApplePushVoIP extends DeviceToken { + /** + * Device token; may be empty to de-register a device. + */ + public String deviceToken; + /** + * True, if App Sandbox is enabled. + */ + public boolean isAppSandbox; + /** + * True, if push notifications should be additionally encrypted. + */ + public boolean encrypt; + + /** + * A token for Apple Push Notification service VoIP notifications. + */ + public DeviceTokenApplePushVoIP() { + } + + /** + * A token for Apple Push Notification service VoIP notifications. + * + * @param deviceToken Device token; may be empty to de-register a device. + * @param isAppSandbox True, if App Sandbox is enabled. + * @param encrypt True, if push notifications should be additionally encrypted. + */ + public DeviceTokenApplePushVoIP(String deviceToken, boolean isAppSandbox, boolean encrypt) { + this.deviceToken = deviceToken; + this.isAppSandbox = isAppSandbox; + this.encrypt = encrypt; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 804275689; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for Windows Push Notification Services. + */ + public static class DeviceTokenWindowsPush extends DeviceToken { + /** + * The access token that will be used to send notifications; may be empty to de-register a device. + */ + public String accessToken; + + /** + * A token for Windows Push Notification Services. + */ + public DeviceTokenWindowsPush() { + } + + /** + * A token for Windows Push Notification Services. + * + * @param accessToken The access token that will be used to send notifications; may be empty to de-register a device. + */ + public DeviceTokenWindowsPush(String accessToken) { + this.accessToken = accessToken; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1410514289; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for Microsoft Push Notification Service. + */ + public static class DeviceTokenMicrosoftPush extends DeviceToken { + /** + * Push notification channel URI; may be empty to de-register a device. + */ + public String channelUri; + + /** + * A token for Microsoft Push Notification Service. + */ + public DeviceTokenMicrosoftPush() { + } + + /** + * A token for Microsoft Push Notification Service. + * + * @param channelUri Push notification channel URI; may be empty to de-register a device. + */ + public DeviceTokenMicrosoftPush(String channelUri) { + this.channelUri = channelUri; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1224269900; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for Microsoft Push Notification Service VoIP channel. + */ + public static class DeviceTokenMicrosoftPushVoIP extends DeviceToken { + /** + * Push notification channel URI; may be empty to de-register a device. + */ + public String channelUri; + + /** + * A token for Microsoft Push Notification Service VoIP channel. + */ + public DeviceTokenMicrosoftPushVoIP() { + } + + /** + * A token for Microsoft Push Notification Service VoIP channel. + * + * @param channelUri Push notification channel URI; may be empty to de-register a device. + */ + public DeviceTokenMicrosoftPushVoIP(String channelUri) { + this.channelUri = channelUri; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -785603759; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for web Push API. + */ + public static class DeviceTokenWebPush extends DeviceToken { + /** + * Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device. + */ + public String endpoint; + /** + * Base64url-encoded P-256 elliptic curve Diffie-Hellman public key. + */ + public String p256dhBase64url; + /** + * Base64url-encoded authentication secret. + */ + public String authBase64url; + + /** + * A token for web Push API. + */ + public DeviceTokenWebPush() { + } + + /** + * A token for web Push API. + * + * @param endpoint Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device. + * @param p256dhBase64url Base64url-encoded P-256 elliptic curve Diffie-Hellman public key. + * @param authBase64url Base64url-encoded authentication secret. + */ + public DeviceTokenWebPush(String endpoint, String p256dhBase64url, String authBase64url) { + this.endpoint = endpoint; + this.p256dhBase64url = p256dhBase64url; + this.authBase64url = authBase64url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1694507273; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for Simple Push API for Firefox OS. + */ + public static class DeviceTokenSimplePush extends DeviceToken { + /** + * Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device. + */ + public String endpoint; + + /** + * A token for Simple Push API for Firefox OS. + */ + public DeviceTokenSimplePush() { + } + + /** + * A token for Simple Push API for Firefox OS. + * + * @param endpoint Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device. + */ + public DeviceTokenSimplePush(String endpoint) { + this.endpoint = endpoint; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 49584736; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for Ubuntu Push Client service. + */ + public static class DeviceTokenUbuntuPush extends DeviceToken { + /** + * Token; may be empty to de-register a device. + */ + public String token; + + /** + * A token for Ubuntu Push Client service. + */ + public DeviceTokenUbuntuPush() { + } + + /** + * A token for Ubuntu Push Client service. + * + * @param token Token; may be empty to de-register a device. + */ + public DeviceTokenUbuntuPush(String token) { + this.token = token; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1782320422; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for BlackBerry Push Service. + */ + public static class DeviceTokenBlackBerryPush extends DeviceToken { + /** + * Token; may be empty to de-register a device. + */ + public String token; + + /** + * A token for BlackBerry Push Service. + */ + public DeviceTokenBlackBerryPush() { + } + + /** + * A token for BlackBerry Push Service. + * + * @param token Token; may be empty to de-register a device. + */ + public DeviceTokenBlackBerryPush(String token) { + this.token = token; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1559167234; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A token for Tizen Push Service. + */ + public static class DeviceTokenTizenPush extends DeviceToken { + /** + * Push service registration identifier; may be empty to de-register a device. + */ + public String regId; + + /** + * A token for Tizen Push Service. + */ + public DeviceTokenTizenPush() { + } + + /** + * A token for Tizen Push Service. + * + * @param regId Push service registration identifier; may be empty to de-register a device. + */ + public DeviceTokenTizenPush(String regId) { + this.regId = regId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1359947213; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a document of any type. + */ + public static class Document extends Object { + /** + * Original name of the file; as defined by the sender. + */ + public String fileName; + /** + * MIME type of the file; as defined by the sender. + */ + public String mimeType; + /** + * Document minithumbnail; may be null. + */ + public Minithumbnail minithumbnail; + /** + * Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null. + */ + public Thumbnail thumbnail; + /** + * File containing the document. + */ + public File document; + + /** + * Describes a document of any type. + */ + public Document() { + } + + /** + * Describes a document of any type. + * + * @param fileName Original name of the file; as defined by the sender. + * @param mimeType MIME type of the file; as defined by the sender. + * @param minithumbnail Document minithumbnail; may be null. + * @param thumbnail Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null. + * @param document File containing the document. + */ + public Document(String fileName, String mimeType, Minithumbnail minithumbnail, Thumbnail thumbnail, File document) { + this.fileName = fileName; + this.mimeType = mimeType; + this.minithumbnail = minithumbnail; + this.thumbnail = thumbnail; + this.document = document; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1357271080; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a message draft. + */ + public static class DraftMessage extends Object { + /** + * Identifier of the message to reply to; 0 if none. + */ + public long replyToMessageId; + /** + * Point in time (Unix timestamp) when the draft was created. + */ + public int date; + /** + * Content of the message draft; this should always be of type inputMessageText. + */ + public InputMessageContent inputMessageText; + + /** + * Contains information about a message draft. + */ + public DraftMessage() { + } + + /** + * Contains information about a message draft. + * + * @param replyToMessageId Identifier of the message to reply to; 0 if none. + * @param date Point in time (Unix timestamp) when the draft was created. + * @param inputMessageText Content of the message draft; this should always be of type inputMessageText. + */ + public DraftMessage(long replyToMessageId, int date, InputMessageContent inputMessageText) { + this.replyToMessageId = replyToMessageId; + this.date = date; + this.inputMessageText = inputMessageText; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1373050112; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Information about the email address authentication code that was sent. + */ + public static class EmailAddressAuthenticationCodeInfo extends Object { + /** + * Pattern of the email address to which an authentication code was sent. + */ + public String emailAddressPattern; + /** + * Length of the code; 0 if unknown. + */ + public int length; + + /** + * Information about the email address authentication code that was sent. + */ + public EmailAddressAuthenticationCodeInfo() { + } + + /** + * Information about the email address authentication code that was sent. + * + * @param emailAddressPattern Pattern of the email address to which an authentication code was sent. + * @param length Length of the code; 0 if unknown. + */ + public EmailAddressAuthenticationCodeInfo(String emailAddressPattern, int length) { + this.emailAddressPattern = emailAddressPattern; + this.length = length; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1151066659; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of emoji. + */ + public static class Emojis extends Object { + /** + * List of emojis. + */ + public String[] emojis; + + /** + * Represents a list of emoji. + */ + public Emojis() { + } + + /** + * Represents a list of emoji. + * + * @param emojis List of emojis. + */ + public Emojis(String[] emojis) { + this.emojis = emojis; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 950339552; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains encrypted Telegram Passport data credentials. + */ + public static class EncryptedCredentials extends Object { + /** + * The encrypted credentials. + */ + public byte[] data; + /** + * The decrypted data hash. + */ + public byte[] hash; + /** + * Secret for data decryption, encrypted with the service's public key. + */ + public byte[] secret; + + /** + * Contains encrypted Telegram Passport data credentials. + */ + public EncryptedCredentials() { + } + + /** + * Contains encrypted Telegram Passport data credentials. + * + * @param data The encrypted credentials. + * @param hash The decrypted data hash. + * @param secret Secret for data decryption, encrypted with the service's public key. + */ + public EncryptedCredentials(byte[] data, byte[] hash, byte[] secret) { + this.data = data; + this.hash = hash; + this.secret = secret; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1331106766; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about an encrypted Telegram Passport element; for bots only. + */ + public static class EncryptedPassportElement extends Object { + /** + * Type of Telegram Passport element. + */ + public PassportElementType type; + /** + * Encrypted JSON-encoded data about the user. + */ + public byte[] data; + /** + * The front side of an identity document. + */ + public DatedFile frontSide; + /** + * The reverse side of an identity document; may be null. + */ + public DatedFile reverseSide; + /** + * Selfie with the document; may be null. + */ + public DatedFile selfie; + /** + * List of files containing a certified English translation of the document. + */ + public DatedFile[] translation; + /** + * List of attached files. + */ + public DatedFile[] files; + /** + * Unencrypted data, phone number or email address. + */ + public String value; + /** + * Hash of the entire element. + */ + public String hash; + + /** + * Contains information about an encrypted Telegram Passport element; for bots only. + */ + public EncryptedPassportElement() { + } + + /** + * Contains information about an encrypted Telegram Passport element; for bots only. + * + * @param type Type of Telegram Passport element. + * @param data Encrypted JSON-encoded data about the user. + * @param frontSide The front side of an identity document. + * @param reverseSide The reverse side of an identity document; may be null. + * @param selfie Selfie with the document; may be null. + * @param translation List of files containing a certified English translation of the document. + * @param files List of attached files. + * @param value Unencrypted data, phone number or email address. + * @param hash Hash of the entire element. + */ + public EncryptedPassportElement(PassportElementType type, byte[] data, DatedFile frontSide, DatedFile reverseSide, DatedFile selfie, DatedFile[] translation, DatedFile[] files, String value, String hash) { + this.type = type; + this.data = data; + this.frontSide = frontSide; + this.reverseSide = reverseSide; + this.selfie = selfie; + this.translation = translation; + this.files = files; + this.value = value; + this.hash = hash; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2002386193; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An object of this type can be returned on every function call, in case of an error. + */ + public static class Error extends Object { + /** + * Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user. + */ + public int code; + /** + * Error message; subject to future changes. + */ + public String message; + + /** + * An object of this type can be returned on every function call, in case of an error. + */ + public Error() { + } + + /** + * An object of this type can be returned on every function call, in case of an error. + * + * @param code Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user. + * @param message Error message; subject to future changes. + */ + public Error(int code, String message) { + this.code = code; + this.message = message; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1679978726; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a file. + */ + public static class File extends Object { + /** + * Unique file identifier. + */ + public int id; + /** + * File size; 0 if unknown. + */ + public int size; + /** + * Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress. + */ + public int expectedSize; + /** + * Information about the local copy of the file. + */ + public LocalFile local; + /** + * Information about the remote copy of the file. + */ + public RemoteFile remote; + + /** + * Represents a file. + */ + public File() { + } + + /** + * Represents a file. + * + * @param id Unique file identifier. + * @param size File size; 0 if unknown. + * @param expectedSize Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress. + * @param local Information about the local copy of the file. + * @param remote Information about the remote copy of the file. + */ + public File(int id, int size, int expectedSize, LocalFile local, RemoteFile remote) { + this.id = id; + this.size = size; + this.expectedSize = expectedSize; + this.local = local; + this.remote = remote; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 766337656; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a part of a file. + */ + public static class FilePart extends Object { + /** + * File bytes. + */ + public byte[] data; + + /** + * Contains a part of a file. + */ + public FilePart() { + } + + /** + * Contains a part of a file. + * + * @param data File bytes. + */ + public FilePart(byte[] data) { + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 911821878; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents the type of a file. + */ + public abstract static class FileType extends Object { + } + + /** + * The data is not a file. + */ + public static class FileTypeNone extends FileType { + + /** + * The data is not a file. + */ + public FileTypeNone() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2003009189; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is an animation. + */ + public static class FileTypeAnimation extends FileType { + + /** + * The file is an animation. + */ + public FileTypeAnimation() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -290816582; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is an audio file. + */ + public static class FileTypeAudio extends FileType { + + /** + * The file is an audio file. + */ + public FileTypeAudio() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -709112160; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a document. + */ + public static class FileTypeDocument extends FileType { + + /** + * The file is a document. + */ + public FileTypeDocument() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -564722929; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a photo. + */ + public static class FileTypePhoto extends FileType { + + /** + * The file is a photo. + */ + public FileTypePhoto() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1718914651; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a profile photo. + */ + public static class FileTypeProfilePhoto extends FileType { + + /** + * The file is a profile photo. + */ + public FileTypeProfilePhoto() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1795089315; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file was sent to a secret chat (the file type is not known to the server). + */ + public static class FileTypeSecret extends FileType { + + /** + * The file was sent to a secret chat (the file type is not known to the server). + */ + public FileTypeSecret() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1871899401; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a thumbnail of a file from a secret chat. + */ + public static class FileTypeSecretThumbnail extends FileType { + + /** + * The file is a thumbnail of a file from a secret chat. + */ + public FileTypeSecretThumbnail() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1401326026; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a file from Secure storage used for storing Telegram Passport files. + */ + public static class FileTypeSecure extends FileType { + + /** + * The file is a file from Secure storage used for storing Telegram Passport files. + */ + public FileTypeSecure() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1419133146; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a sticker. + */ + public static class FileTypeSticker extends FileType { + + /** + * The file is a sticker. + */ + public FileTypeSticker() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 475233385; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a thumbnail of another file. + */ + public static class FileTypeThumbnail extends FileType { + + /** + * The file is a thumbnail of another file. + */ + public FileTypeThumbnail() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -12443298; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file type is not yet known. + */ + public static class FileTypeUnknown extends FileType { + + /** + * The file type is not yet known. + */ + public FileTypeUnknown() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2011566768; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a video. + */ + public static class FileTypeVideo extends FileType { + + /** + * The file is a video. + */ + public FileTypeVideo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1430816539; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a video note. + */ + public static class FileTypeVideoNote extends FileType { + + /** + * The file is a video note. + */ + public FileTypeVideoNote() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -518412385; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a voice note. + */ + public static class FileTypeVoiceNote extends FileType { + + /** + * The file is a voice note. + */ + public FileTypeVoiceNote() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -588681661; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file is a wallpaper or a background pattern. + */ + public static class FileTypeWallpaper extends FileType { + + /** + * The file is a wallpaper or a background pattern. + */ + public FileTypeWallpaper() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1854930076; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A text with some entities. + */ + public static class FormattedText extends Object { + /** + * The text. + */ + public String text; + /** + * Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. Pre, Code and PreCode entities can't contain other entities. Bold, Italic, Underline and Strikethrough entities can contain and to be contained in all other entities. All other entities can't contain each other. + */ + public TextEntity[] entities; + + /** + * A text with some entities. + */ + public FormattedText() { + } + + /** + * A text with some entities. + * + * @param text The text. + * @param entities Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. Pre, Code and PreCode entities can't contain other entities. Bold, Italic, Underline and Strikethrough entities can contain and to be contained in all other entities. All other entities can't contain each other. + */ + public FormattedText(String text, TextEntity[] entities) { + this.text = text; + this.entities = entities; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -252624564; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of messages found by a search. + */ + public static class FoundMessages extends Object { + /** + * Approximate total count of messages found; -1 if unknown. + */ + public int totalCount; + /** + * List of messages. + */ + public Message[] messages; + /** + * The offset for the next request. If empty, there are no more results. + */ + public String nextOffset; + + /** + * Contains a list of messages found by a search. + */ + public FoundMessages() { + } + + /** + * Contains a list of messages found by a search. + * + * @param totalCount Approximate total count of messages found; -1 if unknown. + * @param messages List of messages. + * @param nextOffset The offset for the next request. If empty, there are no more results. + */ + public FoundMessages(int totalCount, Message[] messages, String nextOffset) { + this.totalCount = totalCount; + this.messages = messages; + this.nextOffset = nextOffset; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -529809608; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a game. + */ + public static class Game extends Object { + /** + * Game ID. + */ + public long id; + /** + * Game short name. To share a game use the URL https://t.me/{botUsername}?game={gameShortName}. + */ + public String shortName; + /** + * Game title. + */ + public String title; + /** + * Game text, usually containing scoreboards for a game. + */ + public FormattedText text; + /** + * Game description. + */ + public String description; + /** + * Game photo. + */ + public Photo photo; + /** + * Game animation; may be null. + */ + public Animation animation; + + /** + * Describes a game. + */ + public Game() { + } + + /** + * Describes a game. + * + * @param id Game ID. + * @param shortName Game short name. To share a game use the URL https://t.me/{botUsername}?game={gameShortName}. + * @param title Game title. + * @param text Game text, usually containing scoreboards for a game. + * @param description Game description. + * @param photo Game photo. + * @param animation Game animation; may be null. + */ + public Game(long id, String shortName, String title, FormattedText text, String description, Photo photo, Animation animation) { + this.id = id; + this.shortName = shortName; + this.title = title; + this.text = text; + this.description = description; + this.photo = photo; + this.animation = animation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1565597752; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains one row of the game high score table. + */ + public static class GameHighScore extends Object { + /** + * Position in the high score table. + */ + public int position; + /** + * User identifier. + */ + public int userId; + /** + * User score. + */ + public int score; + + /** + * Contains one row of the game high score table. + */ + public GameHighScore() { + } + + /** + * Contains one row of the game high score table. + * + * @param position Position in the high score table. + * @param userId User identifier. + * @param score User score. + */ + public GameHighScore(int position, int userId, int score) { + this.position = position; + this.userId = userId; + this.score = score; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -30778358; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of game high scores. + */ + public static class GameHighScores extends Object { + /** + * A list of game high scores. + */ + public GameHighScore[] scores; + + /** + * Contains a list of game high scores. + */ + public GameHighScores() { + } + + /** + * Contains a list of game high scores. + * + * @param scores A list of game high scores. + */ + public GameHighScores(GameHighScore[] scores) { + this.scores = scores; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -725770727; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of hashtags. + */ + public static class Hashtags extends Object { + /** + * A list of hashtags. + */ + public String[] hashtags; + + /** + * Contains a list of hashtags. + */ + public Hashtags() { + } + + /** + * Contains a list of hashtags. + * + * @param hashtags A list of hashtags. + */ + public Hashtags(String[] hashtags) { + this.hashtags = hashtags; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 676798885; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains an HTTP URL. + */ + public static class HttpUrl extends Object { + /** + * The URL. + */ + public String url; + + /** + * Contains an HTTP URL. + */ + public HttpUrl() { + } + + /** + * Contains an HTTP URL. + * + * @param url The URL. + */ + public HttpUrl(String url) { + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2018019930; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An identity document. + */ + public static class IdentityDocument extends Object { + /** + * Document number; 1-24 characters. + */ + public String number; + /** + * Document expiry date; may be null. + */ + public Date expiryDate; + /** + * Front side of the document. + */ + public DatedFile frontSide; + /** + * Reverse side of the document; only for driver license and identity card. + */ + public DatedFile reverseSide; + /** + * Selfie with the document; may be null. + */ + public DatedFile selfie; + /** + * List of files containing a certified English translation of the document. + */ + public DatedFile[] translation; + + /** + * An identity document. + */ + public IdentityDocument() { + } + + /** + * An identity document. + * + * @param number Document number; 1-24 characters. + * @param expiryDate Document expiry date; may be null. + * @param frontSide Front side of the document. + * @param reverseSide Reverse side of the document; only for driver license and identity card. + * @param selfie Selfie with the document; may be null. + * @param translation List of files containing a certified English translation of the document. + */ + public IdentityDocument(String number, Date expiryDate, DatedFile frontSide, DatedFile reverseSide, DatedFile selfie, DatedFile[] translation) { + this.number = number; + this.expiryDate = expiryDate; + this.frontSide = frontSide; + this.reverseSide = reverseSide; + this.selfie = selfie; + this.translation = translation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 445952972; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents the result of an ImportContacts request. + */ + public static class ImportedContacts extends Object { + /** + * User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user. + */ + public int[] userIds; + /** + * The number of users that imported the corresponding contact; 0 for already registered users or if unavailable. + */ + public int[] importerCount; + + /** + * Represents the result of an ImportContacts request. + */ + public ImportedContacts() { + } + + /** + * Represents the result of an ImportContacts request. + * + * @param userIds User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user. + * @param importerCount The number of users that imported the corresponding contact; 0 for already registered users or if unavailable. + */ + public ImportedContacts(int[] userIds, int[] importerCount) { + this.userIds = userIds; + this.importerCount = importerCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -741685354; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a single button in an inline keyboard. + */ + public static class InlineKeyboardButton extends Object { + /** + * Text of the button. + */ + public String text; + /** + * Type of the button. + */ + public InlineKeyboardButtonType type; + + /** + * Represents a single button in an inline keyboard. + */ + public InlineKeyboardButton() { + } + + /** + * Represents a single button in an inline keyboard. + * + * @param text Text of the button. + * @param type Type of the button. + */ + public InlineKeyboardButton(String text, InlineKeyboardButtonType type) { + this.text = text; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -372105704; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the type of an inline keyboard button. + */ + public abstract static class InlineKeyboardButtonType extends Object { + } + + /** + * A button that opens a specified URL. + */ + public static class InlineKeyboardButtonTypeUrl extends InlineKeyboardButtonType { + /** + * HTTP or tg:// URL to open. + */ + public String url; + + /** + * A button that opens a specified URL. + */ + public InlineKeyboardButtonTypeUrl() { + } + + /** + * A button that opens a specified URL. + * + * @param url HTTP or tg:// URL to open. + */ + public InlineKeyboardButtonTypeUrl(String url) { + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1130741420; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button that opens a specified URL and automatically logs in in current user if they allowed to do that. + */ + public static class InlineKeyboardButtonTypeLoginUrl extends InlineKeyboardButtonType { + /** + * An HTTP URL to open. + */ + public String url; + /** + * Unique button identifier. + */ + public int id; + /** + * If non-empty, new text of the button in forwarded messages. + */ + public String forwardText; + + /** + * A button that opens a specified URL and automatically logs in in current user if they allowed to do that. + */ + public InlineKeyboardButtonTypeLoginUrl() { + } + + /** + * A button that opens a specified URL and automatically logs in in current user if they allowed to do that. + * + * @param url An HTTP URL to open. + * @param id Unique button identifier. + * @param forwardText If non-empty, new text of the button in forwarded messages. + */ + public InlineKeyboardButtonTypeLoginUrl(String url, int id, String forwardText) { + this.url = url; + this.id = id; + this.forwardText = forwardText; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 281435539; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button that sends a callback query to a bot. + */ + public static class InlineKeyboardButtonTypeCallback extends InlineKeyboardButtonType { + /** + * Data to be sent to the bot via a callback query. + */ + public byte[] data; + + /** + * A button that sends a callback query to a bot. + */ + public InlineKeyboardButtonTypeCallback() { + } + + /** + * A button that sends a callback query to a bot. + * + * @param data Data to be sent to the bot via a callback query. + */ + public InlineKeyboardButtonTypeCallback(byte[] data) { + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1127515139; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button that asks for password of the current user and then sends a callback query to a bot. + */ + public static class InlineKeyboardButtonTypeCallbackWithPassword extends InlineKeyboardButtonType { + /** + * Data to be sent to the bot via a callback query. + */ + public byte[] data; + + /** + * A button that asks for password of the current user and then sends a callback query to a bot. + */ + public InlineKeyboardButtonTypeCallbackWithPassword() { + } + + /** + * A button that asks for password of the current user and then sends a callback query to a bot. + * + * @param data Data to be sent to the bot via a callback query. + */ + public InlineKeyboardButtonTypeCallbackWithPassword(byte[] data) { + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 908018248; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame. + */ + public static class InlineKeyboardButtonTypeCallbackGame extends InlineKeyboardButtonType { + + /** + * A button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame. + */ + public InlineKeyboardButtonTypeCallbackGame() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -383429528; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button that forces an inline query to the bot to be inserted in the input field. + */ + public static class InlineKeyboardButtonTypeSwitchInline extends InlineKeyboardButtonType { + /** + * Inline query to be sent to the bot. + */ + public String query; + /** + * True, if the inline query should be sent from the current chat. + */ + public boolean inCurrentChat; + + /** + * A button that forces an inline query to the bot to be inserted in the input field. + */ + public InlineKeyboardButtonTypeSwitchInline() { + } + + /** + * A button that forces an inline query to the bot to be inserted in the input field. + * + * @param query Inline query to be sent to the bot. + * @param inCurrentChat True, if the inline query should be sent from the current chat. + */ + public InlineKeyboardButtonTypeSwitchInline(String query, boolean inCurrentChat) { + this.query = query; + this.inCurrentChat = inCurrentChat; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2035563307; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice. + */ + public static class InlineKeyboardButtonTypeBuy extends InlineKeyboardButtonType { + + /** + * A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice. + */ + public InlineKeyboardButtonTypeBuy() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1360739440; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a single result of an inline query. + */ + public abstract static class InlineQueryResult extends Object { + } + + /** + * Represents a link to an article or web page. + */ + public static class InlineQueryResultArticle extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * URL of the result, if it exists. + */ + public String url; + /** + * True, if the URL must be not shown. + */ + public boolean hideUrl; + /** + * Title of the result. + */ + public String title; + /** + * A short description of the result. + */ + public String description; + /** + * Result thumbnail in JPEG format; may be null. + */ + public Thumbnail thumbnail; + + /** + * Represents a link to an article or web page. + */ + public InlineQueryResultArticle() { + } + + /** + * Represents a link to an article or web page. + * + * @param id Unique identifier of the query result. + * @param url URL of the result, if it exists. + * @param hideUrl True, if the URL must be not shown. + * @param title Title of the result. + * @param description A short description of the result. + * @param thumbnail Result thumbnail in JPEG format; may be null. + */ + public InlineQueryResultArticle(String id, String url, boolean hideUrl, String title, String description, Thumbnail thumbnail) { + this.id = id; + this.url = url; + this.hideUrl = hideUrl; + this.title = title; + this.description = description; + this.thumbnail = thumbnail; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 206340825; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a user contact. + */ + public static class InlineQueryResultContact extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * A user contact. + */ + public Contact contact; + /** + * Result thumbnail in JPEG format; may be null. + */ + public Thumbnail thumbnail; + + /** + * Represents a user contact. + */ + public InlineQueryResultContact() { + } + + /** + * Represents a user contact. + * + * @param id Unique identifier of the query result. + * @param contact A user contact. + * @param thumbnail Result thumbnail in JPEG format; may be null. + */ + public InlineQueryResultContact(String id, Contact contact, Thumbnail thumbnail) { + this.id = id; + this.contact = contact; + this.thumbnail = thumbnail; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -181960174; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a point on the map. + */ + public static class InlineQueryResultLocation extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Location result. + */ + public Location location; + /** + * Title of the result. + */ + public String title; + /** + * Result thumbnail in JPEG format; may be null. + */ + public Thumbnail thumbnail; + + /** + * Represents a point on the map. + */ + public InlineQueryResultLocation() { + } + + /** + * Represents a point on the map. + * + * @param id Unique identifier of the query result. + * @param location Location result. + * @param title Title of the result. + * @param thumbnail Result thumbnail in JPEG format; may be null. + */ + public InlineQueryResultLocation(String id, Location location, String title, Thumbnail thumbnail) { + this.id = id; + this.location = location; + this.title = title; + this.thumbnail = thumbnail; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 466004752; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents information about a venue. + */ + public static class InlineQueryResultVenue extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Venue result. + */ + public Venue venue; + /** + * Result thumbnail in JPEG format; may be null. + */ + public Thumbnail thumbnail; + + /** + * Represents information about a venue. + */ + public InlineQueryResultVenue() { + } + + /** + * Represents information about a venue. + * + * @param id Unique identifier of the query result. + * @param venue Venue result. + * @param thumbnail Result thumbnail in JPEG format; may be null. + */ + public InlineQueryResultVenue(String id, Venue venue, Thumbnail thumbnail) { + this.id = id; + this.venue = venue; + this.thumbnail = thumbnail; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1281036382; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents information about a game. + */ + public static class InlineQueryResultGame extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Game result. + */ + public Game game; + + /** + * Represents information about a game. + */ + public InlineQueryResultGame() { + } + + /** + * Represents information about a game. + * + * @param id Unique identifier of the query result. + * @param game Game result. + */ + public InlineQueryResultGame(String id, Game game) { + this.id = id; + this.game = game; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1706916987; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents an animation file. + */ + public static class InlineQueryResultAnimation extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Animation file. + */ + public Animation animation; + /** + * Animation title. + */ + public String title; + + /** + * Represents an animation file. + */ + public InlineQueryResultAnimation() { + } + + /** + * Represents an animation file. + * + * @param id Unique identifier of the query result. + * @param animation Animation file. + * @param title Animation title. + */ + public InlineQueryResultAnimation(String id, Animation animation, String title) { + this.id = id; + this.animation = animation; + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2009984267; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents an audio file. + */ + public static class InlineQueryResultAudio extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Audio file. + */ + public Audio audio; + + /** + * Represents an audio file. + */ + public InlineQueryResultAudio() { + } + + /** + * Represents an audio file. + * + * @param id Unique identifier of the query result. + * @param audio Audio file. + */ + public InlineQueryResultAudio(String id, Audio audio) { + this.id = id; + this.audio = audio; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 842650360; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a document. + */ + public static class InlineQueryResultDocument extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Document. + */ + public Document document; + /** + * Document title. + */ + public String title; + /** + * Document description. + */ + public String description; + + /** + * Represents a document. + */ + public InlineQueryResultDocument() { + } + + /** + * Represents a document. + * + * @param id Unique identifier of the query result. + * @param document Document. + * @param title Document title. + * @param description Document description. + */ + public InlineQueryResultDocument(String id, Document document, String title, String description) { + this.id = id; + this.document = document; + this.title = title; + this.description = description; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1491268539; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a photo. + */ + public static class InlineQueryResultPhoto extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Photo. + */ + public Photo photo; + /** + * Title of the result, if known. + */ + public String title; + /** + * A short description of the result, if known. + */ + public String description; + + /** + * Represents a photo. + */ + public InlineQueryResultPhoto() { + } + + /** + * Represents a photo. + * + * @param id Unique identifier of the query result. + * @param photo Photo. + * @param title Title of the result, if known. + * @param description A short description of the result, if known. + */ + public InlineQueryResultPhoto(String id, Photo photo, String title, String description) { + this.id = id; + this.photo = photo; + this.title = title; + this.description = description; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1848319440; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a sticker. + */ + public static class InlineQueryResultSticker extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Sticker. + */ + public Sticker sticker; + + /** + * Represents a sticker. + */ + public InlineQueryResultSticker() { + } + + /** + * Represents a sticker. + * + * @param id Unique identifier of the query result. + * @param sticker Sticker. + */ + public InlineQueryResultSticker(String id, Sticker sticker) { + this.id = id; + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1848224245; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a video. + */ + public static class InlineQueryResultVideo extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Video. + */ + public Video video; + /** + * Title of the video. + */ + public String title; + /** + * Description of the video. + */ + public String description; + + /** + * Represents a video. + */ + public InlineQueryResultVideo() { + } + + /** + * Represents a video. + * + * @param id Unique identifier of the query result. + * @param video Video. + * @param title Title of the video. + * @param description Description of the video. + */ + public InlineQueryResultVideo(String id, Video video, String title, String description) { + this.id = id; + this.video = video; + this.title = title; + this.description = description; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1373158683; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a voice note. + */ + public static class InlineQueryResultVoiceNote extends InlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Voice note. + */ + public VoiceNote voiceNote; + /** + * Title of the voice note. + */ + public String title; + + /** + * Represents a voice note. + */ + public InlineQueryResultVoiceNote() { + } + + /** + * Represents a voice note. + * + * @param id Unique identifier of the query result. + * @param voiceNote Voice note. + * @param title Title of the voice note. + */ + public InlineQueryResultVoiceNote(String id, VoiceNote voiceNote, String title) { + this.id = id; + this.voiceNote = voiceNote; + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1897393105; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query. + */ + public static class InlineQueryResults extends Object { + /** + * Unique identifier of the inline query. + */ + public long inlineQueryId; + /** + * The offset for the next request. If empty, there are no more results. + */ + public String nextOffset; + /** + * Results of the query. + */ + public InlineQueryResult[] results; + /** + * If non-empty, this text should be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switchPmParameter. + */ + public String switchPmText; + /** + * Parameter for the bot start message. + */ + public String switchPmParameter; + + /** + * Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query. + */ + public InlineQueryResults() { + } + + /** + * Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query. + * + * @param inlineQueryId Unique identifier of the inline query. + * @param nextOffset The offset for the next request. If empty, there are no more results. + * @param results Results of the query. + * @param switchPmText If non-empty, this text should be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switchPmParameter. + * @param switchPmParameter Parameter for the bot start message. + */ + public InlineQueryResults(long inlineQueryId, String nextOffset, InlineQueryResult[] results, String switchPmText, String switchPmParameter) { + this.inlineQueryId = inlineQueryId; + this.nextOffset = nextOffset; + this.results = results; + this.switchPmText = switchPmText; + this.switchPmParameter = switchPmParameter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1000709656; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains information about background to set. + */ + public abstract static class InputBackground extends Object { + } + + /** + * A background from a local file. + */ + public static class InputBackgroundLocal extends InputBackground { + /** + * Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns. + */ + public InputFile background; + + /** + * A background from a local file. + */ + public InputBackgroundLocal() { + } + + /** + * A background from a local file. + * + * @param background Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns. + */ + public InputBackgroundLocal(InputFile background) { + this.background = background; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1747094364; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A background from the server. + */ + public static class InputBackgroundRemote extends InputBackground { + /** + * The background identifier. + */ + public long backgroundId; + + /** + * A background from the server. + */ + public InputBackgroundRemote() { + } + + /** + * A background from the server. + * + * @param backgroundId The background identifier. + */ + public InputBackgroundRemote(long backgroundId) { + this.backgroundId = backgroundId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -274976231; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a photo to be set as a user profile or chat photo. + */ + public abstract static class InputChatPhoto extends Object { + } + + /** + * A previously used profile photo of the current user. + */ + public static class InputChatPhotoPrevious extends InputChatPhoto { + /** + * Identifier of the profile photo to reuse. + */ + public long chatPhotoId; + + /** + * A previously used profile photo of the current user. + */ + public InputChatPhotoPrevious() { + } + + /** + * A previously used profile photo of the current user. + * + * @param chatPhotoId Identifier of the profile photo to reuse. + */ + public InputChatPhotoPrevious(long chatPhotoId) { + this.chatPhotoId = chatPhotoId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 23128529; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A static photo in JPEG format. + */ + public static class InputChatPhotoStatic extends InputChatPhoto { + /** + * Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed. + */ + public InputFile photo; + + /** + * A static photo in JPEG format. + */ + public InputChatPhotoStatic() { + } + + /** + * A static photo in JPEG format. + * + * @param photo Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed. + */ + public InputChatPhotoStatic(InputFile photo) { + this.photo = photo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1979179699; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 800 and be at most 2MB in size. + */ + public static class InputChatPhotoAnimation extends InputChatPhoto { + /** + * Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed. + */ + public InputFile animation; + /** + * Timestamp of the frame, which will be used as static chat photo. + */ + public double mainFrameTimestamp; + + /** + * An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 800 and be at most 2MB in size. + */ + public InputChatPhotoAnimation() { + } + + /** + * An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 800 and be at most 2MB in size. + * + * @param animation Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed. + * @param mainFrameTimestamp Timestamp of the frame, which will be used as static chat photo. + */ + public InputChatPhotoAnimation(InputFile animation, double mainFrameTimestamp) { + this.animation = animation; + this.mainFrameTimestamp = mainFrameTimestamp; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 90846242; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains information about the payment method chosen by the user. + */ + public abstract static class InputCredentials extends Object { + } + + /** + * Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password. + */ + public static class InputCredentialsSaved extends InputCredentials { + /** + * Identifier of the saved credentials. + */ + public String savedCredentialsId; + + /** + * Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password. + */ + public InputCredentialsSaved() { + } + + /** + * Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password. + * + * @param savedCredentialsId Identifier of the saved credentials. + */ + public InputCredentialsSaved(String savedCredentialsId) { + this.savedCredentialsId = savedCredentialsId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2034385364; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Applies if a user enters new credentials on a payment provider website. + */ + public static class InputCredentialsNew extends InputCredentials { + /** + * Contains JSON-encoded data with a credential identifier from the payment provider. + */ + public String data; + /** + * True, if the credential identifier can be saved on the server side. + */ + public boolean allowSave; + + /** + * Applies if a user enters new credentials on a payment provider website. + */ + public InputCredentialsNew() { + } + + /** + * Applies if a user enters new credentials on a payment provider website. + * + * @param data Contains JSON-encoded data with a credential identifier from the payment provider. + * @param allowSave True, if the credential identifier can be saved on the server side. + */ + public InputCredentialsNew(String data, boolean allowSave) { + this.data = data; + this.allowSave = allowSave; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -829689558; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Applies if a user enters new credentials using Android Pay. + */ + public static class InputCredentialsAndroidPay extends InputCredentials { + /** + * JSON-encoded data with the credential identifier. + */ + public String data; + + /** + * Applies if a user enters new credentials using Android Pay. + */ + public InputCredentialsAndroidPay() { + } + + /** + * Applies if a user enters new credentials using Android Pay. + * + * @param data JSON-encoded data with the credential identifier. + */ + public InputCredentialsAndroidPay(String data) { + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1979566832; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Applies if a user enters new credentials using Apple Pay. + */ + public static class InputCredentialsApplePay extends InputCredentials { + /** + * JSON-encoded data with the credential identifier. + */ + public String data; + + /** + * Applies if a user enters new credentials using Apple Pay. + */ + public InputCredentialsApplePay() { + } + + /** + * Applies if a user enters new credentials using Apple Pay. + * + * @param data JSON-encoded data with the credential identifier. + */ + public InputCredentialsApplePay(String data) { + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1246570799; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Points to a file. + */ + public abstract static class InputFile extends Object { + } + + /** + * A file defined by its unique ID. + */ + public static class InputFileId extends InputFile { + /** + * Unique file identifier. + */ + public int id; + + /** + * A file defined by its unique ID. + */ + public InputFileId() { + } + + /** + * A file defined by its unique ID. + * + * @param id Unique file identifier. + */ + public InputFileId(int id) { + this.id = id; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1788906253; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application. + */ + public static class InputFileRemote extends InputFile { + /** + * Remote file identifier. + */ + public String id; + + /** + * A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application. + */ + public InputFileRemote() { + } + + /** + * A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application. + * + * @param id Remote file identifier. + */ + public InputFileRemote(String id) { + this.id = id; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -107574466; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A file defined by a local path. + */ + public static class InputFileLocal extends InputFile { + /** + * Local path to the file. + */ + public String path; + + /** + * A file defined by a local path. + */ + public InputFileLocal() { + } + + /** + * A file defined by a local path. + * + * @param path Local path to the file. + */ + public InputFileLocal(String path) { + this.path = path; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2056030919; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A file generated by the application. + */ + public static class InputFileGenerated extends InputFile { + /** + * Local path to a file from which the file is generated; may be empty if there is no such file. + */ + public String originalPath; + /** + * String specifying the conversion applied to the original file; should be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage. + */ + public String conversion; + /** + * Expected size of the generated file; 0 if unknown. + */ + public int expectedSize; + + /** + * A file generated by the application. + */ + public InputFileGenerated() { + } + + /** + * A file generated by the application. + * + * @param originalPath Local path to a file from which the file is generated; may be empty if there is no such file. + * @param conversion String specifying the conversion applied to the original file; should be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage. + * @param expectedSize Expected size of the generated file; 0 if unknown. + */ + public InputFileGenerated(String originalPath, String conversion, int expectedSize) { + this.originalPath = originalPath; + this.conversion = conversion; + this.expectedSize = expectedSize; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1781351885; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An identity document to be saved to Telegram Passport. + */ + public static class InputIdentityDocument extends Object { + /** + * Document number; 1-24 characters. + */ + public String number; + /** + * Document expiry date, if available. + */ + public Date expiryDate; + /** + * Front side of the document. + */ + public InputFile frontSide; + /** + * Reverse side of the document; only for driver license and identity card. + */ + public InputFile reverseSide; + /** + * Selfie with the document, if available. + */ + public InputFile selfie; + /** + * List of files containing a certified English translation of the document. + */ + public InputFile[] translation; + + /** + * An identity document to be saved to Telegram Passport. + */ + public InputIdentityDocument() { + } + + /** + * An identity document to be saved to Telegram Passport. + * + * @param number Document number; 1-24 characters. + * @param expiryDate Document expiry date, if available. + * @param frontSide Front side of the document. + * @param reverseSide Reverse side of the document; only for driver license and identity card. + * @param selfie Selfie with the document, if available. + * @param translation List of files containing a certified English translation of the document. + */ + public InputIdentityDocument(String number, Date expiryDate, InputFile frontSide, InputFile reverseSide, InputFile selfie, InputFile[] translation) { + this.number = number; + this.expiryDate = expiryDate; + this.frontSide = frontSide; + this.reverseSide = reverseSide; + this.selfie = selfie; + this.translation = translation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -381776063; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a single result of an inline query; for bots only. + */ + public abstract static class InputInlineQueryResult extends Object { + } + + /** + * Represents a link to an animated GIF or an animated (i.e. without sound) H.264/MPEG-4 AVC video. + */ + public static class InputInlineQueryResultAnimation extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Title of the query result. + */ + public String title; + /** + * URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists. + */ + public String thumbnailUrl; + /** + * MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4". + */ + public String thumbnailMimeType; + /** + * The URL of the video file (file size must not exceed 1MB). + */ + public String videoUrl; + /** + * MIME type of the video file. Must be one of "image/gif" and "video/mp4". + */ + public String videoMimeType; + /** + * Duration of the video, in seconds. + */ + public int videoDuration; + /** + * Width of the video. + */ + public int videoWidth; + /** + * Height of the video. + */ + public int videoHeight; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a link to an animated GIF or an animated (i.e. without sound) H.264/MPEG-4 AVC video. + */ + public InputInlineQueryResultAnimation() { + } + + /** + * Represents a link to an animated GIF or an animated (i.e. without sound) H.264/MPEG-4 AVC video. + * + * @param id Unique identifier of the query result. + * @param title Title of the query result. + * @param thumbnailUrl URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists. + * @param thumbnailMimeType MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4". + * @param videoUrl The URL of the video file (file size must not exceed 1MB). + * @param videoMimeType MIME type of the video file. Must be one of "image/gif" and "video/mp4". + * @param videoDuration Duration of the video, in seconds. + * @param videoWidth Width of the video. + * @param videoHeight Height of the video. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAnimation, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultAnimation(String id, String title, String thumbnailUrl, String thumbnailMimeType, String videoUrl, String videoMimeType, int videoDuration, int videoWidth, int videoHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.title = title; + this.thumbnailUrl = thumbnailUrl; + this.thumbnailMimeType = thumbnailMimeType; + this.videoUrl = videoUrl; + this.videoMimeType = videoMimeType; + this.videoDuration = videoDuration; + this.videoWidth = videoWidth; + this.videoHeight = videoHeight; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1489808874; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a link to an article or web page. + */ + public static class InputInlineQueryResultArticle extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * URL of the result, if it exists. + */ + public String url; + /** + * True, if the URL must be not shown. + */ + public boolean hideUrl; + /** + * Title of the result. + */ + public String title; + /** + * A short description of the result. + */ + public String description; + /** + * URL of the result thumbnail, if it exists. + */ + public String thumbnailUrl; + /** + * Thumbnail width, if known. + */ + public int thumbnailWidth; + /** + * Thumbnail height, if known. + */ + public int thumbnailHeight; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a link to an article or web page. + */ + public InputInlineQueryResultArticle() { + } + + /** + * Represents a link to an article or web page. + * + * @param id Unique identifier of the query result. + * @param url URL of the result, if it exists. + * @param hideUrl True, if the URL must be not shown. + * @param title Title of the result. + * @param description A short description of the result. + * @param thumbnailUrl URL of the result thumbnail, if it exists. + * @param thumbnailWidth Thumbnail width, if known. + * @param thumbnailHeight Thumbnail height, if known. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultArticle(String id, String url, boolean hideUrl, String title, String description, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.url = url; + this.hideUrl = hideUrl; + this.title = title; + this.description = description; + this.thumbnailUrl = thumbnailUrl; + this.thumbnailWidth = thumbnailWidth; + this.thumbnailHeight = thumbnailHeight; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1973670156; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a link to an MP3 audio file. + */ + public static class InputInlineQueryResultAudio extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Title of the audio file. + */ + public String title; + /** + * Performer of the audio file. + */ + public String performer; + /** + * The URL of the audio file. + */ + public String audioUrl; + /** + * Audio file duration, in seconds. + */ + public int audioDuration; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a link to an MP3 audio file. + */ + public InputInlineQueryResultAudio() { + } + + /** + * Represents a link to an MP3 audio file. + * + * @param id Unique identifier of the query result. + * @param title Title of the audio file. + * @param performer Performer of the audio file. + * @param audioUrl The URL of the audio file. + * @param audioDuration Audio file duration, in seconds. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageAudio, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultAudio(String id, String title, String performer, String audioUrl, int audioDuration, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.title = title; + this.performer = performer; + this.audioUrl = audioUrl; + this.audioDuration = audioDuration; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1260139988; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a user contact. + */ + public static class InputInlineQueryResultContact extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * User contact. + */ + public Contact contact; + /** + * URL of the result thumbnail, if it exists. + */ + public String thumbnailUrl; + /** + * Thumbnail width, if known. + */ + public int thumbnailWidth; + /** + * Thumbnail height, if known. + */ + public int thumbnailHeight; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a user contact. + */ + public InputInlineQueryResultContact() { + } + + /** + * Represents a user contact. + * + * @param id Unique identifier of the query result. + * @param contact User contact. + * @param thumbnailUrl URL of the result thumbnail, if it exists. + * @param thumbnailWidth Thumbnail width, if known. + * @param thumbnailHeight Thumbnail height, if known. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultContact(String id, Contact contact, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.contact = contact; + this.thumbnailUrl = thumbnailUrl; + this.thumbnailWidth = thumbnailWidth; + this.thumbnailHeight = thumbnailHeight; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1846064594; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a link to a file. + */ + public static class InputInlineQueryResultDocument extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Title of the resulting file. + */ + public String title; + /** + * Short description of the result, if known. + */ + public String description; + /** + * URL of the file. + */ + public String documentUrl; + /** + * MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed. + */ + public String mimeType; + /** + * The URL of the file thumbnail, if it exists. + */ + public String thumbnailUrl; + /** + * Width of the thumbnail. + */ + public int thumbnailWidth; + /** + * Height of the thumbnail. + */ + public int thumbnailHeight; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a link to a file. + */ + public InputInlineQueryResultDocument() { + } + + /** + * Represents a link to a file. + * + * @param id Unique identifier of the query result. + * @param title Title of the resulting file. + * @param description Short description of the result, if known. + * @param documentUrl URL of the file. + * @param mimeType MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed. + * @param thumbnailUrl The URL of the file thumbnail, if it exists. + * @param thumbnailWidth Width of the thumbnail. + * @param thumbnailHeight Height of the thumbnail. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageDocument, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultDocument(String id, String title, String description, String documentUrl, String mimeType, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.title = title; + this.description = description; + this.documentUrl = documentUrl; + this.mimeType = mimeType; + this.thumbnailUrl = thumbnailUrl; + this.thumbnailWidth = thumbnailWidth; + this.thumbnailHeight = thumbnailHeight; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 578801869; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a game. + */ + public static class InputInlineQueryResultGame extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Short name of the game. + */ + public String gameShortName; + /** + * Message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + + /** + * Represents a game. + */ + public InputInlineQueryResultGame() { + } + + /** + * Represents a game. + * + * @param id Unique identifier of the query result. + * @param gameShortName Short name of the game. + * @param replyMarkup Message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public InputInlineQueryResultGame(String id, String gameShortName, ReplyMarkup replyMarkup) { + this.id = id; + this.gameShortName = gameShortName; + this.replyMarkup = replyMarkup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 966074327; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a point on the map. + */ + public static class InputInlineQueryResultLocation extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Location result. + */ + public Location location; + /** + * Amount of time relative to the message sent time until the location can be updated, in seconds. + */ + public int livePeriod; + /** + * Title of the result. + */ + public String title; + /** + * URL of the result thumbnail, if it exists. + */ + public String thumbnailUrl; + /** + * Thumbnail width, if known. + */ + public int thumbnailWidth; + /** + * Thumbnail height, if known. + */ + public int thumbnailHeight; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a point on the map. + */ + public InputInlineQueryResultLocation() { + } + + /** + * Represents a point on the map. + * + * @param id Unique identifier of the query result. + * @param location Location result. + * @param livePeriod Amount of time relative to the message sent time until the location can be updated, in seconds. + * @param title Title of the result. + * @param thumbnailUrl URL of the result thumbnail, if it exists. + * @param thumbnailWidth Thumbnail width, if known. + * @param thumbnailHeight Thumbnail height, if known. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultLocation(String id, Location location, int livePeriod, String title, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.location = location; + this.livePeriod = livePeriod; + this.title = title; + this.thumbnailUrl = thumbnailUrl; + this.thumbnailWidth = thumbnailWidth; + this.thumbnailHeight = thumbnailHeight; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1887650218; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents link to a JPEG image. + */ + public static class InputInlineQueryResultPhoto extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Title of the result, if known. + */ + public String title; + /** + * A short description of the result, if known. + */ + public String description; + /** + * URL of the photo thumbnail, if it exists. + */ + public String thumbnailUrl; + /** + * The URL of the JPEG photo (photo size must not exceed 5MB). + */ + public String photoUrl; + /** + * Width of the photo. + */ + public int photoWidth; + /** + * Height of the photo. + */ + public int photoHeight; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents link to a JPEG image. + */ + public InputInlineQueryResultPhoto() { + } + + /** + * Represents link to a JPEG image. + * + * @param id Unique identifier of the query result. + * @param title Title of the result, if known. + * @param description A short description of the result, if known. + * @param thumbnailUrl URL of the photo thumbnail, if it exists. + * @param photoUrl The URL of the JPEG photo (photo size must not exceed 5MB). + * @param photoWidth Width of the photo. + * @param photoHeight Height of the photo. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessagePhoto, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultPhoto(String id, String title, String description, String thumbnailUrl, String photoUrl, int photoWidth, int photoHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.title = title; + this.description = description; + this.thumbnailUrl = thumbnailUrl; + this.photoUrl = photoUrl; + this.photoWidth = photoWidth; + this.photoHeight = photoHeight; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1123338721; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a link to a WEBP or TGS sticker. + */ + public static class InputInlineQueryResultSticker extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * URL of the sticker thumbnail, if it exists. + */ + public String thumbnailUrl; + /** + * The URL of the WEBP or TGS sticker (sticker file size must not exceed 5MB). + */ + public String stickerUrl; + /** + * Width of the sticker. + */ + public int stickerWidth; + /** + * Height of the sticker. + */ + public int stickerHeight; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a link to a WEBP or TGS sticker. + */ + public InputInlineQueryResultSticker() { + } + + /** + * Represents a link to a WEBP or TGS sticker. + * + * @param id Unique identifier of the query result. + * @param thumbnailUrl URL of the sticker thumbnail, if it exists. + * @param stickerUrl The URL of the WEBP or TGS sticker (sticker file size must not exceed 5MB). + * @param stickerWidth Width of the sticker. + * @param stickerHeight Height of the sticker. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, inputMessageSticker, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultSticker(String id, String thumbnailUrl, String stickerUrl, int stickerWidth, int stickerHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.thumbnailUrl = thumbnailUrl; + this.stickerUrl = stickerUrl; + this.stickerWidth = stickerWidth; + this.stickerHeight = stickerHeight; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 274007129; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents information about a venue. + */ + public static class InputInlineQueryResultVenue extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Venue result. + */ + public Venue venue; + /** + * URL of the result thumbnail, if it exists. + */ + public String thumbnailUrl; + /** + * Thumbnail width, if known. + */ + public int thumbnailWidth; + /** + * Thumbnail height, if known. + */ + public int thumbnailHeight; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents information about a venue. + */ + public InputInlineQueryResultVenue() { + } + + /** + * Represents information about a venue. + * + * @param id Unique identifier of the query result. + * @param venue Venue result. + * @param thumbnailUrl URL of the result thumbnail, if it exists. + * @param thumbnailWidth Thumbnail width, if known. + * @param thumbnailHeight Thumbnail height, if known. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultVenue(String id, Venue venue, String thumbnailUrl, int thumbnailWidth, int thumbnailHeight, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.venue = venue; + this.thumbnailUrl = thumbnailUrl; + this.thumbnailWidth = thumbnailWidth; + this.thumbnailHeight = thumbnailHeight; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 541704509; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a link to a page containing an embedded video player or a video file. + */ + public static class InputInlineQueryResultVideo extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Title of the result. + */ + public String title; + /** + * A short description of the result, if known. + */ + public String description; + /** + * The URL of the video thumbnail (JPEG), if it exists. + */ + public String thumbnailUrl; + /** + * URL of the embedded video player or video file. + */ + public String videoUrl; + /** + * MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported. + */ + public String mimeType; + /** + * Width of the video. + */ + public int videoWidth; + /** + * Height of the video. + */ + public int videoHeight; + /** + * Video duration, in seconds. + */ + public int videoDuration; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a link to a page containing an embedded video player or a video file. + */ + public InputInlineQueryResultVideo() { + } + + /** + * Represents a link to a page containing an embedded video player or a video file. + * + * @param id Unique identifier of the query result. + * @param title Title of the result. + * @param description A short description of the result, if known. + * @param thumbnailUrl The URL of the video thumbnail (JPEG), if it exists. + * @param videoUrl URL of the embedded video player or video file. + * @param mimeType MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported. + * @param videoWidth Width of the video. + * @param videoHeight Height of the video. + * @param videoDuration Video duration, in seconds. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVideo, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultVideo(String id, String title, String description, String thumbnailUrl, String videoUrl, String mimeType, int videoWidth, int videoHeight, int videoDuration, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.title = title; + this.description = description; + this.thumbnailUrl = thumbnailUrl; + this.videoUrl = videoUrl; + this.mimeType = mimeType; + this.videoWidth = videoWidth; + this.videoHeight = videoHeight; + this.videoDuration = videoDuration; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1724073191; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a link to an opus-encoded audio file within an OGG container, single channel audio. + */ + public static class InputInlineQueryResultVoiceNote extends InputInlineQueryResult { + /** + * Unique identifier of the query result. + */ + public String id; + /** + * Title of the voice note. + */ + public String title; + /** + * The URL of the voice note file. + */ + public String voiceNoteUrl; + /** + * Duration of the voice note, in seconds. + */ + public int voiceNoteDuration; + /** + * The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputMessageContent inputMessageContent; + + /** + * Represents a link to an opus-encoded audio file within an OGG container, single channel audio. + */ + public InputInlineQueryResultVoiceNote() { + } + + /** + * Represents a link to an opus-encoded audio file within an OGG container, single channel audio. + * + * @param id Unique identifier of the query result. + * @param title Title of the voice note. + * @param voiceNoteUrl The URL of the voice note file. + * @param voiceNoteDuration Duration of the voice note, in seconds. + * @param replyMarkup The message reply markup. Must be of type replyMarkupInlineKeyboard or null. + * @param inputMessageContent The content of the message to be sent. Must be one of the following types: InputMessageText, InputMessageVoiceNote, InputMessageLocation, InputMessageVenue or InputMessageContact. + */ + public InputInlineQueryResultVoiceNote(String id, String title, String voiceNoteUrl, int voiceNoteDuration, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.id = id; + this.title = title; + this.voiceNoteUrl = voiceNoteUrl; + this.voiceNoteDuration = voiceNoteDuration; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1790072503; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * The content of a message to send. + */ + public abstract static class InputMessageContent extends Object { + } + + /** + * A text message. + */ + public static class InputMessageText extends InputMessageContent { + /** + * Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually. + */ + public FormattedText text; + /** + * True, if rich web page previews for URLs in the message text should be disabled. + */ + public boolean disableWebPagePreview; + /** + * True, if a chat message draft should be deleted. + */ + public boolean clearDraft; + + /** + * A text message. + */ + public InputMessageText() { + } + + /** + * A text message. + * + * @param text Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually. + * @param disableWebPagePreview True, if rich web page previews for URLs in the message text should be disabled. + * @param clearDraft True, if a chat message draft should be deleted. + */ + public InputMessageText(FormattedText text, boolean disableWebPagePreview, boolean clearDraft) { + this.text = text; + this.disableWebPagePreview = disableWebPagePreview; + this.clearDraft = clearDraft; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 247050392; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An animation message (GIF-style). + */ + public static class InputMessageAnimation extends InputMessageContent { + /** + * Animation file to be sent. + */ + public InputFile animation; + /** + * Animation thumbnail, if available. + */ + public InputThumbnail thumbnail; + /** + * File identifiers of the stickers added to the animation, if applicable. + */ + public int[] addedStickerFileIds; + /** + * Duration of the animation, in seconds. + */ + public int duration; + /** + * Width of the animation; may be replaced by the server. + */ + public int width; + /** + * Height of the animation; may be replaced by the server. + */ + public int height; + /** + * Animation caption; 0-GetOption("message_caption_length_max") characters. + */ + public FormattedText caption; + + /** + * An animation message (GIF-style). + */ + public InputMessageAnimation() { + } + + /** + * An animation message (GIF-style). + * + * @param animation Animation file to be sent. + * @param thumbnail Animation thumbnail, if available. + * @param addedStickerFileIds File identifiers of the stickers added to the animation, if applicable. + * @param duration Duration of the animation, in seconds. + * @param width Width of the animation; may be replaced by the server. + * @param height Height of the animation; may be replaced by the server. + * @param caption Animation caption; 0-GetOption("message_caption_length_max") characters. + */ + public InputMessageAnimation(InputFile animation, InputThumbnail thumbnail, int[] addedStickerFileIds, int duration, int width, int height, FormattedText caption) { + this.animation = animation; + this.thumbnail = thumbnail; + this.addedStickerFileIds = addedStickerFileIds; + this.duration = duration; + this.width = width; + this.height = height; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1208433535; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An audio message. + */ + public static class InputMessageAudio extends InputMessageContent { + /** + * Audio file to be sent. + */ + public InputFile audio; + /** + * Thumbnail of the cover for the album, if available. + */ + public InputThumbnail albumCoverThumbnail; + /** + * Duration of the audio, in seconds; may be replaced by the server. + */ + public int duration; + /** + * Title of the audio; 0-64 characters; may be replaced by the server. + */ + public String title; + /** + * Performer of the audio; 0-64 characters, may be replaced by the server. + */ + public String performer; + /** + * Audio caption; 0-GetOption("message_caption_length_max") characters. + */ + public FormattedText caption; + + /** + * An audio message. + */ + public InputMessageAudio() { + } + + /** + * An audio message. + * + * @param audio Audio file to be sent. + * @param albumCoverThumbnail Thumbnail of the cover for the album, if available. + * @param duration Duration of the audio, in seconds; may be replaced by the server. + * @param title Title of the audio; 0-64 characters; may be replaced by the server. + * @param performer Performer of the audio; 0-64 characters, may be replaced by the server. + * @param caption Audio caption; 0-GetOption("message_caption_length_max") characters. + */ + public InputMessageAudio(InputFile audio, InputThumbnail albumCoverThumbnail, int duration, String title, String performer, FormattedText caption) { + this.audio = audio; + this.albumCoverThumbnail = albumCoverThumbnail; + this.duration = duration; + this.title = title; + this.performer = performer; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -626786126; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A document message (general file). + */ + public static class InputMessageDocument extends InputMessageContent { + /** + * Document to be sent. + */ + public InputFile document; + /** + * Document thumbnail, if available. + */ + public InputThumbnail thumbnail; + /** + * If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats. + */ + public boolean disableContentTypeDetection; + /** + * Document caption; 0-GetOption("message_caption_length_max") characters. + */ + public FormattedText caption; + + /** + * A document message (general file). + */ + public InputMessageDocument() { + } + + /** + * A document message (general file). + * + * @param document Document to be sent. + * @param thumbnail Document thumbnail, if available. + * @param disableContentTypeDetection If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats. + * @param caption Document caption; 0-GetOption("message_caption_length_max") characters. + */ + public InputMessageDocument(InputFile document, InputThumbnail thumbnail, boolean disableContentTypeDetection, FormattedText caption) { + this.document = document; + this.thumbnail = thumbnail; + this.disableContentTypeDetection = disableContentTypeDetection; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1633383097; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A photo message. + */ + public static class InputMessagePhoto extends InputMessageContent { + /** + * Photo to send. + */ + public InputFile photo; + /** + * Photo thumbnail to be sent, this is sent to the other party in secret chats only. + */ + public InputThumbnail thumbnail; + /** + * File identifiers of the stickers added to the photo, if applicable. + */ + public int[] addedStickerFileIds; + /** + * Photo width. + */ + public int width; + /** + * Photo height. + */ + public int height; + /** + * Photo caption; 0-GetOption("message_caption_length_max") characters. + */ + public FormattedText caption; + /** + * Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats. + */ + public int ttl; + + /** + * A photo message. + */ + public InputMessagePhoto() { + } + + /** + * A photo message. + * + * @param photo Photo to send. + * @param thumbnail Photo thumbnail to be sent, this is sent to the other party in secret chats only. + * @param addedStickerFileIds File identifiers of the stickers added to the photo, if applicable. + * @param width Photo width. + * @param height Photo height. + * @param caption Photo caption; 0-GetOption("message_caption_length_max") characters. + * @param ttl Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats. + */ + public InputMessagePhoto(InputFile photo, InputThumbnail thumbnail, int[] addedStickerFileIds, int width, int height, FormattedText caption, int ttl) { + this.photo = photo; + this.thumbnail = thumbnail; + this.addedStickerFileIds = addedStickerFileIds; + this.width = width; + this.height = height; + this.caption = caption; + this.ttl = ttl; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1648801584; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A sticker message. + */ + public static class InputMessageSticker extends InputMessageContent { + /** + * Sticker to be sent. + */ + public InputFile sticker; + /** + * Sticker thumbnail, if available. + */ + public InputThumbnail thumbnail; + /** + * Sticker width. + */ + public int width; + /** + * Sticker height. + */ + public int height; + + /** + * A sticker message. + */ + public InputMessageSticker() { + } + + /** + * A sticker message. + * + * @param sticker Sticker to be sent. + * @param thumbnail Sticker thumbnail, if available. + * @param width Sticker width. + * @param height Sticker height. + */ + public InputMessageSticker(InputFile sticker, InputThumbnail thumbnail, int width, int height) { + this.sticker = sticker; + this.thumbnail = thumbnail; + this.width = width; + this.height = height; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 740776325; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A video message. + */ + public static class InputMessageVideo extends InputMessageContent { + /** + * Video to be sent. + */ + public InputFile video; + /** + * Video thumbnail, if available. + */ + public InputThumbnail thumbnail; + /** + * File identifiers of the stickers added to the video, if applicable. + */ + public int[] addedStickerFileIds; + /** + * Duration of the video, in seconds. + */ + public int duration; + /** + * Video width. + */ + public int width; + /** + * Video height. + */ + public int height; + /** + * True, if the video should be tried to be streamed. + */ + public boolean supportsStreaming; + /** + * Video caption; 0-GetOption("message_caption_length_max") characters. + */ + public FormattedText caption; + /** + * Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats. + */ + public int ttl; + + /** + * A video message. + */ + public InputMessageVideo() { + } + + /** + * A video message. + * + * @param video Video to be sent. + * @param thumbnail Video thumbnail, if available. + * @param addedStickerFileIds File identifiers of the stickers added to the video, if applicable. + * @param duration Duration of the video, in seconds. + * @param width Video width. + * @param height Video height. + * @param supportsStreaming True, if the video should be tried to be streamed. + * @param caption Video caption; 0-GetOption("message_caption_length_max") characters. + * @param ttl Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats. + */ + public InputMessageVideo(InputFile video, InputThumbnail thumbnail, int[] addedStickerFileIds, int duration, int width, int height, boolean supportsStreaming, FormattedText caption, int ttl) { + this.video = video; + this.thumbnail = thumbnail; + this.addedStickerFileIds = addedStickerFileIds; + this.duration = duration; + this.width = width; + this.height = height; + this.supportsStreaming = supportsStreaming; + this.caption = caption; + this.ttl = ttl; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2108486755; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A video note message. + */ + public static class InputMessageVideoNote extends InputMessageContent { + /** + * Video note to be sent. + */ + public InputFile videoNote; + /** + * Video thumbnail, if available. + */ + public InputThumbnail thumbnail; + /** + * Duration of the video, in seconds. + */ + public int duration; + /** + * Video width and height; must be positive and not greater than 640. + */ + public int length; + + /** + * A video note message. + */ + public InputMessageVideoNote() { + } + + /** + * A video note message. + * + * @param videoNote Video note to be sent. + * @param thumbnail Video thumbnail, if available. + * @param duration Duration of the video, in seconds. + * @param length Video width and height; must be positive and not greater than 640. + */ + public InputMessageVideoNote(InputFile videoNote, InputThumbnail thumbnail, int duration, int length) { + this.videoNote = videoNote; + this.thumbnail = thumbnail; + this.duration = duration; + this.length = length; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 279108859; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A voice note message. + */ + public static class InputMessageVoiceNote extends InputMessageContent { + /** + * Voice note to be sent. + */ + public InputFile voiceNote; + /** + * Duration of the voice note, in seconds. + */ + public int duration; + /** + * Waveform representation of the voice note, in 5-bit format. + */ + public byte[] waveform; + /** + * Voice note caption; 0-GetOption("message_caption_length_max") characters. + */ + public FormattedText caption; + + /** + * A voice note message. + */ + public InputMessageVoiceNote() { + } + + /** + * A voice note message. + * + * @param voiceNote Voice note to be sent. + * @param duration Duration of the voice note, in seconds. + * @param waveform Waveform representation of the voice note, in 5-bit format. + * @param caption Voice note caption; 0-GetOption("message_caption_length_max") characters. + */ + public InputMessageVoiceNote(InputFile voiceNote, int duration, byte[] waveform, FormattedText caption) { + this.voiceNote = voiceNote; + this.duration = duration; + this.waveform = waveform; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2136519657; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a location. + */ + public static class InputMessageLocation extends InputMessageContent { + /** + * Location to be sent. + */ + public Location location; + /** + * Period for which the location can be updated, in seconds; should be between 60 and 86400 for a live location and 0 otherwise. + */ + public int livePeriod; + + /** + * A message with a location. + */ + public InputMessageLocation() { + } + + /** + * A message with a location. + * + * @param location Location to be sent. + * @param livePeriod Period for which the location can be updated, in seconds; should be between 60 and 86400 for a live location and 0 otherwise. + */ + public InputMessageLocation(Location location, int livePeriod) { + this.location = location; + this.livePeriod = livePeriod; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1624179655; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with information about a venue. + */ + public static class InputMessageVenue extends InputMessageContent { + /** + * Venue to send. + */ + public Venue venue; + + /** + * A message with information about a venue. + */ + public InputMessageVenue() { + } + + /** + * A message with information about a venue. + * + * @param venue Venue to send. + */ + public InputMessageVenue(Venue venue) { + this.venue = venue; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1447926269; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message containing a user contact. + */ + public static class InputMessageContact extends InputMessageContent { + /** + * Contact to send. + */ + public Contact contact; + + /** + * A message containing a user contact. + */ + public InputMessageContact() { + } + + /** + * A message containing a user contact. + * + * @param contact Contact to send. + */ + public InputMessageContact(Contact contact) { + this.contact = contact; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -982446849; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A dice message. + */ + public static class InputMessageDice extends InputMessageContent { + /** + * Emoji on which the dice throw animation is based. + */ + public String emoji; + /** + * True, if a chat message draft should be deleted. + */ + public boolean clearDraft; + + /** + * A dice message. + */ + public InputMessageDice() { + } + + /** + * A dice message. + * + * @param emoji Emoji on which the dice throw animation is based. + * @param clearDraft True, if a chat message draft should be deleted. + */ + public InputMessageDice(String emoji, boolean clearDraft) { + this.emoji = emoji; + this.clearDraft = clearDraft; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 841574313; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a game; not supported for channels or secret chats. + */ + public static class InputMessageGame extends InputMessageContent { + /** + * User identifier of the bot that owns the game. + */ + public int botUserId; + /** + * Short name of the game. + */ + public String gameShortName; + + /** + * A message with a game; not supported for channels or secret chats. + */ + public InputMessageGame() { + } + + /** + * A message with a game; not supported for channels or secret chats. + * + * @param botUserId User identifier of the bot that owns the game. + * @param gameShortName Short name of the game. + */ + public InputMessageGame(int botUserId, String gameShortName) { + this.botUserId = botUserId; + this.gameShortName = gameShortName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1728000914; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with an invoice; can be used only by bots and only in private chats. + */ + public static class InputMessageInvoice extends InputMessageContent { + /** + * Invoice. + */ + public Invoice invoice; + /** + * Product title; 1-32 characters. + */ + public String title; + /** + * Product description; 0-255 characters. + */ + public String description; + /** + * Product photo URL; optional. + */ + public String photoUrl; + /** + * Product photo size. + */ + public int photoSize; + /** + * Product photo width. + */ + public int photoWidth; + /** + * Product photo height. + */ + public int photoHeight; + /** + * The invoice payload. + */ + public byte[] payload; + /** + * Payment provider token. + */ + public String providerToken; + /** + * JSON-encoded data about the invoice, which will be shared with the payment provider. + */ + public String providerData; + /** + * Unique invoice bot startParameter for the generation of this invoice. + */ + public String startParameter; + + /** + * A message with an invoice; can be used only by bots and only in private chats. + */ + public InputMessageInvoice() { + } + + /** + * A message with an invoice; can be used only by bots and only in private chats. + * + * @param invoice Invoice. + * @param title Product title; 1-32 characters. + * @param description Product description; 0-255 characters. + * @param photoUrl Product photo URL; optional. + * @param photoSize Product photo size. + * @param photoWidth Product photo width. + * @param photoHeight Product photo height. + * @param payload The invoice payload. + * @param providerToken Payment provider token. + * @param providerData JSON-encoded data about the invoice, which will be shared with the payment provider. + * @param startParameter Unique invoice bot startParameter for the generation of this invoice. + */ + public InputMessageInvoice(Invoice invoice, String title, String description, String photoUrl, int photoSize, int photoWidth, int photoHeight, byte[] payload, String providerToken, String providerData, String startParameter) { + this.invoice = invoice; + this.title = title; + this.description = description; + this.photoUrl = photoUrl; + this.photoSize = photoSize; + this.photoWidth = photoWidth; + this.photoHeight = photoHeight; + this.payload = payload; + this.providerToken = providerToken; + this.providerData = providerData; + this.startParameter = startParameter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1038812175; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot. + */ + public static class InputMessagePoll extends InputMessageContent { + /** + * Poll question, 1-255 characters (up to 300 characters for bots). + */ + public String question; + /** + * List of poll answer options, 2-10 strings 1-100 characters each. + */ + public String[] options; + /** + * True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels. + */ + public boolean isAnonymous; + /** + * Type of the poll. + */ + public PollType type; + /** + * Amount of time the poll will be active after creation, in seconds; for bots only. + */ + public int openPeriod; + /** + * Point in time (Unix timestamp) when the poll will be automatically closed; for bots only. + */ + public int closeDate; + /** + * True, if the poll needs to be sent already closed; for bots only. + */ + public boolean isClosed; + + /** + * A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot. + */ + public InputMessagePoll() { + } + + /** + * A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot. + * + * @param question Poll question, 1-255 characters (up to 300 characters for bots). + * @param options List of poll answer options, 2-10 strings 1-100 characters each. + * @param isAnonymous True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels. + * @param type Type of the poll. + * @param openPeriod Amount of time the poll will be active after creation, in seconds; for bots only. + * @param closeDate Point in time (Unix timestamp) when the poll will be automatically closed; for bots only. + * @param isClosed True, if the poll needs to be sent already closed; for bots only. + */ + public InputMessagePoll(String question, String[] options, boolean isAnonymous, PollType type, int openPeriod, int closeDate, boolean isClosed) { + this.question = question; + this.options = options; + this.isAnonymous = isAnonymous; + this.type = type; + this.openPeriod = openPeriod; + this.closeDate = closeDate; + this.isClosed = isClosed; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2054629900; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A forwarded message. + */ + public static class InputMessageForwarded extends InputMessageContent { + /** + * Identifier for the chat this forwarded message came from. + */ + public long fromChatId; + /** + * Identifier of the message to forward. + */ + public long messageId; + /** + * True, if a game message should be shared within a launched game; applies only to game messages. + */ + public boolean inGameShare; + /** + * Options to be used to copy content of the message without a link to the original message. + */ + public MessageCopyOptions copyOptions; + + /** + * A forwarded message. + */ + public InputMessageForwarded() { + } + + /** + * A forwarded message. + * + * @param fromChatId Identifier for the chat this forwarded message came from. + * @param messageId Identifier of the message to forward. + * @param inGameShare True, if a game message should be shared within a launched game; applies only to game messages. + * @param copyOptions Options to be used to copy content of the message without a link to the original message. + */ + public InputMessageForwarded(long fromChatId, long messageId, boolean inGameShare, MessageCopyOptions copyOptions) { + this.fromChatId = fromChatId; + this.messageId = messageId; + this.inGameShare = inGameShare; + this.copyOptions = copyOptions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1696232440; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains information about a Telegram Passport element to be saved. + */ + public abstract static class InputPassportElement extends Object { + } + + /** + * A Telegram Passport element to be saved containing the user's personal details. + */ + public static class InputPassportElementPersonalDetails extends InputPassportElement { + /** + * Personal details of the user. + */ + public PersonalDetails personalDetails; + + /** + * A Telegram Passport element to be saved containing the user's personal details. + */ + public InputPassportElementPersonalDetails() { + } + + /** + * A Telegram Passport element to be saved containing the user's personal details. + * + * @param personalDetails Personal details of the user. + */ + public InputPassportElementPersonalDetails(PersonalDetails personalDetails) { + this.personalDetails = personalDetails; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 164791359; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's passport. + */ + public static class InputPassportElementPassport extends InputPassportElement { + /** + * The passport to be saved. + */ + public InputIdentityDocument passport; + + /** + * A Telegram Passport element to be saved containing the user's passport. + */ + public InputPassportElementPassport() { + } + + /** + * A Telegram Passport element to be saved containing the user's passport. + * + * @param passport The passport to be saved. + */ + public InputPassportElementPassport(InputIdentityDocument passport) { + this.passport = passport; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -497011356; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's driver license. + */ + public static class InputPassportElementDriverLicense extends InputPassportElement { + /** + * The driver license to be saved. + */ + public InputIdentityDocument driverLicense; + + /** + * A Telegram Passport element to be saved containing the user's driver license. + */ + public InputPassportElementDriverLicense() { + } + + /** + * A Telegram Passport element to be saved containing the user's driver license. + * + * @param driverLicense The driver license to be saved. + */ + public InputPassportElementDriverLicense(InputIdentityDocument driverLicense) { + this.driverLicense = driverLicense; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 304813264; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's identity card. + */ + public static class InputPassportElementIdentityCard extends InputPassportElement { + /** + * The identity card to be saved. + */ + public InputIdentityDocument identityCard; + + /** + * A Telegram Passport element to be saved containing the user's identity card. + */ + public InputPassportElementIdentityCard() { + } + + /** + * A Telegram Passport element to be saved containing the user's identity card. + * + * @param identityCard The identity card to be saved. + */ + public InputPassportElementIdentityCard(InputIdentityDocument identityCard) { + this.identityCard = identityCard; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -9963390; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's internal passport. + */ + public static class InputPassportElementInternalPassport extends InputPassportElement { + /** + * The internal passport to be saved. + */ + public InputIdentityDocument internalPassport; + + /** + * A Telegram Passport element to be saved containing the user's internal passport. + */ + public InputPassportElementInternalPassport() { + } + + /** + * A Telegram Passport element to be saved containing the user's internal passport. + * + * @param internalPassport The internal passport to be saved. + */ + public InputPassportElementInternalPassport(InputIdentityDocument internalPassport) { + this.internalPassport = internalPassport; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 715360043; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's address. + */ + public static class InputPassportElementAddress extends InputPassportElement { + /** + * The address to be saved. + */ + public Address address; + + /** + * A Telegram Passport element to be saved containing the user's address. + */ + public InputPassportElementAddress() { + } + + /** + * A Telegram Passport element to be saved containing the user's address. + * + * @param address The address to be saved. + */ + public InputPassportElementAddress(Address address) { + this.address = address; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 461630480; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's utility bill. + */ + public static class InputPassportElementUtilityBill extends InputPassportElement { + /** + * The utility bill to be saved. + */ + public InputPersonalDocument utilityBill; + + /** + * A Telegram Passport element to be saved containing the user's utility bill. + */ + public InputPassportElementUtilityBill() { + } + + /** + * A Telegram Passport element to be saved containing the user's utility bill. + * + * @param utilityBill The utility bill to be saved. + */ + public InputPassportElementUtilityBill(InputPersonalDocument utilityBill) { + this.utilityBill = utilityBill; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1389203841; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's bank statement. + */ + public static class InputPassportElementBankStatement extends InputPassportElement { + /** + * The bank statement to be saved. + */ + public InputPersonalDocument bankStatement; + + /** + * A Telegram Passport element to be saved containing the user's bank statement. + */ + public InputPassportElementBankStatement() { + } + + /** + * A Telegram Passport element to be saved containing the user's bank statement. + * + * @param bankStatement The bank statement to be saved. + */ + public InputPassportElementBankStatement(InputPersonalDocument bankStatement) { + this.bankStatement = bankStatement; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -26585208; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's rental agreement. + */ + public static class InputPassportElementRentalAgreement extends InputPassportElement { + /** + * The rental agreement to be saved. + */ + public InputPersonalDocument rentalAgreement; + + /** + * A Telegram Passport element to be saved containing the user's rental agreement. + */ + public InputPassportElementRentalAgreement() { + } + + /** + * A Telegram Passport element to be saved containing the user's rental agreement. + * + * @param rentalAgreement The rental agreement to be saved. + */ + public InputPassportElementRentalAgreement(InputPersonalDocument rentalAgreement) { + this.rentalAgreement = rentalAgreement; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1736154155; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's passport registration. + */ + public static class InputPassportElementPassportRegistration extends InputPassportElement { + /** + * The passport registration page to be saved. + */ + public InputPersonalDocument passportRegistration; + + /** + * A Telegram Passport element to be saved containing the user's passport registration. + */ + public InputPassportElementPassportRegistration() { + } + + /** + * A Telegram Passport element to be saved containing the user's passport registration. + * + * @param passportRegistration The passport registration page to be saved. + */ + public InputPassportElementPassportRegistration(InputPersonalDocument passportRegistration) { + this.passportRegistration = passportRegistration; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1314562128; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's temporary registration. + */ + public static class InputPassportElementTemporaryRegistration extends InputPassportElement { + /** + * The temporary registration document to be saved. + */ + public InputPersonalDocument temporaryRegistration; + + /** + * A Telegram Passport element to be saved containing the user's temporary registration. + */ + public InputPassportElementTemporaryRegistration() { + } + + /** + * A Telegram Passport element to be saved containing the user's temporary registration. + * + * @param temporaryRegistration The temporary registration document to be saved. + */ + public InputPassportElementTemporaryRegistration(InputPersonalDocument temporaryRegistration) { + this.temporaryRegistration = temporaryRegistration; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1913238047; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's phone number. + */ + public static class InputPassportElementPhoneNumber extends InputPassportElement { + /** + * The phone number to be saved. + */ + public String phoneNumber; + + /** + * A Telegram Passport element to be saved containing the user's phone number. + */ + public InputPassportElementPhoneNumber() { + } + + /** + * A Telegram Passport element to be saved containing the user's phone number. + * + * @param phoneNumber The phone number to be saved. + */ + public InputPassportElementPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1319357497; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element to be saved containing the user's email address. + */ + public static class InputPassportElementEmailAddress extends InputPassportElement { + /** + * The email address to be saved. + */ + public String emailAddress; + + /** + * A Telegram Passport element to be saved containing the user's email address. + */ + public InputPassportElementEmailAddress() { + } + + /** + * A Telegram Passport element to be saved containing the user's email address. + * + * @param emailAddress The email address to be saved. + */ + public InputPassportElementEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -248605659; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the description of an error in a Telegram Passport element; for bots only. + */ + public static class InputPassportElementError extends Object { + /** + * Type of Telegram Passport element that has the error. + */ + public PassportElementType type; + /** + * Error message. + */ + public String message; + /** + * Error source. + */ + public InputPassportElementErrorSource source; + + /** + * Contains the description of an error in a Telegram Passport element; for bots only. + */ + public InputPassportElementError() { + } + + /** + * Contains the description of an error in a Telegram Passport element; for bots only. + * + * @param type Type of Telegram Passport element that has the error. + * @param message Error message. + * @param source Error source. + */ + public InputPassportElementError(PassportElementType type, String message, InputPassportElementErrorSource source) { + this.type = type; + this.message = message; + this.source = source; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 285756898; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains the description of an error in a Telegram Passport element; for bots only. + */ + public abstract static class InputPassportElementErrorSource extends Object { + } + + /** + * The element contains an error in an unspecified place. The error will be considered resolved when new data is added. + */ + public static class InputPassportElementErrorSourceUnspecified extends InputPassportElementErrorSource { + /** + * Current hash of the entire element. + */ + public byte[] elementHash; + + /** + * The element contains an error in an unspecified place. The error will be considered resolved when new data is added. + */ + public InputPassportElementErrorSourceUnspecified() { + } + + /** + * The element contains an error in an unspecified place. The error will be considered resolved when new data is added. + * + * @param elementHash Current hash of the entire element. + */ + public InputPassportElementErrorSourceUnspecified(byte[] elementHash) { + this.elementHash = elementHash; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 267230319; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A data field contains an error. The error is considered resolved when the field's value changes. + */ + public static class InputPassportElementErrorSourceDataField extends InputPassportElementErrorSource { + /** + * Field name. + */ + public String fieldName; + /** + * Current data hash. + */ + public byte[] dataHash; + + /** + * A data field contains an error. The error is considered resolved when the field's value changes. + */ + public InputPassportElementErrorSourceDataField() { + } + + /** + * A data field contains an error. The error is considered resolved when the field's value changes. + * + * @param fieldName Field name. + * @param dataHash Current data hash. + */ + public InputPassportElementErrorSourceDataField(String fieldName, byte[] dataHash) { + this.fieldName = fieldName; + this.dataHash = dataHash; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -426795002; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes. + */ + public static class InputPassportElementErrorSourceFrontSide extends InputPassportElementErrorSource { + /** + * Current hash of the file containing the front side. + */ + public byte[] fileHash; + + /** + * The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes. + */ + public InputPassportElementErrorSourceFrontSide() { + } + + /** + * The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes. + * + * @param fileHash Current hash of the file containing the front side. + */ + public InputPassportElementErrorSourceFrontSide(byte[] fileHash) { + this.fileHash = fileHash; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 588023741; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes. + */ + public static class InputPassportElementErrorSourceReverseSide extends InputPassportElementErrorSource { + /** + * Current hash of the file containing the reverse side. + */ + public byte[] fileHash; + + /** + * The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes. + */ + public InputPassportElementErrorSourceReverseSide() { + } + + /** + * The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes. + * + * @param fileHash Current hash of the file containing the reverse side. + */ + public InputPassportElementErrorSourceReverseSide(byte[] fileHash) { + this.fileHash = fileHash; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 413072891; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The selfie contains an error. The error is considered resolved when the file with the selfie changes. + */ + public static class InputPassportElementErrorSourceSelfie extends InputPassportElementErrorSource { + /** + * Current hash of the file containing the selfie. + */ + public byte[] fileHash; + + /** + * The selfie contains an error. The error is considered resolved when the file with the selfie changes. + */ + public InputPassportElementErrorSourceSelfie() { + } + + /** + * The selfie contains an error. The error is considered resolved when the file with the selfie changes. + * + * @param fileHash Current hash of the file containing the selfie. + */ + public InputPassportElementErrorSourceSelfie(byte[] fileHash) { + this.fileHash = fileHash; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -773575528; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes. + */ + public static class InputPassportElementErrorSourceTranslationFile extends InputPassportElementErrorSource { + /** + * Current hash of the file containing the translation. + */ + public byte[] fileHash; + + /** + * One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes. + */ + public InputPassportElementErrorSourceTranslationFile() { + } + + /** + * One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes. + * + * @param fileHash Current hash of the file containing the translation. + */ + public InputPassportElementErrorSourceTranslationFile(byte[] fileHash) { + this.fileHash = fileHash; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 505842299; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The translation of the document contains an error. The error is considered resolved when the list of files changes. + */ + public static class InputPassportElementErrorSourceTranslationFiles extends InputPassportElementErrorSource { + /** + * Current hashes of all files with the translation. + */ + public byte[][] fileHashes; + + /** + * The translation of the document contains an error. The error is considered resolved when the list of files changes. + */ + public InputPassportElementErrorSourceTranslationFiles() { + } + + /** + * The translation of the document contains an error. The error is considered resolved when the list of files changes. + * + * @param fileHashes Current hashes of all files with the translation. + */ + public InputPassportElementErrorSourceTranslationFiles(byte[][] fileHashes) { + this.fileHashes = fileHashes; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -527254048; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file contains an error. The error is considered resolved when the file changes. + */ + public static class InputPassportElementErrorSourceFile extends InputPassportElementErrorSource { + /** + * Current hash of the file which has the error. + */ + public byte[] fileHash; + + /** + * The file contains an error. The error is considered resolved when the file changes. + */ + public InputPassportElementErrorSourceFile() { + } + + /** + * The file contains an error. The error is considered resolved when the file changes. + * + * @param fileHash Current hash of the file which has the error. + */ + public InputPassportElementErrorSourceFile(byte[] fileHash) { + this.fileHash = fileHash; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -298492469; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of attached files contains an error. The error is considered resolved when the file list changes. + */ + public static class InputPassportElementErrorSourceFiles extends InputPassportElementErrorSource { + /** + * Current hashes of all attached files. + */ + public byte[][] fileHashes; + + /** + * The list of attached files contains an error. The error is considered resolved when the file list changes. + */ + public InputPassportElementErrorSourceFiles() { + } + + /** + * The list of attached files contains an error. The error is considered resolved when the file list changes. + * + * @param fileHashes Current hashes of all attached files. + */ + public InputPassportElementErrorSourceFiles(byte[][] fileHashes) { + this.fileHashes = fileHashes; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2008541640; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A personal document to be saved to Telegram Passport. + */ + public static class InputPersonalDocument extends Object { + /** + * List of files containing the pages of the document. + */ + public InputFile[] files; + /** + * List of files containing a certified English translation of the document. + */ + public InputFile[] translation; + + /** + * A personal document to be saved to Telegram Passport. + */ + public InputPersonalDocument() { + } + + /** + * A personal document to be saved to Telegram Passport. + * + * @param files List of files containing the pages of the document. + * @param translation List of files containing a certified English translation of the document. + */ + public InputPersonalDocument(InputFile[] files, InputFile[] translation) { + this.files = files; + this.translation = translation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1676966826; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a sticker that needs to be added to a sticker set. + */ + public abstract static class InputSticker extends Object { + } + + /** + * A static sticker in PNG format, which will be converted to WEBP server-side. + */ + public static class InputStickerStatic extends InputSticker { + /** + * PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square. + */ + public InputFile sticker; + /** + * Emojis corresponding to the sticker. + */ + public String emojis; + /** + * For masks, position where the mask should be placed; may be null. + */ + public MaskPosition maskPosition; + + /** + * A static sticker in PNG format, which will be converted to WEBP server-side. + */ + public InputStickerStatic() { + } + + /** + * A static sticker in PNG format, which will be converted to WEBP server-side. + * + * @param sticker PNG image with the sticker; must be up to 512 KB in size and fit in a 512x512 square. + * @param emojis Emojis corresponding to the sticker. + * @param maskPosition For masks, position where the mask should be placed; may be null. + */ + public InputStickerStatic(InputFile sticker, String emojis, MaskPosition maskPosition) { + this.sticker = sticker; + this.emojis = emojis; + this.maskPosition = maskPosition; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1409680603; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An animated sticker in TGS format. + */ + public static class InputStickerAnimated extends InputSticker { + /** + * File with the animated sticker. Only local or uploaded within a week files are supported. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements. + */ + public InputFile sticker; + /** + * Emojis corresponding to the sticker. + */ + public String emojis; + + /** + * An animated sticker in TGS format. + */ + public InputStickerAnimated() { + } + + /** + * An animated sticker in TGS format. + * + * @param sticker File with the animated sticker. Only local or uploaded within a week files are supported. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements. + * @param emojis Emojis corresponding to the sticker. + */ + public InputStickerAnimated(InputFile sticker, String emojis) { + this.sticker = sticker; + this.emojis = emojis; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1127265952; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size. + */ + public static class InputThumbnail extends Object { + /** + * Thumbnail file to send. Sending thumbnails by fileId is currently not supported. + */ + public InputFile thumbnail; + /** + * Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown. + */ + public int width; + /** + * Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown. + */ + public int height; + + /** + * A thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size. + */ + public InputThumbnail() { + } + + /** + * A thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size. + * + * @param thumbnail Thumbnail file to send. Sending thumbnails by fileId is currently not supported. + * @param width Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown. + * @param height Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown. + */ + public InputThumbnail(InputFile thumbnail, int width, int height) { + this.thumbnail = thumbnail; + this.width = width; + this.height = height; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1582387236; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Product invoice. + */ + public static class Invoice extends Object { + /** + * ISO 4217 currency code. + */ + public String currency; + /** + * A list of objects used to calculate the total price of the product. + */ + public LabeledPricePart[] priceParts; + /** + * True, if the payment is a test payment. + */ + public boolean isTest; + /** + * True, if the user's name is needed for payment. + */ + public boolean needName; + /** + * True, if the user's phone number is needed for payment. + */ + public boolean needPhoneNumber; + /** + * True, if the user's email address is needed for payment. + */ + public boolean needEmailAddress; + /** + * True, if the user's shipping address is needed for payment. + */ + public boolean needShippingAddress; + /** + * True, if the user's phone number will be sent to the provider. + */ + public boolean sendPhoneNumberToProvider; + /** + * True, if the user's email address will be sent to the provider. + */ + public boolean sendEmailAddressToProvider; + /** + * True, if the total price depends on the shipping method. + */ + public boolean isFlexible; + + /** + * Product invoice. + */ + public Invoice() { + } + + /** + * Product invoice. + * + * @param currency ISO 4217 currency code. + * @param priceParts A list of objects used to calculate the total price of the product. + * @param isTest True, if the payment is a test payment. + * @param needName True, if the user's name is needed for payment. + * @param needPhoneNumber True, if the user's phone number is needed for payment. + * @param needEmailAddress True, if the user's email address is needed for payment. + * @param needShippingAddress True, if the user's shipping address is needed for payment. + * @param sendPhoneNumberToProvider True, if the user's phone number will be sent to the provider. + * @param sendEmailAddressToProvider True, if the user's email address will be sent to the provider. + * @param isFlexible True, if the total price depends on the shipping method. + */ + public Invoice(String currency, LabeledPricePart[] priceParts, boolean isTest, boolean needName, boolean needPhoneNumber, boolean needEmailAddress, boolean needShippingAddress, boolean sendPhoneNumberToProvider, boolean sendEmailAddressToProvider, boolean isFlexible) { + this.currency = currency; + this.priceParts = priceParts; + this.isTest = isTest; + this.needName = needName; + this.needPhoneNumber = needPhoneNumber; + this.needEmailAddress = needEmailAddress; + this.needShippingAddress = needShippingAddress; + this.sendPhoneNumberToProvider = sendPhoneNumberToProvider; + this.sendEmailAddressToProvider = sendEmailAddressToProvider; + this.isFlexible = isFlexible; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -368451690; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents one member of a JSON object. + */ + public static class JsonObjectMember extends Object { + /** + * Member's key. + */ + public String key; + /** + * Member's value. + */ + public JsonValue value; + + /** + * Represents one member of a JSON object. + */ + public JsonObjectMember() { + } + + /** + * Represents one member of a JSON object. + * + * @param key Member's key. + * @param value Member's value. + */ + public JsonObjectMember(String key, JsonValue value) { + this.key = key; + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1803309418; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a JSON value. + */ + public abstract static class JsonValue extends Object { + } + + /** + * Represents a null JSON value. + */ + public static class JsonValueNull extends JsonValue { + + /** + * Represents a null JSON value. + */ + public JsonValueNull() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -92872499; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a boolean JSON value. + */ + public static class JsonValueBoolean extends JsonValue { + /** + * The value. + */ + public boolean value; + + /** + * Represents a boolean JSON value. + */ + public JsonValueBoolean() { + } + + /** + * Represents a boolean JSON value. + * + * @param value The value. + */ + public JsonValueBoolean(boolean value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2142186576; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a numeric JSON value. + */ + public static class JsonValueNumber extends JsonValue { + /** + * The value. + */ + public double value; + + /** + * Represents a numeric JSON value. + */ + public JsonValueNumber() { + } + + /** + * Represents a numeric JSON value. + * + * @param value The value. + */ + public JsonValueNumber(double value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1010822033; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a string JSON value. + */ + public static class JsonValueString extends JsonValue { + /** + * The value. + */ + public String value; + + /** + * Represents a string JSON value. + */ + public JsonValueString() { + } + + /** + * Represents a string JSON value. + * + * @param value The value. + */ + public JsonValueString(String value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1597947313; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a JSON array. + */ + public static class JsonValueArray extends JsonValue { + /** + * The list of array elements. + */ + public JsonValue[] values; + + /** + * Represents a JSON array. + */ + public JsonValueArray() { + } + + /** + * Represents a JSON array. + * + * @param values The list of array elements. + */ + public JsonValueArray(JsonValue[] values) { + this.values = values; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -183913546; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a JSON object. + */ + public static class JsonValueObject extends JsonValue { + /** + * The list of object members. + */ + public JsonObjectMember[] members; + + /** + * Represents a JSON object. + */ + public JsonValueObject() { + } + + /** + * Represents a JSON object. + * + * @param members The list of object members. + */ + public JsonValueObject(JsonObjectMember[] members) { + this.members = members; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 520252026; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a single button in a bot keyboard. + */ + public static class KeyboardButton extends Object { + /** + * Text of the button. + */ + public String text; + /** + * Type of the button. + */ + public KeyboardButtonType type; + + /** + * Represents a single button in a bot keyboard. + */ + public KeyboardButton() { + } + + /** + * Represents a single button in a bot keyboard. + * + * @param text Text of the button. + * @param type Type of the button. + */ + public KeyboardButton(String text, KeyboardButtonType type) { + this.text = text; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2069836172; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a keyboard button type. + */ + public abstract static class KeyboardButtonType extends Object { + } + + /** + * A simple button, with text that should be sent when the button is pressed. + */ + public static class KeyboardButtonTypeText extends KeyboardButtonType { + + /** + * A simple button, with text that should be sent when the button is pressed. + */ + public KeyboardButtonTypeText() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1773037256; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button that sends the user's phone number when pressed; available only in private chats. + */ + public static class KeyboardButtonTypeRequestPhoneNumber extends KeyboardButtonType { + + /** + * A button that sends the user's phone number when pressed; available only in private chats. + */ + public KeyboardButtonTypeRequestPhoneNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1529235527; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button that sends the user's location when pressed; available only in private chats. + */ + public static class KeyboardButtonTypeRequestLocation extends KeyboardButtonType { + + /** + * A button that sends the user's location when pressed; available only in private chats. + */ + public KeyboardButtonTypeRequestLocation() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -125661955; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A button that allows the user to create and send a poll when pressed; available only in private chats. + */ + public static class KeyboardButtonTypeRequestPoll extends KeyboardButtonType { + /** + * If true, only regular polls must be allowed to create. + */ + public boolean forceRegular; + /** + * If true, only polls in quiz mode must be allowed to create. + */ + public boolean forceQuiz; + + /** + * A button that allows the user to create and send a poll when pressed; available only in private chats. + */ + public KeyboardButtonTypeRequestPoll() { + } + + /** + * A button that allows the user to create and send a poll when pressed; available only in private chats. + * + * @param forceRegular If true, only regular polls must be allowed to create. + * @param forceQuiz If true, only polls in quiz mode must be allowed to create. + */ + public KeyboardButtonTypeRequestPoll(boolean forceRegular, boolean forceQuiz) { + this.forceRegular = forceRegular; + this.forceQuiz = forceQuiz; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1902435512; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Portion of the price of a product (e.g., "delivery cost", "tax amount"). + */ + public static class LabeledPricePart extends Object { + /** + * Label for this portion of the product price. + */ + public String label; + /** + * Currency amount in minimal quantity of the currency. + */ + public long amount; + + /** + * Portion of the price of a product (e.g., "delivery cost", "tax amount"). + */ + public LabeledPricePart() { + } + + /** + * Portion of the price of a product (e.g., "delivery cost", "tax amount"). + * + * @param label Label for this portion of the product price. + * @param amount Currency amount in minimal quantity of the currency. + */ + public LabeledPricePart(String label, long amount) { + this.label = label; + this.amount = amount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 552789798; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a language pack. + */ + public static class LanguagePackInfo extends Object { + /** + * Unique language pack identifier. + */ + public String id; + /** + * Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs. + */ + public String baseLanguagePackId; + /** + * Language name. + */ + public String name; + /** + * Name of the language in that language. + */ + public String nativeName; + /** + * A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info. + */ + public String pluralCode; + /** + * True, if the language pack is official. + */ + public boolean isOfficial; + /** + * True, if the language pack strings are RTL. + */ + public boolean isRtl; + /** + * True, if the language pack is a beta language pack. + */ + public boolean isBeta; + /** + * True, if the language pack is installed by the current user. + */ + public boolean isInstalled; + /** + * Total number of non-deleted strings from the language pack. + */ + public int totalStringCount; + /** + * Total number of translated strings from the language pack. + */ + public int translatedStringCount; + /** + * Total number of non-deleted strings from the language pack available locally. + */ + public int localStringCount; + /** + * Link to language translation interface; empty for custom local language packs. + */ + public String translationUrl; + + /** + * Contains information about a language pack. + */ + public LanguagePackInfo() { + } + + /** + * Contains information about a language pack. + * + * @param id Unique language pack identifier. + * @param baseLanguagePackId Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs. + * @param name Language name. + * @param nativeName Name of the language in that language. + * @param pluralCode A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info. + * @param isOfficial True, if the language pack is official. + * @param isRtl True, if the language pack strings are RTL. + * @param isBeta True, if the language pack is a beta language pack. + * @param isInstalled True, if the language pack is installed by the current user. + * @param totalStringCount Total number of non-deleted strings from the language pack. + * @param translatedStringCount Total number of translated strings from the language pack. + * @param localStringCount Total number of non-deleted strings from the language pack available locally. + * @param translationUrl Link to language translation interface; empty for custom local language packs. + */ + public LanguagePackInfo(String id, String baseLanguagePackId, String name, String nativeName, String pluralCode, boolean isOfficial, boolean isRtl, boolean isBeta, boolean isInstalled, int totalStringCount, int translatedStringCount, int localStringCount, String translationUrl) { + this.id = id; + this.baseLanguagePackId = baseLanguagePackId; + this.name = name; + this.nativeName = nativeName; + this.pluralCode = pluralCode; + this.isOfficial = isOfficial; + this.isRtl = isRtl; + this.isBeta = isBeta; + this.isInstalled = isInstalled; + this.totalStringCount = totalStringCount; + this.translatedStringCount = translatedStringCount; + this.localStringCount = localStringCount; + this.translationUrl = translationUrl; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 542199642; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents one language pack string. + */ + public static class LanguagePackString extends Object { + /** + * String key. + */ + public String key; + /** + * String value. + */ + public LanguagePackStringValue value; + + /** + * Represents one language pack string. + */ + public LanguagePackString() { + } + + /** + * Represents one language pack string. + * + * @param key String key. + * @param value String value. + */ + public LanguagePackString(String key, LanguagePackStringValue value) { + this.key = key; + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1307632736; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents the value of a string in a language pack. + */ + public abstract static class LanguagePackStringValue extends Object { + } + + /** + * An ordinary language pack string. + */ + public static class LanguagePackStringValueOrdinary extends LanguagePackStringValue { + /** + * String value. + */ + public String value; + + /** + * An ordinary language pack string. + */ + public LanguagePackStringValueOrdinary() { + } + + /** + * An ordinary language pack string. + * + * @param value String value. + */ + public LanguagePackStringValueOrdinary(String value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -249256352; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info. + */ + public static class LanguagePackStringValuePluralized extends LanguagePackStringValue { + /** + * Value for zero objects. + */ + public String zeroValue; + /** + * Value for one object. + */ + public String oneValue; + /** + * Value for two objects. + */ + public String twoValue; + /** + * Value for few objects. + */ + public String fewValue; + /** + * Value for many objects. + */ + public String manyValue; + /** + * Default value. + */ + public String otherValue; + + /** + * A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info. + */ + public LanguagePackStringValuePluralized() { + } + + /** + * A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info. + * + * @param zeroValue Value for zero objects. + * @param oneValue Value for one object. + * @param twoValue Value for two objects. + * @param fewValue Value for few objects. + * @param manyValue Value for many objects. + * @param otherValue Default value. + */ + public LanguagePackStringValuePluralized(String zeroValue, String oneValue, String twoValue, String fewValue, String manyValue, String otherValue) { + this.zeroValue = zeroValue; + this.oneValue = oneValue; + this.twoValue = twoValue; + this.fewValue = fewValue; + this.manyValue = manyValue; + this.otherValue = otherValue; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1906840261; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A deleted language pack string, the value should be taken from the built-in english language pack. + */ + public static class LanguagePackStringValueDeleted extends LanguagePackStringValue { + + /** + * A deleted language pack string, the value should be taken from the built-in english language pack. + */ + public LanguagePackStringValueDeleted() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1834792698; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of language pack strings. + */ + public static class LanguagePackStrings extends Object { + /** + * A list of language pack strings. + */ + public LanguagePackString[] strings; + + /** + * Contains a list of language pack strings. + */ + public LanguagePackStrings() { + } + + /** + * Contains a list of language pack strings. + * + * @param strings A list of language pack strings. + */ + public LanguagePackStrings(LanguagePackString[] strings) { + this.strings = strings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1172082922; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a local file. + */ + public static class LocalFile extends Object { + /** + * Local path to the locally available file part; may be empty. + */ + public String path; + /** + * True, if it is possible to try to download or generate the file. + */ + public boolean canBeDownloaded; + /** + * True, if the file can be deleted. + */ + public boolean canBeDeleted; + /** + * True, if the file is currently being downloaded (or a local copy is being generated by some other means). + */ + public boolean isDownloadingActive; + /** + * True, if the local copy is fully available. + */ + public boolean isDownloadingCompleted; + /** + * Download will be started from this offset. downloadedPrefixSize is calculated from this offset. + */ + public int downloadOffset; + /** + * If isDownloadingCompleted is false, then only some prefix of the file starting from downloadOffset is ready to be read. downloadedPrefixSize is the size of that prefix. + */ + public int downloadedPrefixSize; + /** + * Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage. + */ + public int downloadedSize; + + /** + * Represents a local file. + */ + public LocalFile() { + } + + /** + * Represents a local file. + * + * @param path Local path to the locally available file part; may be empty. + * @param canBeDownloaded True, if it is possible to try to download or generate the file. + * @param canBeDeleted True, if the file can be deleted. + * @param isDownloadingActive True, if the file is currently being downloaded (or a local copy is being generated by some other means). + * @param isDownloadingCompleted True, if the local copy is fully available. + * @param downloadOffset Download will be started from this offset. downloadedPrefixSize is calculated from this offset. + * @param downloadedPrefixSize If isDownloadingCompleted is false, then only some prefix of the file starting from downloadOffset is ready to be read. downloadedPrefixSize is the size of that prefix. + * @param downloadedSize Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage. + */ + public LocalFile(String path, boolean canBeDownloaded, boolean canBeDeleted, boolean isDownloadingActive, boolean isDownloadingCompleted, int downloadOffset, int downloadedPrefixSize, int downloadedSize) { + this.path = path; + this.canBeDownloaded = canBeDownloaded; + this.canBeDeleted = canBeDeleted; + this.isDownloadingActive = isDownloadingActive; + this.isDownloadingCompleted = isDownloadingCompleted; + this.downloadOffset = downloadOffset; + this.downloadedPrefixSize = downloadedPrefixSize; + this.downloadedSize = downloadedSize; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1166400317; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about the current localization target. + */ + public static class LocalizationTargetInfo extends Object { + /** + * List of available language packs for this application. + */ + public LanguagePackInfo[] languagePacks; + + /** + * Contains information about the current localization target. + */ + public LocalizationTargetInfo() { + } + + /** + * Contains information about the current localization target. + * + * @param languagePacks List of available language packs for this application. + */ + public LocalizationTargetInfo(LanguagePackInfo[] languagePacks) { + this.languagePacks = languagePacks; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2048670809; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a location on planet Earth. + */ + public static class Location extends Object { + /** + * Latitude of the location in degrees; as defined by the sender. + */ + public double latitude; + /** + * Longitude of the location, in degrees; as defined by the sender. + */ + public double longitude; + + /** + * Describes a location on planet Earth. + */ + public Location() { + } + + /** + * Describes a location on planet Earth. + * + * @param latitude Latitude of the location in degrees; as defined by the sender. + * @param longitude Longitude of the location, in degrees; as defined by the sender. + */ + public Location(double latitude, double longitude) { + this.latitude = latitude; + this.longitude = longitude; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 749028016; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a stream to which TDLib internal log is written. + */ + public abstract static class LogStream extends Object { + } + + /** + * The log is written to stderr or an OS specific log. + */ + public static class LogStreamDefault extends LogStream { + + /** + * The log is written to stderr or an OS specific log. + */ + public LogStreamDefault() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1390581436; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The log is written to a file. + */ + public static class LogStreamFile extends LogStream { + /** + * Path to the file to where the internal TDLib log will be written. + */ + public String path; + /** + * The maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated. + */ + public long maxFileSize; + /** + * Pass true to additionally redirect stderr to the log file. Ignored on Windows. + */ + public boolean redirectStderr; + + /** + * The log is written to a file. + */ + public LogStreamFile() { + } + + /** + * The log is written to a file. + * + * @param path Path to the file to where the internal TDLib log will be written. + * @param maxFileSize The maximum size of the file to where the internal TDLib log is written before the file will be auto-rotated. + * @param redirectStderr Pass true to additionally redirect stderr to the log file. Ignored on Windows. + */ + public LogStreamFile(String path, long maxFileSize, boolean redirectStderr) { + this.path = path; + this.maxFileSize = maxFileSize; + this.redirectStderr = redirectStderr; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1532136933; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The log is written nowhere. + */ + public static class LogStreamEmpty extends LogStream { + + /** + * The log is written nowhere. + */ + public LogStreamEmpty() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -499912244; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of available TDLib internal log tags. + */ + public static class LogTags extends Object { + /** + * List of log tags. + */ + public String[] tags; + + /** + * Contains a list of available TDLib internal log tags. + */ + public LogTags() { + } + + /** + * Contains a list of available TDLib internal log tags. + * + * @param tags List of log tags. + */ + public LogTags(String[] tags) { + this.tags = tags; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1604930601; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a TDLib internal log verbosity level. + */ + public static class LogVerbosityLevel extends Object { + /** + * Log verbosity level. + */ + public int verbosityLevel; + + /** + * Contains a TDLib internal log verbosity level. + */ + public LogVerbosityLevel() { + } + + /** + * Contains a TDLib internal log verbosity level. + * + * @param verbosityLevel Log verbosity level. + */ + public LogVerbosityLevel(int verbosityLevel) { + this.verbosityLevel = verbosityLevel; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1734624234; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl. + */ + public abstract static class LoginUrlInfo extends Object { + } + + /** + * An HTTP url needs to be open. + */ + public static class LoginUrlInfoOpen extends LoginUrlInfo { + /** + * The URL to open. + */ + public String url; + /** + * True, if there is no need to show an ordinary open URL confirm. + */ + public boolean skipConfirm; + + /** + * An HTTP url needs to be open. + */ + public LoginUrlInfoOpen() { + } + + /** + * An HTTP url needs to be open. + * + * @param url The URL to open. + * @param skipConfirm True, if there is no need to show an ordinary open URL confirm. + */ + public LoginUrlInfoOpen(String url, boolean skipConfirm) { + this.url = url; + this.skipConfirm = skipConfirm; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1079045420; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An authorization confirmation dialog needs to be shown to the user. + */ + public static class LoginUrlInfoRequestConfirmation extends LoginUrlInfo { + /** + * An HTTP URL to be opened. + */ + public String url; + /** + * A domain of the URL. + */ + public String domain; + /** + * User identifier of a bot linked with the website. + */ + public int botUserId; + /** + * True, if the user needs to be requested to give the permission to the bot to send them messages. + */ + public boolean requestWriteAccess; + + /** + * An authorization confirmation dialog needs to be shown to the user. + */ + public LoginUrlInfoRequestConfirmation() { + } + + /** + * An authorization confirmation dialog needs to be shown to the user. + * + * @param url An HTTP URL to be opened. + * @param domain A domain of the URL. + * @param botUserId User identifier of a bot linked with the website. + * @param requestWriteAccess True, if the user needs to be requested to give the permission to the bot to send them messages. + */ + public LoginUrlInfoRequestConfirmation(String url, String domain, int botUserId, boolean requestWriteAccess) { + this.url = url; + this.domain = domain; + this.botUserId = botUserId; + this.requestWriteAccess = requestWriteAccess; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1761898342; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Part of the face, relative to which a mask should be placed. + */ + public abstract static class MaskPoint extends Object { + } + + /** + * A mask should be placed relatively to the forehead. + */ + public static class MaskPointForehead extends MaskPoint { + + /** + * A mask should be placed relatively to the forehead. + */ + public MaskPointForehead() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1027512005; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A mask should be placed relatively to the eyes. + */ + public static class MaskPointEyes extends MaskPoint { + + /** + * A mask should be placed relatively to the eyes. + */ + public MaskPointEyes() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1748310861; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A mask should be placed relatively to the mouth. + */ + public static class MaskPointMouth extends MaskPoint { + + /** + * A mask should be placed relatively to the mouth. + */ + public MaskPointMouth() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 411773406; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A mask should be placed relatively to the chin. + */ + public static class MaskPointChin extends MaskPoint { + + /** + * A mask should be placed relatively to the chin. + */ + public MaskPointChin() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 534995335; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Position on a photo where a mask should be placed. + */ + public static class MaskPosition extends Object { + /** + * Part of the face, relative to which the mask should be placed. + */ + public MaskPoint point; + /** + * Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position.) + */ + public double xShift; + /** + * Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position.) + */ + public double yShift; + /** + * Mask scaling coefficient. (For example, 2.0 means a doubled size.) + */ + public double scale; + + /** + * Position on a photo where a mask should be placed. + */ + public MaskPosition() { + } + + /** + * Position on a photo where a mask should be placed. + * + * @param point Part of the face, relative to which the mask should be placed. + * @param xShift Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position.) + * @param yShift Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position.) + * @param scale Mask scaling coefficient. (For example, 2.0 means a doubled size.) + */ + public MaskPosition(MaskPoint point, double xShift, double yShift, double scale) { + this.point = point; + this.xShift = xShift; + this.yShift = yShift; + this.scale = scale; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2097433026; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a message. + */ + public static class Message extends Object { + /** + * Message identifier; unique for the chat to which the message belongs. + */ + public long id; + /** + * Identifier of the user who sent the message; 0 if unknown. Currently, it is unknown for channel posts, for channel posts automatically forwarded to discussion group and for anonymously sent supergroup messages. + */ + public int senderUserId; + /** + * Identifier of the chat on behalf of which the message was sent; 0 if none. + */ + public long senderChatId; + /** + * Chat identifier. + */ + public long chatId; + /** + * Information about the sending state of the message; may be null. + */ + public MessageSendingState sendingState; + /** + * Information about the scheduling state of the message; may be null. + */ + public MessageSchedulingState schedulingState; + /** + * True, if the message is outgoing. + */ + public boolean isOutgoing; + /** + * True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application. + */ + public boolean canBeEdited; + /** + * True, if the message can be forwarded. + */ + public boolean canBeForwarded; + /** + * True, if the message can be deleted only for the current user while other users will continue to see it. + */ + public boolean canBeDeletedOnlyForSelf; + /** + * True, if the message can be deleted for all users. + */ + public boolean canBeDeletedForAllUsers; + /** + * True, if the message statistics are available. + */ + public boolean canGetStatistics; + /** + * True, if the message thread info is available. + */ + public boolean canGetMessageThread; + /** + * True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts. + */ + public boolean isChannelPost; + /** + * True, if the message contains an unread mention for the current user. + */ + public boolean containsUnreadMention; + /** + * Point in time (Unix timestamp) when the message was sent. + */ + public int date; + /** + * Point in time (Unix timestamp) when the message was last edited. + */ + public int editDate; + /** + * Information about the initial message sender; may be null. + */ + public MessageForwardInfo forwardInfo; + /** + * Information about interactions with the message; may be null. + */ + public MessageInteractionInfo interactionInfo; + /** + * If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different replyInChatId and chatId. + */ + public long replyInChatId; + /** + * If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message. + */ + public long replyToMessageId; + /** + * If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs. + */ + public long messageThreadId; + /** + * For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires. + */ + public int ttl; + /** + * Time left before the message expires, in seconds. + */ + public double ttlExpiresIn; + /** + * If non-zero, the user identifier of the bot through which this message was sent. + */ + public int viaBotUserId; + /** + * For channel posts, optional author signature. + */ + public String authorSignature; + /** + * Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums. + */ + public long mediaAlbumId; + /** + * If non-empty, contains a human-readable description of the reason why access to this message must be restricted. + */ + public String restrictionReason; + /** + * Content of the message. + */ + public MessageContent content; + /** + * Reply markup for the message; may be null. + */ + public ReplyMarkup replyMarkup; + + /** + * Describes a message. + */ + public Message() { + } + + /** + * Describes a message. + * + * @param id Message identifier; unique for the chat to which the message belongs. + * @param senderUserId Identifier of the user who sent the message; 0 if unknown. Currently, it is unknown for channel posts, for channel posts automatically forwarded to discussion group and for anonymously sent supergroup messages. + * @param senderChatId Identifier of the chat on behalf of which the message was sent; 0 if none. + * @param chatId Chat identifier. + * @param sendingState Information about the sending state of the message; may be null. + * @param schedulingState Information about the scheduling state of the message; may be null. + * @param isOutgoing True, if the message is outgoing. + * @param canBeEdited True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application. + * @param canBeForwarded True, if the message can be forwarded. + * @param canBeDeletedOnlyForSelf True, if the message can be deleted only for the current user while other users will continue to see it. + * @param canBeDeletedForAllUsers True, if the message can be deleted for all users. + * @param canGetStatistics True, if the message statistics are available. + * @param canGetMessageThread True, if the message thread info is available. + * @param isChannelPost True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts. + * @param containsUnreadMention True, if the message contains an unread mention for the current user. + * @param date Point in time (Unix timestamp) when the message was sent. + * @param editDate Point in time (Unix timestamp) when the message was last edited. + * @param forwardInfo Information about the initial message sender; may be null. + * @param interactionInfo Information about interactions with the message; may be null. + * @param replyInChatId If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different replyInChatId and chatId. + * @param replyToMessageId If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message. + * @param messageThreadId If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs. + * @param ttl For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires. + * @param ttlExpiresIn Time left before the message expires, in seconds. + * @param viaBotUserId If non-zero, the user identifier of the bot through which this message was sent. + * @param authorSignature For channel posts, optional author signature. + * @param mediaAlbumId Unique identifier of an album this message belongs to. Only photos and videos can be grouped together in albums. + * @param restrictionReason If non-empty, contains a human-readable description of the reason why access to this message must be restricted. + * @param content Content of the message. + * @param replyMarkup Reply markup for the message; may be null. + */ + public Message(long id, int senderUserId, long senderChatId, long chatId, MessageSendingState sendingState, MessageSchedulingState schedulingState, boolean isOutgoing, boolean canBeEdited, boolean canBeForwarded, boolean canBeDeletedOnlyForSelf, boolean canBeDeletedForAllUsers, boolean canGetStatistics, boolean canGetMessageThread, boolean isChannelPost, boolean containsUnreadMention, int date, int editDate, MessageForwardInfo forwardInfo, MessageInteractionInfo interactionInfo, long replyInChatId, long replyToMessageId, long messageThreadId, int ttl, double ttlExpiresIn, int viaBotUserId, String authorSignature, long mediaAlbumId, String restrictionReason, MessageContent content, ReplyMarkup replyMarkup) { + this.id = id; + this.senderUserId = senderUserId; + this.senderChatId = senderChatId; + this.chatId = chatId; + this.sendingState = sendingState; + this.schedulingState = schedulingState; + this.isOutgoing = isOutgoing; + this.canBeEdited = canBeEdited; + this.canBeForwarded = canBeForwarded; + this.canBeDeletedOnlyForSelf = canBeDeletedOnlyForSelf; + this.canBeDeletedForAllUsers = canBeDeletedForAllUsers; + this.canGetStatistics = canGetStatistics; + this.canGetMessageThread = canGetMessageThread; + this.isChannelPost = isChannelPost; + this.containsUnreadMention = containsUnreadMention; + this.date = date; + this.editDate = editDate; + this.forwardInfo = forwardInfo; + this.interactionInfo = interactionInfo; + this.replyInChatId = replyInChatId; + this.replyToMessageId = replyToMessageId; + this.messageThreadId = messageThreadId; + this.ttl = ttl; + this.ttlExpiresIn = ttlExpiresIn; + this.viaBotUserId = viaBotUserId; + this.authorSignature = authorSignature; + this.mediaAlbumId = mediaAlbumId; + this.restrictionReason = restrictionReason; + this.content = content; + this.replyMarkup = replyMarkup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 81067037; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains the content of a message. + */ + public abstract static class MessageContent extends Object { + } + + /** + * A text message. + */ + public static class MessageText extends MessageContent { + /** + * Text of the message. + */ + public FormattedText text; + /** + * A preview of the web page that's mentioned in the text; may be null. + */ + public WebPage webPage; + + /** + * A text message. + */ + public MessageText() { + } + + /** + * A text message. + * + * @param text Text of the message. + * @param webPage A preview of the web page that's mentioned in the text; may be null. + */ + public MessageText(FormattedText text, WebPage webPage) { + this.text = text; + this.webPage = webPage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1989037971; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An animation message (GIF-style). + */ + public static class MessageAnimation extends MessageContent { + /** + * The animation description. + */ + public Animation animation; + /** + * Animation caption. + */ + public FormattedText caption; + /** + * True, if the animation thumbnail must be blurred and the animation must be shown only while tapped. + */ + public boolean isSecret; + + /** + * An animation message (GIF-style). + */ + public MessageAnimation() { + } + + /** + * An animation message (GIF-style). + * + * @param animation The animation description. + * @param caption Animation caption. + * @param isSecret True, if the animation thumbnail must be blurred and the animation must be shown only while tapped. + */ + public MessageAnimation(Animation animation, FormattedText caption, boolean isSecret) { + this.animation = animation; + this.caption = caption; + this.isSecret = isSecret; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1306939396; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An audio message. + */ + public static class MessageAudio extends MessageContent { + /** + * The audio description. + */ + public Audio audio; + /** + * Audio caption. + */ + public FormattedText caption; + + /** + * An audio message. + */ + public MessageAudio() { + } + + /** + * An audio message. + * + * @param audio The audio description. + * @param caption Audio caption. + */ + public MessageAudio(Audio audio, FormattedText caption) { + this.audio = audio; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 276722716; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A document message (general file). + */ + public static class MessageDocument extends MessageContent { + /** + * The document description. + */ + public Document document; + /** + * Document caption. + */ + public FormattedText caption; + + /** + * A document message (general file). + */ + public MessageDocument() { + } + + /** + * A document message (general file). + * + * @param document The document description. + * @param caption Document caption. + */ + public MessageDocument(Document document, FormattedText caption) { + this.document = document; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 596945783; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A photo message. + */ + public static class MessagePhoto extends MessageContent { + /** + * The photo description. + */ + public Photo photo; + /** + * Photo caption. + */ + public FormattedText caption; + /** + * True, if the photo must be blurred and must be shown only while tapped. + */ + public boolean isSecret; + + /** + * A photo message. + */ + public MessagePhoto() { + } + + /** + * A photo message. + * + * @param photo The photo description. + * @param caption Photo caption. + * @param isSecret True, if the photo must be blurred and must be shown only while tapped. + */ + public MessagePhoto(Photo photo, FormattedText caption, boolean isSecret) { + this.photo = photo; + this.caption = caption; + this.isSecret = isSecret; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1851395174; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An expired photo message (self-destructed after TTL has elapsed). + */ + public static class MessageExpiredPhoto extends MessageContent { + + /** + * An expired photo message (self-destructed after TTL has elapsed). + */ + public MessageExpiredPhoto() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1404641801; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A sticker message. + */ + public static class MessageSticker extends MessageContent { + /** + * The sticker description. + */ + public Sticker sticker; + + /** + * A sticker message. + */ + public MessageSticker() { + } + + /** + * A sticker message. + * + * @param sticker The sticker description. + */ + public MessageSticker(Sticker sticker) { + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1779022878; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A video message. + */ + public static class MessageVideo extends MessageContent { + /** + * The video description. + */ + public Video video; + /** + * Video caption. + */ + public FormattedText caption; + /** + * True, if the video thumbnail must be blurred and the video must be shown only while tapped. + */ + public boolean isSecret; + + /** + * A video message. + */ + public MessageVideo() { + } + + /** + * A video message. + * + * @param video The video description. + * @param caption Video caption. + * @param isSecret True, if the video thumbnail must be blurred and the video must be shown only while tapped. + */ + public MessageVideo(Video video, FormattedText caption, boolean isSecret) { + this.video = video; + this.caption = caption; + this.isSecret = isSecret; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2021281344; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An expired video message (self-destructed after TTL has elapsed). + */ + public static class MessageExpiredVideo extends MessageContent { + + /** + * An expired video message (self-destructed after TTL has elapsed). + */ + public MessageExpiredVideo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1212209981; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A video note message. + */ + public static class MessageVideoNote extends MessageContent { + /** + * The video note description. + */ + public VideoNote videoNote; + /** + * True, if at least one of the recipients has viewed the video note. + */ + public boolean isViewed; + /** + * True, if the video note thumbnail must be blurred and the video note must be shown only while tapped. + */ + public boolean isSecret; + + /** + * A video note message. + */ + public MessageVideoNote() { + } + + /** + * A video note message. + * + * @param videoNote The video note description. + * @param isViewed True, if at least one of the recipients has viewed the video note. + * @param isSecret True, if the video note thumbnail must be blurred and the video note must be shown only while tapped. + */ + public MessageVideoNote(VideoNote videoNote, boolean isViewed, boolean isSecret) { + this.videoNote = videoNote; + this.isViewed = isViewed; + this.isSecret = isSecret; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 963323014; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A voice note message. + */ + public static class MessageVoiceNote extends MessageContent { + /** + * The voice note description. + */ + public VoiceNote voiceNote; + /** + * Voice note caption. + */ + public FormattedText caption; + /** + * True, if at least one of the recipients has listened to the voice note. + */ + public boolean isListened; + + /** + * A voice note message. + */ + public MessageVoiceNote() { + } + + /** + * A voice note message. + * + * @param voiceNote The voice note description. + * @param caption Voice note caption. + * @param isListened True, if at least one of the recipients has listened to the voice note. + */ + public MessageVoiceNote(VoiceNote voiceNote, FormattedText caption, boolean isListened) { + this.voiceNote = voiceNote; + this.caption = caption; + this.isListened = isListened; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 527777781; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a location. + */ + public static class MessageLocation extends MessageContent { + /** + * The location description. + */ + public Location location; + /** + * Time relative to the message sent date until which the location can be updated, in seconds. + */ + public int livePeriod; + /** + * Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes. + */ + public int expiresIn; + + /** + * A message with a location. + */ + public MessageLocation() { + } + + /** + * A message with a location. + * + * @param location The location description. + * @param livePeriod Time relative to the message sent date until which the location can be updated, in seconds. + * @param expiresIn Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes. + */ + public MessageLocation(Location location, int livePeriod, int expiresIn) { + this.location = location; + this.livePeriod = livePeriod; + this.expiresIn = expiresIn; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1301887786; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with information about a venue. + */ + public static class MessageVenue extends MessageContent { + /** + * The venue description. + */ + public Venue venue; + + /** + * A message with information about a venue. + */ + public MessageVenue() { + } + + /** + * A message with information about a venue. + * + * @param venue The venue description. + */ + public MessageVenue(Venue venue) { + this.venue = venue; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2146492043; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a user contact. + */ + public static class MessageContact extends MessageContent { + /** + * The contact description. + */ + public Contact contact; + + /** + * A message with a user contact. + */ + public MessageContact() { + } + + /** + * A message with a user contact. + * + * @param contact The contact description. + */ + public MessageContact(Contact contact) { + this.contact = contact; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -512684966; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A dice message. The dice value is randomly generated by the server. + */ + public static class MessageDice extends MessageContent { + /** + * The animated sticker with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known. + */ + public Sticker initialStateSticker; + /** + * The animated sticker with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known. + */ + public Sticker finalStateSticker; + /** + * Emoji on which the dice throw animation is based. + */ + public String emoji; + /** + * The dice value. If the value is 0, the dice don't have final state yet. + */ + public int value; + /** + * Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded. + */ + public int successAnimationFrameNumber; + + /** + * A dice message. The dice value is randomly generated by the server. + */ + public MessageDice() { + } + + /** + * A dice message. The dice value is randomly generated by the server. + * + * @param initialStateSticker The animated sticker with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known. + * @param finalStateSticker The animated sticker with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known. + * @param emoji Emoji on which the dice throw animation is based. + * @param value The dice value. If the value is 0, the dice don't have final state yet. + * @param successAnimationFrameNumber Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded. + */ + public MessageDice(Sticker initialStateSticker, Sticker finalStateSticker, String emoji, int value, int successAnimationFrameNumber) { + this.initialStateSticker = initialStateSticker; + this.finalStateSticker = finalStateSticker; + this.emoji = emoji; + this.value = value; + this.successAnimationFrameNumber = successAnimationFrameNumber; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1350654849; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a game. + */ + public static class MessageGame extends MessageContent { + /** + * The game description. + */ + public Game game; + + /** + * A message with a game. + */ + public MessageGame() { + } + + /** + * A message with a game. + * + * @param game The game description. + */ + public MessageGame(Game game) { + this.game = game; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -69441162; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a poll. + */ + public static class MessagePoll extends MessageContent { + /** + * The poll description. + */ + public Poll poll; + + /** + * A message with a poll. + */ + public MessagePoll() { + } + + /** + * A message with a poll. + * + * @param poll The poll description. + */ + public MessagePoll(Poll poll) { + this.poll = poll; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -662130099; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with an invoice from a bot. + */ + public static class MessageInvoice extends MessageContent { + /** + * Product title. + */ + public String title; + /** + * Product description. + */ + public String description; + /** + * Product photo; may be null. + */ + public Photo photo; + /** + * Currency for the product price. + */ + public String currency; + /** + * Product total price in the minimal quantity of the currency. + */ + public long totalAmount; + /** + * Unique invoice bot startParameter. To share an invoice use the URL https://t.me/{botUsername}?start={startParameter}. + */ + public String startParameter; + /** + * True, if the invoice is a test invoice. + */ + public boolean isTest; + /** + * True, if the shipping address should be specified. + */ + public boolean needShippingAddress; + /** + * The identifier of the message with the receipt, after the product has been purchased. + */ + public long receiptMessageId; + + /** + * A message with an invoice from a bot. + */ + public MessageInvoice() { + } + + /** + * A message with an invoice from a bot. + * + * @param title Product title. + * @param description Product description. + * @param photo Product photo; may be null. + * @param currency Currency for the product price. + * @param totalAmount Product total price in the minimal quantity of the currency. + * @param startParameter Unique invoice bot startParameter. To share an invoice use the URL https://t.me/{botUsername}?start={startParameter}. + * @param isTest True, if the invoice is a test invoice. + * @param needShippingAddress True, if the shipping address should be specified. + * @param receiptMessageId The identifier of the message with the receipt, after the product has been purchased. + */ + public MessageInvoice(String title, String description, Photo photo, String currency, long totalAmount, String startParameter, boolean isTest, boolean needShippingAddress, long receiptMessageId) { + this.title = title; + this.description = description; + this.photo = photo; + this.currency = currency; + this.totalAmount = totalAmount; + this.startParameter = startParameter; + this.isTest = isTest; + this.needShippingAddress = needShippingAddress; + this.receiptMessageId = receiptMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1916671476; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with information about an ended call. + */ + public static class MessageCall extends MessageContent { + /** + * True, if the call was a video call. + */ + public boolean isVideo; + /** + * Reason why the call was discarded. + */ + public CallDiscardReason discardReason; + /** + * Call duration, in seconds. + */ + public int duration; + + /** + * A message with information about an ended call. + */ + public MessageCall() { + } + + /** + * A message with information about an ended call. + * + * @param isVideo True, if the call was a video call. + * @param discardReason Reason why the call was discarded. + * @param duration Call duration, in seconds. + */ + public MessageCall(boolean isVideo, CallDiscardReason discardReason, int duration) { + this.isVideo = isVideo; + this.discardReason = discardReason; + this.duration = duration; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 538893824; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A newly created basic group. + */ + public static class MessageBasicGroupChatCreate extends MessageContent { + /** + * Title of the basic group. + */ + public String title; + /** + * User identifiers of members in the basic group. + */ + public int[] memberUserIds; + + /** + * A newly created basic group. + */ + public MessageBasicGroupChatCreate() { + } + + /** + * A newly created basic group. + * + * @param title Title of the basic group. + * @param memberUserIds User identifiers of members in the basic group. + */ + public MessageBasicGroupChatCreate(String title, int[] memberUserIds) { + this.title = title; + this.memberUserIds = memberUserIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1575377646; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A newly created supergroup or channel. + */ + public static class MessageSupergroupChatCreate extends MessageContent { + /** + * Title of the supergroup or channel. + */ + public String title; + + /** + * A newly created supergroup or channel. + */ + public MessageSupergroupChatCreate() { + } + + /** + * A newly created supergroup or channel. + * + * @param title Title of the supergroup or channel. + */ + public MessageSupergroupChatCreate(String title) { + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -434325733; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An updated chat title. + */ + public static class MessageChatChangeTitle extends MessageContent { + /** + * New chat title. + */ + public String title; + + /** + * An updated chat title. + */ + public MessageChatChangeTitle() { + } + + /** + * An updated chat title. + * + * @param title New chat title. + */ + public MessageChatChangeTitle(String title) { + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 748272449; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An updated chat photo. + */ + public static class MessageChatChangePhoto extends MessageContent { + /** + * New chat photo. + */ + public ChatPhoto photo; + + /** + * An updated chat photo. + */ + public MessageChatChangePhoto() { + } + + /** + * An updated chat photo. + * + * @param photo New chat photo. + */ + public MessageChatChangePhoto(ChatPhoto photo) { + this.photo = photo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -813415093; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A deleted chat photo. + */ + public static class MessageChatDeletePhoto extends MessageContent { + + /** + * A deleted chat photo. + */ + public MessageChatDeletePhoto() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -184374809; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * New chat members were added. + */ + public static class MessageChatAddMembers extends MessageContent { + /** + * User identifiers of the new members. + */ + public int[] memberUserIds; + + /** + * New chat members were added. + */ + public MessageChatAddMembers() { + } + + /** + * New chat members were added. + * + * @param memberUserIds User identifiers of the new members. + */ + public MessageChatAddMembers(int[] memberUserIds) { + this.memberUserIds = memberUserIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 401228326; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new member joined the chat by invite link. + */ + public static class MessageChatJoinByLink extends MessageContent { + + /** + * A new member joined the chat by invite link. + */ + public MessageChatJoinByLink() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1846493311; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat member was deleted. + */ + public static class MessageChatDeleteMember extends MessageContent { + /** + * User identifier of the deleted chat member. + */ + public int userId; + + /** + * A chat member was deleted. + */ + public MessageChatDeleteMember() { + } + + /** + * A chat member was deleted. + * + * @param userId User identifier of the deleted chat member. + */ + public MessageChatDeleteMember(int userId) { + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1164414043; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A basic group was upgraded to a supergroup and was deactivated as the result. + */ + public static class MessageChatUpgradeTo extends MessageContent { + /** + * Identifier of the supergroup to which the basic group was upgraded. + */ + public int supergroupId; + + /** + * A basic group was upgraded to a supergroup and was deactivated as the result. + */ + public MessageChatUpgradeTo() { + } + + /** + * A basic group was upgraded to a supergroup and was deactivated as the result. + * + * @param supergroupId Identifier of the supergroup to which the basic group was upgraded. + */ + public MessageChatUpgradeTo(int supergroupId) { + this.supergroupId = supergroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1957816681; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A supergroup has been created from a basic group. + */ + public static class MessageChatUpgradeFrom extends MessageContent { + /** + * Title of the newly created supergroup. + */ + public String title; + /** + * The identifier of the original basic group. + */ + public int basicGroupId; + + /** + * A supergroup has been created from a basic group. + */ + public MessageChatUpgradeFrom() { + } + + /** + * A supergroup has been created from a basic group. + * + * @param title Title of the newly created supergroup. + * @param basicGroupId The identifier of the original basic group. + */ + public MessageChatUpgradeFrom(String title, int basicGroupId) { + this.title = title; + this.basicGroupId = basicGroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1642272558; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message has been pinned. + */ + public static class MessagePinMessage extends MessageContent { + /** + * Identifier of the pinned message, can be an identifier of a deleted message or 0. + */ + public long messageId; + + /** + * A message has been pinned. + */ + public MessagePinMessage() { + } + + /** + * A message has been pinned. + * + * @param messageId Identifier of the pinned message, can be an identifier of a deleted message or 0. + */ + public MessagePinMessage(long messageId) { + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 953503801; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A screenshot of a message in the chat has been taken. + */ + public static class MessageScreenshotTaken extends MessageContent { + + /** + * A screenshot of a message in the chat has been taken. + */ + public MessageScreenshotTaken() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1564971605; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The TTL (Time To Live) setting messages in a secret chat has been changed. + */ + public static class MessageChatSetTtl extends MessageContent { + /** + * New TTL. + */ + public int ttl; + + /** + * The TTL (Time To Live) setting messages in a secret chat has been changed. + */ + public MessageChatSetTtl() { + } + + /** + * The TTL (Time To Live) setting messages in a secret chat has been changed. + * + * @param ttl New TTL. + */ + public MessageChatSetTtl(int ttl) { + this.ttl = ttl; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1810060209; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A non-standard action has happened in the chat. + */ + public static class MessageCustomServiceAction extends MessageContent { + /** + * Message text to be shown in the chat. + */ + public String text; + + /** + * A non-standard action has happened in the chat. + */ + public MessageCustomServiceAction() { + } + + /** + * A non-standard action has happened in the chat. + * + * @param text Message text to be shown in the chat. + */ + public MessageCustomServiceAction(String text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1435879282; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new high score was achieved in a game. + */ + public static class MessageGameScore extends MessageContent { + /** + * Identifier of the message with the game, can be an identifier of a deleted message. + */ + public long gameMessageId; + /** + * Identifier of the game; may be different from the games presented in the message with the game. + */ + public long gameId; + /** + * New score. + */ + public int score; + + /** + * A new high score was achieved in a game. + */ + public MessageGameScore() { + } + + /** + * A new high score was achieved in a game. + * + * @param gameMessageId Identifier of the message with the game, can be an identifier of a deleted message. + * @param gameId Identifier of the game; may be different from the games presented in the message with the game. + * @param score New score. + */ + public MessageGameScore(long gameMessageId, long gameId, int score) { + this.gameMessageId = gameMessageId; + this.gameId = gameId; + this.score = score; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1344904575; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A payment has been completed. + */ + public static class MessagePaymentSuccessful extends MessageContent { + /** + * Identifier of the message with the corresponding invoice; can be an identifier of a deleted message. + */ + public long invoiceMessageId; + /** + * Currency for the price of the product. + */ + public String currency; + /** + * Total price for the product, in the minimal quantity of the currency. + */ + public long totalAmount; + + /** + * A payment has been completed. + */ + public MessagePaymentSuccessful() { + } + + /** + * A payment has been completed. + * + * @param invoiceMessageId Identifier of the message with the corresponding invoice; can be an identifier of a deleted message. + * @param currency Currency for the price of the product. + * @param totalAmount Total price for the product, in the minimal quantity of the currency. + */ + public MessagePaymentSuccessful(long invoiceMessageId, String currency, long totalAmount) { + this.invoiceMessageId = invoiceMessageId; + this.currency = currency; + this.totalAmount = totalAmount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -595962993; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A payment has been completed; for bots only. + */ + public static class MessagePaymentSuccessfulBot extends MessageContent { + /** + * Identifier of the message with the corresponding invoice; can be an identifier of a deleted message. + */ + public long invoiceMessageId; + /** + * Currency for price of the product. + */ + public String currency; + /** + * Total price for the product, in the minimal quantity of the currency. + */ + public long totalAmount; + /** + * Invoice payload. + */ + public byte[] invoicePayload; + /** + * Identifier of the shipping option chosen by the user; may be empty if not applicable. + */ + public String shippingOptionId; + /** + * Information about the order; may be null. + */ + public OrderInfo orderInfo; + /** + * Telegram payment identifier. + */ + public String telegramPaymentChargeId; + /** + * Provider payment identifier. + */ + public String providerPaymentChargeId; + + /** + * A payment has been completed; for bots only. + */ + public MessagePaymentSuccessfulBot() { + } + + /** + * A payment has been completed; for bots only. + * + * @param invoiceMessageId Identifier of the message with the corresponding invoice; can be an identifier of a deleted message. + * @param currency Currency for price of the product. + * @param totalAmount Total price for the product, in the minimal quantity of the currency. + * @param invoicePayload Invoice payload. + * @param shippingOptionId Identifier of the shipping option chosen by the user; may be empty if not applicable. + * @param orderInfo Information about the order; may be null. + * @param telegramPaymentChargeId Telegram payment identifier. + * @param providerPaymentChargeId Provider payment identifier. + */ + public MessagePaymentSuccessfulBot(long invoiceMessageId, String currency, long totalAmount, byte[] invoicePayload, String shippingOptionId, OrderInfo orderInfo, String telegramPaymentChargeId, String providerPaymentChargeId) { + this.invoiceMessageId = invoiceMessageId; + this.currency = currency; + this.totalAmount = totalAmount; + this.invoicePayload = invoicePayload; + this.shippingOptionId = shippingOptionId; + this.orderInfo = orderInfo; + this.telegramPaymentChargeId = telegramPaymentChargeId; + this.providerPaymentChargeId = providerPaymentChargeId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -412310696; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A contact has registered with Telegram. + */ + public static class MessageContactRegistered extends MessageContent { + + /** + * A contact has registered with Telegram. + */ + public MessageContactRegistered() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1502020353; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The current user has connected a website by logging in using Telegram Login Widget on it. + */ + public static class MessageWebsiteConnected extends MessageContent { + /** + * Domain name of the connected website. + */ + public String domainName; + + /** + * The current user has connected a website by logging in using Telegram Login Widget on it. + */ + public MessageWebsiteConnected() { + } + + /** + * The current user has connected a website by logging in using Telegram Login Widget on it. + * + * @param domainName Domain name of the connected website. + */ + public MessageWebsiteConnected(String domainName) { + this.domainName = domainName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1074551800; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Telegram Passport data has been sent. + */ + public static class MessagePassportDataSent extends MessageContent { + /** + * List of Telegram Passport element types sent. + */ + public PassportElementType[] types; + + /** + * Telegram Passport data has been sent. + */ + public MessagePassportDataSent() { + } + + /** + * Telegram Passport data has been sent. + * + * @param types List of Telegram Passport element types sent. + */ + public MessagePassportDataSent(PassportElementType[] types) { + this.types = types; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1017405171; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Telegram Passport data has been received; for bots only. + */ + public static class MessagePassportDataReceived extends MessageContent { + /** + * List of received Telegram Passport elements. + */ + public EncryptedPassportElement[] elements; + /** + * Encrypted data credentials. + */ + public EncryptedCredentials credentials; + + /** + * Telegram Passport data has been received; for bots only. + */ + public MessagePassportDataReceived() { + } + + /** + * Telegram Passport data has been received; for bots only. + * + * @param elements List of received Telegram Passport elements. + * @param credentials Encrypted data credentials. + */ + public MessagePassportDataReceived(EncryptedPassportElement[] elements, EncryptedCredentials credentials) { + this.elements = elements; + this.credentials = credentials; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1367863624; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Message content that is not supported in the current TDLib version. + */ + public static class MessageUnsupported extends MessageContent { + + /** + * Message content that is not supported in the current TDLib version. + */ + public MessageUnsupported() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1816726139; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Options to be used when a message content is copied without a link to the original message. + */ + public static class MessageCopyOptions extends Object { + /** + * True, if content of the message needs to be copied without a link to the original message. Always true if the message is forwarded to a secret chat. + */ + public boolean sendCopy; + /** + * True, if media caption of the message copy needs to be replaced. Ignored if sendCopy is false. + */ + public boolean replaceCaption; + /** + * New message caption. Ignored if replaceCaption is false. + */ + public FormattedText newCaption; + + /** + * Options to be used when a message content is copied without a link to the original message. + */ + public MessageCopyOptions() { + } + + /** + * Options to be used when a message content is copied without a link to the original message. + * + * @param sendCopy True, if content of the message needs to be copied without a link to the original message. Always true if the message is forwarded to a secret chat. + * @param replaceCaption True, if media caption of the message copy needs to be replaced. Ignored if sendCopy is false. + * @param newCaption New message caption. Ignored if replaceCaption is false. + */ + public MessageCopyOptions(boolean sendCopy, boolean replaceCaption, FormattedText newCaption) { + this.sendCopy = sendCopy; + this.replaceCaption = replaceCaption; + this.newCaption = newCaption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1208442937; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a forwarded message. + */ + public static class MessageForwardInfo extends Object { + /** + * Origin of a forwarded message. + */ + public MessageForwardOrigin origin; + /** + * Point in time (Unix timestamp) when the message was originally sent. + */ + public int date; + /** + * The type of a public service announcement for the forwarded message. + */ + public String publicServiceAnnouncementType; + /** + * For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the chat from which the message was forwarded last time; 0 if unknown. + */ + public long fromChatId; + /** + * For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the original message from which the new message was forwarded last time; 0 if unknown. + */ + public long fromMessageId; + + /** + * Contains information about a forwarded message. + */ + public MessageForwardInfo() { + } + + /** + * Contains information about a forwarded message. + * + * @param origin Origin of a forwarded message. + * @param date Point in time (Unix timestamp) when the message was originally sent. + * @param publicServiceAnnouncementType The type of a public service announcement for the forwarded message. + * @param fromChatId For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the chat from which the message was forwarded last time; 0 if unknown. + * @param fromMessageId For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the original message from which the new message was forwarded last time; 0 if unknown. + */ + public MessageForwardInfo(MessageForwardOrigin origin, int date, String publicServiceAnnouncementType, long fromChatId, long fromMessageId) { + this.origin = origin; + this.date = date; + this.publicServiceAnnouncementType = publicServiceAnnouncementType; + this.fromChatId = fromChatId; + this.fromMessageId = fromMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -327300408; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains information about the origin of a forwarded message. + */ + public abstract static class MessageForwardOrigin extends Object { + } + + /** + * The message was originally written by a known user. + */ + public static class MessageForwardOriginUser extends MessageForwardOrigin { + /** + * Identifier of the user that originally sent the message. + */ + public int senderUserId; + + /** + * The message was originally written by a known user. + */ + public MessageForwardOriginUser() { + } + + /** + * The message was originally written by a known user. + * + * @param senderUserId Identifier of the user that originally sent the message. + */ + public MessageForwardOriginUser(int senderUserId) { + this.senderUserId = senderUserId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2781520; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The message was originally written by an anonymous chat administrator on behalf of the chat. + */ + public static class MessageForwardOriginChat extends MessageForwardOrigin { + /** + * Identifier of the chat that originally sent the message. + */ + public long senderChatId; + + /** + * The message was originally written by an anonymous chat administrator on behalf of the chat. + */ + public MessageForwardOriginChat() { + } + + /** + * The message was originally written by an anonymous chat administrator on behalf of the chat. + * + * @param senderChatId Identifier of the chat that originally sent the message. + */ + public MessageForwardOriginChat(long senderChatId) { + this.senderChatId = senderChatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 872598889; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The message was originally written by a user, which is hidden by their privacy settings. + */ + public static class MessageForwardOriginHiddenUser extends MessageForwardOrigin { + /** + * Name of the sender. + */ + public String senderName; + + /** + * The message was originally written by a user, which is hidden by their privacy settings. + */ + public MessageForwardOriginHiddenUser() { + } + + /** + * The message was originally written by a user, which is hidden by their privacy settings. + * + * @param senderName Name of the sender. + */ + public MessageForwardOriginHiddenUser(String senderName) { + this.senderName = senderName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -271257885; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The message was originally a post in a channel. + */ + public static class MessageForwardOriginChannel extends MessageForwardOrigin { + /** + * Identifier of the chat from which the message was originally forwarded. + */ + public long chatId; + /** + * Message identifier of the original message; 0 if unknown. + */ + public long messageId; + /** + * Original post author signature. + */ + public String authorSignature; + + /** + * The message was originally a post in a channel. + */ + public MessageForwardOriginChannel() { + } + + /** + * The message was originally a post in a channel. + * + * @param chatId Identifier of the chat from which the message was originally forwarded. + * @param messageId Message identifier of the original message; 0 if unknown. + * @param authorSignature Original post author signature. + */ + public MessageForwardOriginChannel(long chatId, long messageId, String authorSignature) { + this.chatId = chatId; + this.messageId = messageId; + this.authorSignature = authorSignature; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1490730723; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about interactions with a message. + */ + public static class MessageInteractionInfo extends Object { + /** + * Number of times the message was viewed. + */ + public int viewCount; + /** + * Number of times the message was forwarded. + */ + public int forwardCount; + /** + * Contains information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself. + */ + public MessageReplyInfo replyInfo; + + /** + * Contains information about interactions with a message. + */ + public MessageInteractionInfo() { + } + + /** + * Contains information about interactions with a message. + * + * @param viewCount Number of times the message was viewed. + * @param forwardCount Number of times the message was forwarded. + * @param replyInfo Contains information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself. + */ + public MessageInteractionInfo(int viewCount, int forwardCount, MessageReplyInfo replyInfo) { + this.viewCount = viewCount; + this.forwardCount = forwardCount; + this.replyInfo = replyInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -620714966; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains an HTTPS link to a message in a supergroup or channel. + */ + public static class MessageLink extends Object { + /** + * Message link. + */ + public String link; + /** + * True, if the link will work for non-members of the chat. + */ + public boolean isPublic; + + /** + * Contains an HTTPS link to a message in a supergroup or channel. + */ + public MessageLink() { + } + + /** + * Contains an HTTPS link to a message in a supergroup or channel. + * + * @param link Message link. + * @param isPublic True, if the link will work for non-members of the chat. + */ + public MessageLink(String link, boolean isPublic) { + this.link = link; + this.isPublic = isPublic; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1354089818; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a link to a message in a chat. + */ + public static class MessageLinkInfo extends Object { + /** + * True, if the link is a public link for a message in a chat. + */ + public boolean isPublic; + /** + * If found, identifier of the chat to which the message belongs, 0 otherwise. + */ + public long chatId; + /** + * If found, the linked message; may be null. + */ + public Message message; + /** + * True, if the whole media album to which the message belongs is linked. + */ + public boolean forAlbum; + /** + * True, if the message is linked as a channel post comment or from a message thread. + */ + public boolean forComment; + + /** + * Contains information about a link to a message in a chat. + */ + public MessageLinkInfo() { + } + + /** + * Contains information about a link to a message in a chat. + * + * @param isPublic True, if the link is a public link for a message in a chat. + * @param chatId If found, identifier of the chat to which the message belongs, 0 otherwise. + * @param message If found, the linked message; may be null. + * @param forAlbum True, if the whole media album to which the message belongs is linked. + * @param forComment True, if the message is linked as a channel post comment or from a message thread. + */ + public MessageLinkInfo(boolean isPublic, long chatId, Message message, boolean forAlbum, boolean forComment) { + this.isPublic = isPublic; + this.chatId = chatId; + this.message = message; + this.forAlbum = forAlbum; + this.forComment = forComment; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1002342529; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about message replies. + */ + public static class MessageReplyInfo extends Object { + /** + * Number of times the message was directly or indirectly replied. + */ + public int replyCount; + /** + * User identifiers of the recent repliers to the message; available in channels with a discussion supergroup. + */ + public int[] recentReplierUserIds; + /** + * Identifier of the last read incoming reply to the message. + */ + public long lastReadInboxMessageId; + /** + * Identifier of the last read outgoing reply to the message. + */ + public long lastReadOutboxMessageId; + /** + * Identifier of the last reply to the message. + */ + public long lastMessageId; + + /** + * Contains information about message replies. + */ + public MessageReplyInfo() { + } + + /** + * Contains information about message replies. + * + * @param replyCount Number of times the message was directly or indirectly replied. + * @param recentReplierUserIds User identifiers of the recent repliers to the message; available in channels with a discussion supergroup. + * @param lastReadInboxMessageId Identifier of the last read incoming reply to the message. + * @param lastReadOutboxMessageId Identifier of the last read outgoing reply to the message. + * @param lastMessageId Identifier of the last reply to the message. + */ + public MessageReplyInfo(int replyCount, int[] recentReplierUserIds, long lastReadInboxMessageId, long lastReadOutboxMessageId, long lastMessageId) { + this.replyCount = replyCount; + this.recentReplierUserIds = recentReplierUserIds; + this.lastReadInboxMessageId = lastReadInboxMessageId; + this.lastReadOutboxMessageId = lastReadOutboxMessageId; + this.lastMessageId = lastMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -67189409; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains information about the time when a scheduled message will be sent. + */ + public abstract static class MessageSchedulingState extends Object { + } + + /** + * The message will be sent at the specified date. + */ + public static class MessageSchedulingStateSendAtDate extends MessageSchedulingState { + /** + * Date the message will be sent. The date must be within 367 days in the future. + */ + public int sendDate; + + /** + * The message will be sent at the specified date. + */ + public MessageSchedulingStateSendAtDate() { + } + + /** + * The message will be sent at the specified date. + * + * @param sendDate Date the message will be sent. The date must be within 367 days in the future. + */ + public MessageSchedulingStateSendAtDate(int sendDate) { + this.sendDate = sendDate; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1485570073; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The message will be sent when the peer will be online. Applicable to private chats only and when the exact online status of the peer is known. + */ + public static class MessageSchedulingStateSendWhenOnline extends MessageSchedulingState { + + /** + * The message will be sent when the peer will be online. Applicable to private chats only and when the exact online status of the peer is known. + */ + public MessageSchedulingStateSendWhenOnline() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2092947464; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Options to be used when a message is sent. + */ + public static class MessageSendOptions extends Object { + /** + * Pass true to disable notification for the message. + */ + public boolean disableNotification; + /** + * Pass true if the message is sent from the background. + */ + public boolean fromBackground; + /** + * Message scheduling state. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled. + */ + public MessageSchedulingState schedulingState; + + /** + * Options to be used when a message is sent. + */ + public MessageSendOptions() { + } + + /** + * Options to be used when a message is sent. + * + * @param disableNotification Pass true to disable notification for the message. + * @param fromBackground Pass true if the message is sent from the background. + * @param schedulingState Message scheduling state. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled. + */ + public MessageSendOptions(boolean disableNotification, boolean fromBackground, MessageSchedulingState schedulingState) { + this.disableNotification = disableNotification; + this.fromBackground = fromBackground; + this.schedulingState = schedulingState; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 914544314; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains information about the sending state of the message. + */ + public abstract static class MessageSendingState extends Object { + } + + /** + * The message is being sent now, but has not yet been delivered to the server. + */ + public static class MessageSendingStatePending extends MessageSendingState { + + /** + * The message is being sent now, but has not yet been delivered to the server. + */ + public MessageSendingStatePending() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1381803582; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The message failed to be sent. + */ + public static class MessageSendingStateFailed extends MessageSendingState { + /** + * An error code; 0 if unknown. + */ + public int errorCode; + /** + * Error message. + */ + public String errorMessage; + /** + * True, if the message can be re-sent. + */ + public boolean canRetry; + /** + * Time left before the message can be re-sent, in seconds. No update is sent when this field changes. + */ + public double retryAfter; + + /** + * The message failed to be sent. + */ + public MessageSendingStateFailed() { + } + + /** + * The message failed to be sent. + * + * @param errorCode An error code; 0 if unknown. + * @param errorMessage Error message. + * @param canRetry True, if the message can be re-sent. + * @param retryAfter Time left before the message can be re-sent, in seconds. No update is sent when this field changes. + */ + public MessageSendingStateFailed(int errorCode, String errorMessage, boolean canRetry, double retryAfter) { + this.errorCode = errorCode; + this.errorMessage = errorMessage; + this.canRetry = canRetry; + this.retryAfter = retryAfter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2054476087; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A detailed statistics about a message. + */ + public static class MessageStatistics extends Object { + /** + * A graph containing number of message views and shares. + */ + public StatisticsGraph messageInteractionGraph; + + /** + * A detailed statistics about a message. + */ + public MessageStatistics() { + } + + /** + * A detailed statistics about a message. + * + * @param messageInteractionGraph A graph containing number of message views and shares. + */ + public MessageStatistics(StatisticsGraph messageInteractionGraph) { + this.messageInteractionGraph = messageInteractionGraph; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1148915634; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a message thread. + */ + public static class MessageThreadInfo extends Object { + /** + * Identifier of the chat to which the message thread belongs. + */ + public long chatId; + /** + * Message thread identifier, unique within the chat. + */ + public long messageThreadId; + /** + * The messages from which the thread starts. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). + */ + public Message[] messages; + /** + * A draft of a message in the message thread; may be null. + */ + public DraftMessage draftMessage; + + /** + * Contains information about a message thread. + */ + public MessageThreadInfo() { + } + + /** + * Contains information about a message thread. + * + * @param chatId Identifier of the chat to which the message thread belongs. + * @param messageThreadId Message thread identifier, unique within the chat. + * @param messages The messages from which the thread starts. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). + * @param draftMessage A draft of a message in the message thread; may be null. + */ + public MessageThreadInfo(long chatId, long messageThreadId, Message[] messages, DraftMessage draftMessage) { + this.chatId = chatId; + this.messageThreadId = messageThreadId; + this.messages = messages; + this.draftMessage = draftMessage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -800726069; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of messages. + */ + public static class Messages extends Object { + /** + * Approximate total count of messages found. + */ + public int totalCount; + /** + * List of messages; messages may be null. + */ + public Message[] messages; + + /** + * Contains a list of messages. + */ + public Messages() { + } + + /** + * Contains a list of messages. + * + * @param totalCount Approximate total count of messages found. + * @param messages List of messages; messages may be null. + */ + public Messages(int totalCount, Message[] messages) { + this.totalCount = totalCount; + this.messages = messages; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -16498159; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Thumbnail image of a very poor quality and low resolution. + */ + public static class Minithumbnail extends Object { + /** + * Thumbnail width, usually doesn't exceed 40. + */ + public int width; + /** + * Thumbnail height, usually doesn't exceed 40. + */ + public int height; + /** + * The thumbnail in JPEG format. + */ + public byte[] data; + + /** + * Thumbnail image of a very poor quality and low resolution. + */ + public Minithumbnail() { + } + + /** + * Thumbnail image of a very poor quality and low resolution. + * + * @param width Thumbnail width, usually doesn't exceed 40. + * @param height Thumbnail height, usually doesn't exceed 40. + * @param data The thumbnail in JPEG format. + */ + public Minithumbnail(int width, int height, byte[] data) { + this.width = width; + this.height = height; + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -328540758; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A full list of available network statistic entries. + */ + public static class NetworkStatistics extends Object { + /** + * Point in time (Unix timestamp) from which the statistics are collected. + */ + public int sinceDate; + /** + * Network statistics entries. + */ + public NetworkStatisticsEntry[] entries; + + /** + * A full list of available network statistic entries. + */ + public NetworkStatistics() { + } + + /** + * A full list of available network statistic entries. + * + * @param sinceDate Point in time (Unix timestamp) from which the statistics are collected. + * @param entries Network statistics entries. + */ + public NetworkStatistics(int sinceDate, NetworkStatisticsEntry[] entries) { + this.sinceDate = sinceDate; + this.entries = entries; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1615554212; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains statistics about network usage. + */ + public abstract static class NetworkStatisticsEntry extends Object { + } + + /** + * Contains information about the total amount of data that was used to send and receive files. + */ + public static class NetworkStatisticsEntryFile extends NetworkStatisticsEntry { + /** + * Type of the file the data is part of. + */ + public FileType fileType; + /** + * Type of the network the data was sent through. Call setNetworkType to maintain the actual network type. + */ + public NetworkType networkType; + /** + * Total number of bytes sent. + */ + public long sentBytes; + /** + * Total number of bytes received. + */ + public long receivedBytes; + + /** + * Contains information about the total amount of data that was used to send and receive files. + */ + public NetworkStatisticsEntryFile() { + } + + /** + * Contains information about the total amount of data that was used to send and receive files. + * + * @param fileType Type of the file the data is part of. + * @param networkType Type of the network the data was sent through. Call setNetworkType to maintain the actual network type. + * @param sentBytes Total number of bytes sent. + * @param receivedBytes Total number of bytes received. + */ + public NetworkStatisticsEntryFile(FileType fileType, NetworkType networkType, long sentBytes, long receivedBytes) { + this.fileType = fileType; + this.networkType = networkType; + this.sentBytes = sentBytes; + this.receivedBytes = receivedBytes; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 188452706; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about the total amount of data that was used for calls. + */ + public static class NetworkStatisticsEntryCall extends NetworkStatisticsEntry { + /** + * Type of the network the data was sent through. Call setNetworkType to maintain the actual network type. + */ + public NetworkType networkType; + /** + * Total number of bytes sent. + */ + public long sentBytes; + /** + * Total number of bytes received. + */ + public long receivedBytes; + /** + * Total call duration, in seconds. + */ + public double duration; + + /** + * Contains information about the total amount of data that was used for calls. + */ + public NetworkStatisticsEntryCall() { + } + + /** + * Contains information about the total amount of data that was used for calls. + * + * @param networkType Type of the network the data was sent through. Call setNetworkType to maintain the actual network type. + * @param sentBytes Total number of bytes sent. + * @param receivedBytes Total number of bytes received. + * @param duration Total call duration, in seconds. + */ + public NetworkStatisticsEntryCall(NetworkType networkType, long sentBytes, long receivedBytes, double duration) { + this.networkType = networkType; + this.sentBytes = sentBytes; + this.receivedBytes = receivedBytes; + this.duration = duration; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 737000365; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents the type of a network. + */ + public abstract static class NetworkType extends Object { + } + + /** + * The network is not available. + */ + public static class NetworkTypeNone extends NetworkType { + + /** + * The network is not available. + */ + public NetworkTypeNone() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1971691759; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A mobile network. + */ + public static class NetworkTypeMobile extends NetworkType { + + /** + * A mobile network. + */ + public NetworkTypeMobile() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 819228239; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A mobile roaming network. + */ + public static class NetworkTypeMobileRoaming extends NetworkType { + + /** + * A mobile roaming network. + */ + public NetworkTypeMobileRoaming() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1435199760; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Wi-Fi network. + */ + public static class NetworkTypeWiFi extends NetworkType { + + /** + * A Wi-Fi network. + */ + public NetworkTypeWiFi() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -633872070; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A different network type (e.g., Ethernet network). + */ + public static class NetworkTypeOther extends NetworkType { + + /** + * A different network type (e.g., Ethernet network). + */ + public NetworkTypeOther() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1942128539; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a notification. + */ + public static class Notification extends Object { + /** + * Unique persistent identifier of this notification. + */ + public int id; + /** + * Notification date. + */ + public int date; + /** + * True, if the notification was initially silent. + */ + public boolean isSilent; + /** + * Notification type. + */ + public NotificationType type; + + /** + * Contains information about a notification. + */ + public Notification() { + } + + /** + * Contains information about a notification. + * + * @param id Unique persistent identifier of this notification. + * @param date Notification date. + * @param isSilent True, if the notification was initially silent. + * @param type Notification type. + */ + public Notification(int id, int date, boolean isSilent, NotificationType type) { + this.id = id; + this.date = date; + this.isSilent = isSilent; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 788743120; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a group of notifications. + */ + public static class NotificationGroup extends Object { + /** + * Unique persistent auto-incremented from 1 identifier of the notification group. + */ + public int id; + /** + * Type of the group. + */ + public NotificationGroupType type; + /** + * Identifier of a chat to which all notifications in the group belong. + */ + public long chatId; + /** + * Total number of active notifications in the group. + */ + public int totalCount; + /** + * The list of active notifications. + */ + public Notification[] notifications; + + /** + * Describes a group of notifications. + */ + public NotificationGroup() { + } + + /** + * Describes a group of notifications. + * + * @param id Unique persistent auto-incremented from 1 identifier of the notification group. + * @param type Type of the group. + * @param chatId Identifier of a chat to which all notifications in the group belong. + * @param totalCount Total number of active notifications in the group. + * @param notifications The list of active notifications. + */ + public NotificationGroup(int id, NotificationGroupType type, long chatId, int totalCount, Notification[] notifications) { + this.id = id; + this.type = type; + this.chatId = chatId; + this.totalCount = totalCount; + this.notifications = notifications; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 780691541; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the type of notifications in a notification group. + */ + public abstract static class NotificationGroupType extends Object { + } + + /** + * A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages. + */ + public static class NotificationGroupTypeMessages extends NotificationGroupType { + + /** + * A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages. + */ + public NotificationGroupTypeMessages() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1702481123; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message. + */ + public static class NotificationGroupTypeMentions extends NotificationGroupType { + + /** + * A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message. + */ + public NotificationGroupTypeMentions() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2050324051; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A group containing a notification of type notificationTypeNewSecretChat. + */ + public static class NotificationGroupTypeSecretChat extends NotificationGroupType { + + /** + * A group containing a notification of type notificationTypeNewSecretChat. + */ + public NotificationGroupTypeSecretChat() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1390759476; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A group containing notifications of type notificationTypeNewCall. + */ + public static class NotificationGroupTypeCalls extends NotificationGroupType { + + /** + * A group containing notifications of type notificationTypeNewCall. + */ + public NotificationGroupTypeCalls() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1379123538; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the types of chats to which notification settings are applied. + */ + public abstract static class NotificationSettingsScope extends Object { + } + + /** + * Notification settings applied to all private and secret chats when the corresponding chat setting has a default value. + */ + public static class NotificationSettingsScopePrivateChats extends NotificationSettingsScope { + + /** + * Notification settings applied to all private and secret chats when the corresponding chat setting has a default value. + */ + public NotificationSettingsScopePrivateChats() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 937446759; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Notification settings applied to all basic groups and supergroups when the corresponding chat setting has a default value. + */ + public static class NotificationSettingsScopeGroupChats extends NotificationSettingsScope { + + /** + * Notification settings applied to all basic groups and supergroups when the corresponding chat setting has a default value. + */ + public NotificationSettingsScopeGroupChats() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1212142067; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Notification settings applied to all channels when the corresponding chat setting has a default value. + */ + public static class NotificationSettingsScopeChannelChats extends NotificationSettingsScope { + + /** + * Notification settings applied to all channels when the corresponding chat setting has a default value. + */ + public NotificationSettingsScopeChannelChats() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 548013448; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains detailed information about a notification. + */ + public abstract static class NotificationType extends Object { + } + + /** + * New message was received. + */ + public static class NotificationTypeNewMessage extends NotificationType { + /** + * The message. + */ + public Message message; + + /** + * New message was received. + */ + public NotificationTypeNewMessage() { + } + + /** + * New message was received. + * + * @param message The message. + */ + public NotificationTypeNewMessage(Message message) { + this.message = message; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1885935159; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * New secret chat was created. + */ + public static class NotificationTypeNewSecretChat extends NotificationType { + + /** + * New secret chat was created. + */ + public NotificationTypeNewSecretChat() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1198638768; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * New call was received. + */ + public static class NotificationTypeNewCall extends NotificationType { + /** + * Call identifier. + */ + public int callId; + + /** + * New call was received. + */ + public NotificationTypeNewCall() { + } + + /** + * New call was received. + * + * @param callId Call identifier. + */ + public NotificationTypeNewCall(int callId) { + this.callId = callId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1712734585; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * New message was received through a push notification. + */ + public static class NotificationTypeNewPushMessage extends NotificationType { + /** + * The message identifier. The message will not be available in the chat history, but the ID can be used in viewMessages, or as replyToMessageId. + */ + public long messageId; + /** + * Sender of the message; 0 if unknown. Corresponding user may be inaccessible. + */ + public int senderUserId; + /** + * Sender chat of the message; 0 if none. + */ + public long senderChatId; + /** + * Name of the sender; can be different from the name of the sender user. + */ + public String senderName; + /** + * True, if the message is outgoing. + */ + public boolean isOutgoing; + /** + * Push message content. + */ + public PushMessageContent content; + + /** + * New message was received through a push notification. + */ + public NotificationTypeNewPushMessage() { + } + + /** + * New message was received through a push notification. + * + * @param messageId The message identifier. The message will not be available in the chat history, but the ID can be used in viewMessages, or as replyToMessageId. + * @param senderUserId Sender of the message; 0 if unknown. Corresponding user may be inaccessible. + * @param senderChatId Sender chat of the message; 0 if none. + * @param senderName Name of the sender; can be different from the name of the sender user. + * @param isOutgoing True, if the message is outgoing. + * @param content Push message content. + */ + public NotificationTypeNewPushMessage(long messageId, int senderUserId, long senderChatId, String senderName, boolean isOutgoing, PushMessageContent content) { + this.messageId = messageId; + this.senderUserId = senderUserId; + this.senderChatId = senderChatId; + this.senderName = senderName; + this.isOutgoing = isOutgoing; + this.content = content; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -728846585; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An object of this type is returned on a successful function call for certain functions. + */ + public static class Ok extends Object { + + /** + * An object of this type is returned on a successful function call for certain functions. + */ + public Ok() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -722616727; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents the value of an option. + */ + public abstract static class OptionValue extends Object { + } + + /** + * Represents a boolean option. + */ + public static class OptionValueBoolean extends OptionValue { + /** + * The value of the option. + */ + public boolean value; + + /** + * Represents a boolean option. + */ + public OptionValueBoolean() { + } + + /** + * Represents a boolean option. + * + * @param value The value of the option. + */ + public OptionValueBoolean(boolean value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 63135518; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents an unknown option or an option which has a default value. + */ + public static class OptionValueEmpty extends OptionValue { + + /** + * Represents an unknown option or an option which has a default value. + */ + public OptionValueEmpty() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 918955155; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents an integer option. + */ + public static class OptionValueInteger extends OptionValue { + /** + * The value of the option. + */ + public long value; + + /** + * Represents an integer option. + */ + public OptionValueInteger() { + } + + /** + * Represents an integer option. + * + * @param value The value of the option. + */ + public OptionValueInteger(long value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -186858780; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a string option. + */ + public static class OptionValueString extends OptionValue { + /** + * The value of the option. + */ + public String value; + + /** + * Represents a string option. + */ + public OptionValueString() { + } + + /** + * Represents a string option. + * + * @param value The value of the option. + */ + public OptionValueString(String value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 756248212; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Order information. + */ + public static class OrderInfo extends Object { + /** + * Name of the user. + */ + public String name; + /** + * Phone number of the user. + */ + public String phoneNumber; + /** + * Email address of the user. + */ + public String emailAddress; + /** + * Shipping address for this order; may be null. + */ + public Address shippingAddress; + + /** + * Order information. + */ + public OrderInfo() { + } + + /** + * Order information. + * + * @param name Name of the user. + * @param phoneNumber Phone number of the user. + * @param emailAddress Email address of the user. + * @param shippingAddress Shipping address for this order; may be null. + */ + public OrderInfo(String name, String phoneNumber, String emailAddress, Address shippingAddress) { + this.name = name; + this.phoneNumber = phoneNumber; + this.emailAddress = emailAddress; + this.shippingAddress = shippingAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 783997294; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a block of an instant view web page. + */ + public abstract static class PageBlock extends Object { + } + + /** + * The title of a page. + */ + public static class PageBlockTitle extends PageBlock { + /** + * Title. + */ + public RichText title; + + /** + * The title of a page. + */ + public PageBlockTitle() { + } + + /** + * The title of a page. + * + * @param title Title. + */ + public PageBlockTitle(RichText title) { + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1629664784; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The subtitle of a page. + */ + public static class PageBlockSubtitle extends PageBlock { + /** + * Subtitle. + */ + public RichText subtitle; + + /** + * The subtitle of a page. + */ + public PageBlockSubtitle() { + } + + /** + * The subtitle of a page. + * + * @param subtitle Subtitle. + */ + public PageBlockSubtitle(RichText subtitle) { + this.subtitle = subtitle; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 264524263; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The author and publishing date of a page. + */ + public static class PageBlockAuthorDate extends PageBlock { + /** + * Author. + */ + public RichText author; + /** + * Point in time (Unix timestamp) when the article was published; 0 if unknown. + */ + public int publishDate; + + /** + * The author and publishing date of a page. + */ + public PageBlockAuthorDate() { + } + + /** + * The author and publishing date of a page. + * + * @param author Author. + * @param publishDate Point in time (Unix timestamp) when the article was published; 0 if unknown. + */ + public PageBlockAuthorDate(RichText author, int publishDate) { + this.author = author; + this.publishDate = publishDate; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1300231184; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A header. + */ + public static class PageBlockHeader extends PageBlock { + /** + * Header. + */ + public RichText header; + + /** + * A header. + */ + public PageBlockHeader() { + } + + /** + * A header. + * + * @param header Header. + */ + public PageBlockHeader(RichText header) { + this.header = header; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1402854811; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A subheader. + */ + public static class PageBlockSubheader extends PageBlock { + /** + * Subheader. + */ + public RichText subheader; + + /** + * A subheader. + */ + public PageBlockSubheader() { + } + + /** + * A subheader. + * + * @param subheader Subheader. + */ + public PageBlockSubheader(RichText subheader) { + this.subheader = subheader; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1263956774; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A kicker. + */ + public static class PageBlockKicker extends PageBlock { + /** + * Kicker. + */ + public RichText kicker; + + /** + * A kicker. + */ + public PageBlockKicker() { + } + + /** + * A kicker. + * + * @param kicker Kicker. + */ + public PageBlockKicker(RichText kicker) { + this.kicker = kicker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1361282635; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A text paragraph. + */ + public static class PageBlockParagraph extends PageBlock { + /** + * Paragraph text. + */ + public RichText text; + + /** + * A text paragraph. + */ + public PageBlockParagraph() { + } + + /** + * A text paragraph. + * + * @param text Paragraph text. + */ + public PageBlockParagraph(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1182402406; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A preformatted text paragraph. + */ + public static class PageBlockPreformatted extends PageBlock { + /** + * Paragraph text. + */ + public RichText text; + /** + * Programming language for which the text should be formatted. + */ + public String language; + + /** + * A preformatted text paragraph. + */ + public PageBlockPreformatted() { + } + + /** + * A preformatted text paragraph. + * + * @param text Paragraph text. + * @param language Programming language for which the text should be formatted. + */ + public PageBlockPreformatted(RichText text, String language) { + this.text = text; + this.language = language; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1066346178; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The footer of a page. + */ + public static class PageBlockFooter extends PageBlock { + /** + * Footer. + */ + public RichText footer; + + /** + * The footer of a page. + */ + public PageBlockFooter() { + } + + /** + * The footer of a page. + * + * @param footer Footer. + */ + public PageBlockFooter(RichText footer) { + this.footer = footer; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 886429480; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An empty block separating a page. + */ + public static class PageBlockDivider extends PageBlock { + + /** + * An empty block separating a page. + */ + public PageBlockDivider() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -618614392; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor. + */ + public static class PageBlockAnchor extends PageBlock { + /** + * Name of the anchor. + */ + public String name; + + /** + * An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor. + */ + public PageBlockAnchor() { + } + + /** + * An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor. + * + * @param name Name of the anchor. + */ + public PageBlockAnchor(String name) { + this.name = name; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -837994576; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A list of data blocks. + */ + public static class PageBlockList extends PageBlock { + /** + * The items of the list. + */ + public PageBlockListItem[] items; + + /** + * A list of data blocks. + */ + public PageBlockList() { + } + + /** + * A list of data blocks. + * + * @param items The items of the list. + */ + public PageBlockList(PageBlockListItem[] items) { + this.items = items; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1037074852; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A block quote. + */ + public static class PageBlockBlockQuote extends PageBlock { + /** + * Quote text. + */ + public RichText text; + /** + * Quote credit. + */ + public RichText credit; + + /** + * A block quote. + */ + public PageBlockBlockQuote() { + } + + /** + * A block quote. + * + * @param text Quote text. + * @param credit Quote credit. + */ + public PageBlockBlockQuote(RichText text, RichText credit) { + this.text = text; + this.credit = credit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1657834142; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A pull quote. + */ + public static class PageBlockPullQuote extends PageBlock { + /** + * Quote text. + */ + public RichText text; + /** + * Quote credit. + */ + public RichText credit; + + /** + * A pull quote. + */ + public PageBlockPullQuote() { + } + + /** + * A pull quote. + * + * @param text Quote text. + * @param credit Quote credit. + */ + public PageBlockPullQuote(RichText text, RichText credit) { + this.text = text; + this.credit = credit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 490242317; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An animation. + */ + public static class PageBlockAnimation extends PageBlock { + /** + * Animation file; may be null. + */ + public Animation animation; + /** + * Animation caption. + */ + public PageBlockCaption caption; + /** + * True, if the animation should be played automatically. + */ + public boolean needAutoplay; + + /** + * An animation. + */ + public PageBlockAnimation() { + } + + /** + * An animation. + * + * @param animation Animation file; may be null. + * @param caption Animation caption. + * @param needAutoplay True, if the animation should be played automatically. + */ + public PageBlockAnimation(Animation animation, PageBlockCaption caption, boolean needAutoplay) { + this.animation = animation; + this.caption = caption; + this.needAutoplay = needAutoplay; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1355669513; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An audio file. + */ + public static class PageBlockAudio extends PageBlock { + /** + * Audio file; may be null. + */ + public Audio audio; + /** + * Audio file caption. + */ + public PageBlockCaption caption; + + /** + * An audio file. + */ + public PageBlockAudio() { + } + + /** + * An audio file. + * + * @param audio Audio file; may be null. + * @param caption Audio file caption. + */ + public PageBlockAudio(Audio audio, PageBlockCaption caption) { + this.audio = audio; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -63371245; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A photo. + */ + public static class PageBlockPhoto extends PageBlock { + /** + * Photo file; may be null. + */ + public Photo photo; + /** + * Photo caption. + */ + public PageBlockCaption caption; + /** + * URL that needs to be opened when the photo is clicked. + */ + public String url; + + /** + * A photo. + */ + public PageBlockPhoto() { + } + + /** + * A photo. + * + * @param photo Photo file; may be null. + * @param caption Photo caption. + * @param url URL that needs to be opened when the photo is clicked. + */ + public PageBlockPhoto(Photo photo, PageBlockCaption caption, String url) { + this.photo = photo; + this.caption = caption; + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 417601156; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A video. + */ + public static class PageBlockVideo extends PageBlock { + /** + * Video file; may be null. + */ + public Video video; + /** + * Video caption. + */ + public PageBlockCaption caption; + /** + * True, if the video should be played automatically. + */ + public boolean needAutoplay; + /** + * True, if the video should be looped. + */ + public boolean isLooped; + + /** + * A video. + */ + public PageBlockVideo() { + } + + /** + * A video. + * + * @param video Video file; may be null. + * @param caption Video caption. + * @param needAutoplay True, if the video should be played automatically. + * @param isLooped True, if the video should be looped. + */ + public PageBlockVideo(Video video, PageBlockCaption caption, boolean needAutoplay, boolean isLooped) { + this.video = video; + this.caption = caption; + this.needAutoplay = needAutoplay; + this.isLooped = isLooped; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 510041394; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A voice note. + */ + public static class PageBlockVoiceNote extends PageBlock { + /** + * Voice note; may be null. + */ + public VoiceNote voiceNote; + /** + * Voice note caption. + */ + public PageBlockCaption caption; + + /** + * A voice note. + */ + public PageBlockVoiceNote() { + } + + /** + * A voice note. + * + * @param voiceNote Voice note; may be null. + * @param caption Voice note caption. + */ + public PageBlockVoiceNote(VoiceNote voiceNote, PageBlockCaption caption) { + this.voiceNote = voiceNote; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1823310463; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A page cover. + */ + public static class PageBlockCover extends PageBlock { + /** + * Cover. + */ + public PageBlock cover; + + /** + * A page cover. + */ + public PageBlockCover() { + } + + /** + * A page cover. + * + * @param cover Cover. + */ + public PageBlockCover(PageBlock cover) { + this.cover = cover; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 972174080; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An embedded web page. + */ + public static class PageBlockEmbedded extends PageBlock { + /** + * Web page URL, if available. + */ + public String url; + /** + * HTML-markup of the embedded page. + */ + public String html; + /** + * Poster photo, if available; may be null. + */ + public Photo posterPhoto; + /** + * Block width; 0 if unknown. + */ + public int width; + /** + * Block height; 0 if unknown. + */ + public int height; + /** + * Block caption. + */ + public PageBlockCaption caption; + /** + * True, if the block should be full width. + */ + public boolean isFullWidth; + /** + * True, if scrolling should be allowed. + */ + public boolean allowScrolling; + + /** + * An embedded web page. + */ + public PageBlockEmbedded() { + } + + /** + * An embedded web page. + * + * @param url Web page URL, if available. + * @param html HTML-markup of the embedded page. + * @param posterPhoto Poster photo, if available; may be null. + * @param width Block width; 0 if unknown. + * @param height Block height; 0 if unknown. + * @param caption Block caption. + * @param isFullWidth True, if the block should be full width. + * @param allowScrolling True, if scrolling should be allowed. + */ + public PageBlockEmbedded(String url, String html, Photo posterPhoto, int width, int height, PageBlockCaption caption, boolean isFullWidth, boolean allowScrolling) { + this.url = url; + this.html = html; + this.posterPhoto = posterPhoto; + this.width = width; + this.height = height; + this.caption = caption; + this.isFullWidth = isFullWidth; + this.allowScrolling = allowScrolling; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1942577763; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An embedded post. + */ + public static class PageBlockEmbeddedPost extends PageBlock { + /** + * Web page URL. + */ + public String url; + /** + * Post author. + */ + public String author; + /** + * Post author photo; may be null. + */ + public Photo authorPhoto; + /** + * Point in time (Unix timestamp) when the post was created; 0 if unknown. + */ + public int date; + /** + * Post content. + */ + public PageBlock[] pageBlocks; + /** + * Post caption. + */ + public PageBlockCaption caption; + + /** + * An embedded post. + */ + public PageBlockEmbeddedPost() { + } + + /** + * An embedded post. + * + * @param url Web page URL. + * @param author Post author. + * @param authorPhoto Post author photo; may be null. + * @param date Point in time (Unix timestamp) when the post was created; 0 if unknown. + * @param pageBlocks Post content. + * @param caption Post caption. + */ + public PageBlockEmbeddedPost(String url, String author, Photo authorPhoto, int date, PageBlock[] pageBlocks, PageBlockCaption caption) { + this.url = url; + this.author = author; + this.authorPhoto = authorPhoto; + this.date = date; + this.pageBlocks = pageBlocks; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 397600949; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A collage. + */ + public static class PageBlockCollage extends PageBlock { + /** + * Collage item contents. + */ + public PageBlock[] pageBlocks; + /** + * Block caption. + */ + public PageBlockCaption caption; + + /** + * A collage. + */ + public PageBlockCollage() { + } + + /** + * A collage. + * + * @param pageBlocks Collage item contents. + * @param caption Block caption. + */ + public PageBlockCollage(PageBlock[] pageBlocks, PageBlockCaption caption) { + this.pageBlocks = pageBlocks; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1163760110; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A slideshow. + */ + public static class PageBlockSlideshow extends PageBlock { + /** + * Slideshow item contents. + */ + public PageBlock[] pageBlocks; + /** + * Block caption. + */ + public PageBlockCaption caption; + + /** + * A slideshow. + */ + public PageBlockSlideshow() { + } + + /** + * A slideshow. + * + * @param pageBlocks Slideshow item contents. + * @param caption Block caption. + */ + public PageBlockSlideshow(PageBlock[] pageBlocks, PageBlockCaption caption) { + this.pageBlocks = pageBlocks; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 539217375; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A link to a chat. + */ + public static class PageBlockChatLink extends PageBlock { + /** + * Chat title. + */ + public String title; + /** + * Chat photo; may be null. + */ + public ChatPhotoInfo photo; + /** + * Chat username, by which all other information about the chat should be resolved. + */ + public String username; + + /** + * A link to a chat. + */ + public PageBlockChatLink() { + } + + /** + * A link to a chat. + * + * @param title Chat title. + * @param photo Chat photo; may be null. + * @param username Chat username, by which all other information about the chat should be resolved. + */ + public PageBlockChatLink(String title, ChatPhotoInfo photo, String username) { + this.title = title; + this.photo = photo; + this.username = username; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -202091253; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A table. + */ + public static class PageBlockTable extends PageBlock { + /** + * Table caption. + */ + public RichText caption; + /** + * Table cells. + */ + public PageBlockTableCell[][] cells; + /** + * True, if the table is bordered. + */ + public boolean isBordered; + /** + * True, if the table is striped. + */ + public boolean isStriped; + + /** + * A table. + */ + public PageBlockTable() { + } + + /** + * A table. + * + * @param caption Table caption. + * @param cells Table cells. + * @param isBordered True, if the table is bordered. + * @param isStriped True, if the table is striped. + */ + public PageBlockTable(RichText caption, PageBlockTableCell[][] cells, boolean isBordered, boolean isStriped) { + this.caption = caption; + this.cells = cells; + this.isBordered = isBordered; + this.isStriped = isStriped; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -942649288; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A collapsible block. + */ + public static class PageBlockDetails extends PageBlock { + /** + * Always visible heading for the block. + */ + public RichText header; + /** + * Block contents. + */ + public PageBlock[] pageBlocks; + /** + * True, if the block is open by default. + */ + public boolean isOpen; + + /** + * A collapsible block. + */ + public PageBlockDetails() { + } + + /** + * A collapsible block. + * + * @param header Always visible heading for the block. + * @param pageBlocks Block contents. + * @param isOpen True, if the block is open by default. + */ + public PageBlockDetails(RichText header, PageBlock[] pageBlocks, boolean isOpen) { + this.header = header; + this.pageBlocks = pageBlocks; + this.isOpen = isOpen; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1599869809; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Related articles. + */ + public static class PageBlockRelatedArticles extends PageBlock { + /** + * Block header. + */ + public RichText header; + /** + * List of related articles. + */ + public PageBlockRelatedArticle[] articles; + + /** + * Related articles. + */ + public PageBlockRelatedArticles() { + } + + /** + * Related articles. + * + * @param header Block header. + * @param articles List of related articles. + */ + public PageBlockRelatedArticles(RichText header, PageBlockRelatedArticle[] articles) { + this.header = header; + this.articles = articles; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1807324374; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A map. + */ + public static class PageBlockMap extends PageBlock { + /** + * Location of the map center. + */ + public Location location; + /** + * Map zoom level. + */ + public int zoom; + /** + * Map width. + */ + public int width; + /** + * Map height. + */ + public int height; + /** + * Block caption. + */ + public PageBlockCaption caption; + + /** + * A map. + */ + public PageBlockMap() { + } + + /** + * A map. + * + * @param location Location of the map center. + * @param zoom Map zoom level. + * @param width Map width. + * @param height Map height. + * @param caption Block caption. + */ + public PageBlockMap(Location location, int zoom, int width, int height, PageBlockCaption caption) { + this.location = location; + this.zoom = zoom; + this.width = width; + this.height = height; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1510961171; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a caption of an instant view web page block, consisting of a text and a trailing credit. + */ + public static class PageBlockCaption extends Object { + /** + * Content of the caption. + */ + public RichText text; + /** + * Block credit (like HTML tag <cite>). + */ + public RichText credit; + + /** + * Contains a caption of an instant view web page block, consisting of a text and a trailing credit. + */ + public PageBlockCaption() { + } + + /** + * Contains a caption of an instant view web page block, consisting of a text and a trailing credit. + * + * @param text Content of the caption. + * @param credit Block credit (like HTML tag <cite>). + */ + public PageBlockCaption(RichText text, RichText credit) { + this.text = text; + this.credit = credit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1180064650; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a horizontal alignment of a table cell content. + */ + public abstract static class PageBlockHorizontalAlignment extends Object { + } + + /** + * The content should be left-aligned. + */ + public static class PageBlockHorizontalAlignmentLeft extends PageBlockHorizontalAlignment { + + /** + * The content should be left-aligned. + */ + public PageBlockHorizontalAlignmentLeft() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 848701417; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The content should be center-aligned. + */ + public static class PageBlockHorizontalAlignmentCenter extends PageBlockHorizontalAlignment { + + /** + * The content should be center-aligned. + */ + public PageBlockHorizontalAlignmentCenter() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1009203990; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The content should be right-aligned. + */ + public static class PageBlockHorizontalAlignmentRight extends PageBlockHorizontalAlignment { + + /** + * The content should be right-aligned. + */ + public PageBlockHorizontalAlignmentRight() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1371369214; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes an item of a list page block. + */ + public static class PageBlockListItem extends Object { + /** + * Item label. + */ + public String label; + /** + * Item blocks. + */ + public PageBlock[] pageBlocks; + + /** + * Describes an item of a list page block. + */ + public PageBlockListItem() { + } + + /** + * Describes an item of a list page block. + * + * @param label Item label. + * @param pageBlocks Item blocks. + */ + public PageBlockListItem(String label, PageBlock[] pageBlocks) { + this.label = label; + this.pageBlocks = pageBlocks; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 323186259; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a related article. + */ + public static class PageBlockRelatedArticle extends Object { + /** + * Related article URL. + */ + public String url; + /** + * Article title; may be empty. + */ + public String title; + /** + * Article description; may be empty. + */ + public String description; + /** + * Article photo; may be null. + */ + public Photo photo; + /** + * Article author; may be empty. + */ + public String author; + /** + * Point in time (Unix timestamp) when the article was published; 0 if unknown. + */ + public int publishDate; + + /** + * Contains information about a related article. + */ + public PageBlockRelatedArticle() { + } + + /** + * Contains information about a related article. + * + * @param url Related article URL. + * @param title Article title; may be empty. + * @param description Article description; may be empty. + * @param photo Article photo; may be null. + * @param author Article author; may be empty. + * @param publishDate Point in time (Unix timestamp) when the article was published; 0 if unknown. + */ + public PageBlockRelatedArticle(String url, String title, String description, Photo photo, String author, int publishDate) { + this.url = url; + this.title = title; + this.description = description; + this.photo = photo; + this.author = author; + this.publishDate = publishDate; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 481199251; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a cell of a table. + */ + public static class PageBlockTableCell extends Object { + /** + * Cell text; may be null. If the text is null, then the cell should be invisible. + */ + public RichText text; + /** + * True, if it is a header cell. + */ + public boolean isHeader; + /** + * The number of columns the cell should span. + */ + public int colspan; + /** + * The number of rows the cell should span. + */ + public int rowspan; + /** + * Horizontal cell content alignment. + */ + public PageBlockHorizontalAlignment align; + /** + * Vertical cell content alignment. + */ + public PageBlockVerticalAlignment valign; + + /** + * Represents a cell of a table. + */ + public PageBlockTableCell() { + } + + /** + * Represents a cell of a table. + * + * @param text Cell text; may be null. If the text is null, then the cell should be invisible. + * @param isHeader True, if it is a header cell. + * @param colspan The number of columns the cell should span. + * @param rowspan The number of rows the cell should span. + * @param align Horizontal cell content alignment. + * @param valign Vertical cell content alignment. + */ + public PageBlockTableCell(RichText text, boolean isHeader, int colspan, int rowspan, PageBlockHorizontalAlignment align, PageBlockVerticalAlignment valign) { + this.text = text; + this.isHeader = isHeader; + this.colspan = colspan; + this.rowspan = rowspan; + this.align = align; + this.valign = valign; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1417658214; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a Vertical alignment of a table cell content. + */ + public abstract static class PageBlockVerticalAlignment extends Object { + } + + /** + * The content should be top-aligned. + */ + public static class PageBlockVerticalAlignmentTop extends PageBlockVerticalAlignment { + + /** + * The content should be top-aligned. + */ + public PageBlockVerticalAlignmentTop() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 195500454; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The content should be middle-aligned. + */ + public static class PageBlockVerticalAlignmentMiddle extends PageBlockVerticalAlignment { + + /** + * The content should be middle-aligned. + */ + public PageBlockVerticalAlignmentMiddle() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2123096587; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The content should be bottom-aligned. + */ + public static class PageBlockVerticalAlignmentBottom extends PageBlockVerticalAlignment { + + /** + * The content should be bottom-aligned. + */ + public PageBlockVerticalAlignmentBottom() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2092531158; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a Telegram Passport authorization form that was requested. + */ + public static class PassportAuthorizationForm extends Object { + /** + * Unique identifier of the authorization form. + */ + public int id; + /** + * Information about the Telegram Passport elements that need to be provided to complete the form. + */ + public PassportRequiredElement[] requiredElements; + /** + * URL for the privacy policy of the service; may be empty. + */ + public String privacyPolicyUrl; + + /** + * Contains information about a Telegram Passport authorization form that was requested. + */ + public PassportAuthorizationForm() { + } + + /** + * Contains information about a Telegram Passport authorization form that was requested. + * + * @param id Unique identifier of the authorization form. + * @param requiredElements Information about the Telegram Passport elements that need to be provided to complete the form. + * @param privacyPolicyUrl URL for the privacy policy of the service; may be empty. + */ + public PassportAuthorizationForm(int id, PassportRequiredElement[] requiredElements, String privacyPolicyUrl) { + this.id = id; + this.requiredElements = requiredElements; + this.privacyPolicyUrl = privacyPolicyUrl; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1070673218; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains information about a Telegram Passport element. + */ + public abstract static class PassportElement extends Object { + } + + /** + * A Telegram Passport element containing the user's personal details. + */ + public static class PassportElementPersonalDetails extends PassportElement { + /** + * Personal details of the user. + */ + public PersonalDetails personalDetails; + + /** + * A Telegram Passport element containing the user's personal details. + */ + public PassportElementPersonalDetails() { + } + + /** + * A Telegram Passport element containing the user's personal details. + * + * @param personalDetails Personal details of the user. + */ + public PassportElementPersonalDetails(PersonalDetails personalDetails) { + this.personalDetails = personalDetails; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1217724035; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's passport. + */ + public static class PassportElementPassport extends PassportElement { + /** + * Passport. + */ + public IdentityDocument passport; + + /** + * A Telegram Passport element containing the user's passport. + */ + public PassportElementPassport() { + } + + /** + * A Telegram Passport element containing the user's passport. + * + * @param passport Passport. + */ + public PassportElementPassport(IdentityDocument passport) { + this.passport = passport; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -263985373; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's driver license. + */ + public static class PassportElementDriverLicense extends PassportElement { + /** + * Driver license. + */ + public IdentityDocument driverLicense; + + /** + * A Telegram Passport element containing the user's driver license. + */ + public PassportElementDriverLicense() { + } + + /** + * A Telegram Passport element containing the user's driver license. + * + * @param driverLicense Driver license. + */ + public PassportElementDriverLicense(IdentityDocument driverLicense) { + this.driverLicense = driverLicense; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1643580589; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's identity card. + */ + public static class PassportElementIdentityCard extends PassportElement { + /** + * Identity card. + */ + public IdentityDocument identityCard; + + /** + * A Telegram Passport element containing the user's identity card. + */ + public PassportElementIdentityCard() { + } + + /** + * A Telegram Passport element containing the user's identity card. + * + * @param identityCard Identity card. + */ + public PassportElementIdentityCard(IdentityDocument identityCard) { + this.identityCard = identityCard; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2083775797; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's internal passport. + */ + public static class PassportElementInternalPassport extends PassportElement { + /** + * Internal passport. + */ + public IdentityDocument internalPassport; + + /** + * A Telegram Passport element containing the user's internal passport. + */ + public PassportElementInternalPassport() { + } + + /** + * A Telegram Passport element containing the user's internal passport. + * + * @param internalPassport Internal passport. + */ + public PassportElementInternalPassport(IdentityDocument internalPassport) { + this.internalPassport = internalPassport; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 36220295; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's address. + */ + public static class PassportElementAddress extends PassportElement { + /** + * Address. + */ + public Address address; + + /** + * A Telegram Passport element containing the user's address. + */ + public PassportElementAddress() { + } + + /** + * A Telegram Passport element containing the user's address. + * + * @param address Address. + */ + public PassportElementAddress(Address address) { + this.address = address; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -782625232; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's utility bill. + */ + public static class PassportElementUtilityBill extends PassportElement { + /** + * Utility bill. + */ + public PersonalDocument utilityBill; + + /** + * A Telegram Passport element containing the user's utility bill. + */ + public PassportElementUtilityBill() { + } + + /** + * A Telegram Passport element containing the user's utility bill. + * + * @param utilityBill Utility bill. + */ + public PassportElementUtilityBill(PersonalDocument utilityBill) { + this.utilityBill = utilityBill; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -234611246; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's bank statement. + */ + public static class PassportElementBankStatement extends PassportElement { + /** + * Bank statement. + */ + public PersonalDocument bankStatement; + + /** + * A Telegram Passport element containing the user's bank statement. + */ + public PassportElementBankStatement() { + } + + /** + * A Telegram Passport element containing the user's bank statement. + * + * @param bankStatement Bank statement. + */ + public PassportElementBankStatement(PersonalDocument bankStatement) { + this.bankStatement = bankStatement; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -366464408; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's rental agreement. + */ + public static class PassportElementRentalAgreement extends PassportElement { + /** + * Rental agreement. + */ + public PersonalDocument rentalAgreement; + + /** + * A Telegram Passport element containing the user's rental agreement. + */ + public PassportElementRentalAgreement() { + } + + /** + * A Telegram Passport element containing the user's rental agreement. + * + * @param rentalAgreement Rental agreement. + */ + public PassportElementRentalAgreement(PersonalDocument rentalAgreement) { + this.rentalAgreement = rentalAgreement; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -290141400; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's passport registration pages. + */ + public static class PassportElementPassportRegistration extends PassportElement { + /** + * Passport registration pages. + */ + public PersonalDocument passportRegistration; + + /** + * A Telegram Passport element containing the user's passport registration pages. + */ + public PassportElementPassportRegistration() { + } + + /** + * A Telegram Passport element containing the user's passport registration pages. + * + * @param passportRegistration Passport registration pages. + */ + public PassportElementPassportRegistration(PersonalDocument passportRegistration) { + this.passportRegistration = passportRegistration; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 618323071; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's temporary registration. + */ + public static class PassportElementTemporaryRegistration extends PassportElement { + /** + * Temporary registration. + */ + public PersonalDocument temporaryRegistration; + + /** + * A Telegram Passport element containing the user's temporary registration. + */ + public PassportElementTemporaryRegistration() { + } + + /** + * A Telegram Passport element containing the user's temporary registration. + * + * @param temporaryRegistration Temporary registration. + */ + public PassportElementTemporaryRegistration(PersonalDocument temporaryRegistration) { + this.temporaryRegistration = temporaryRegistration; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1237626864; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's phone number. + */ + public static class PassportElementPhoneNumber extends PassportElement { + /** + * Phone number. + */ + public String phoneNumber; + + /** + * A Telegram Passport element containing the user's phone number. + */ + public PassportElementPhoneNumber() { + } + + /** + * A Telegram Passport element containing the user's phone number. + * + * @param phoneNumber Phone number. + */ + public PassportElementPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1320118375; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's email address. + */ + public static class PassportElementEmailAddress extends PassportElement { + /** + * Email address. + */ + public String emailAddress; + + /** + * A Telegram Passport element containing the user's email address. + */ + public PassportElementEmailAddress() { + } + + /** + * A Telegram Passport element containing the user's email address. + * + * @param emailAddress Email address. + */ + public PassportElementEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1528129531; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the description of an error in a Telegram Passport element. + */ + public static class PassportElementError extends Object { + /** + * Type of the Telegram Passport element which has the error. + */ + public PassportElementType type; + /** + * Error message. + */ + public String message; + /** + * Error source. + */ + public PassportElementErrorSource source; + + /** + * Contains the description of an error in a Telegram Passport element. + */ + public PassportElementError() { + } + + /** + * Contains the description of an error in a Telegram Passport element. + * + * @param type Type of the Telegram Passport element which has the error. + * @param message Error message. + * @param source Error source. + */ + public PassportElementError(PassportElementType type, String message, PassportElementErrorSource source) { + this.type = type; + this.message = message; + this.source = source; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1861902395; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains the description of an error in a Telegram Passport element. + */ + public abstract static class PassportElementErrorSource extends Object { + } + + /** + * The element contains an error in an unspecified place. The error will be considered resolved when new data is added. + */ + public static class PassportElementErrorSourceUnspecified extends PassportElementErrorSource { + + /** + * The element contains an error in an unspecified place. The error will be considered resolved when new data is added. + */ + public PassportElementErrorSourceUnspecified() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -378320830; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * One of the data fields contains an error. The error will be considered resolved when the value of the field changes. + */ + public static class PassportElementErrorSourceDataField extends PassportElementErrorSource { + /** + * Field name. + */ + public String fieldName; + + /** + * One of the data fields contains an error. The error will be considered resolved when the value of the field changes. + */ + public PassportElementErrorSourceDataField() { + } + + /** + * One of the data fields contains an error. The error will be considered resolved when the value of the field changes. + * + * @param fieldName Field name. + */ + public PassportElementErrorSourceDataField(String fieldName) { + this.fieldName = fieldName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -308650776; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The front side of the document contains an error. The error will be considered resolved when the file with the front side changes. + */ + public static class PassportElementErrorSourceFrontSide extends PassportElementErrorSource { + + /** + * The front side of the document contains an error. The error will be considered resolved when the file with the front side changes. + */ + public PassportElementErrorSourceFrontSide() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1895658292; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes. + */ + public static class PassportElementErrorSourceReverseSide extends PassportElementErrorSource { + + /** + * The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes. + */ + public PassportElementErrorSourceReverseSide() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1918630391; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes. + */ + public static class PassportElementErrorSourceSelfie extends PassportElementErrorSource { + + /** + * The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes. + */ + public PassportElementErrorSourceSelfie() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -797043672; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * One of files with the translation of the document contains an error. The error will be considered resolved when the file changes. + */ + public static class PassportElementErrorSourceTranslationFile extends PassportElementErrorSource { + /** + * Index of a file with the error. + */ + public int fileIndex; + + /** + * One of files with the translation of the document contains an error. The error will be considered resolved when the file changes. + */ + public PassportElementErrorSourceTranslationFile() { + } + + /** + * One of files with the translation of the document contains an error. The error will be considered resolved when the file changes. + * + * @param fileIndex Index of a file with the error. + */ + public PassportElementErrorSourceTranslationFile(int fileIndex) { + this.fileIndex = fileIndex; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -689621228; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The translation of the document contains an error. The error will be considered resolved when the list of translation files changes. + */ + public static class PassportElementErrorSourceTranslationFiles extends PassportElementErrorSource { + + /** + * The translation of the document contains an error. The error will be considered resolved when the list of translation files changes. + */ + public PassportElementErrorSourceTranslationFiles() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 581280796; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file contains an error. The error will be considered resolved when the file changes. + */ + public static class PassportElementErrorSourceFile extends PassportElementErrorSource { + /** + * Index of a file with the error. + */ + public int fileIndex; + + /** + * The file contains an error. The error will be considered resolved when the file changes. + */ + public PassportElementErrorSourceFile() { + } + + /** + * The file contains an error. The error will be considered resolved when the file changes. + * + * @param fileIndex Index of a file with the error. + */ + public PassportElementErrorSourceFile(int fileIndex) { + this.fileIndex = fileIndex; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2020358960; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of attached files contains an error. The error will be considered resolved when the list of files changes. + */ + public static class PassportElementErrorSourceFiles extends PassportElementErrorSource { + + /** + * The list of attached files contains an error. The error will be considered resolved when the list of files changes. + */ + public PassportElementErrorSourceFiles() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1894164178; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains the type of a Telegram Passport element. + */ + public abstract static class PassportElementType extends Object { + } + + /** + * A Telegram Passport element containing the user's personal details. + */ + public static class PassportElementTypePersonalDetails extends PassportElementType { + + /** + * A Telegram Passport element containing the user's personal details. + */ + public PassportElementTypePersonalDetails() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1032136365; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's passport. + */ + public static class PassportElementTypePassport extends PassportElementType { + + /** + * A Telegram Passport element containing the user's passport. + */ + public PassportElementTypePassport() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -436360376; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's driver license. + */ + public static class PassportElementTypeDriverLicense extends PassportElementType { + + /** + * A Telegram Passport element containing the user's driver license. + */ + public PassportElementTypeDriverLicense() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1827298379; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's identity card. + */ + public static class PassportElementTypeIdentityCard extends PassportElementType { + + /** + * A Telegram Passport element containing the user's identity card. + */ + public PassportElementTypeIdentityCard() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -502356132; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's internal passport. + */ + public static class PassportElementTypeInternalPassport extends PassportElementType { + + /** + * A Telegram Passport element containing the user's internal passport. + */ + public PassportElementTypeInternalPassport() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -793781959; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's address. + */ + public static class PassportElementTypeAddress extends PassportElementType { + + /** + * A Telegram Passport element containing the user's address. + */ + public PassportElementTypeAddress() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 496327874; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's utility bill. + */ + public static class PassportElementTypeUtilityBill extends PassportElementType { + + /** + * A Telegram Passport element containing the user's utility bill. + */ + public PassportElementTypeUtilityBill() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 627084906; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's bank statement. + */ + public static class PassportElementTypeBankStatement extends PassportElementType { + + /** + * A Telegram Passport element containing the user's bank statement. + */ + public PassportElementTypeBankStatement() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 574095667; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's rental agreement. + */ + public static class PassportElementTypeRentalAgreement extends PassportElementType { + + /** + * A Telegram Passport element containing the user's rental agreement. + */ + public PassportElementTypeRentalAgreement() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2060583280; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the registration page of the user's passport. + */ + public static class PassportElementTypePassportRegistration extends PassportElementType { + + /** + * A Telegram Passport element containing the registration page of the user's passport. + */ + public PassportElementTypePassportRegistration() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -159478209; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's temporary registration. + */ + public static class PassportElementTypeTemporaryRegistration extends PassportElementType { + + /** + * A Telegram Passport element containing the user's temporary registration. + */ + public PassportElementTypeTemporaryRegistration() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1092498527; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's phone number. + */ + public static class PassportElementTypePhoneNumber extends PassportElementType { + + /** + * A Telegram Passport element containing the user's phone number. + */ + public PassportElementTypePhoneNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -995361172; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A Telegram Passport element containing the user's email address. + */ + public static class PassportElementTypeEmailAddress extends PassportElementType { + + /** + * A Telegram Passport element containing the user's email address. + */ + public PassportElementTypeEmailAddress() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -79321405; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about saved Telegram Passport elements. + */ + public static class PassportElements extends Object { + /** + * Telegram Passport elements. + */ + public PassportElement[] elements; + + /** + * Contains information about saved Telegram Passport elements. + */ + public PassportElements() { + } + + /** + * Contains information about saved Telegram Passport elements. + * + * @param elements Telegram Passport elements. + */ + public PassportElements(PassportElement[] elements) { + this.elements = elements; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1264617556; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a Telegram Passport elements and corresponding errors. + */ + public static class PassportElementsWithErrors extends Object { + /** + * Telegram Passport elements. + */ + public PassportElement[] elements; + /** + * Errors in the elements that are already available. + */ + public PassportElementError[] errors; + + /** + * Contains information about a Telegram Passport elements and corresponding errors. + */ + public PassportElementsWithErrors() { + } + + /** + * Contains information about a Telegram Passport elements and corresponding errors. + * + * @param elements Telegram Passport elements. + * @param errors Errors in the elements that are already available. + */ + public PassportElementsWithErrors(PassportElement[] elements, PassportElementError[] errors) { + this.elements = elements; + this.errors = errors; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1308923044; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a description of the required Telegram Passport element that was requested by a service. + */ + public static class PassportRequiredElement extends Object { + /** + * List of Telegram Passport elements any of which is enough to provide. + */ + public PassportSuitableElement[] suitableElements; + + /** + * Contains a description of the required Telegram Passport element that was requested by a service. + */ + public PassportRequiredElement() { + } + + /** + * Contains a description of the required Telegram Passport element that was requested by a service. + * + * @param suitableElements List of Telegram Passport elements any of which is enough to provide. + */ + public PassportRequiredElement(PassportSuitableElement[] suitableElements) { + this.suitableElements = suitableElements; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1983641651; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a Telegram Passport element that was requested by a service. + */ + public static class PassportSuitableElement extends Object { + /** + * Type of the element. + */ + public PassportElementType type; + /** + * True, if a selfie is required with the identity document. + */ + public boolean isSelfieRequired; + /** + * True, if a certified English translation is required with the document. + */ + public boolean isTranslationRequired; + /** + * True, if personal details must include the user's name in the language of their country of residence. + */ + public boolean isNativeNameRequired; + + /** + * Contains information about a Telegram Passport element that was requested by a service. + */ + public PassportSuitableElement() { + } + + /** + * Contains information about a Telegram Passport element that was requested by a service. + * + * @param type Type of the element. + * @param isSelfieRequired True, if a selfie is required with the identity document. + * @param isTranslationRequired True, if a certified English translation is required with the document. + * @param isNativeNameRequired True, if personal details must include the user's name in the language of their country of residence. + */ + public PassportSuitableElement(PassportElementType type, boolean isSelfieRequired, boolean isTranslationRequired, boolean isNativeNameRequired) { + this.type = type; + this.isSelfieRequired = isSelfieRequired; + this.isTranslationRequired = isTranslationRequired; + this.isNativeNameRequired = isNativeNameRequired; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -789019876; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents the current state of 2-step verification. + */ + public static class PasswordState extends Object { + /** + * True, if a 2-step verification password is set. + */ + public boolean hasPassword; + /** + * Hint for the password; may be empty. + */ + public String passwordHint; + /** + * True, if a recovery email is set. + */ + public boolean hasRecoveryEmailAddress; + /** + * True, if some Telegram Passport elements were saved. + */ + public boolean hasPassportData; + /** + * Information about the recovery email address to which the confirmation email was sent; may be null. + */ + public EmailAddressAuthenticationCodeInfo recoveryEmailAddressCodeInfo; + + /** + * Represents the current state of 2-step verification. + */ + public PasswordState() { + } + + /** + * Represents the current state of 2-step verification. + * + * @param hasPassword True, if a 2-step verification password is set. + * @param passwordHint Hint for the password; may be empty. + * @param hasRecoveryEmailAddress True, if a recovery email is set. + * @param hasPassportData True, if some Telegram Passport elements were saved. + * @param recoveryEmailAddressCodeInfo Information about the recovery email address to which the confirmation email was sent; may be null. + */ + public PasswordState(boolean hasPassword, String passwordHint, boolean hasRecoveryEmailAddress, boolean hasPassportData, EmailAddressAuthenticationCodeInfo recoveryEmailAddressCodeInfo) { + this.hasPassword = hasPassword; + this.passwordHint = passwordHint; + this.hasRecoveryEmailAddress = hasRecoveryEmailAddress; + this.hasPassportData = hasPassportData; + this.recoveryEmailAddressCodeInfo = recoveryEmailAddressCodeInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1154797731; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about an invoice payment form. + */ + public static class PaymentForm extends Object { + /** + * Full information of the invoice. + */ + public Invoice invoice; + /** + * Payment form URL. + */ + public String url; + /** + * Contains information about the payment provider, if available, to support it natively without the need for opening the URL; may be null. + */ + public PaymentsProviderStripe paymentsProvider; + /** + * Saved server-side order information; may be null. + */ + public OrderInfo savedOrderInfo; + /** + * Contains information about saved card credentials; may be null. + */ + public SavedCredentials savedCredentials; + /** + * True, if the user can choose to save credentials. + */ + public boolean canSaveCredentials; + /** + * True, if the user will be able to save credentials protected by a password they set up. + */ + public boolean needPassword; + + /** + * Contains information about an invoice payment form. + */ + public PaymentForm() { + } + + /** + * Contains information about an invoice payment form. + * + * @param invoice Full information of the invoice. + * @param url Payment form URL. + * @param paymentsProvider Contains information about the payment provider, if available, to support it natively without the need for opening the URL; may be null. + * @param savedOrderInfo Saved server-side order information; may be null. + * @param savedCredentials Contains information about saved card credentials; may be null. + * @param canSaveCredentials True, if the user can choose to save credentials. + * @param needPassword True, if the user will be able to save credentials protected by a password they set up. + */ + public PaymentForm(Invoice invoice, String url, PaymentsProviderStripe paymentsProvider, OrderInfo savedOrderInfo, SavedCredentials savedCredentials, boolean canSaveCredentials, boolean needPassword) { + this.invoice = invoice; + this.url = url; + this.paymentsProvider = paymentsProvider; + this.savedOrderInfo = savedOrderInfo; + this.savedCredentials = savedCredentials; + this.canSaveCredentials = canSaveCredentials; + this.needPassword = needPassword; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -200418230; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a successful payment. + */ + public static class PaymentReceipt extends Object { + /** + * Point in time (Unix timestamp) when the payment was made. + */ + public int date; + /** + * User identifier of the payment provider bot. + */ + public int paymentsProviderUserId; + /** + * Contains information about the invoice. + */ + public Invoice invoice; + /** + * Contains order information; may be null. + */ + public OrderInfo orderInfo; + /** + * Chosen shipping option; may be null. + */ + public ShippingOption shippingOption; + /** + * Title of the saved credentials. + */ + public String credentialsTitle; + + /** + * Contains information about a successful payment. + */ + public PaymentReceipt() { + } + + /** + * Contains information about a successful payment. + * + * @param date Point in time (Unix timestamp) when the payment was made. + * @param paymentsProviderUserId User identifier of the payment provider bot. + * @param invoice Contains information about the invoice. + * @param orderInfo Contains order information; may be null. + * @param shippingOption Chosen shipping option; may be null. + * @param credentialsTitle Title of the saved credentials. + */ + public PaymentReceipt(int date, int paymentsProviderUserId, Invoice invoice, OrderInfo orderInfo, ShippingOption shippingOption, String credentialsTitle) { + this.date = date; + this.paymentsProviderUserId = paymentsProviderUserId; + this.invoice = invoice; + this.orderInfo = orderInfo; + this.shippingOption = shippingOption; + this.credentialsTitle = credentialsTitle; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1171223545; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the result of a payment request. + */ + public static class PaymentResult extends Object { + /** + * True, if the payment request was successful; otherwise the verificationUrl will be not empty. + */ + public boolean success; + /** + * URL for additional payment credentials verification. + */ + public String verificationUrl; + + /** + * Contains the result of a payment request. + */ + public PaymentResult() { + } + + /** + * Contains the result of a payment request. + * + * @param success True, if the payment request was successful; otherwise the verificationUrl will be not empty. + * @param verificationUrl URL for additional payment credentials verification. + */ + public PaymentResult(boolean success, String verificationUrl) { + this.success = success; + this.verificationUrl = verificationUrl; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -804263843; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Stripe payment provider. + */ + public static class PaymentsProviderStripe extends Object { + /** + * Stripe API publishable key. + */ + public String publishableKey; + /** + * True, if the user country must be provided. + */ + public boolean needCountry; + /** + * True, if the user ZIP/postal code must be provided. + */ + public boolean needPostalCode; + /** + * True, if the cardholder name must be provided. + */ + public boolean needCardholderName; + + /** + * Stripe payment provider. + */ + public PaymentsProviderStripe() { + } + + /** + * Stripe payment provider. + * + * @param publishableKey Stripe API publishable key. + * @param needCountry True, if the user country must be provided. + * @param needPostalCode True, if the user ZIP/postal code must be provided. + * @param needCardholderName True, if the cardholder name must be provided. + */ + public PaymentsProviderStripe(String publishableKey, boolean needCountry, boolean needPostalCode, boolean needCardholderName) { + this.publishableKey = publishableKey; + this.needCountry = needCountry; + this.needPostalCode = needPostalCode; + this.needCardholderName = needCardholderName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1090791032; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the user's personal details. + */ + public static class PersonalDetails extends Object { + /** + * First name of the user written in English; 1-255 characters. + */ + public String firstName; + /** + * Middle name of the user written in English; 0-255 characters. + */ + public String middleName; + /** + * Last name of the user written in English; 1-255 characters. + */ + public String lastName; + /** + * Native first name of the user; 1-255 characters. + */ + public String nativeFirstName; + /** + * Native middle name of the user; 0-255 characters. + */ + public String nativeMiddleName; + /** + * Native last name of the user; 1-255 characters. + */ + public String nativeLastName; + /** + * Birthdate of the user. + */ + public Date birthdate; + /** + * Gender of the user, "male" or "female". + */ + public String gender; + /** + * A two-letter ISO 3166-1 alpha-2 country code of the user's country. + */ + public String countryCode; + /** + * A two-letter ISO 3166-1 alpha-2 country code of the user's residence country. + */ + public String residenceCountryCode; + + /** + * Contains the user's personal details. + */ + public PersonalDetails() { + } + + /** + * Contains the user's personal details. + * + * @param firstName First name of the user written in English; 1-255 characters. + * @param middleName Middle name of the user written in English; 0-255 characters. + * @param lastName Last name of the user written in English; 1-255 characters. + * @param nativeFirstName Native first name of the user; 1-255 characters. + * @param nativeMiddleName Native middle name of the user; 0-255 characters. + * @param nativeLastName Native last name of the user; 1-255 characters. + * @param birthdate Birthdate of the user. + * @param gender Gender of the user, "male" or "female". + * @param countryCode A two-letter ISO 3166-1 alpha-2 country code of the user's country. + * @param residenceCountryCode A two-letter ISO 3166-1 alpha-2 country code of the user's residence country. + */ + public PersonalDetails(String firstName, String middleName, String lastName, String nativeFirstName, String nativeMiddleName, String nativeLastName, Date birthdate, String gender, String countryCode, String residenceCountryCode) { + this.firstName = firstName; + this.middleName = middleName; + this.lastName = lastName; + this.nativeFirstName = nativeFirstName; + this.nativeMiddleName = nativeMiddleName; + this.nativeLastName = nativeLastName; + this.birthdate = birthdate; + this.gender = gender; + this.countryCode = countryCode; + this.residenceCountryCode = residenceCountryCode; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1061656137; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A personal document, containing some information about a user. + */ + public static class PersonalDocument extends Object { + /** + * List of files containing the pages of the document. + */ + public DatedFile[] files; + /** + * List of files containing a certified English translation of the document. + */ + public DatedFile[] translation; + + /** + * A personal document, containing some information about a user. + */ + public PersonalDocument() { + } + + /** + * A personal document, containing some information about a user. + * + * @param files List of files containing the pages of the document. + * @param translation List of files containing a certified English translation of the document. + */ + public PersonalDocument(DatedFile[] files, DatedFile[] translation) { + this.files = files; + this.translation = translation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1011634661; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains settings for the authentication of the user's phone number. + */ + public static class PhoneNumberAuthenticationSettings extends Object { + /** + * Pass true if the authentication code may be sent via flash call to the specified phone number. + */ + public boolean allowFlashCall; + /** + * Pass true if the authenticated phone number is used on the current device. + */ + public boolean isCurrentPhoneNumber; + /** + * For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details. + */ + public boolean allowSmsRetrieverApi; + + /** + * Contains settings for the authentication of the user's phone number. + */ + public PhoneNumberAuthenticationSettings() { + } + + /** + * Contains settings for the authentication of the user's phone number. + * + * @param allowFlashCall Pass true if the authentication code may be sent via flash call to the specified phone number. + * @param isCurrentPhoneNumber Pass true if the authenticated phone number is used on the current device. + * @param allowSmsRetrieverApi For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details. + */ + public PhoneNumberAuthenticationSettings(boolean allowFlashCall, boolean isCurrentPhoneNumber, boolean allowSmsRetrieverApi) { + this.allowFlashCall = allowFlashCall; + this.isCurrentPhoneNumber = isCurrentPhoneNumber; + this.allowSmsRetrieverApi = allowSmsRetrieverApi; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -859198743; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a phone number. + */ + public static class PhoneNumberInfo extends Object { + /** + * Information about the country to which the phone number belongs; may be null. + */ + public CountryInfo country; + /** + * The part of the phone number denoting country calling code or its part. + */ + public String countryCallingCode; + /** + * The phone number without country calling code formatted accordingly to local rules. + */ + public String formattedPhoneNumber; + + /** + * Contains information about a phone number. + */ + public PhoneNumberInfo() { + } + + /** + * Contains information about a phone number. + * + * @param country Information about the country to which the phone number belongs; may be null. + * @param countryCallingCode The part of the phone number denoting country calling code or its part. + * @param formattedPhoneNumber The phone number without country calling code formatted accordingly to local rules. + */ + public PhoneNumberInfo(CountryInfo country, String countryCallingCode, String formattedPhoneNumber) { + this.country = country; + this.countryCallingCode = countryCallingCode; + this.formattedPhoneNumber = formattedPhoneNumber; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 560180961; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a photo. + */ + public static class Photo extends Object { + /** + * True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets. + */ + public boolean hasStickers; + /** + * Photo minithumbnail; may be null. + */ + public Minithumbnail minithumbnail; + /** + * Available variants of the photo, in different sizes. + */ + public PhotoSize[] sizes; + + /** + * Describes a photo. + */ + public Photo() { + } + + /** + * Describes a photo. + * + * @param hasStickers True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets. + * @param minithumbnail Photo minithumbnail; may be null. + * @param sizes Available variants of the photo, in different sizes. + */ + public Photo(boolean hasStickers, Minithumbnail minithumbnail, PhotoSize[] sizes) { + this.hasStickers = hasStickers; + this.minithumbnail = minithumbnail; + this.sizes = sizes; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2022871583; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes an image in JPEG format. + */ + public static class PhotoSize extends Object { + /** + * Image type (see https://core.telegram.org/constructor/photoSize). + */ + public String type; + /** + * Information about the image file. + */ + public File photo; + /** + * Image width. + */ + public int width; + /** + * Image height. + */ + public int height; + /** + * Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image. + */ + public int[] progressiveSizes; + + /** + * Describes an image in JPEG format. + */ + public PhotoSize() { + } + + /** + * Describes an image in JPEG format. + * + * @param type Image type (see https://core.telegram.org/constructor/photoSize). + * @param photo Information about the image file. + * @param width Image width. + * @param height Image height. + * @param progressiveSizes Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image. + */ + public PhotoSize(String type, File photo, int width, int height, int[] progressiveSizes) { + this.type = type; + this.photo = photo; + this.width = width; + this.height = height; + this.progressiveSizes = progressiveSizes; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1609182352; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a poll. + */ + public static class Poll extends Object { + /** + * Unique poll identifier. + */ + public long id; + /** + * Poll question, 1-300 characters. + */ + public String question; + /** + * List of poll answer options. + */ + public PollOption[] options; + /** + * Total number of voters, participating in the poll. + */ + public int totalVoterCount; + /** + * User identifiers of recent voters, if the poll is non-anonymous. + */ + public int[] recentVoterUserIds; + /** + * True, if the poll is anonymous. + */ + public boolean isAnonymous; + /** + * Type of the poll. + */ + public PollType type; + /** + * Amount of time the poll will be active after creation, in seconds. + */ + public int openPeriod; + /** + * Point in time (Unix timestamp) when the poll will be automatically closed. + */ + public int closeDate; + /** + * True, if the poll is closed. + */ + public boolean isClosed; + + /** + * Describes a poll. + */ + public Poll() { + } + + /** + * Describes a poll. + * + * @param id Unique poll identifier. + * @param question Poll question, 1-300 characters. + * @param options List of poll answer options. + * @param totalVoterCount Total number of voters, participating in the poll. + * @param recentVoterUserIds User identifiers of recent voters, if the poll is non-anonymous. + * @param isAnonymous True, if the poll is anonymous. + * @param type Type of the poll. + * @param openPeriod Amount of time the poll will be active after creation, in seconds. + * @param closeDate Point in time (Unix timestamp) when the poll will be automatically closed. + * @param isClosed True, if the poll is closed. + */ + public Poll(long id, String question, PollOption[] options, int totalVoterCount, int[] recentVoterUserIds, boolean isAnonymous, PollType type, int openPeriod, int closeDate, boolean isClosed) { + this.id = id; + this.question = question; + this.options = options; + this.totalVoterCount = totalVoterCount; + this.recentVoterUserIds = recentVoterUserIds; + this.isAnonymous = isAnonymous; + this.type = type; + this.openPeriod = openPeriod; + this.closeDate = closeDate; + this.isClosed = isClosed; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 163256789; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes one answer option of a poll. + */ + public static class PollOption extends Object { + /** + * Option text, 1-100 characters. + */ + public String text; + /** + * Number of voters for this option, available only for closed or voted polls. + */ + public int voterCount; + /** + * The percentage of votes for this option, 0-100. + */ + public int votePercentage; + /** + * True, if the option was chosen by the user. + */ + public boolean isChosen; + /** + * True, if the option is being chosen by a pending setPollAnswer request. + */ + public boolean isBeingChosen; + + /** + * Describes one answer option of a poll. + */ + public PollOption() { + } + + /** + * Describes one answer option of a poll. + * + * @param text Option text, 1-100 characters. + * @param voterCount Number of voters for this option, available only for closed or voted polls. + * @param votePercentage The percentage of votes for this option, 0-100. + * @param isChosen True, if the option was chosen by the user. + * @param isBeingChosen True, if the option is being chosen by a pending setPollAnswer request. + */ + public PollOption(String text, int voterCount, int votePercentage, boolean isChosen, boolean isBeingChosen) { + this.text = text; + this.voterCount = voterCount; + this.votePercentage = votePercentage; + this.isChosen = isChosen; + this.isBeingChosen = isBeingChosen; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1473893797; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the type of a poll. + */ + public abstract static class PollType extends Object { + } + + /** + * A regular poll. + */ + public static class PollTypeRegular extends PollType { + /** + * True, if multiple answer options can be chosen simultaneously. + */ + public boolean allowMultipleAnswers; + + /** + * A regular poll. + */ + public PollTypeRegular() { + } + + /** + * A regular poll. + * + * @param allowMultipleAnswers True, if multiple answer options can be chosen simultaneously. + */ + public PollTypeRegular(boolean allowMultipleAnswers) { + this.allowMultipleAnswers = allowMultipleAnswers; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 641265698; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A poll in quiz mode, which has exactly one correct answer option and can be answered only once. + */ + public static class PollTypeQuiz extends PollType { + /** + * 0-based identifier of the correct answer option; -1 for a yet unanswered poll. + */ + public int correctOptionId; + /** + * Text that is shown when the user chooses an incorrect answer or taps on the lamp icon, 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll. + */ + public FormattedText explanation; + + /** + * A poll in quiz mode, which has exactly one correct answer option and can be answered only once. + */ + public PollTypeQuiz() { + } + + /** + * A poll in quiz mode, which has exactly one correct answer option and can be answered only once. + * + * @param correctOptionId 0-based identifier of the correct answer option; -1 for a yet unanswered poll. + * @param explanation Text that is shown when the user chooses an incorrect answer or taps on the lamp icon, 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll. + */ + public PollTypeQuiz(int correctOptionId, FormattedText explanation) { + this.correctOptionId = correctOptionId; + this.explanation = explanation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 657013913; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a user profile photo. + */ + public static class ProfilePhoto extends Object { + /** + * Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos. + */ + public long id; + /** + * A small (160x160) user profile photo. The file can be downloaded only before the photo is changed. + */ + public File small; + /** + * A big (640x640) user profile photo. The file can be downloaded only before the photo is changed. + */ + public File big; + /** + * True, if the photo has animated variant. + */ + public boolean hasAnimation; + + /** + * Describes a user profile photo. + */ + public ProfilePhoto() { + } + + /** + * Describes a user profile photo. + * + * @param id Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos. + * @param small A small (160x160) user profile photo. The file can be downloaded only before the photo is changed. + * @param big A big (640x640) user profile photo. The file can be downloaded only before the photo is changed. + * @param hasAnimation True, if the photo has animated variant. + */ + public ProfilePhoto(long id, File small, File big, boolean hasAnimation) { + this.id = id; + this.small = small; + this.big = big; + this.hasAnimation = hasAnimation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1270562457; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of proxy servers. + */ + public static class Proxies extends Object { + /** + * List of proxy servers. + */ + public Proxy[] proxies; + + /** + * Represents a list of proxy servers. + */ + public Proxies() { + } + + /** + * Represents a list of proxy servers. + * + * @param proxies List of proxy servers. + */ + public Proxies(Proxy[] proxies) { + this.proxies = proxies; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1200447205; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about a proxy server. + */ + public static class Proxy extends Object { + /** + * Unique identifier of the proxy. + */ + public int id; + /** + * Proxy server IP address. + */ + public String server; + /** + * Proxy server port. + */ + public int port; + /** + * Point in time (Unix timestamp) when the proxy was last used; 0 if never. + */ + public int lastUsedDate; + /** + * True, if the proxy is enabled now. + */ + public boolean isEnabled; + /** + * Type of the proxy. + */ + public ProxyType type; + + /** + * Contains information about a proxy server. + */ + public Proxy() { + } + + /** + * Contains information about a proxy server. + * + * @param id Unique identifier of the proxy. + * @param server Proxy server IP address. + * @param port Proxy server port. + * @param lastUsedDate Point in time (Unix timestamp) when the proxy was last used; 0 if never. + * @param isEnabled True, if the proxy is enabled now. + * @param type Type of the proxy. + */ + public Proxy(int id, String server, int port, int lastUsedDate, boolean isEnabled, ProxyType type) { + this.id = id; + this.server = server; + this.port = port; + this.lastUsedDate = lastUsedDate; + this.isEnabled = isEnabled; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 196049779; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the type of a proxy server. + */ + public abstract static class ProxyType extends Object { + } + + /** + * A SOCKS5 proxy server. + */ + public static class ProxyTypeSocks5 extends ProxyType { + /** + * Username for logging in; may be empty. + */ + public String username; + /** + * Password for logging in; may be empty. + */ + public String password; + + /** + * A SOCKS5 proxy server. + */ + public ProxyTypeSocks5() { + } + + /** + * A SOCKS5 proxy server. + * + * @param username Username for logging in; may be empty. + * @param password Password for logging in; may be empty. + */ + public ProxyTypeSocks5(String username, String password) { + this.username = username; + this.password = password; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -890027341; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A HTTP transparent proxy server. + */ + public static class ProxyTypeHttp extends ProxyType { + /** + * Username for logging in; may be empty. + */ + public String username; + /** + * Password for logging in; may be empty. + */ + public String password; + /** + * Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method. + */ + public boolean httpOnly; + + /** + * A HTTP transparent proxy server. + */ + public ProxyTypeHttp() { + } + + /** + * A HTTP transparent proxy server. + * + * @param username Username for logging in; may be empty. + * @param password Password for logging in; may be empty. + * @param httpOnly Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method. + */ + public ProxyTypeHttp(String username, String password, boolean httpOnly) { + this.username = username; + this.password = password; + this.httpOnly = httpOnly; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1547188361; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An MTProto proxy server. + */ + public static class ProxyTypeMtproto extends ProxyType { + /** + * The proxy's secret in hexadecimal encoding. + */ + public String secret; + + /** + * An MTProto proxy server. + */ + public ProxyTypeMtproto() { + } + + /** + * An MTProto proxy server. + * + * @param secret The proxy's secret in hexadecimal encoding. + */ + public ProxyTypeMtproto(String secret) { + this.secret = secret; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1964826627; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a type of public chats. + */ + public abstract static class PublicChatType extends Object { + } + + /** + * The chat is public, because it has username. + */ + public static class PublicChatTypeHasUsername extends PublicChatType { + + /** + * The chat is public, because it has username. + */ + public PublicChatTypeHasUsername() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 350789758; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat is public, because it is a location-based supergroup. + */ + public static class PublicChatTypeIsLocationBased extends PublicChatType { + + /** + * The chat is public, because it is a location-based supergroup. + */ + public PublicChatTypeIsLocationBased() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1183735952; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains content of a push message notification. + */ + public abstract static class PushMessageContent extends Object { + } + + /** + * A general message with hidden content. + */ + public static class PushMessageContentHidden extends PushMessageContent { + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A general message with hidden content. + */ + public PushMessageContentHidden() { + } + + /** + * A general message with hidden content. + * + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentHidden(boolean isPinned) { + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -316950436; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An animation message (GIF-style). + */ + public static class PushMessageContentAnimation extends PushMessageContent { + /** + * Message content; may be null. + */ + public Animation animation; + /** + * Animation caption. + */ + public String caption; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * An animation message (GIF-style). + */ + public PushMessageContentAnimation() { + } + + /** + * An animation message (GIF-style). + * + * @param animation Message content; may be null. + * @param caption Animation caption. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentAnimation(Animation animation, String caption, boolean isPinned) { + this.animation = animation; + this.caption = caption; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1034215396; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An audio message. + */ + public static class PushMessageContentAudio extends PushMessageContent { + /** + * Message content; may be null. + */ + public Audio audio; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * An audio message. + */ + public PushMessageContentAudio() { + } + + /** + * An audio message. + * + * @param audio Message content; may be null. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentAudio(Audio audio, boolean isPinned) { + this.audio = audio; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 381581426; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a user contact. + */ + public static class PushMessageContentContact extends PushMessageContent { + /** + * Contact's name. + */ + public String name; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A message with a user contact. + */ + public PushMessageContentContact() { + } + + /** + * A message with a user contact. + * + * @param name Contact's name. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentContact(String name, boolean isPinned) { + this.name = name; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -12219820; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A contact has registered with Telegram. + */ + public static class PushMessageContentContactRegistered extends PushMessageContent { + + /** + * A contact has registered with Telegram. + */ + public PushMessageContentContactRegistered() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -303962720; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A document message (a general file). + */ + public static class PushMessageContentDocument extends PushMessageContent { + /** + * Message content; may be null. + */ + public Document document; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A document message (a general file). + */ + public PushMessageContentDocument() { + } + + /** + * A document message (a general file). + * + * @param document Message content; may be null. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentDocument(Document document, boolean isPinned) { + this.document = document; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -458379775; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a game. + */ + public static class PushMessageContentGame extends PushMessageContent { + /** + * Game title, empty for pinned game message. + */ + public String title; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A message with a game. + */ + public PushMessageContentGame() { + } + + /** + * A message with a game. + * + * @param title Game title, empty for pinned game message. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentGame(String title, boolean isPinned) { + this.title = title; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -515131109; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new high score was achieved in a game. + */ + public static class PushMessageContentGameScore extends PushMessageContent { + /** + * Game title, empty for pinned message. + */ + public String title; + /** + * New score, 0 for pinned message. + */ + public int score; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A new high score was achieved in a game. + */ + public PushMessageContentGameScore() { + } + + /** + * A new high score was achieved in a game. + * + * @param title Game title, empty for pinned message. + * @param score New score, 0 for pinned message. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentGameScore(String title, int score, boolean isPinned) { + this.title = title; + this.score = score; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 901303688; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with an invoice from a bot. + */ + public static class PushMessageContentInvoice extends PushMessageContent { + /** + * Product price. + */ + public String price; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A message with an invoice from a bot. + */ + public PushMessageContentInvoice() { + } + + /** + * A message with an invoice from a bot. + * + * @param price Product price. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentInvoice(String price, boolean isPinned) { + this.price = price; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1731687492; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a location. + */ + public static class PushMessageContentLocation extends PushMessageContent { + /** + * True, if the location is live. + */ + public boolean isLive; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A message with a location. + */ + public PushMessageContentLocation() { + } + + /** + * A message with a location. + * + * @param isLive True, if the location is live. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentLocation(boolean isLive, boolean isPinned) { + this.isLive = isLive; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1288005709; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A photo message. + */ + public static class PushMessageContentPhoto extends PushMessageContent { + /** + * Message content; may be null. + */ + public Photo photo; + /** + * Photo caption. + */ + public String caption; + /** + * True, if the photo is secret. + */ + public boolean isSecret; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A photo message. + */ + public PushMessageContentPhoto() { + } + + /** + * A photo message. + * + * @param photo Message content; may be null. + * @param caption Photo caption. + * @param isSecret True, if the photo is secret. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentPhoto(Photo photo, String caption, boolean isSecret, boolean isPinned) { + this.photo = photo; + this.caption = caption; + this.isSecret = isSecret; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 140631122; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a poll. + */ + public static class PushMessageContentPoll extends PushMessageContent { + /** + * Poll question. + */ + public String question; + /** + * True, if the poll is regular and not in quiz mode. + */ + public boolean isRegular; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A message with a poll. + */ + public PushMessageContentPoll() { + } + + /** + * A message with a poll. + * + * @param question Poll question. + * @param isRegular True, if the poll is regular and not in quiz mode. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentPoll(String question, boolean isRegular, boolean isPinned) { + this.question = question; + this.isRegular = isRegular; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -44403654; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A screenshot of a message in the chat has been taken. + */ + public static class PushMessageContentScreenshotTaken extends PushMessageContent { + + /** + * A screenshot of a message in the chat has been taken. + */ + public PushMessageContentScreenshotTaken() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 214245369; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a sticker. + */ + public static class PushMessageContentSticker extends PushMessageContent { + /** + * Message content; may be null. + */ + public Sticker sticker; + /** + * Emoji corresponding to the sticker; may be empty. + */ + public String emoji; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A message with a sticker. + */ + public PushMessageContentSticker() { + } + + /** + * A message with a sticker. + * + * @param sticker Message content; may be null. + * @param emoji Emoji corresponding to the sticker; may be empty. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentSticker(Sticker sticker, String emoji, boolean isPinned) { + this.sticker = sticker; + this.emoji = emoji; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1553513939; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A text message. + */ + public static class PushMessageContentText extends PushMessageContent { + /** + * Message text. + */ + public String text; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A text message. + */ + public PushMessageContentText() { + } + + /** + * A text message. + * + * @param text Message text. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentText(String text, boolean isPinned) { + this.text = text; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 274587305; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A video message. + */ + public static class PushMessageContentVideo extends PushMessageContent { + /** + * Message content; may be null. + */ + public Video video; + /** + * Video caption. + */ + public String caption; + /** + * True, if the video is secret. + */ + public boolean isSecret; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A video message. + */ + public PushMessageContentVideo() { + } + + /** + * A video message. + * + * @param video Message content; may be null. + * @param caption Video caption. + * @param isSecret True, if the video is secret. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentVideo(Video video, String caption, boolean isSecret, boolean isPinned) { + this.video = video; + this.caption = caption; + this.isSecret = isSecret; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 310038831; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A video note message. + */ + public static class PushMessageContentVideoNote extends PushMessageContent { + /** + * Message content; may be null. + */ + public VideoNote videoNote; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A video note message. + */ + public PushMessageContentVideoNote() { + } + + /** + * A video note message. + * + * @param videoNote Message content; may be null. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentVideoNote(VideoNote videoNote, boolean isPinned) { + this.videoNote = videoNote; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1122764417; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A voice note message. + */ + public static class PushMessageContentVoiceNote extends PushMessageContent { + /** + * Message content; may be null. + */ + public VoiceNote voiceNote; + /** + * True, if the message is a pinned message with the specified content. + */ + public boolean isPinned; + + /** + * A voice note message. + */ + public PushMessageContentVoiceNote() { + } + + /** + * A voice note message. + * + * @param voiceNote Message content; may be null. + * @param isPinned True, if the message is a pinned message with the specified content. + */ + public PushMessageContentVoiceNote(VoiceNote voiceNote, boolean isPinned) { + this.voiceNote = voiceNote; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 88910987; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A newly created basic group. + */ + public static class PushMessageContentBasicGroupChatCreate extends PushMessageContent { + + /** + * A newly created basic group. + */ + public PushMessageContentBasicGroupChatCreate() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2114855172; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * New chat members were invited to a group. + */ + public static class PushMessageContentChatAddMembers extends PushMessageContent { + /** + * Name of the added member. + */ + public String memberName; + /** + * True, if the current user was added to the group. + */ + public boolean isCurrentUser; + /** + * True, if the user has returned to the group themself. + */ + public boolean isReturned; + + /** + * New chat members were invited to a group. + */ + public PushMessageContentChatAddMembers() { + } + + /** + * New chat members were invited to a group. + * + * @param memberName Name of the added member. + * @param isCurrentUser True, if the current user was added to the group. + * @param isReturned True, if the user has returned to the group themself. + */ + public PushMessageContentChatAddMembers(String memberName, boolean isCurrentUser, boolean isReturned) { + this.memberName = memberName; + this.isCurrentUser = isCurrentUser; + this.isReturned = isReturned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1087145158; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat photo was edited. + */ + public static class PushMessageContentChatChangePhoto extends PushMessageContent { + + /** + * A chat photo was edited. + */ + public PushMessageContentChatChangePhoto() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1114222051; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat title was edited. + */ + public static class PushMessageContentChatChangeTitle extends PushMessageContent { + /** + * New chat title. + */ + public String title; + + /** + * A chat title was edited. + */ + public PushMessageContentChatChangeTitle() { + } + + /** + * A chat title was edited. + * + * @param title New chat title. + */ + public PushMessageContentChatChangeTitle(String title) { + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1964902749; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat member was deleted. + */ + public static class PushMessageContentChatDeleteMember extends PushMessageContent { + /** + * Name of the deleted member. + */ + public String memberName; + /** + * True, if the current user was deleted from the group. + */ + public boolean isCurrentUser; + /** + * True, if the user has left the group themself. + */ + public boolean isLeft; + + /** + * A chat member was deleted. + */ + public PushMessageContentChatDeleteMember() { + } + + /** + * A chat member was deleted. + * + * @param memberName Name of the deleted member. + * @param isCurrentUser True, if the current user was deleted from the group. + * @param isLeft True, if the user has left the group themself. + */ + public PushMessageContentChatDeleteMember(String memberName, boolean isCurrentUser, boolean isLeft) { + this.memberName = memberName; + this.isCurrentUser = isCurrentUser; + this.isLeft = isLeft; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 598714783; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new member joined the chat by invite link. + */ + public static class PushMessageContentChatJoinByLink extends PushMessageContent { + + /** + * A new member joined the chat by invite link. + */ + public PushMessageContentChatJoinByLink() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1553719113; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A forwarded messages. + */ + public static class PushMessageContentMessageForwards extends PushMessageContent { + /** + * Number of forwarded messages. + */ + public int totalCount; + + /** + * A forwarded messages. + */ + public PushMessageContentMessageForwards() { + } + + /** + * A forwarded messages. + * + * @param totalCount Number of forwarded messages. + */ + public PushMessageContentMessageForwards(int totalCount) { + this.totalCount = totalCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1913083876; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A media album. + */ + public static class PushMessageContentMediaAlbum extends PushMessageContent { + /** + * Number of messages in the album. + */ + public int totalCount; + /** + * True, if the album has at least one photo. + */ + public boolean hasPhotos; + /** + * True, if the album has at least one video. + */ + public boolean hasVideos; + + /** + * A media album. + */ + public PushMessageContentMediaAlbum() { + } + + /** + * A media album. + * + * @param totalCount Number of messages in the album. + * @param hasPhotos True, if the album has at least one photo. + * @param hasVideos True, if the album has at least one video. + */ + public PushMessageContentMediaAlbum(int totalCount, boolean hasPhotos, boolean hasVideos) { + this.totalCount = totalCount; + this.hasPhotos = hasPhotos; + this.hasVideos = hasVideos; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -874278109; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification. + */ + public static class PushReceiverId extends Object { + /** + * The globally unique identifier of push notification subscription. + */ + public long id; + + /** + * Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification. + */ + public PushReceiverId() { + } + + /** + * Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification. + * + * @param id The globally unique identifier of push notification subscription. + */ + public PushReceiverId(long id) { + this.id = id; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 371056428; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a recommended chat filter. + */ + public static class RecommendedChatFilter extends Object { + /** + * The chat filter. + */ + public ChatFilter filter; + /** + * Chat filter description. + */ + public String description; + + /** + * Describes a recommended chat filter. + */ + public RecommendedChatFilter() { + } + + /** + * Describes a recommended chat filter. + * + * @param filter The chat filter. + * @param description Chat filter description. + */ + public RecommendedChatFilter(ChatFilter filter, String description) { + this.filter = filter; + this.description = description; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 36048610; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of recommended chat filters. + */ + public static class RecommendedChatFilters extends Object { + /** + * List of recommended chat filters. + */ + public RecommendedChatFilter[] chatFilters; + + /** + * Contains a list of recommended chat filters. + */ + public RecommendedChatFilters() { + } + + /** + * Contains a list of recommended chat filters. + * + * @param chatFilters List of recommended chat filters. + */ + public RecommendedChatFilters(RecommendedChatFilter[] chatFilters) { + this.chatFilters = chatFilters; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -263416880; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about the current recovery email address. + */ + public static class RecoveryEmailAddress extends Object { + /** + * Recovery email address. + */ + public String recoveryEmailAddress; + + /** + * Contains information about the current recovery email address. + */ + public RecoveryEmailAddress() { + } + + /** + * Contains information about the current recovery email address. + * + * @param recoveryEmailAddress Recovery email address. + */ + public RecoveryEmailAddress(String recoveryEmailAddress) { + this.recoveryEmailAddress = recoveryEmailAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1290526187; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a remote file. + */ + public static class RemoteFile extends Object { + /** + * Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the originalPath and "#url#" as the conversion string. Application should generate the file by downloading it to the specified location. + */ + public String id; + /** + * Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time. + */ + public String uniqueId; + /** + * True, if the file is currently being uploaded (or a remote copy is being generated by some other means). + */ + public boolean isUploadingActive; + /** + * True, if a remote copy is fully available. + */ + public boolean isUploadingCompleted; + /** + * Size of the remote available part of the file; 0 if unknown. + */ + public int uploadedSize; + + /** + * Represents a remote file. + */ + public RemoteFile() { + } + + /** + * Represents a remote file. + * + * @param id Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the originalPath and "#url#" as the conversion string. Application should generate the file by downloading it to the specified location. + * @param uniqueId Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time. + * @param isUploadingActive True, if the file is currently being uploaded (or a remote copy is being generated by some other means). + * @param isUploadingCompleted True, if a remote copy is fully available. + * @param uploadedSize Size of the remote available part of the file; 0 if unknown. + */ + public RemoteFile(String id, String uniqueId, boolean isUploadingActive, boolean isUploadingCompleted, int uploadedSize) { + this.id = id; + this.uniqueId = uniqueId; + this.isUploadingActive = isUploadingActive; + this.isUploadingCompleted = isUploadingCompleted; + this.uploadedSize = uploadedSize; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1822143022; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots. + */ + public abstract static class ReplyMarkup extends Object { + } + + /** + * Instructs application to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with messageId == 0 will be sent. + */ + public static class ReplyMarkupRemoveKeyboard extends ReplyMarkup { + /** + * True, if the keyboard is removed only for the mentioned users or the target user of a reply. + */ + public boolean isPersonal; + + /** + * Instructs application to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with messageId == 0 will be sent. + */ + public ReplyMarkupRemoveKeyboard() { + } + + /** + * Instructs application to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with messageId == 0 will be sent. + * + * @param isPersonal True, if the keyboard is removed only for the mentioned users or the target user of a reply. + */ + public ReplyMarkupRemoveKeyboard(boolean isPersonal) { + this.isPersonal = isPersonal; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -691252879; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Instructs application to force a reply to this message. + */ + public static class ReplyMarkupForceReply extends ReplyMarkup { + /** + * True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply. + */ + public boolean isPersonal; + + /** + * Instructs application to force a reply to this message. + */ + public ReplyMarkupForceReply() { + } + + /** + * Instructs application to force a reply to this message. + * + * @param isPersonal True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply. + */ + public ReplyMarkupForceReply(boolean isPersonal) { + this.isPersonal = isPersonal; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1039104593; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a custom keyboard layout to quickly reply to bots. + */ + public static class ReplyMarkupShowKeyboard extends ReplyMarkup { + /** + * A list of rows of bot keyboard buttons. + */ + public KeyboardButton[][] rows; + /** + * True, if the application needs to resize the keyboard vertically. + */ + public boolean resizeKeyboard; + /** + * True, if the application needs to hide the keyboard after use. + */ + public boolean oneTime; + /** + * True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply. + */ + public boolean isPersonal; + + /** + * Contains a custom keyboard layout to quickly reply to bots. + */ + public ReplyMarkupShowKeyboard() { + } + + /** + * Contains a custom keyboard layout to quickly reply to bots. + * + * @param rows A list of rows of bot keyboard buttons. + * @param resizeKeyboard True, if the application needs to resize the keyboard vertically. + * @param oneTime True, if the application needs to hide the keyboard after use. + * @param isPersonal True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply. + */ + public ReplyMarkupShowKeyboard(KeyboardButton[][] rows, boolean resizeKeyboard, boolean oneTime, boolean isPersonal) { + this.rows = rows; + this.resizeKeyboard = resizeKeyboard; + this.oneTime = oneTime; + this.isPersonal = isPersonal; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -992627133; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains an inline keyboard layout. + */ + public static class ReplyMarkupInlineKeyboard extends ReplyMarkup { + /** + * A list of rows of inline keyboard buttons. + */ + public InlineKeyboardButton[][] rows; + + /** + * Contains an inline keyboard layout. + */ + public ReplyMarkupInlineKeyboard() { + } + + /** + * Contains an inline keyboard layout. + * + * @param rows A list of rows of inline keyboard buttons. + */ + public ReplyMarkupInlineKeyboard(InlineKeyboardButton[][] rows) { + this.rows = rows; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -619317658; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a text object inside an instant-view web page. + */ + public abstract static class RichText extends Object { + } + + /** + * A plain text. + */ + public static class RichTextPlain extends RichText { + /** + * Text. + */ + public String text; + + /** + * A plain text. + */ + public RichTextPlain() { + } + + /** + * A plain text. + * + * @param text Text. + */ + public RichTextPlain(String text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 482617702; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A bold rich text. + */ + public static class RichTextBold extends RichText { + /** + * Text. + */ + public RichText text; + + /** + * A bold rich text. + */ + public RichTextBold() { + } + + /** + * A bold rich text. + * + * @param text Text. + */ + public RichTextBold(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1670844268; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An italicized rich text. + */ + public static class RichTextItalic extends RichText { + /** + * Text. + */ + public RichText text; + + /** + * An italicized rich text. + */ + public RichTextItalic() { + } + + /** + * An italicized rich text. + * + * @param text Text. + */ + public RichTextItalic(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1853354047; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An underlined rich text. + */ + public static class RichTextUnderline extends RichText { + /** + * Text. + */ + public RichText text; + + /** + * An underlined rich text. + */ + public RichTextUnderline() { + } + + /** + * An underlined rich text. + * + * @param text Text. + */ + public RichTextUnderline(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -536019572; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A strikethrough rich text. + */ + public static class RichTextStrikethrough extends RichText { + /** + * Text. + */ + public RichText text; + + /** + * A strikethrough rich text. + */ + public RichTextStrikethrough() { + } + + /** + * A strikethrough rich text. + * + * @param text Text. + */ + public RichTextStrikethrough(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 723413585; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A fixed-width rich text. + */ + public static class RichTextFixed extends RichText { + /** + * Text. + */ + public RichText text; + + /** + * A fixed-width rich text. + */ + public RichTextFixed() { + } + + /** + * A fixed-width rich text. + * + * @param text Text. + */ + public RichTextFixed(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1271496249; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rich text URL link. + */ + public static class RichTextUrl extends RichText { + /** + * Text. + */ + public RichText text; + /** + * URL. + */ + public String url; + /** + * True, if the URL has cached instant view server-side. + */ + public boolean isCached; + + /** + * A rich text URL link. + */ + public RichTextUrl() { + } + + /** + * A rich text URL link. + * + * @param text Text. + * @param url URL. + * @param isCached True, if the URL has cached instant view server-side. + */ + public RichTextUrl(RichText text, String url, boolean isCached) { + this.text = text; + this.url = url; + this.isCached = isCached; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 83939092; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rich text email link. + */ + public static class RichTextEmailAddress extends RichText { + /** + * Text. + */ + public RichText text; + /** + * Email address. + */ + public String emailAddress; + + /** + * A rich text email link. + */ + public RichTextEmailAddress() { + } + + /** + * A rich text email link. + * + * @param text Text. + * @param emailAddress Email address. + */ + public RichTextEmailAddress(RichText text, String emailAddress) { + this.text = text; + this.emailAddress = emailAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 40018679; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A subscript rich text. + */ + public static class RichTextSubscript extends RichText { + /** + * Text. + */ + public RichText text; + + /** + * A subscript rich text. + */ + public RichTextSubscript() { + } + + /** + * A subscript rich text. + * + * @param text Text. + */ + public RichTextSubscript(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -868197812; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A superscript rich text. + */ + public static class RichTextSuperscript extends RichText { + /** + * Text. + */ + public RichText text; + + /** + * A superscript rich text. + */ + public RichTextSuperscript() { + } + + /** + * A superscript rich text. + * + * @param text Text. + */ + public RichTextSuperscript(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -382241437; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A marked rich text. + */ + public static class RichTextMarked extends RichText { + /** + * Text. + */ + public RichText text; + + /** + * A marked rich text. + */ + public RichTextMarked() { + } + + /** + * A marked rich text. + * + * @param text Text. + */ + public RichTextMarked(RichText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1271999614; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rich text phone number. + */ + public static class RichTextPhoneNumber extends RichText { + /** + * Text. + */ + public RichText text; + /** + * Phone number. + */ + public String phoneNumber; + + /** + * A rich text phone number. + */ + public RichTextPhoneNumber() { + } + + /** + * A rich text phone number. + * + * @param text Text. + * @param phoneNumber Phone number. + */ + public RichTextPhoneNumber(RichText text, String phoneNumber) { + this.text = text; + this.phoneNumber = phoneNumber; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 128521539; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A small image inside the text. + */ + public static class RichTextIcon extends RichText { + /** + * The image represented as a document. The image can be in GIF, JPEG or PNG format. + */ + public Document document; + /** + * Width of a bounding box in which the image should be shown; 0 if unknown. + */ + public int width; + /** + * Height of a bounding box in which the image should be shown; 0 if unknown. + */ + public int height; + + /** + * A small image inside the text. + */ + public RichTextIcon() { + } + + /** + * A small image inside the text. + * + * @param document The image represented as a document. The image can be in GIF, JPEG or PNG format. + * @param width Width of a bounding box in which the image should be shown; 0 if unknown. + * @param height Height of a bounding box in which the image should be shown; 0 if unknown. + */ + public RichTextIcon(Document document, int width, int height) { + this.document = document; + this.width = width; + this.height = height; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1480316158; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rich text reference of a text on the same web page. + */ + public static class RichTextReference extends RichText { + /** + * The text. + */ + public RichText text; + /** + * The text to show on click. + */ + public RichText referenceText; + /** + * An HTTP URL, opening the reference. + */ + public String url; + + /** + * A rich text reference of a text on the same web page. + */ + public RichTextReference() { + } + + /** + * A rich text reference of a text on the same web page. + * + * @param text The text. + * @param referenceText The text to show on click. + * @param url An HTTP URL, opening the reference. + */ + public RichTextReference(RichText text, RichText referenceText, String url) { + this.text = text; + this.referenceText = referenceText; + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -144433301; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An anchor. + */ + public static class RichTextAnchor extends RichText { + /** + * Anchor name. + */ + public String name; + + /** + * An anchor. + */ + public RichTextAnchor() { + } + + /** + * An anchor. + * + * @param name Anchor name. + */ + public RichTextAnchor(String name) { + this.name = name; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1316950068; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A link to an anchor on the same web page. + */ + public static class RichTextAnchorLink extends RichText { + /** + * The link text. + */ + public RichText text; + /** + * The anchor name. If the name is empty, the link should bring back to top. + */ + public String name; + /** + * An HTTP URL, opening the anchor. + */ + public String url; + + /** + * A link to an anchor on the same web page. + */ + public RichTextAnchorLink() { + } + + /** + * A link to an anchor on the same web page. + * + * @param text The link text. + * @param name The anchor name. If the name is empty, the link should bring back to top. + * @param url An HTTP URL, opening the anchor. + */ + public RichTextAnchorLink(RichText text, String name, String url) { + this.text = text; + this.name = name; + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -367827961; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A concatenation of rich texts. + */ + public static class RichTexts extends RichText { + /** + * Texts. + */ + public RichText[] texts; + + /** + * A concatenation of rich texts. + */ + public RichTexts() { + } + + /** + * A concatenation of rich texts. + * + * @param texts Texts. + */ + public RichTexts(RichText[] texts) { + this.texts = texts; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1647457821; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about saved card credentials. + */ + public static class SavedCredentials extends Object { + /** + * Unique identifier of the saved credentials. + */ + public String id; + /** + * Title of the saved credentials. + */ + public String title; + + /** + * Contains information about saved card credentials. + */ + public SavedCredentials() { + } + + /** + * Contains information about saved card credentials. + * + * @param id Unique identifier of the saved credentials. + * @param title Title of the saved credentials. + */ + public SavedCredentials(String id, String title) { + this.id = id; + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -370273060; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about notification settings for several chats. + */ + public static class ScopeNotificationSettings extends Object { + /** + * Time left before notifications will be unmuted, in seconds. + */ + public int muteFor; + /** + * The name of an audio file to be used for notification sounds; only applies to iOS applications. + */ + public String sound; + /** + * True, if message content should be displayed in notifications. + */ + public boolean showPreview; + /** + * True, if notifications for incoming pinned messages will be created as for an ordinary unread message. + */ + public boolean disablePinnedMessageNotifications; + /** + * True, if notifications for messages with mentions will be created as for an ordinary unread message. + */ + public boolean disableMentionNotifications; + + /** + * Contains information about notification settings for several chats. + */ + public ScopeNotificationSettings() { + } + + /** + * Contains information about notification settings for several chats. + * + * @param muteFor Time left before notifications will be unmuted, in seconds. + * @param sound The name of an audio file to be used for notification sounds; only applies to iOS applications. + * @param showPreview True, if message content should be displayed in notifications. + * @param disablePinnedMessageNotifications True, if notifications for incoming pinned messages will be created as for an ordinary unread message. + * @param disableMentionNotifications True, if notifications for messages with mentions will be created as for an ordinary unread message. + */ + public ScopeNotificationSettings(int muteFor, String sound, boolean showPreview, boolean disablePinnedMessageNotifications, boolean disableMentionNotifications) { + this.muteFor = muteFor; + this.sound = sound; + this.showPreview = showPreview; + this.disablePinnedMessageNotifications = disablePinnedMessageNotifications; + this.disableMentionNotifications = disableMentionNotifications; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -426103745; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a filter for message search results. + */ + public abstract static class SearchMessagesFilter extends Object { + } + + /** + * Returns all found messages, no filter is applied. + */ + public static class SearchMessagesFilterEmpty extends SearchMessagesFilter { + + /** + * Returns all found messages, no filter is applied. + */ + public SearchMessagesFilterEmpty() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -869395657; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only animation messages. + */ + public static class SearchMessagesFilterAnimation extends SearchMessagesFilter { + + /** + * Returns only animation messages. + */ + public SearchMessagesFilterAnimation() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -155713339; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only audio messages. + */ + public static class SearchMessagesFilterAudio extends SearchMessagesFilter { + + /** + * Returns only audio messages. + */ + public SearchMessagesFilterAudio() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 867505275; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only document messages. + */ + public static class SearchMessagesFilterDocument extends SearchMessagesFilter { + + /** + * Returns only document messages. + */ + public SearchMessagesFilterDocument() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1526331215; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only photo messages. + */ + public static class SearchMessagesFilterPhoto extends SearchMessagesFilter { + + /** + * Returns only photo messages. + */ + public SearchMessagesFilterPhoto() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 925932293; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only video messages. + */ + public static class SearchMessagesFilterVideo extends SearchMessagesFilter { + + /** + * Returns only video messages. + */ + public SearchMessagesFilterVideo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 115538222; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only voice note messages. + */ + public static class SearchMessagesFilterVoiceNote extends SearchMessagesFilter { + + /** + * Returns only voice note messages. + */ + public SearchMessagesFilterVoiceNote() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1841439357; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only photo and video messages. + */ + public static class SearchMessagesFilterPhotoAndVideo extends SearchMessagesFilter { + + /** + * Returns only photo and video messages. + */ + public SearchMessagesFilterPhotoAndVideo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1352130963; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only messages containing URLs. + */ + public static class SearchMessagesFilterUrl extends SearchMessagesFilter { + + /** + * Returns only messages containing URLs. + */ + public SearchMessagesFilterUrl() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1828724341; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only messages containing chat photos. + */ + public static class SearchMessagesFilterChatPhoto extends SearchMessagesFilter { + + /** + * Returns only messages containing chat photos. + */ + public SearchMessagesFilterChatPhoto() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1247751329; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only call messages. + */ + public static class SearchMessagesFilterCall extends SearchMessagesFilter { + + /** + * Returns only call messages. + */ + public SearchMessagesFilterCall() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1305231012; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only incoming call messages with missed/declined discard reasons. + */ + public static class SearchMessagesFilterMissedCall extends SearchMessagesFilter { + + /** + * Returns only incoming call messages with missed/declined discard reasons. + */ + public SearchMessagesFilterMissedCall() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 970663098; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only video note messages. + */ + public static class SearchMessagesFilterVideoNote extends SearchMessagesFilter { + + /** + * Returns only video note messages. + */ + public SearchMessagesFilterVideoNote() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 564323321; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only voice and video note messages. + */ + public static class SearchMessagesFilterVoiceAndVideoNote extends SearchMessagesFilter { + + /** + * Returns only voice and video note messages. + */ + public SearchMessagesFilterVoiceAndVideoNote() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 664174819; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only messages with mentions of the current user, or messages that are replies to their messages. + */ + public static class SearchMessagesFilterMention extends SearchMessagesFilter { + + /** + * Returns only messages with mentions of the current user, or messages that are replies to their messages. + */ + public SearchMessagesFilterMention() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2001258652; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query, a message thread or by the sending user. + */ + public static class SearchMessagesFilterUnreadMention extends SearchMessagesFilter { + + /** + * Returns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query, a message thread or by the sending user. + */ + public SearchMessagesFilterUnreadMention() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -95769149; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns only failed to send messages. This filter can be used only if the message database is used. + */ + public static class SearchMessagesFilterFailedToSend extends SearchMessagesFilter { + + /** + * Returns only failed to send messages. This filter can be used only if the message database is used. + */ + public SearchMessagesFilterFailedToSend() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -596322564; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a value representing a number of seconds. + */ + public static class Seconds extends Object { + /** + * Number of seconds. + */ + public double seconds; + + /** + * Contains a value representing a number of seconds. + */ + public Seconds() { + } + + /** + * Contains a value representing a number of seconds. + * + * @param seconds Number of seconds. + */ + public Seconds(double seconds) { + this.seconds = seconds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 959899022; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a secret chat. + */ + public static class SecretChat extends Object { + /** + * Secret chat identifier. + */ + public int id; + /** + * Identifier of the chat partner. + */ + public int userId; + /** + * State of the secret chat. + */ + public SecretChatState state; + /** + * True, if the chat was created by the current user; otherwise false. + */ + public boolean isOutbound; + /** + * Current message Time To Live setting (self-destruct timer) for the chat, in seconds. + */ + public int ttl; + /** + * Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers. + */ + public byte[] keyHash; + /** + * Secret chat layer; determines features supported by the chat partner's application. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101. + */ + public int layer; + + /** + * Represents a secret chat. + */ + public SecretChat() { + } + + /** + * Represents a secret chat. + * + * @param id Secret chat identifier. + * @param userId Identifier of the chat partner. + * @param state State of the secret chat. + * @param isOutbound True, if the chat was created by the current user; otherwise false. + * @param ttl Current message Time To Live setting (self-destruct timer) for the chat, in seconds. + * @param keyHash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers. + * @param layer Secret chat layer; determines features supported by the chat partner's application. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101. + */ + public SecretChat(int id, int userId, SecretChatState state, boolean isOutbound, int ttl, byte[] keyHash, int layer) { + this.id = id; + this.userId = userId; + this.state = state; + this.isOutbound = isOutbound; + this.ttl = ttl; + this.keyHash = keyHash; + this.layer = layer; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1279231629; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the current secret chat state. + */ + public abstract static class SecretChatState extends Object { + } + + /** + * The secret chat is not yet created; waiting for the other user to get online. + */ + public static class SecretChatStatePending extends SecretChatState { + + /** + * The secret chat is not yet created; waiting for the other user to get online. + */ + public SecretChatStatePending() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1637050756; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The secret chat is ready to use. + */ + public static class SecretChatStateReady extends SecretChatState { + + /** + * The secret chat is ready to use. + */ + public SecretChatStateReady() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1611352087; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The secret chat is closed. + */ + public static class SecretChatStateClosed extends SecretChatState { + + /** + * The secret chat is closed. + */ + public SecretChatStateClosed() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1945106707; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order. + */ + public static class Session extends Object { + /** + * Session identifier. + */ + public long id; + /** + * True, if this session is the current session. + */ + public boolean isCurrent; + /** + * True, if a password is needed to complete authorization of the session. + */ + public boolean isPasswordPending; + /** + * Telegram API identifier, as provided by the application. + */ + public int apiId; + /** + * Name of the application, as provided by the application. + */ + public String applicationName; + /** + * The version of the application, as provided by the application. + */ + public String applicationVersion; + /** + * True, if the application is an official application or uses the apiId of an official application. + */ + public boolean isOfficialApplication; + /** + * Model of the device the application has been run or is running on, as provided by the application. + */ + public String deviceModel; + /** + * Operating system the application has been run or is running on, as provided by the application. + */ + public String platform; + /** + * Version of the operating system the application has been run or is running on, as provided by the application. + */ + public String systemVersion; + /** + * Point in time (Unix timestamp) when the user has logged in. + */ + public int logInDate; + /** + * Point in time (Unix timestamp) when the session was last used. + */ + public int lastActiveDate; + /** + * IP address from which the session was created, in human-readable format. + */ + public String ip; + /** + * A two-letter country code for the country from which the session was created, based on the IP address. + */ + public String country; + /** + * Region code from which the session was created, based on the IP address. + */ + public String region; + + /** + * Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order. + */ + public Session() { + } + + /** + * Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order. + * + * @param id Session identifier. + * @param isCurrent True, if this session is the current session. + * @param isPasswordPending True, if a password is needed to complete authorization of the session. + * @param apiId Telegram API identifier, as provided by the application. + * @param applicationName Name of the application, as provided by the application. + * @param applicationVersion The version of the application, as provided by the application. + * @param isOfficialApplication True, if the application is an official application or uses the apiId of an official application. + * @param deviceModel Model of the device the application has been run or is running on, as provided by the application. + * @param platform Operating system the application has been run or is running on, as provided by the application. + * @param systemVersion Version of the operating system the application has been run or is running on, as provided by the application. + * @param logInDate Point in time (Unix timestamp) when the user has logged in. + * @param lastActiveDate Point in time (Unix timestamp) when the session was last used. + * @param ip IP address from which the session was created, in human-readable format. + * @param country A two-letter country code for the country from which the session was created, based on the IP address. + * @param region Region code from which the session was created, based on the IP address. + */ + public Session(long id, boolean isCurrent, boolean isPasswordPending, int apiId, String applicationName, String applicationVersion, boolean isOfficialApplication, String deviceModel, String platform, String systemVersion, int logInDate, int lastActiveDate, String ip, String country, String region) { + this.id = id; + this.isCurrent = isCurrent; + this.isPasswordPending = isPasswordPending; + this.apiId = apiId; + this.applicationName = applicationName; + this.applicationVersion = applicationVersion; + this.isOfficialApplication = isOfficialApplication; + this.deviceModel = deviceModel; + this.platform = platform; + this.systemVersion = systemVersion; + this.logInDate = logInDate; + this.lastActiveDate = lastActiveDate; + this.ip = ip; + this.country = country; + this.region = region; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1920553176; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of sessions. + */ + public static class Sessions extends Object { + /** + * List of sessions. + */ + public Session[] sessions; + + /** + * Contains a list of sessions. + */ + public Sessions() { + } + + /** + * Contains a list of sessions. + * + * @param sessions List of sessions. + */ + public Sessions(Session[] sessions) { + this.sessions = sessions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -463118121; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * One shipping option. + */ + public static class ShippingOption extends Object { + /** + * Shipping option identifier. + */ + public String id; + /** + * Option title. + */ + public String title; + /** + * A list of objects used to calculate the total shipping costs. + */ + public LabeledPricePart[] priceParts; + + /** + * One shipping option. + */ + public ShippingOption() { + } + + /** + * One shipping option. + * + * @param id Shipping option identifier. + * @param title Option title. + * @param priceParts A list of objects used to calculate the total shipping costs. + */ + public ShippingOption(String id, String title, LabeledPricePart[] priceParts) { + this.id = id; + this.title = title; + this.priceParts = priceParts; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1425690001; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes a statistics graph. + */ + public abstract static class StatisticsGraph extends Object { + } + + /** + * A graph data. + */ + public static class StatisticsGraphData extends StatisticsGraph { + /** + * Graph data in JSON format. + */ + public String jsonData; + /** + * If non-empty, a token which can be used to receive a zoomed in graph. + */ + public String zoomToken; + + /** + * A graph data. + */ + public StatisticsGraphData() { + } + + /** + * A graph data. + * + * @param jsonData Graph data in JSON format. + * @param zoomToken If non-empty, a token which can be used to receive a zoomed in graph. + */ + public StatisticsGraphData(String jsonData, String zoomToken) { + this.jsonData = jsonData; + this.zoomToken = zoomToken; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1756117226; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The graph data to be asynchronously loaded through getStatisticsGraph. + */ + public static class StatisticsGraphAsync extends StatisticsGraph { + /** + * The token to use for data loading. + */ + public String token; + + /** + * The graph data to be asynchronously loaded through getStatisticsGraph. + */ + public StatisticsGraphAsync() { + } + + /** + * The graph data to be asynchronously loaded through getStatisticsGraph. + * + * @param token The token to use for data loading. + */ + public StatisticsGraphAsync(String token) { + this.token = token; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1064479337; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An error message to be shown to the user instead of the graph. + */ + public static class StatisticsGraphError extends StatisticsGraph { + /** + * The error message. + */ + public String errorMessage; + + /** + * An error message to be shown to the user instead of the graph. + */ + public StatisticsGraphError() { + } + + /** + * An error message to be shown to the user instead of the graph. + * + * @param errorMessage The error message. + */ + public StatisticsGraphError(String errorMessage) { + this.errorMessage = errorMessage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -61804431; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A statistics value. + */ + public static class StatisticsValue extends Object { + /** + * The value. + */ + public double value; + /** + * The value for the previous day. + */ + public double previousValue; + /** + * The growth rate of the value, as a percentage. + */ + public double growthRatePercentage; + + /** + * A statistics value. + */ + public StatisticsValue() { + } + + /** + * A statistics value. + * + * @param value The value. + * @param previousValue The value for the previous day. + * @param growthRatePercentage The growth rate of the value, as a percentage. + */ + public StatisticsValue(double value, double previousValue, double growthRatePercentage) { + this.value = value; + this.previousValue = previousValue; + this.growthRatePercentage = growthRatePercentage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1147508964; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a sticker. + */ + public static class Sticker extends Object { + /** + * The identifier of the sticker set to which the sticker belongs; 0 if none. + */ + public long setId; + /** + * Sticker width; as defined by the sender. + */ + public int width; + /** + * Sticker height; as defined by the sender. + */ + public int height; + /** + * Emoji corresponding to the sticker. + */ + public String emoji; + /** + * True, if the sticker is an animated sticker in TGS format. + */ + public boolean isAnimated; + /** + * True, if the sticker is a mask. + */ + public boolean isMask; + /** + * Position where the mask should be placed; may be null. + */ + public MaskPosition maskPosition; + /** + * Sticker thumbnail in WEBP or JPEG format; may be null. + */ + public Thumbnail thumbnail; + /** + * File containing the sticker. + */ + public File sticker; + + /** + * Describes a sticker. + */ + public Sticker() { + } + + /** + * Describes a sticker. + * + * @param setId The identifier of the sticker set to which the sticker belongs; 0 if none. + * @param width Sticker width; as defined by the sender. + * @param height Sticker height; as defined by the sender. + * @param emoji Emoji corresponding to the sticker. + * @param isAnimated True, if the sticker is an animated sticker in TGS format. + * @param isMask True, if the sticker is a mask. + * @param maskPosition Position where the mask should be placed; may be null. + * @param thumbnail Sticker thumbnail in WEBP or JPEG format; may be null. + * @param sticker File containing the sticker. + */ + public Sticker(long setId, int width, int height, String emoji, boolean isAnimated, boolean isMask, MaskPosition maskPosition, Thumbnail thumbnail, File sticker) { + this.setId = setId; + this.width = width; + this.height = height; + this.emoji = emoji; + this.isAnimated = isAnimated; + this.isMask = isMask; + this.maskPosition = maskPosition; + this.thumbnail = thumbnail; + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -692141937; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a sticker set. + */ + public static class StickerSet extends Object { + /** + * Identifier of the sticker set. + */ + public long id; + /** + * Title of the sticker set. + */ + public String title; + /** + * Name of the sticker set. + */ + public String name; + /** + * Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed. + */ + public Thumbnail thumbnail; + /** + * True, if the sticker set has been installed by the current user. + */ + public boolean isInstalled; + /** + * True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously. + */ + public boolean isArchived; + /** + * True, if the sticker set is official. + */ + public boolean isOfficial; + /** + * True, is the stickers in the set are animated. + */ + public boolean isAnimated; + /** + * True, if the stickers in the set are masks. + */ + public boolean isMasks; + /** + * True for already viewed trending sticker sets. + */ + public boolean isViewed; + /** + * List of stickers in this set. + */ + public Sticker[] stickers; + /** + * A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object. + */ + public Emojis[] emojis; + + /** + * Represents a sticker set. + */ + public StickerSet() { + } + + /** + * Represents a sticker set. + * + * @param id Identifier of the sticker set. + * @param title Title of the sticker set. + * @param name Name of the sticker set. + * @param thumbnail Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed. + * @param isInstalled True, if the sticker set has been installed by the current user. + * @param isArchived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously. + * @param isOfficial True, if the sticker set is official. + * @param isAnimated True, is the stickers in the set are animated. + * @param isMasks True, if the stickers in the set are masks. + * @param isViewed True for already viewed trending sticker sets. + * @param stickers List of stickers in this set. + * @param emojis A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object. + */ + public StickerSet(long id, String title, String name, Thumbnail thumbnail, boolean isInstalled, boolean isArchived, boolean isOfficial, boolean isAnimated, boolean isMasks, boolean isViewed, Sticker[] stickers, Emojis[] emojis) { + this.id = id; + this.title = title; + this.name = name; + this.thumbnail = thumbnail; + this.isInstalled = isInstalled; + this.isArchived = isArchived; + this.isOfficial = isOfficial; + this.isAnimated = isAnimated; + this.isMasks = isMasks; + this.isViewed = isViewed; + this.stickers = stickers; + this.emojis = emojis; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 853438190; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents short information about a sticker set. + */ + public static class StickerSetInfo extends Object { + /** + * Identifier of the sticker set. + */ + public long id; + /** + * Title of the sticker set. + */ + public String title; + /** + * Name of the sticker set. + */ + public String name; + /** + * Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. + */ + public Thumbnail thumbnail; + /** + * True, if the sticker set has been installed by current user. + */ + public boolean isInstalled; + /** + * True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously. + */ + public boolean isArchived; + /** + * True, if the sticker set is official. + */ + public boolean isOfficial; + /** + * True, is the stickers in the set are animated. + */ + public boolean isAnimated; + /** + * True, if the stickers in the set are masks. + */ + public boolean isMasks; + /** + * True for already viewed trending sticker sets. + */ + public boolean isViewed; + /** + * Total number of stickers in the set. + */ + public int size; + /** + * Contains up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full set should be requested. + */ + public Sticker[] covers; + + /** + * Represents short information about a sticker set. + */ + public StickerSetInfo() { + } + + /** + * Represents short information about a sticker set. + * + * @param id Identifier of the sticker set. + * @param title Title of the sticker set. + * @param name Name of the sticker set. + * @param thumbnail Sticker set thumbnail in WEBP or TGS format with width and height 100; may be null. + * @param isInstalled True, if the sticker set has been installed by current user. + * @param isArchived True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously. + * @param isOfficial True, if the sticker set is official. + * @param isAnimated True, is the stickers in the set are animated. + * @param isMasks True, if the stickers in the set are masks. + * @param isViewed True for already viewed trending sticker sets. + * @param size Total number of stickers in the set. + * @param covers Contains up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full set should be requested. + */ + public StickerSetInfo(long id, String title, String name, Thumbnail thumbnail, boolean isInstalled, boolean isArchived, boolean isOfficial, boolean isAnimated, boolean isMasks, boolean isViewed, int size, Sticker[] covers) { + this.id = id; + this.title = title; + this.name = name; + this.thumbnail = thumbnail; + this.isInstalled = isInstalled; + this.isArchived = isArchived; + this.isOfficial = isOfficial; + this.isAnimated = isAnimated; + this.isMasks = isMasks; + this.isViewed = isViewed; + this.size = size; + this.covers = covers; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 703844215; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of sticker sets. + */ + public static class StickerSets extends Object { + /** + * Approximate total number of sticker sets found. + */ + public int totalCount; + /** + * List of sticker sets. + */ + public StickerSetInfo[] sets; + + /** + * Represents a list of sticker sets. + */ + public StickerSets() { + } + + /** + * Represents a list of sticker sets. + * + * @param totalCount Approximate total number of sticker sets found. + * @param sets List of sticker sets. + */ + public StickerSets(int totalCount, StickerSetInfo[] sets) { + this.totalCount = totalCount; + this.sets = sets; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1883828812; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of stickers. + */ + public static class Stickers extends Object { + /** + * List of stickers. + */ + public Sticker[] stickers; + + /** + * Represents a list of stickers. + */ + public Stickers() { + } + + /** + * Represents a list of stickers. + * + * @param stickers List of stickers. + */ + public Stickers(Sticker[] stickers) { + this.stickers = stickers; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1974859260; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the exact storage usage statistics split by chats and file type. + */ + public static class StorageStatistics extends Object { + /** + * Total size of files. + */ + public long size; + /** + * Total number of files. + */ + public int count; + /** + * Statistics split by chats. + */ + public StorageStatisticsByChat[] byChat; + + /** + * Contains the exact storage usage statistics split by chats and file type. + */ + public StorageStatistics() { + } + + /** + * Contains the exact storage usage statistics split by chats and file type. + * + * @param size Total size of files. + * @param count Total number of files. + * @param byChat Statistics split by chats. + */ + public StorageStatistics(long size, int count, StorageStatisticsByChat[] byChat) { + this.size = size; + this.count = count; + this.byChat = byChat; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 217237013; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the storage usage statistics for a specific chat. + */ + public static class StorageStatisticsByChat extends Object { + /** + * Chat identifier; 0 if none. + */ + public long chatId; + /** + * Total size of the files in the chat. + */ + public long size; + /** + * Total number of files in the chat. + */ + public int count; + /** + * Statistics split by file types. + */ + public StorageStatisticsByFileType[] byFileType; + + /** + * Contains the storage usage statistics for a specific chat. + */ + public StorageStatisticsByChat() { + } + + /** + * Contains the storage usage statistics for a specific chat. + * + * @param chatId Chat identifier; 0 if none. + * @param size Total size of the files in the chat. + * @param count Total number of files in the chat. + * @param byFileType Statistics split by file types. + */ + public StorageStatisticsByChat(long chatId, long size, int count, StorageStatisticsByFileType[] byFileType) { + this.chatId = chatId; + this.size = size; + this.count = count; + this.byFileType = byFileType; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 635434531; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains the storage usage statistics for a specific file type. + */ + public static class StorageStatisticsByFileType extends Object { + /** + * File type. + */ + public FileType fileType; + /** + * Total size of the files. + */ + public long size; + /** + * Total number of files. + */ + public int count; + + /** + * Contains the storage usage statistics for a specific file type. + */ + public StorageStatisticsByFileType() { + } + + /** + * Contains the storage usage statistics for a specific file type. + * + * @param fileType File type. + * @param size Total size of the files. + * @param count Total number of files. + */ + public StorageStatisticsByFileType(FileType fileType, long size, int count) { + this.fileType = fileType; + this.size = size; + this.count = count; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 714012840; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains approximate storage usage statistics, excluding files of unknown file type. + */ + public static class StorageStatisticsFast extends Object { + /** + * Approximate total size of files. + */ + public long filesSize; + /** + * Approximate number of files. + */ + public int fileCount; + /** + * Size of the database. + */ + public long databaseSize; + /** + * Size of the language pack database. + */ + public long languagePackDatabaseSize; + /** + * Size of the TDLib internal log. + */ + public long logSize; + + /** + * Contains approximate storage usage statistics, excluding files of unknown file type. + */ + public StorageStatisticsFast() { + } + + /** + * Contains approximate storage usage statistics, excluding files of unknown file type. + * + * @param filesSize Approximate total size of files. + * @param fileCount Approximate number of files. + * @param databaseSize Size of the database. + * @param languagePackDatabaseSize Size of the language pack database. + * @param logSize Size of the TDLib internal log. + */ + public StorageStatisticsFast(long filesSize, int fileCount, long databaseSize, long languagePackDatabaseSize, long logSize) { + this.filesSize = filesSize; + this.fileCount = fileCount; + this.databaseSize = databaseSize; + this.languagePackDatabaseSize = languagePackDatabaseSize; + this.logSize = logSize; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -884922271; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes an action suggested to the current user. + */ + public abstract static class SuggestedAction extends Object { + } + + /** + * Suggests the user to enable "archive_and_mute_new_chats_from_unknown_users" option. + */ + public static class SuggestedActionEnableArchiveAndMuteNewChats extends SuggestedAction { + + /** + * Suggests the user to enable "archive_and_mute_new_chats_from_unknown_users" option. + */ + public SuggestedActionEnableArchiveAndMuteNewChats() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2017586255; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Suggests the user to check authorization phone number and change the phone number if it is inaccessible. + */ + public static class SuggestedActionCheckPhoneNumber extends SuggestedAction { + + /** + * Suggests the user to check authorization phone number and change the phone number if it is inaccessible. + */ + public SuggestedActionCheckPhoneNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 648771563; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers. + */ + public static class Supergroup extends Object { + /** + * Supergroup or channel identifier. + */ + public int id; + /** + * Username of the supergroup or channel; empty for private supergroups or channels. + */ + public String username; + /** + * Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member. + */ + public int date; + /** + * Status of the current user in the supergroup or channel; custom title will be always empty. + */ + public ChatMemberStatus status; + /** + * Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules. + */ + public int memberCount; + /** + * True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel. + */ + public boolean hasLinkedChat; + /** + * True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup. + */ + public boolean hasLocation; + /** + * True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels. + */ + public boolean signMessages; + /** + * True, if the slow mode is enabled in the supergroup. + */ + public boolean isSlowModeEnabled; + /** + * True, if the supergroup is a channel. + */ + public boolean isChannel; + /** + * True, if the supergroup or channel is verified. + */ + public boolean isVerified; + /** + * If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted. + */ + public String restrictionReason; + /** + * True, if many users reported this supergroup as a scam. + */ + public boolean isScam; + + /** + * Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers. + */ + public Supergroup() { + } + + /** + * Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers. + * + * @param id Supergroup or channel identifier. + * @param username Username of the supergroup or channel; empty for private supergroups or channels. + * @param date Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member. + * @param status Status of the current user in the supergroup or channel; custom title will be always empty. + * @param memberCount Number of members in the supergroup or channel; 0 if unknown. Currently it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules. + * @param hasLinkedChat True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel. + * @param hasLocation True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup. + * @param signMessages True, if messages sent to the channel should contain information about the sender. This field is only applicable to channels. + * @param isSlowModeEnabled True, if the slow mode is enabled in the supergroup. + * @param isChannel True, if the supergroup is a channel. + * @param isVerified True, if the supergroup or channel is verified. + * @param restrictionReason If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted. + * @param isScam True, if many users reported this supergroup as a scam. + */ + public Supergroup(int id, String username, int date, ChatMemberStatus status, int memberCount, boolean hasLinkedChat, boolean hasLocation, boolean signMessages, boolean isSlowModeEnabled, boolean isChannel, boolean isVerified, String restrictionReason, boolean isScam) { + this.id = id; + this.username = username; + this.date = date; + this.status = status; + this.memberCount = memberCount; + this.hasLinkedChat = hasLinkedChat; + this.hasLocation = hasLocation; + this.signMessages = signMessages; + this.isSlowModeEnabled = isSlowModeEnabled; + this.isChannel = isChannel; + this.isVerified = isVerified; + this.restrictionReason = restrictionReason; + this.isScam = isScam; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -103091; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains full information about a supergroup or channel. + */ + public static class SupergroupFullInfo extends Object { + /** + * Chat photo; may be null. + */ + public ChatPhoto photo; + /** + * Supergroup or channel description. + */ + public String description; + /** + * Number of members in the supergroup or channel; 0 if unknown. + */ + public int memberCount; + /** + * Number of privileged users in the supergroup or channel; 0 if unknown. + */ + public int administratorCount; + /** + * Number of restricted users in the supergroup; 0 if unknown. + */ + public int restrictedCount; + /** + * Number of users banned from chat; 0 if unknown. + */ + public int bannedCount; + /** + * Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown. + */ + public long linkedChatId; + /** + * Delay between consecutive sent messages for non-administrator supergroup members, in seconds. + */ + public int slowModeDelay; + /** + * Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero. + */ + public double slowModeDelayExpiresIn; + /** + * True, if members of the chat can be retrieved. + */ + public boolean canGetMembers; + /** + * True, if the chat username can be changed. + */ + public boolean canSetUsername; + /** + * True, if the supergroup sticker set can be changed. + */ + public boolean canSetStickerSet; + /** + * True, if the supergroup location can be changed. + */ + public boolean canSetLocation; + /** + * True, if the supergroup or channel statistics are available. + */ + public boolean canGetStatistics; + /** + * True, if new chat members will have access to old messages. In public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chat. The value of this field is only available for chat administrators. + */ + public boolean isAllHistoryAvailable; + /** + * Identifier of the supergroup sticker set; 0 if none. + */ + public long stickerSetId; + /** + * Location to which the supergroup is connected; may be null. + */ + public ChatLocation location; + /** + * Invite link for this chat. + */ + public String inviteLink; + /** + * Identifier of the basic group from which supergroup was upgraded; 0 if none. + */ + public int upgradedFromBasicGroupId; + /** + * Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none. + */ + public long upgradedFromMaxMessageId; + + /** + * Contains full information about a supergroup or channel. + */ + public SupergroupFullInfo() { + } + + /** + * Contains full information about a supergroup or channel. + * + * @param photo Chat photo; may be null. + * @param description Supergroup or channel description. + * @param memberCount Number of members in the supergroup or channel; 0 if unknown. + * @param administratorCount Number of privileged users in the supergroup or channel; 0 if unknown. + * @param restrictedCount Number of restricted users in the supergroup; 0 if unknown. + * @param bannedCount Number of users banned from chat; 0 if unknown. + * @param linkedChatId Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown. + * @param slowModeDelay Delay between consecutive sent messages for non-administrator supergroup members, in seconds. + * @param slowModeDelayExpiresIn Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero. + * @param canGetMembers True, if members of the chat can be retrieved. + * @param canSetUsername True, if the chat username can be changed. + * @param canSetStickerSet True, if the supergroup sticker set can be changed. + * @param canSetLocation True, if the supergroup location can be changed. + * @param canGetStatistics True, if the supergroup or channel statistics are available. + * @param isAllHistoryAvailable True, if new chat members will have access to old messages. In public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chat. The value of this field is only available for chat administrators. + * @param stickerSetId Identifier of the supergroup sticker set; 0 if none. + * @param location Location to which the supergroup is connected; may be null. + * @param inviteLink Invite link for this chat. + * @param upgradedFromBasicGroupId Identifier of the basic group from which supergroup was upgraded; 0 if none. + * @param upgradedFromMaxMessageId Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none. + */ + public SupergroupFullInfo(ChatPhoto photo, String description, int memberCount, int administratorCount, int restrictedCount, int bannedCount, long linkedChatId, int slowModeDelay, double slowModeDelayExpiresIn, boolean canGetMembers, boolean canSetUsername, boolean canSetStickerSet, boolean canSetLocation, boolean canGetStatistics, boolean isAllHistoryAvailable, long stickerSetId, ChatLocation location, String inviteLink, int upgradedFromBasicGroupId, long upgradedFromMaxMessageId) { + this.photo = photo; + this.description = description; + this.memberCount = memberCount; + this.administratorCount = administratorCount; + this.restrictedCount = restrictedCount; + this.bannedCount = bannedCount; + this.linkedChatId = linkedChatId; + this.slowModeDelay = slowModeDelay; + this.slowModeDelayExpiresIn = slowModeDelayExpiresIn; + this.canGetMembers = canGetMembers; + this.canSetUsername = canSetUsername; + this.canSetStickerSet = canSetStickerSet; + this.canSetLocation = canSetLocation; + this.canGetStatistics = canGetStatistics; + this.isAllHistoryAvailable = isAllHistoryAvailable; + this.stickerSetId = stickerSetId; + this.location = location; + this.inviteLink = inviteLink; + this.upgradedFromBasicGroupId = upgradedFromBasicGroupId; + this.upgradedFromMaxMessageId = upgradedFromMaxMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1112328416; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Specifies the kind of chat members to return in getSupergroupMembers. + */ + public abstract static class SupergroupMembersFilter extends Object { + } + + /** + * Returns recently active users in reverse chronological order. + */ + public static class SupergroupMembersFilterRecent extends SupergroupMembersFilter { + + /** + * Returns recently active users in reverse chronological order. + */ + public SupergroupMembersFilterRecent() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1178199509; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns contacts of the user, which are members of the supergroup or channel. + */ + public static class SupergroupMembersFilterContacts extends SupergroupMembersFilter { + /** + * Query to search for. + */ + public String query; + + /** + * Returns contacts of the user, which are members of the supergroup or channel. + */ + public SupergroupMembersFilterContacts() { + } + + /** + * Returns contacts of the user, which are members of the supergroup or channel. + * + * @param query Query to search for. + */ + public SupergroupMembersFilterContacts(String query) { + this.query = query; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1282910856; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the owner and administrators. + */ + public static class SupergroupMembersFilterAdministrators extends SupergroupMembersFilter { + + /** + * Returns the owner and administrators. + */ + public SupergroupMembersFilterAdministrators() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2097380265; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Used to search for supergroup or channel members via a (string) query. + */ + public static class SupergroupMembersFilterSearch extends SupergroupMembersFilter { + /** + * Query to search for. + */ + public String query; + + /** + * Used to search for supergroup or channel members via a (string) query. + */ + public SupergroupMembersFilterSearch() { + } + + /** + * Used to search for supergroup or channel members via a (string) query. + * + * @param query Query to search for. + */ + public SupergroupMembersFilterSearch(String query) { + this.query = query; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1696358469; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns restricted supergroup members; can be used only by administrators. + */ + public static class SupergroupMembersFilterRestricted extends SupergroupMembersFilter { + /** + * Query to search for. + */ + public String query; + + /** + * Returns restricted supergroup members; can be used only by administrators. + */ + public SupergroupMembersFilterRestricted() { + } + + /** + * Returns restricted supergroup members; can be used only by administrators. + * + * @param query Query to search for. + */ + public SupergroupMembersFilterRestricted(String query) { + this.query = query; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1107800034; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns users banned from the supergroup or channel; can be used only by administrators. + */ + public static class SupergroupMembersFilterBanned extends SupergroupMembersFilter { + /** + * Query to search for. + */ + public String query; + + /** + * Returns users banned from the supergroup or channel; can be used only by administrators. + */ + public SupergroupMembersFilterBanned() { + } + + /** + * Returns users banned from the supergroup or channel; can be used only by administrators. + * + * @param query Query to search for. + */ + public SupergroupMembersFilterBanned(String query) { + this.query = query; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1210621683; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns bot members of the supergroup or channel. + */ + public static class SupergroupMembersFilterBots extends SupergroupMembersFilter { + + /** + * Returns bot members of the supergroup or channel. + */ + public SupergroupMembersFilterBots() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 492138918; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a URL linking to an internal Telegram entity. + */ + public static class TMeUrl extends Object { + /** + * URL. + */ + public String url; + /** + * Type of the URL. + */ + public TMeUrlType type; + + /** + * Represents a URL linking to an internal Telegram entity. + */ + public TMeUrl() { + } + + /** + * Represents a URL linking to an internal Telegram entity. + * + * @param url URL. + * @param type Type of the URL. + */ + public TMeUrl(String url, TMeUrlType type) { + this.url = url; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1140786622; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the type of a URL linking to an internal Telegram entity. + */ + public abstract static class TMeUrlType extends Object { + } + + /** + * A URL linking to a user. + */ + public static class TMeUrlTypeUser extends TMeUrlType { + /** + * Identifier of the user. + */ + public int userId; + + /** + * A URL linking to a user. + */ + public TMeUrlTypeUser() { + } + + /** + * A URL linking to a user. + * + * @param userId Identifier of the user. + */ + public TMeUrlTypeUser(int userId) { + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1198700130; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A URL linking to a public supergroup or channel. + */ + public static class TMeUrlTypeSupergroup extends TMeUrlType { + /** + * Identifier of the supergroup or channel. + */ + public long supergroupId; + + /** + * A URL linking to a public supergroup or channel. + */ + public TMeUrlTypeSupergroup() { + } + + /** + * A URL linking to a public supergroup or channel. + * + * @param supergroupId Identifier of the supergroup or channel. + */ + public TMeUrlTypeSupergroup(long supergroupId) { + this.supergroupId = supergroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1353369944; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat invite link. + */ + public static class TMeUrlTypeChatInvite extends TMeUrlType { + /** + * Chat invite link info. + */ + public ChatInviteLinkInfo info; + + /** + * A chat invite link. + */ + public TMeUrlTypeChatInvite() { + } + + /** + * A chat invite link. + * + * @param info Chat invite link info. + */ + public TMeUrlTypeChatInvite(ChatInviteLinkInfo info) { + this.info = info; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 313907785; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A URL linking to a sticker set. + */ + public static class TMeUrlTypeStickerSet extends TMeUrlType { + /** + * Identifier of the sticker set. + */ + public long stickerSetId; + + /** + * A URL linking to a sticker set. + */ + public TMeUrlTypeStickerSet() { + } + + /** + * A URL linking to a sticker set. + * + * @param stickerSetId Identifier of the sticker set. + */ + public TMeUrlTypeStickerSet(long stickerSetId) { + this.stickerSetId = stickerSetId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1602473196; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of t.me URLs. + */ + public static class TMeUrls extends Object { + /** + * List of URLs. + */ + public TMeUrl[] urls; + + /** + * Contains a list of t.me URLs. + */ + public TMeUrls() { + } + + /** + * Contains a list of t.me URLs. + * + * @param urls List of URLs. + */ + public TMeUrls(TMeUrl[] urls) { + this.urls = urls; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1130595098; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains parameters for TDLib initialization. + */ + public static class TdlibParameters extends Object { + /** + * If set to true, the Telegram test environment will be used instead of the production environment. + */ + public boolean useTestDc; + /** + * The path to the directory for the persistent database; if empty, the current working directory will be used. + */ + public String databaseDirectory; + /** + * The path to the directory for storing files; if empty, databaseDirectory will be used. + */ + public String filesDirectory; + /** + * If set to true, information about downloaded and uploaded files will be saved between application restarts. + */ + public boolean useFileDatabase; + /** + * If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies useFileDatabase. + */ + public boolean useChatInfoDatabase; + /** + * If set to true, the library will maintain a cache of chats and messages. Implies useChatInfoDatabase. + */ + public boolean useMessageDatabase; + /** + * If set to true, support for secret chats will be enabled. + */ + public boolean useSecretChats; + /** + * Application identifier for Telegram API access, which can be obtained at https://my.telegram.org. + */ + public int apiId; + /** + * Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org. + */ + public String apiHash; + /** + * IETF language tag of the user's operating system language; must be non-empty. + */ + public String systemLanguageCode; + /** + * Model of the device the application is being run on; must be non-empty. + */ + public String deviceModel; + /** + * Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib. + */ + public String systemVersion; + /** + * Application version; must be non-empty. + */ + public String applicationVersion; + /** + * If set to true, old files will automatically be deleted. + */ + public boolean enableStorageOptimizer; + /** + * If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name. + */ + public boolean ignoreFileNames; + + /** + * Contains parameters for TDLib initialization. + */ + public TdlibParameters() { + } + + /** + * Contains parameters for TDLib initialization. + * + * @param useTestDc If set to true, the Telegram test environment will be used instead of the production environment. + * @param databaseDirectory The path to the directory for the persistent database; if empty, the current working directory will be used. + * @param filesDirectory The path to the directory for storing files; if empty, databaseDirectory will be used. + * @param useFileDatabase If set to true, information about downloaded and uploaded files will be saved between application restarts. + * @param useChatInfoDatabase If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies useFileDatabase. + * @param useMessageDatabase If set to true, the library will maintain a cache of chats and messages. Implies useChatInfoDatabase. + * @param useSecretChats If set to true, support for secret chats will be enabled. + * @param apiId Application identifier for Telegram API access, which can be obtained at https://my.telegram.org. + * @param apiHash Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org. + * @param systemLanguageCode IETF language tag of the user's operating system language; must be non-empty. + * @param deviceModel Model of the device the application is being run on; must be non-empty. + * @param systemVersion Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib. + * @param applicationVersion Application version; must be non-empty. + * @param enableStorageOptimizer If set to true, old files will automatically be deleted. + * @param ignoreFileNames If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name. + */ + public TdlibParameters(boolean useTestDc, String databaseDirectory, String filesDirectory, boolean useFileDatabase, boolean useChatInfoDatabase, boolean useMessageDatabase, boolean useSecretChats, int apiId, String apiHash, String systemLanguageCode, String deviceModel, String systemVersion, String applicationVersion, boolean enableStorageOptimizer, boolean ignoreFileNames) { + this.useTestDc = useTestDc; + this.databaseDirectory = databaseDirectory; + this.filesDirectory = filesDirectory; + this.useFileDatabase = useFileDatabase; + this.useChatInfoDatabase = useChatInfoDatabase; + this.useMessageDatabase = useMessageDatabase; + this.useSecretChats = useSecretChats; + this.apiId = apiId; + this.apiHash = apiHash; + this.systemLanguageCode = systemLanguageCode; + this.deviceModel = deviceModel; + this.systemVersion = systemVersion; + this.applicationVersion = applicationVersion; + this.enableStorageOptimizer = enableStorageOptimizer; + this.ignoreFileNames = ignoreFileNames; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -761520773; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about the availability of a temporary password, which can be used for payments. + */ + public static class TemporaryPasswordState extends Object { + /** + * True, if a temporary password is available. + */ + public boolean hasPassword; + /** + * Time left before the temporary password expires, in seconds. + */ + public int validFor; + + /** + * Returns information about the availability of a temporary password, which can be used for payments. + */ + public TemporaryPasswordState() { + } + + /** + * Returns information about the availability of a temporary password, which can be used for payments. + * + * @param hasPassword True, if a temporary password is available. + * @param validFor Time left before the temporary password expires, in seconds. + */ + public TemporaryPasswordState(boolean hasPassword, int validFor) { + this.hasPassword = hasPassword; + this.validFor = validFor; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 939837410; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains Telegram terms of service. + */ + public static class TermsOfService extends Object { + /** + * Text of the terms of service. + */ + public FormattedText text; + /** + * The minimum age of a user to be able to accept the terms; 0 if any. + */ + public int minUserAge; + /** + * True, if a blocking popup with terms of service must be shown to the user. + */ + public boolean showPopup; + + /** + * Contains Telegram terms of service. + */ + public TermsOfService() { + } + + /** + * Contains Telegram terms of service. + * + * @param text Text of the terms of service. + * @param minUserAge The minimum age of a user to be able to accept the terms; 0 if any. + * @param showPopup True, if a blocking popup with terms of service must be shown to the user. + */ + public TermsOfService(FormattedText text, int minUserAge, boolean showPopup) { + this.text = text; + this.minUserAge = minUserAge; + this.showPopup = showPopup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 739422597; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A simple object containing a sequence of bytes; for testing only. + */ + public static class TestBytes extends Object { + /** + * Bytes. + */ + public byte[] value; + + /** + * A simple object containing a sequence of bytes; for testing only. + */ + public TestBytes() { + } + + /** + * A simple object containing a sequence of bytes; for testing only. + * + * @param value Bytes. + */ + public TestBytes(byte[] value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1541225250; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A simple object containing a number; for testing only. + */ + public static class TestInt extends Object { + /** + * Number. + */ + public int value; + + /** + * A simple object containing a number; for testing only. + */ + public TestInt() { + } + + /** + * A simple object containing a number; for testing only. + * + * @param value Number. + */ + public TestInt(int value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -574804983; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A simple object containing a string; for testing only. + */ + public static class TestString extends Object { + /** + * String. + */ + public String value; + + /** + * A simple object containing a string; for testing only. + */ + public TestString() { + } + + /** + * A simple object containing a string; for testing only. + * + * @param value String. + */ + public TestString(String value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -27891572; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A simple object containing a vector of numbers; for testing only. + */ + public static class TestVectorInt extends Object { + /** + * Vector of numbers. + */ + public int[] value; + + /** + * A simple object containing a vector of numbers; for testing only. + */ + public TestVectorInt() { + } + + /** + * A simple object containing a vector of numbers; for testing only. + * + * @param value Vector of numbers. + */ + public TestVectorInt(int[] value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 593682027; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A simple object containing a vector of objects that hold a number; for testing only. + */ + public static class TestVectorIntObject extends Object { + /** + * Vector of objects. + */ + public TestInt[] value; + + /** + * A simple object containing a vector of objects that hold a number; for testing only. + */ + public TestVectorIntObject() { + } + + /** + * A simple object containing a vector of objects that hold a number; for testing only. + * + * @param value Vector of objects. + */ + public TestVectorIntObject(TestInt[] value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 125891546; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A simple object containing a vector of strings; for testing only. + */ + public static class TestVectorString extends Object { + /** + * Vector of strings. + */ + public String[] value; + + /** + * A simple object containing a vector of strings; for testing only. + */ + public TestVectorString() { + } + + /** + * A simple object containing a vector of strings; for testing only. + * + * @param value Vector of strings. + */ + public TestVectorString(String[] value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 79339995; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A simple object containing a vector of objects that hold a string; for testing only. + */ + public static class TestVectorStringObject extends Object { + /** + * Vector of objects. + */ + public TestString[] value; + + /** + * A simple object containing a vector of objects that hold a string; for testing only. + */ + public TestVectorStringObject() { + } + + /** + * A simple object containing a vector of objects that hold a string; for testing only. + * + * @param value Vector of objects. + */ + public TestVectorStringObject(TestString[] value) { + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 80780537; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains some text. + */ + public static class Text extends Object { + /** + * Text. + */ + public String text; + + /** + * Contains some text. + */ + public Text() { + } + + /** + * Contains some text. + * + * @param text Text. + */ + public Text(String text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 578181272; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of text entities. + */ + public static class TextEntities extends Object { + /** + * List of text entities. + */ + public TextEntity[] entities; + + /** + * Contains a list of text entities. + */ + public TextEntities() { + } + + /** + * Contains a list of text entities. + * + * @param entities List of text entities. + */ + public TextEntities(TextEntity[] entities) { + this.entities = entities; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -933199172; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a part of the text that needs to be formatted in some unusual way. + */ + public static class TextEntity extends Object { + /** + * Offset of the entity, in UTF-16 code units. + */ + public int offset; + /** + * Length of the entity, in UTF-16 code units. + */ + public int length; + /** + * Type of the entity. + */ + public TextEntityType type; + + /** + * Represents a part of the text that needs to be formatted in some unusual way. + */ + public TextEntity() { + } + + /** + * Represents a part of the text that needs to be formatted in some unusual way. + * + * @param offset Offset of the entity, in UTF-16 code units. + * @param length Length of the entity, in UTF-16 code units. + * @param type Type of the entity. + */ + public TextEntity(int offset, int length, TextEntityType type) { + this.offset = offset; + this.length = length; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1951688280; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a part of the text which must be formatted differently. + */ + public abstract static class TextEntityType extends Object { + } + + /** + * A mention of a user by their username. + */ + public static class TextEntityTypeMention extends TextEntityType { + + /** + * A mention of a user by their username. + */ + public TextEntityTypeMention() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 934535013; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A hashtag text, beginning with "#". + */ + public static class TextEntityTypeHashtag extends TextEntityType { + + /** + * A hashtag text, beginning with "#". + */ + public TextEntityTypeHashtag() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1023958307; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A cashtag text, beginning with "$" and consisting of capital english letters (i.e. "$USD"). + */ + public static class TextEntityTypeCashtag extends TextEntityType { + + /** + * A cashtag text, beginning with "$" and consisting of capital english letters (i.e. "$USD"). + */ + public TextEntityTypeCashtag() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1222915915; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A bot command, beginning with "/". This shouldn't be highlighted if there are no bots in the chat. + */ + public static class TextEntityTypeBotCommand extends TextEntityType { + + /** + * A bot command, beginning with "/". This shouldn't be highlighted if there are no bots in the chat. + */ + public TextEntityTypeBotCommand() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1150997581; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An HTTP URL. + */ + public static class TextEntityTypeUrl extends TextEntityType { + + /** + * An HTTP URL. + */ + public TextEntityTypeUrl() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1312762756; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An email address. + */ + public static class TextEntityTypeEmailAddress extends TextEntityType { + + /** + * An email address. + */ + public TextEntityTypeEmailAddress() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1425545249; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A phone number. + */ + public static class TextEntityTypePhoneNumber extends TextEntityType { + + /** + * A phone number. + */ + public TextEntityTypePhoneNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1160140246; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A bank card number. The getBankCardInfo method can be used to get information about the bank card. + */ + public static class TextEntityTypeBankCardNumber extends TextEntityType { + + /** + * A bank card number. The getBankCardInfo method can be used to get information about the bank card. + */ + public TextEntityTypeBankCardNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 105986320; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A bold text. + */ + public static class TextEntityTypeBold extends TextEntityType { + + /** + * A bold text. + */ + public TextEntityTypeBold() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1128210000; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An italic text. + */ + public static class TextEntityTypeItalic extends TextEntityType { + + /** + * An italic text. + */ + public TextEntityTypeItalic() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -118253987; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An underlined text. + */ + public static class TextEntityTypeUnderline extends TextEntityType { + + /** + * An underlined text. + */ + public TextEntityTypeUnderline() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 792317842; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A strikethrough text. + */ + public static class TextEntityTypeStrikethrough extends TextEntityType { + + /** + * A strikethrough text. + */ + public TextEntityTypeStrikethrough() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 961529082; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Text that must be formatted as if inside a code HTML tag. + */ + public static class TextEntityTypeCode extends TextEntityType { + + /** + * Text that must be formatted as if inside a code HTML tag. + */ + public TextEntityTypeCode() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -974534326; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Text that must be formatted as if inside a pre HTML tag. + */ + public static class TextEntityTypePre extends TextEntityType { + + /** + * Text that must be formatted as if inside a pre HTML tag. + */ + public TextEntityTypePre() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1648958606; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Text that must be formatted as if inside pre, and code HTML tags. + */ + public static class TextEntityTypePreCode extends TextEntityType { + /** + * Programming language of the code; as defined by the sender. + */ + public String language; + + /** + * Text that must be formatted as if inside pre, and code HTML tags. + */ + public TextEntityTypePreCode() { + } + + /** + * Text that must be formatted as if inside pre, and code HTML tags. + * + * @param language Programming language of the code; as defined by the sender. + */ + public TextEntityTypePreCode(String language) { + this.language = language; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -945325397; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A text description shown instead of a raw URL. + */ + public static class TextEntityTypeTextUrl extends TextEntityType { + /** + * HTTP or tg:// URL to be opened when the link is clicked. + */ + public String url; + + /** + * A text description shown instead of a raw URL. + */ + public TextEntityTypeTextUrl() { + } + + /** + * A text description shown instead of a raw URL. + * + * @param url HTTP or tg:// URL to be opened when the link is clicked. + */ + public TextEntityTypeTextUrl(String url) { + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 445719651; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A text shows instead of a raw mention of the user (e.g., when the user has no username). + */ + public static class TextEntityTypeMentionName extends TextEntityType { + /** + * Identifier of the mentioned user. + */ + public int userId; + + /** + * A text shows instead of a raw mention of the user (e.g., when the user has no username). + */ + public TextEntityTypeMentionName() { + } + + /** + * A text shows instead of a raw mention of the user (e.g., when the user has no username). + * + * @param userId Identifier of the mentioned user. + */ + public TextEntityTypeMentionName(int userId) { + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -791517091; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the way the text should be parsed for TextEntities. + */ + public abstract static class TextParseMode extends Object { + } + + /** + * The text uses Markdown-style formatting. + */ + public static class TextParseModeMarkdown extends TextParseMode { + /** + * Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode. + */ + public int version; + + /** + * The text uses Markdown-style formatting. + */ + public TextParseModeMarkdown() { + } + + /** + * The text uses Markdown-style formatting. + * + * @param version Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode. + */ + public TextParseModeMarkdown(int version) { + this.version = version; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 360073407; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The text uses HTML-style formatting. The same as Telegram Bot API "HTML" parse mode. + */ + public static class TextParseModeHTML extends TextParseMode { + + /** + * The text uses HTML-style formatting. The same as Telegram Bot API "HTML" parse mode. + */ + public TextParseModeHTML() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1660208627; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a thumbnail. + */ + public static class Thumbnail extends Object { + /** + * Thumbnail format. + */ + public ThumbnailFormat format; + /** + * Thumbnail width. + */ + public int width; + /** + * Thumbnail height. + */ + public int height; + /** + * The thumbnail. + */ + public File file; + + /** + * Represents a thumbnail. + */ + public Thumbnail() { + } + + /** + * Represents a thumbnail. + * + * @param format Thumbnail format. + * @param width Thumbnail width. + * @param height Thumbnail height. + * @param file The thumbnail. + */ + public Thumbnail(ThumbnailFormat format, int width, int height, File file) { + this.format = format; + this.width = width; + this.height = height; + this.file = file; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1243275371; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes format of the thumbnail. + */ + public abstract static class ThumbnailFormat extends Object { + } + + /** + * The thumbnail is in JPEG format. + */ + public static class ThumbnailFormatJpeg extends ThumbnailFormat { + + /** + * The thumbnail is in JPEG format. + */ + public ThumbnailFormatJpeg() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -653503352; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The thumbnail is in PNG format. It will be used only for background patterns. + */ + public static class ThumbnailFormatPng extends ThumbnailFormat { + + /** + * The thumbnail is in PNG format. It will be used only for background patterns. + */ + public ThumbnailFormatPng() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1577490421; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The thumbnail is in WEBP format. It will be used only for some stickers. + */ + public static class ThumbnailFormatWebp extends ThumbnailFormat { + + /** + * The thumbnail is in WEBP format. It will be used only for some stickers. + */ + public ThumbnailFormatWebp() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -53588974; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The thumbnail is in static GIF format. It will be used only for some bot inline results. + */ + public static class ThumbnailFormatGif extends ThumbnailFormat { + + /** + * The thumbnail is in static GIF format. It will be used only for some bot inline results. + */ + public ThumbnailFormatGif() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1252205962; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The thumbnail is in TGS format. It will be used only for animated sticker sets. + */ + public static class ThumbnailFormatTgs extends ThumbnailFormat { + + /** + * The thumbnail is in TGS format. It will be used only for animated sticker sets. + */ + public ThumbnailFormatTgs() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1315522642; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The thumbnail is in MPEG4 format. It will be used only for some animations and videos. + */ + public static class ThumbnailFormatMpeg4 extends ThumbnailFormat { + + /** + * The thumbnail is in MPEG4 format. It will be used only for some animations and videos. + */ + public ThumbnailFormatMpeg4() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 278616062; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents the categories of chats for which a list of frequently used chats can be retrieved. + */ + public abstract static class TopChatCategory extends Object { + } + + /** + * A category containing frequently used private chats with non-bot users. + */ + public static class TopChatCategoryUsers extends TopChatCategory { + + /** + * A category containing frequently used private chats with non-bot users. + */ + public TopChatCategoryUsers() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1026706816; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A category containing frequently used private chats with bot users. + */ + public static class TopChatCategoryBots extends TopChatCategory { + + /** + * A category containing frequently used private chats with bot users. + */ + public TopChatCategoryBots() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1577129195; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A category containing frequently used basic groups and supergroups. + */ + public static class TopChatCategoryGroups extends TopChatCategory { + + /** + * A category containing frequently used basic groups and supergroups. + */ + public TopChatCategoryGroups() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1530056846; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A category containing frequently used channels. + */ + public static class TopChatCategoryChannels extends TopChatCategory { + + /** + * A category containing frequently used channels. + */ + public TopChatCategoryChannels() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -500825885; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A category containing frequently used chats with inline bots sorted by their usage in inline mode. + */ + public static class TopChatCategoryInlineBots extends TopChatCategory { + + /** + * A category containing frequently used chats with inline bots sorted by their usage in inline mode. + */ + public TopChatCategoryInlineBots() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 377023356; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A category containing frequently used chats used for calls. + */ + public static class TopChatCategoryCalls extends TopChatCategory { + + /** + * A category containing frequently used chats used for calls. + */ + public TopChatCategoryCalls() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 356208861; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A category containing frequently used chats used to forward messages. + */ + public static class TopChatCategoryForwardChats extends TopChatCategory { + + /** + * A category containing frequently used chats used to forward messages. + */ + public TopChatCategoryForwardChats() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1695922133; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Contains notifications about data changes. + */ + public abstract static class Update extends Object { + } + + /** + * The user authorization state has changed. + */ + public static class UpdateAuthorizationState extends Update { + /** + * New authorization state. + */ + public AuthorizationState authorizationState; + + /** + * The user authorization state has changed. + */ + public UpdateAuthorizationState() { + } + + /** + * The user authorization state has changed. + * + * @param authorizationState New authorization state. + */ + public UpdateAuthorizationState(AuthorizationState authorizationState) { + this.authorizationState = authorizationState; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1622347490; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new message was received; can also be an outgoing message. + */ + public static class UpdateNewMessage extends Update { + /** + * The new message. + */ + public Message message; + + /** + * A new message was received; can also be an outgoing message. + */ + public UpdateNewMessage() { + } + + /** + * A new message was received; can also be an outgoing message. + * + * @param message The new message. + */ + public UpdateNewMessage(Message message) { + this.message = message; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -563105266; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message. + */ + public static class UpdateMessageSendAcknowledged extends Update { + /** + * The chat identifier of the sent message. + */ + public long chatId; + /** + * A temporary message identifier. + */ + public long messageId; + + /** + * A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message. + */ + public UpdateMessageSendAcknowledged() { + } + + /** + * A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message. + * + * @param chatId The chat identifier of the sent message. + * @param messageId A temporary message identifier. + */ + public UpdateMessageSendAcknowledged(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1302843961; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message has been successfully sent. + */ + public static class UpdateMessageSendSucceeded extends Update { + /** + * Information about the sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change. + */ + public Message message; + /** + * The previous temporary message identifier. + */ + public long oldMessageId; + + /** + * A message has been successfully sent. + */ + public UpdateMessageSendSucceeded() { + } + + /** + * A message has been successfully sent. + * + * @param message Information about the sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change. + * @param oldMessageId The previous temporary message identifier. + */ + public UpdateMessageSendSucceeded(Message message, long oldMessageId) { + this.message = message; + this.oldMessageId = oldMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1815715197; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update. + */ + public static class UpdateMessageSendFailed extends Update { + /** + * Contains information about the message which failed to send. + */ + public Message message; + /** + * The previous temporary message identifier. + */ + public long oldMessageId; + /** + * An error code. + */ + public int errorCode; + /** + * Error message. + */ + public String errorMessage; + + /** + * A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update. + */ + public UpdateMessageSendFailed() { + } + + /** + * A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update. + * + * @param message Contains information about the message which failed to send. + * @param oldMessageId The previous temporary message identifier. + * @param errorCode An error code. + * @param errorMessage Error message. + */ + public UpdateMessageSendFailed(Message message, long oldMessageId, int errorCode, String errorMessage) { + this.message = message; + this.oldMessageId = oldMessageId; + this.errorCode = errorCode; + this.errorMessage = errorMessage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1032335779; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The message content has changed. + */ + public static class UpdateMessageContent extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + /** + * New message content. + */ + public MessageContent newContent; + + /** + * The message content has changed. + */ + public UpdateMessageContent() { + } + + /** + * The message content has changed. + * + * @param chatId Chat identifier. + * @param messageId Message identifier. + * @param newContent New message content. + */ + public UpdateMessageContent(long chatId, long messageId, MessageContent newContent) { + this.chatId = chatId; + this.messageId = messageId; + this.newContent = newContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 506903332; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message was edited. Changes in the message content will come in a separate updateMessageContent. + */ + public static class UpdateMessageEdited extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + /** + * Point in time (Unix timestamp) when the message was edited. + */ + public int editDate; + /** + * New message reply markup; may be null. + */ + public ReplyMarkup replyMarkup; + + /** + * A message was edited. Changes in the message content will come in a separate updateMessageContent. + */ + public UpdateMessageEdited() { + } + + /** + * A message was edited. Changes in the message content will come in a separate updateMessageContent. + * + * @param chatId Chat identifier. + * @param messageId Message identifier. + * @param editDate Point in time (Unix timestamp) when the message was edited. + * @param replyMarkup New message reply markup; may be null. + */ + public UpdateMessageEdited(long chatId, long messageId, int editDate, ReplyMarkup replyMarkup) { + this.chatId = chatId; + this.messageId = messageId; + this.editDate = editDate; + this.replyMarkup = replyMarkup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -559545626; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The information about interactions with a message has changed. + */ + public static class UpdateMessageInteractionInfo extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + /** + * New information about interactions with the message; may be null. + */ + public MessageInteractionInfo interactionInfo; + + /** + * The information about interactions with a message has changed. + */ + public UpdateMessageInteractionInfo() { + } + + /** + * The information about interactions with a message has changed. + * + * @param chatId Chat identifier. + * @param messageId Message identifier. + * @param interactionInfo New information about interactions with the message; may be null. + */ + public UpdateMessageInteractionInfo(long chatId, long messageId, MessageInteractionInfo interactionInfo) { + this.chatId = chatId; + this.messageId = messageId; + this.interactionInfo = interactionInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1417659394; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages. + */ + public static class UpdateMessageContentOpened extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + + /** + * The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages. + */ + public UpdateMessageContentOpened() { + } + + /** + * The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages. + * + * @param chatId Chat identifier. + * @param messageId Message identifier. + */ + public UpdateMessageContentOpened(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1520523131; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with an unread mention was read. + */ + public static class UpdateMessageMentionRead extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + /** + * The new number of unread mention messages left in the chat. + */ + public int unreadMentionCount; + + /** + * A message with an unread mention was read. + */ + public UpdateMessageMentionRead() { + } + + /** + * A message with an unread mention was read. + * + * @param chatId Chat identifier. + * @param messageId Message identifier. + * @param unreadMentionCount The new number of unread mention messages left in the chat. + */ + public UpdateMessageMentionRead(long chatId, long messageId, int unreadMentionCount) { + this.chatId = chatId; + this.messageId = messageId; + this.unreadMentionCount = unreadMentionCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -252228282; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A message with a live location was viewed. When the update is received, the application is supposed to update the live location. + */ + public static class UpdateMessageLiveLocationViewed extends Update { + /** + * Identifier of the chat with the live location message. + */ + public long chatId; + /** + * Identifier of the message with live location. + */ + public long messageId; + + /** + * A message with a live location was viewed. When the update is received, the application is supposed to update the live location. + */ + public UpdateMessageLiveLocationViewed() { + } + + /** + * A message with a live location was viewed. When the update is received, the application is supposed to update the live location. + * + * @param chatId Identifier of the chat with the live location message. + * @param messageId Identifier of the message with live location. + */ + public UpdateMessageLiveLocationViewed(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1308260971; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates. + */ + public static class UpdateNewChat extends Update { + /** + * The chat. + */ + public Chat chat; + + /** + * A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates. + */ + public UpdateNewChat() { + } + + /** + * A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates. + * + * @param chat The chat. + */ + public UpdateNewChat(Chat chat) { + this.chat = chat; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2075757773; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The title of a chat was changed. + */ + public static class UpdateChatTitle extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new chat title. + */ + public String title; + + /** + * The title of a chat was changed. + */ + public UpdateChatTitle() { + } + + /** + * The title of a chat was changed. + * + * @param chatId Chat identifier. + * @param title The new chat title. + */ + public UpdateChatTitle(long chatId, String title) { + this.chatId = chatId; + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -175405660; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat photo was changed. + */ + public static class UpdateChatPhoto extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new chat photo; may be null. + */ + public ChatPhotoInfo photo; + + /** + * A chat photo was changed. + */ + public UpdateChatPhoto() { + } + + /** + * A chat photo was changed. + * + * @param chatId Chat identifier. + * @param photo The new chat photo; may be null. + */ + public UpdateChatPhoto(long chatId, ChatPhotoInfo photo) { + this.chatId = chatId; + this.photo = photo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -324713921; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Chat permissions was changed. + */ + public static class UpdateChatPermissions extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new chat permissions. + */ + public ChatPermissions permissions; + + /** + * Chat permissions was changed. + */ + public UpdateChatPermissions() { + } + + /** + * Chat permissions was changed. + * + * @param chatId Chat identifier. + * @param permissions The new chat permissions. + */ + public UpdateChatPermissions(long chatId, ChatPermissions permissions) { + this.chatId = chatId; + this.permissions = permissions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1622010003; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The last message of a chat was changed. If lastMessage is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case. + */ + public static class UpdateChatLastMessage extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new last message in the chat; may be null. + */ + public Message lastMessage; + /** + * The new chat positions in the chat lists. + */ + public ChatPosition[] positions; + + /** + * The last message of a chat was changed. If lastMessage is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case. + */ + public UpdateChatLastMessage() { + } + + /** + * The last message of a chat was changed. If lastMessage is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case. + * + * @param chatId Chat identifier. + * @param lastMessage The new last message in the chat; may be null. + * @param positions The new chat positions in the chat lists. + */ + public UpdateChatLastMessage(long chatId, Message lastMessage, ChatPosition[] positions) { + this.chatId = chatId; + this.lastMessage = lastMessage; + this.positions = positions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -923244537; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent. + */ + public static class UpdateChatPosition extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * New chat position. If new order is 0, then the chat needs to be removed from the list. + */ + public ChatPosition position; + + /** + * The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent. + */ + public UpdateChatPosition() { + } + + /** + * The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent. + * + * @param chatId Chat identifier. + * @param position New chat position. If new order is 0, then the chat needs to be removed from the list. + */ + public UpdateChatPosition(long chatId, ChatPosition position) { + this.chatId = chatId; + this.position = position; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -8979849; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat was marked as unread or was read. + */ + public static class UpdateChatIsMarkedAsUnread extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * New value of isMarkedAsUnread. + */ + public boolean isMarkedAsUnread; + + /** + * A chat was marked as unread or was read. + */ + public UpdateChatIsMarkedAsUnread() { + } + + /** + * A chat was marked as unread or was read. + * + * @param chatId Chat identifier. + * @param isMarkedAsUnread New value of isMarkedAsUnread. + */ + public UpdateChatIsMarkedAsUnread(long chatId, boolean isMarkedAsUnread) { + this.chatId = chatId; + this.isMarkedAsUnread = isMarkedAsUnread; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1468347188; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat was blocked or unblocked. + */ + public static class UpdateChatIsBlocked extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * New value of isBlocked. + */ + public boolean isBlocked; + + /** + * A chat was blocked or unblocked. + */ + public UpdateChatIsBlocked() { + } + + /** + * A chat was blocked or unblocked. + * + * @param chatId Chat identifier. + * @param isBlocked New value of isBlocked. + */ + public UpdateChatIsBlocked(long chatId, boolean isBlocked) { + this.chatId = chatId; + this.isBlocked = isBlocked; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1998946752; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat's hasScheduledMessages field has changed. + */ + public static class UpdateChatHasScheduledMessages extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * New value of hasScheduledMessages. + */ + public boolean hasScheduledMessages; + + /** + * A chat's hasScheduledMessages field has changed. + */ + public UpdateChatHasScheduledMessages() { + } + + /** + * A chat's hasScheduledMessages field has changed. + * + * @param chatId Chat identifier. + * @param hasScheduledMessages New value of hasScheduledMessages. + */ + public UpdateChatHasScheduledMessages(long chatId, boolean hasScheduledMessages) { + this.chatId = chatId; + this.hasScheduledMessages = hasScheduledMessages; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2064958167; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The value of the default disableNotification parameter, used when a message is sent to the chat, was changed. + */ + public static class UpdateChatDefaultDisableNotification extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new defaultDisableNotification value. + */ + public boolean defaultDisableNotification; + + /** + * The value of the default disableNotification parameter, used when a message is sent to the chat, was changed. + */ + public UpdateChatDefaultDisableNotification() { + } + + /** + * The value of the default disableNotification parameter, used when a message is sent to the chat, was changed. + * + * @param chatId Chat identifier. + * @param defaultDisableNotification The new defaultDisableNotification value. + */ + public UpdateChatDefaultDisableNotification(long chatId, boolean defaultDisableNotification) { + this.chatId = chatId; + this.defaultDisableNotification = defaultDisableNotification; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 464087707; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Incoming messages were read or number of unread messages has been changed. + */ + public static class UpdateChatReadInbox extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifier of the last read incoming message. + */ + public long lastReadInboxMessageId; + /** + * The number of unread messages left in the chat. + */ + public int unreadCount; + + /** + * Incoming messages were read or number of unread messages has been changed. + */ + public UpdateChatReadInbox() { + } + + /** + * Incoming messages were read or number of unread messages has been changed. + * + * @param chatId Chat identifier. + * @param lastReadInboxMessageId Identifier of the last read incoming message. + * @param unreadCount The number of unread messages left in the chat. + */ + public UpdateChatReadInbox(long chatId, long lastReadInboxMessageId, int unreadCount) { + this.chatId = chatId; + this.lastReadInboxMessageId = lastReadInboxMessageId; + this.unreadCount = unreadCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -797952281; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Outgoing messages were read. + */ + public static class UpdateChatReadOutbox extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifier of last read outgoing message. + */ + public long lastReadOutboxMessageId; + + /** + * Outgoing messages were read. + */ + public UpdateChatReadOutbox() { + } + + /** + * Outgoing messages were read. + * + * @param chatId Chat identifier. + * @param lastReadOutboxMessageId Identifier of last read outgoing message. + */ + public UpdateChatReadOutbox(long chatId, long lastReadOutboxMessageId) { + this.chatId = chatId; + this.lastReadOutboxMessageId = lastReadOutboxMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 708334213; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat unreadMentionCount has changed. + */ + public static class UpdateChatUnreadMentionCount extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The number of unread mention messages left in the chat. + */ + public int unreadMentionCount; + + /** + * The chat unreadMentionCount has changed. + */ + public UpdateChatUnreadMentionCount() { + } + + /** + * The chat unreadMentionCount has changed. + * + * @param chatId Chat identifier. + * @param unreadMentionCount The number of unread mention messages left in the chat. + */ + public UpdateChatUnreadMentionCount(long chatId, int unreadMentionCount) { + this.chatId = chatId; + this.unreadMentionCount = unreadMentionCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2131461348; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Notification settings for a chat were changed. + */ + public static class UpdateChatNotificationSettings extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new notification settings. + */ + public ChatNotificationSettings notificationSettings; + + /** + * Notification settings for a chat were changed. + */ + public UpdateChatNotificationSettings() { + } + + /** + * Notification settings for a chat were changed. + * + * @param chatId Chat identifier. + * @param notificationSettings The new notification settings. + */ + public UpdateChatNotificationSettings(long chatId, ChatNotificationSettings notificationSettings) { + this.chatId = chatId; + this.notificationSettings = notificationSettings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -803163050; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Notification settings for some type of chats were updated. + */ + public static class UpdateScopeNotificationSettings extends Update { + /** + * Types of chats for which notification settings were updated. + */ + public NotificationSettingsScope scope; + /** + * The new notification settings. + */ + public ScopeNotificationSettings notificationSettings; + + /** + * Notification settings for some type of chats were updated. + */ + public UpdateScopeNotificationSettings() { + } + + /** + * Notification settings for some type of chats were updated. + * + * @param scope Types of chats for which notification settings were updated. + * @param notificationSettings The new notification settings. + */ + public UpdateScopeNotificationSettings(NotificationSettingsScope scope, ScopeNotificationSettings notificationSettings) { + this.scope = scope; + this.notificationSettings = notificationSettings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1203975309; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat action bar was changed. + */ + public static class UpdateChatActionBar extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new value of the action bar; may be null. + */ + public ChatActionBar actionBar; + + /** + * The chat action bar was changed. + */ + public UpdateChatActionBar() { + } + + /** + * The chat action bar was changed. + * + * @param chatId Chat identifier. + * @param actionBar The new value of the action bar; may be null. + */ + public UpdateChatActionBar(long chatId, ChatActionBar actionBar) { + this.chatId = chatId; + this.actionBar = actionBar; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -643671870; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The chat pinned message was changed. + */ + public static class UpdateChatPinnedMessage extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new identifier of the pinned message; 0 if there is no pinned message in the chat. + */ + public long pinnedMessageId; + + /** + * The chat pinned message was changed. + */ + public UpdateChatPinnedMessage() { + } + + /** + * The chat pinned message was changed. + * + * @param chatId Chat identifier. + * @param pinnedMessageId The new identifier of the pinned message; 0 if there is no pinned message in the chat. + */ + public UpdateChatPinnedMessage(long chatId, long pinnedMessageId) { + this.chatId = chatId; + this.pinnedMessageId = pinnedMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 802160507; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user. + */ + public static class UpdateChatReplyMarkup extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat. + */ + public long replyMarkupMessageId; + + /** + * The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user. + */ + public UpdateChatReplyMarkup() { + } + + /** + * The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user. + * + * @param chatId Chat identifier. + * @param replyMarkupMessageId Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat. + */ + public UpdateChatReplyMarkup(long chatId, long replyMarkupMessageId) { + this.chatId = chatId; + this.replyMarkupMessageId = replyMarkupMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1309386144; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied. + */ + public static class UpdateChatDraftMessage extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * The new draft message; may be null. + */ + public DraftMessage draftMessage; + /** + * The new chat positions in the chat lists. + */ + public ChatPosition[] positions; + + /** + * A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied. + */ + public UpdateChatDraftMessage() { + } + + /** + * A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn't be applied. + * + * @param chatId Chat identifier. + * @param draftMessage The new draft message; may be null. + * @param positions The new chat positions in the chat lists. + */ + public UpdateChatDraftMessage(long chatId, DraftMessage draftMessage, ChatPosition[] positions) { + this.chatId = chatId; + this.draftMessage = draftMessage; + this.positions = positions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1455190380; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of chat filters or a chat filter has changed. + */ + public static class UpdateChatFilters extends Update { + /** + * The new list of chat filters. + */ + public ChatFilterInfo[] chatFilters; + + /** + * The list of chat filters or a chat filter has changed. + */ + public UpdateChatFilters() { + } + + /** + * The list of chat filters or a chat filter has changed. + * + * @param chatFilters The new list of chat filters. + */ + public UpdateChatFilters(ChatFilterInfo[] chatFilters) { + this.chatFilters = chatFilters; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -961518713; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed. + */ + public static class UpdateChatOnlineMemberCount extends Update { + /** + * Identifier of the chat. + */ + public long chatId; + /** + * New number of online members in the chat, or 0 if unknown. + */ + public int onlineMemberCount; + + /** + * The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed. + */ + public UpdateChatOnlineMemberCount() { + } + + /** + * The number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed. + * + * @param chatId Identifier of the chat. + * @param onlineMemberCount New number of online members in the chat, or 0 if unknown. + */ + public UpdateChatOnlineMemberCount(long chatId, int onlineMemberCount) { + this.chatId = chatId; + this.onlineMemberCount = onlineMemberCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 487369373; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A notification was changed. + */ + public static class UpdateNotification extends Update { + /** + * Unique notification group identifier. + */ + public int notificationGroupId; + /** + * Changed notification. + */ + public Notification notification; + + /** + * A notification was changed. + */ + public UpdateNotification() { + } + + /** + * A notification was changed. + * + * @param notificationGroupId Unique notification group identifier. + * @param notification Changed notification. + */ + public UpdateNotification(int notificationGroupId, Notification notification) { + this.notificationGroupId = notificationGroupId; + this.notification = notification; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1897496876; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A list of active notifications in a notification group has changed. + */ + public static class UpdateNotificationGroup extends Update { + /** + * Unique notification group identifier. + */ + public int notificationGroupId; + /** + * New type of the notification group. + */ + public NotificationGroupType type; + /** + * Identifier of a chat to which all notifications in the group belong. + */ + public long chatId; + /** + * Chat identifier, which notification settings must be applied to the added notifications. + */ + public long notificationSettingsChatId; + /** + * True, if the notifications should be shown without sound. + */ + public boolean isSilent; + /** + * Total number of unread notifications in the group, can be bigger than number of active notifications. + */ + public int totalCount; + /** + * List of added group notifications, sorted by notification ID. + */ + public Notification[] addedNotifications; + /** + * Identifiers of removed group notifications, sorted by notification ID. + */ + public int[] removedNotificationIds; + + /** + * A list of active notifications in a notification group has changed. + */ + public UpdateNotificationGroup() { + } + + /** + * A list of active notifications in a notification group has changed. + * + * @param notificationGroupId Unique notification group identifier. + * @param type New type of the notification group. + * @param chatId Identifier of a chat to which all notifications in the group belong. + * @param notificationSettingsChatId Chat identifier, which notification settings must be applied to the added notifications. + * @param isSilent True, if the notifications should be shown without sound. + * @param totalCount Total number of unread notifications in the group, can be bigger than number of active notifications. + * @param addedNotifications List of added group notifications, sorted by notification ID. + * @param removedNotificationIds Identifiers of removed group notifications, sorted by notification ID. + */ + public UpdateNotificationGroup(int notificationGroupId, NotificationGroupType type, long chatId, long notificationSettingsChatId, boolean isSilent, int totalCount, Notification[] addedNotifications, int[] removedNotificationIds) { + this.notificationGroupId = notificationGroupId; + this.type = type; + this.chatId = chatId; + this.notificationSettingsChatId = notificationSettingsChatId; + this.isSilent = isSilent; + this.totalCount = totalCount; + this.addedNotifications = addedNotifications; + this.removedNotificationIds = removedNotificationIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2049005665; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update. + */ + public static class UpdateActiveNotifications extends Update { + /** + * Lists of active notification groups. + */ + public NotificationGroup[] groups; + + /** + * Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update. + */ + public UpdateActiveNotifications() { + } + + /** + * Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update. + * + * @param groups Lists of active notification groups. + */ + public UpdateActiveNotifications(NotificationGroup[] groups) { + this.groups = groups; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1306672221; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications. + */ + public static class UpdateHavePendingNotifications extends Update { + /** + * True, if there are some delayed notification updates, which will be sent soon. + */ + public boolean haveDelayedNotifications; + /** + * True, if there can be some yet unreceived notifications, which are being fetched from the server. + */ + public boolean haveUnreceivedNotifications; + + /** + * Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications. + */ + public UpdateHavePendingNotifications() { + } + + /** + * Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications. + * + * @param haveDelayedNotifications True, if there are some delayed notification updates, which will be sent soon. + * @param haveUnreceivedNotifications True, if there can be some yet unreceived notifications, which are being fetched from the server. + */ + public UpdateHavePendingNotifications(boolean haveDelayedNotifications, boolean haveUnreceivedNotifications) { + this.haveDelayedNotifications = haveDelayedNotifications; + this.haveUnreceivedNotifications = haveUnreceivedNotifications; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 179233243; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some messages were deleted. + */ + public static class UpdateDeleteMessages extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifiers of the deleted messages. + */ + public long[] messageIds; + /** + * True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible). + */ + public boolean isPermanent; + /** + * True, if the messages are deleted only from the cache and can possibly be retrieved again in the future. + */ + public boolean fromCache; + + /** + * Some messages were deleted. + */ + public UpdateDeleteMessages() { + } + + /** + * Some messages were deleted. + * + * @param chatId Chat identifier. + * @param messageIds Identifiers of the deleted messages. + * @param isPermanent True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible). + * @param fromCache True, if the messages are deleted only from the cache and can possibly be retrieved again in the future. + */ + public UpdateDeleteMessages(long chatId, long[] messageIds, boolean isPermanent, boolean fromCache) { + this.chatId = chatId; + this.messageIds = messageIds; + this.isPermanent = isPermanent; + this.fromCache = fromCache; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1669252686; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * User activity in the chat has changed. + */ + public static class UpdateUserChatAction extends Update { + /** + * Chat identifier. + */ + public long chatId; + /** + * If not 0, a message thread identifier in which the action was performed. + */ + public long messageThreadId; + /** + * Identifier of a user performing an action. + */ + public int userId; + /** + * The action description. + */ + public ChatAction action; + + /** + * User activity in the chat has changed. + */ + public UpdateUserChatAction() { + } + + /** + * User activity in the chat has changed. + * + * @param chatId Chat identifier. + * @param messageThreadId If not 0, a message thread identifier in which the action was performed. + * @param userId Identifier of a user performing an action. + * @param action The action description. + */ + public UpdateUserChatAction(long chatId, long messageThreadId, int userId, ChatAction action) { + this.chatId = chatId; + this.messageThreadId = messageThreadId; + this.userId = userId; + this.action = action; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2066409603; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user went online or offline. + */ + public static class UpdateUserStatus extends Update { + /** + * User identifier. + */ + public int userId; + /** + * New status of the user. + */ + public UserStatus status; + + /** + * The user went online or offline. + */ + public UpdateUserStatus() { + } + + /** + * The user went online or offline. + * + * @param userId User identifier. + * @param status New status of the user. + */ + public UpdateUserStatus(int userId, UserStatus status) { + this.userId = userId; + this.status = status; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1443545195; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application. + */ + public static class UpdateUser extends Update { + /** + * New data about the user. + */ + public User user; + + /** + * Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application. + */ + public UpdateUser() { + } + + /** + * Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application. + * + * @param user New data about the user. + */ + public UpdateUser(User user) { + this.user = user; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1183394041; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application. + */ + public static class UpdateBasicGroup extends Update { + /** + * New data about the group. + */ + public BasicGroup basicGroup; + + /** + * Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application. + */ + public UpdateBasicGroup() { + } + + /** + * Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application. + * + * @param basicGroup New data about the group. + */ + public UpdateBasicGroup(BasicGroup basicGroup) { + this.basicGroup = basicGroup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1003239581; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application. + */ + public static class UpdateSupergroup extends Update { + /** + * New data about the supergroup. + */ + public Supergroup supergroup; + + /** + * Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application. + */ + public UpdateSupergroup() { + } + + /** + * Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application. + * + * @param supergroup New data about the supergroup. + */ + public UpdateSupergroup(Supergroup supergroup) { + this.supergroup = supergroup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -76782300; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application. + */ + public static class UpdateSecretChat extends Update { + /** + * New data about the secret chat. + */ + public SecretChat secretChat; + + /** + * Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application. + */ + public UpdateSecretChat() { + } + + /** + * Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application. + * + * @param secretChat New data about the secret chat. + */ + public UpdateSecretChat(SecretChat secretChat) { + this.secretChat = secretChat; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1666903253; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some data from userFullInfo has been changed. + */ + public static class UpdateUserFullInfo extends Update { + /** + * User identifier. + */ + public int userId; + /** + * New full information about the user. + */ + public UserFullInfo userFullInfo; + + /** + * Some data from userFullInfo has been changed. + */ + public UpdateUserFullInfo() { + } + + /** + * Some data from userFullInfo has been changed. + * + * @param userId User identifier. + * @param userFullInfo New full information about the user. + */ + public UpdateUserFullInfo(int userId, UserFullInfo userFullInfo) { + this.userId = userId; + this.userFullInfo = userFullInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 222103874; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some data from basicGroupFullInfo has been changed. + */ + public static class UpdateBasicGroupFullInfo extends Update { + /** + * Identifier of a basic group. + */ + public int basicGroupId; + /** + * New full information about the group. + */ + public BasicGroupFullInfo basicGroupFullInfo; + + /** + * Some data from basicGroupFullInfo has been changed. + */ + public UpdateBasicGroupFullInfo() { + } + + /** + * Some data from basicGroupFullInfo has been changed. + * + * @param basicGroupId Identifier of a basic group. + * @param basicGroupFullInfo New full information about the group. + */ + public UpdateBasicGroupFullInfo(int basicGroupId, BasicGroupFullInfo basicGroupFullInfo) { + this.basicGroupId = basicGroupId; + this.basicGroupFullInfo = basicGroupFullInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 924030531; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some data from supergroupFullInfo has been changed. + */ + public static class UpdateSupergroupFullInfo extends Update { + /** + * Identifier of the supergroup or channel. + */ + public int supergroupId; + /** + * New full information about the supergroup. + */ + public SupergroupFullInfo supergroupFullInfo; + + /** + * Some data from supergroupFullInfo has been changed. + */ + public UpdateSupergroupFullInfo() { + } + + /** + * Some data from supergroupFullInfo has been changed. + * + * @param supergroupId Identifier of the supergroup or channel. + * @param supergroupFullInfo New full information about the supergroup. + */ + public UpdateSupergroupFullInfo(int supergroupId, SupergroupFullInfo supergroupFullInfo) { + this.supergroupId = supergroupId; + this.supergroupFullInfo = supergroupFullInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1288828758; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Service notification from the server. Upon receiving this the application must show a popup with the content of the notification. + */ + public static class UpdateServiceNotification extends Update { + /** + * Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method. + */ + public String type; + /** + * Notification content. + */ + public MessageContent content; + + /** + * Service notification from the server. Upon receiving this the application must show a popup with the content of the notification. + */ + public UpdateServiceNotification() { + } + + /** + * Service notification from the server. Upon receiving this the application must show a popup with the content of the notification. + * + * @param type Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method. + * @param content Notification content. + */ + public UpdateServiceNotification(String type, MessageContent content) { + this.type = type; + this.content = content; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1318622637; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Information about a file was updated. + */ + public static class UpdateFile extends Update { + /** + * New data about the file. + */ + public File file; + + /** + * Information about a file was updated. + */ + public UpdateFile() { + } + + /** + * Information about a file was updated. + * + * @param file New data about the file. + */ + public UpdateFile(File file) { + this.file = file; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 114132831; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The file generation process needs to be started by the application. + */ + public static class UpdateFileGenerationStart extends Update { + /** + * Unique identifier for the generation process. + */ + public long generationId; + /** + * The path to a file from which a new file is generated; may be empty. + */ + public String originalPath; + /** + * The path to a file that should be created and where the new file should be generated. + */ + public String destinationPath; + /** + * String specifying the conversion applied to the original file. If conversion is "#url#" than originalPath contains an HTTP/HTTPS URL of a file, which should be downloaded by the application. + */ + public String conversion; + + /** + * The file generation process needs to be started by the application. + */ + public UpdateFileGenerationStart() { + } + + /** + * The file generation process needs to be started by the application. + * + * @param generationId Unique identifier for the generation process. + * @param originalPath The path to a file from which a new file is generated; may be empty. + * @param destinationPath The path to a file that should be created and where the new file should be generated. + * @param conversion String specifying the conversion applied to the original file. If conversion is "#url#" than originalPath contains an HTTP/HTTPS URL of a file, which should be downloaded by the application. + */ + public UpdateFileGenerationStart(long generationId, String originalPath, String destinationPath, String conversion) { + this.generationId = generationId; + this.originalPath = originalPath; + this.destinationPath = destinationPath; + this.conversion = conversion; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 216817388; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * File generation is no longer needed. + */ + public static class UpdateFileGenerationStop extends Update { + /** + * Unique identifier for the generation process. + */ + public long generationId; + + /** + * File generation is no longer needed. + */ + public UpdateFileGenerationStop() { + } + + /** + * File generation is no longer needed. + * + * @param generationId Unique identifier for the generation process. + */ + public UpdateFileGenerationStop(long generationId) { + this.generationId = generationId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1894449685; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * New call was created or information about a call was updated. + */ + public static class UpdateCall extends Update { + /** + * New data about a call. + */ + public Call call; + + /** + * New call was created or information about a call was updated. + */ + public UpdateCall() { + } + + /** + * New call was created or information about a call was updated. + * + * @param call New data about a call. + */ + public UpdateCall(Call call) { + this.call = call; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1337184477; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * New call signaling data arrived. + */ + public static class UpdateNewCallSignalingData extends Update { + /** + * The call identifier. + */ + public int callId; + /** + * The data. + */ + public byte[] data; + + /** + * New call signaling data arrived. + */ + public UpdateNewCallSignalingData() { + } + + /** + * New call signaling data arrived. + * + * @param callId The call identifier. + * @param data The data. + */ + public UpdateNewCallSignalingData(int callId, byte[] data) { + this.callId = callId; + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 583634317; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some privacy setting rules have been changed. + */ + public static class UpdateUserPrivacySettingRules extends Update { + /** + * The privacy setting. + */ + public UserPrivacySetting setting; + /** + * New privacy rules. + */ + public UserPrivacySettingRules rules; + + /** + * Some privacy setting rules have been changed. + */ + public UpdateUserPrivacySettingRules() { + } + + /** + * Some privacy setting rules have been changed. + * + * @param setting The privacy setting. + * @param rules New privacy rules. + */ + public UpdateUserPrivacySettingRules(UserPrivacySetting setting, UserPrivacySettingRules rules) { + this.setting = setting; + this.rules = rules; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -912960778; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Number of unread messages in a chat list has changed. This update is sent only if the message database is used. + */ + public static class UpdateUnreadMessageCount extends Update { + /** + * The chat list with changed number of unread messages. + */ + public ChatList chatList; + /** + * Total number of unread messages. + */ + public int unreadCount; + /** + * Total number of unread messages in unmuted chats. + */ + public int unreadUnmutedCount; + + /** + * Number of unread messages in a chat list has changed. This update is sent only if the message database is used. + */ + public UpdateUnreadMessageCount() { + } + + /** + * Number of unread messages in a chat list has changed. This update is sent only if the message database is used. + * + * @param chatList The chat list with changed number of unread messages. + * @param unreadCount Total number of unread messages. + * @param unreadUnmutedCount Total number of unread messages in unmuted chats. + */ + public UpdateUnreadMessageCount(ChatList chatList, int unreadCount, int unreadUnmutedCount) { + this.chatList = chatList; + this.unreadCount = unreadCount; + this.unreadUnmutedCount = unreadUnmutedCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 78987721; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used. + */ + public static class UpdateUnreadChatCount extends Update { + /** + * The chat list with changed number of unread messages. + */ + public ChatList chatList; + /** + * Approximate total number of chats in the chat list. + */ + public int totalCount; + /** + * Total number of unread chats. + */ + public int unreadCount; + /** + * Total number of unread unmuted chats. + */ + public int unreadUnmutedCount; + /** + * Total number of chats marked as unread. + */ + public int markedAsUnreadCount; + /** + * Total number of unmuted chats marked as unread. + */ + public int markedAsUnreadUnmutedCount; + + /** + * Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used. + */ + public UpdateUnreadChatCount() { + } + + /** + * Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used. + * + * @param chatList The chat list with changed number of unread messages. + * @param totalCount Approximate total number of chats in the chat list. + * @param unreadCount Total number of unread chats. + * @param unreadUnmutedCount Total number of unread unmuted chats. + * @param markedAsUnreadCount Total number of chats marked as unread. + * @param markedAsUnreadUnmutedCount Total number of unmuted chats marked as unread. + */ + public UpdateUnreadChatCount(ChatList chatList, int totalCount, int unreadCount, int unreadUnmutedCount, int markedAsUnreadCount, int markedAsUnreadUnmutedCount) { + this.chatList = chatList; + this.totalCount = totalCount; + this.unreadCount = unreadCount; + this.unreadUnmutedCount = unreadUnmutedCount; + this.markedAsUnreadCount = markedAsUnreadCount; + this.markedAsUnreadUnmutedCount = markedAsUnreadUnmutedCount; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1994494530; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * An option changed its value. + */ + public static class UpdateOption extends Update { + /** + * The option name. + */ + public String name; + /** + * The new option value. + */ + public OptionValue value; + + /** + * An option changed its value. + */ + public UpdateOption() { + } + + /** + * An option changed its value. + * + * @param name The option name. + * @param value The new option value. + */ + public UpdateOption(String name, OptionValue value) { + this.name = name; + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 900822020; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A sticker set has changed. + */ + public static class UpdateStickerSet extends Update { + /** + * The sticker set. + */ + public StickerSet stickerSet; + + /** + * A sticker set has changed. + */ + public UpdateStickerSet() { + } + + /** + * A sticker set has changed. + * + * @param stickerSet The sticker set. + */ + public UpdateStickerSet(StickerSet stickerSet) { + this.stickerSet = stickerSet; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1879268812; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of installed sticker sets was updated. + */ + public static class UpdateInstalledStickerSets extends Update { + /** + * True, if the list of installed mask sticker sets was updated. + */ + public boolean isMasks; + /** + * The new list of installed ordinary sticker sets. + */ + public long[] stickerSetIds; + + /** + * The list of installed sticker sets was updated. + */ + public UpdateInstalledStickerSets() { + } + + /** + * The list of installed sticker sets was updated. + * + * @param isMasks True, if the list of installed mask sticker sets was updated. + * @param stickerSetIds The new list of installed ordinary sticker sets. + */ + public UpdateInstalledStickerSets(boolean isMasks, long[] stickerSetIds) { + this.isMasks = isMasks; + this.stickerSetIds = stickerSetIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1125575977; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of trending sticker sets was updated or some of them were viewed. + */ + public static class UpdateTrendingStickerSets extends Update { + /** + * The prefix of the list of trending sticker sets with the newest trending sticker sets. + */ + public StickerSets stickerSets; + + /** + * The list of trending sticker sets was updated or some of them were viewed. + */ + public UpdateTrendingStickerSets() { + } + + /** + * The list of trending sticker sets was updated or some of them were viewed. + * + * @param stickerSets The prefix of the list of trending sticker sets with the newest trending sticker sets. + */ + public UpdateTrendingStickerSets(StickerSets stickerSets) { + this.stickerSets = stickerSets; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 450714593; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of recently used stickers was updated. + */ + public static class UpdateRecentStickers extends Update { + /** + * True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated. + */ + public boolean isAttached; + /** + * The new list of file identifiers of recently used stickers. + */ + public int[] stickerIds; + + /** + * The list of recently used stickers was updated. + */ + public UpdateRecentStickers() { + } + + /** + * The list of recently used stickers was updated. + * + * @param isAttached True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated. + * @param stickerIds The new list of file identifiers of recently used stickers. + */ + public UpdateRecentStickers(boolean isAttached, int[] stickerIds) { + this.isAttached = isAttached; + this.stickerIds = stickerIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1906403540; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of favorite stickers was updated. + */ + public static class UpdateFavoriteStickers extends Update { + /** + * The new list of file identifiers of favorite stickers. + */ + public int[] stickerIds; + + /** + * The list of favorite stickers was updated. + */ + public UpdateFavoriteStickers() { + } + + /** + * The list of favorite stickers was updated. + * + * @param stickerIds The new list of file identifiers of favorite stickers. + */ + public UpdateFavoriteStickers(int[] stickerIds) { + this.stickerIds = stickerIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1662240999; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of saved animations was updated. + */ + public static class UpdateSavedAnimations extends Update { + /** + * The new list of file identifiers of saved animations. + */ + public int[] animationIds; + + /** + * The list of saved animations was updated. + */ + public UpdateSavedAnimations() { + } + + /** + * The list of saved animations was updated. + * + * @param animationIds The new list of file identifiers of saved animations. + */ + public UpdateSavedAnimations(int[] animationIds) { + this.animationIds = animationIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 65563814; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The selected background has changed. + */ + public static class UpdateSelectedBackground extends Update { + /** + * True, if background for dark theme has changed. + */ + public boolean forDarkTheme; + /** + * The new selected background; may be null. + */ + public Background background; + + /** + * The selected background has changed. + */ + public UpdateSelectedBackground() { + } + + /** + * The selected background has changed. + * + * @param forDarkTheme True, if background for dark theme has changed. + * @param background The new selected background; may be null. + */ + public UpdateSelectedBackground(boolean forDarkTheme, Background background) { + this.forDarkTheme = forDarkTheme; + this.background = background; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1715658659; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Some language pack strings have been updated. + */ + public static class UpdateLanguagePackStrings extends Update { + /** + * Localization target to which the language pack belongs. + */ + public String localizationTarget; + /** + * Identifier of the updated language pack. + */ + public String languagePackId; + /** + * List of changed language pack strings. + */ + public LanguagePackString[] strings; + + /** + * Some language pack strings have been updated. + */ + public UpdateLanguagePackStrings() { + } + + /** + * Some language pack strings have been updated. + * + * @param localizationTarget Localization target to which the language pack belongs. + * @param languagePackId Identifier of the updated language pack. + * @param strings List of changed language pack strings. + */ + public UpdateLanguagePackStrings(String localizationTarget, String languagePackId, LanguagePackString[] strings) { + this.localizationTarget = localizationTarget; + this.languagePackId = languagePackId; + this.strings = strings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1056319886; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The connection state has changed. This update must be used only to show the user a human-readable description of the connection state. + */ + public static class UpdateConnectionState extends Update { + /** + * The new connection state. + */ + public ConnectionState state; + + /** + * The connection state has changed. This update must be used only to show the user a human-readable description of the connection state. + */ + public UpdateConnectionState() { + } + + /** + * The connection state has changed. This update must be used only to show the user a human-readable description of the connection state. + * + * @param state The new connection state. + */ + public UpdateConnectionState(ConnectionState state) { + this.state = state; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1469292078; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update". + */ + public static class UpdateTermsOfService extends Update { + /** + * Identifier of the terms of service. + */ + public String termsOfServiceId; + /** + * The new terms of service. + */ + public TermsOfService termsOfService; + + /** + * New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update". + */ + public UpdateTermsOfService() { + } + + /** + * New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update". + * + * @param termsOfServiceId Identifier of the terms of service. + * @param termsOfService The new terms of service. + */ + public UpdateTermsOfService(String termsOfServiceId, TermsOfService termsOfService) { + this.termsOfServiceId = termsOfServiceId; + this.termsOfService = termsOfService; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1304640162; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request. + */ + public static class UpdateUsersNearby extends Update { + /** + * The new list of users nearby. + */ + public ChatNearby[] usersNearby; + + /** + * The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request. + */ + public UpdateUsersNearby() { + } + + /** + * The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request. + * + * @param usersNearby The new list of users nearby. + */ + public UpdateUsersNearby(ChatNearby[] usersNearby) { + this.usersNearby = usersNearby; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1517109163; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of supported dice emojis has changed. + */ + public static class UpdateDiceEmojis extends Update { + /** + * The new list of supported dice emojis. + */ + public String[] emojis; + + /** + * The list of supported dice emojis has changed. + */ + public UpdateDiceEmojis() { + } + + /** + * The list of supported dice emojis has changed. + * + * @param emojis The new list of supported dice emojis. + */ + public UpdateDiceEmojis(String[] emojis) { + this.emojis = emojis; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1069066940; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The parameters of animation search through GetOption("animation_search_bot_username") bot has changed. + */ + public static class UpdateAnimationSearchParameters extends Update { + /** + * Name of the animation search provider. + */ + public String provider; + /** + * The new list of emojis suggested for searching. + */ + public String[] emojis; + + /** + * The parameters of animation search through GetOption("animation_search_bot_username") bot has changed. + */ + public UpdateAnimationSearchParameters() { + } + + /** + * The parameters of animation search through GetOption("animation_search_bot_username") bot has changed. + * + * @param provider Name of the animation search provider. + * @param emojis The new list of emojis suggested for searching. + */ + public UpdateAnimationSearchParameters(String provider, String[] emojis) { + this.provider = provider; + this.emojis = emojis; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1144983202; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The list of suggested to the user actions has changed. + */ + public static class UpdateSuggestedActions extends Update { + /** + * Added suggested actions. + */ + public SuggestedAction[] addedActions; + /** + * Removed suggested actions. + */ + public SuggestedAction[] removedActions; + + /** + * The list of suggested to the user actions has changed. + */ + public UpdateSuggestedActions() { + } + + /** + * The list of suggested to the user actions has changed. + * + * @param addedActions Added suggested actions. + * @param removedActions Removed suggested actions. + */ + public UpdateSuggestedActions(SuggestedAction[] addedActions, SuggestedAction[] removedActions) { + this.addedActions = addedActions; + this.removedActions = removedActions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1459452346; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new incoming inline query; for bots only. + */ + public static class UpdateNewInlineQuery extends Update { + /** + * Unique query identifier. + */ + public long id; + /** + * Identifier of the user who sent the query. + */ + public int senderUserId; + /** + * User location; may be null. + */ + public Location userLocation; + /** + * Text of the query. + */ + public String query; + /** + * Offset of the first entry to return. + */ + public String offset; + + /** + * A new incoming inline query; for bots only. + */ + public UpdateNewInlineQuery() { + } + + /** + * A new incoming inline query; for bots only. + * + * @param id Unique query identifier. + * @param senderUserId Identifier of the user who sent the query. + * @param userLocation User location; may be null. + * @param query Text of the query. + * @param offset Offset of the first entry to return. + */ + public UpdateNewInlineQuery(long id, int senderUserId, Location userLocation, String query, String offset) { + this.id = id; + this.senderUserId = senderUserId; + this.userLocation = userLocation; + this.query = query; + this.offset = offset; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2064730634; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user has chosen a result of an inline query; for bots only. + */ + public static class UpdateNewChosenInlineResult extends Update { + /** + * Identifier of the user who sent the query. + */ + public int senderUserId; + /** + * User location; may be null. + */ + public Location userLocation; + /** + * Text of the query. + */ + public String query; + /** + * Identifier of the chosen result. + */ + public String resultId; + /** + * Identifier of the sent inline message, if known. + */ + public String inlineMessageId; + + /** + * The user has chosen a result of an inline query; for bots only. + */ + public UpdateNewChosenInlineResult() { + } + + /** + * The user has chosen a result of an inline query; for bots only. + * + * @param senderUserId Identifier of the user who sent the query. + * @param userLocation User location; may be null. + * @param query Text of the query. + * @param resultId Identifier of the chosen result. + * @param inlineMessageId Identifier of the sent inline message, if known. + */ + public UpdateNewChosenInlineResult(int senderUserId, Location userLocation, String query, String resultId, String inlineMessageId) { + this.senderUserId = senderUserId; + this.userLocation = userLocation; + this.query = query; + this.resultId = resultId; + this.inlineMessageId = inlineMessageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 527526965; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new incoming callback query; for bots only. + */ + public static class UpdateNewCallbackQuery extends Update { + /** + * Unique query identifier. + */ + public long id; + /** + * Identifier of the user who sent the query. + */ + public int senderUserId; + /** + * Identifier of the chat where the query was sent. + */ + public long chatId; + /** + * Identifier of the message, from which the query originated. + */ + public long messageId; + /** + * Identifier that uniquely corresponds to the chat to which the message was sent. + */ + public long chatInstance; + /** + * Query payload. + */ + public CallbackQueryPayload payload; + + /** + * A new incoming callback query; for bots only. + */ + public UpdateNewCallbackQuery() { + } + + /** + * A new incoming callback query; for bots only. + * + * @param id Unique query identifier. + * @param senderUserId Identifier of the user who sent the query. + * @param chatId Identifier of the chat where the query was sent. + * @param messageId Identifier of the message, from which the query originated. + * @param chatInstance Identifier that uniquely corresponds to the chat to which the message was sent. + * @param payload Query payload. + */ + public UpdateNewCallbackQuery(long id, int senderUserId, long chatId, long messageId, long chatInstance, CallbackQueryPayload payload) { + this.id = id; + this.senderUserId = senderUserId; + this.chatId = chatId; + this.messageId = messageId; + this.chatInstance = chatInstance; + this.payload = payload; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2044226370; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new incoming callback query from a message sent via a bot; for bots only. + */ + public static class UpdateNewInlineCallbackQuery extends Update { + /** + * Unique query identifier. + */ + public long id; + /** + * Identifier of the user who sent the query. + */ + public int senderUserId; + /** + * Identifier of the inline message, from which the query originated. + */ + public String inlineMessageId; + /** + * An identifier uniquely corresponding to the chat a message was sent to. + */ + public long chatInstance; + /** + * Query payload. + */ + public CallbackQueryPayload payload; + + /** + * A new incoming callback query from a message sent via a bot; for bots only. + */ + public UpdateNewInlineCallbackQuery() { + } + + /** + * A new incoming callback query from a message sent via a bot; for bots only. + * + * @param id Unique query identifier. + * @param senderUserId Identifier of the user who sent the query. + * @param inlineMessageId Identifier of the inline message, from which the query originated. + * @param chatInstance An identifier uniquely corresponding to the chat a message was sent to. + * @param payload Query payload. + */ + public UpdateNewInlineCallbackQuery(long id, int senderUserId, String inlineMessageId, long chatInstance, CallbackQueryPayload payload) { + this.id = id; + this.senderUserId = senderUserId; + this.inlineMessageId = inlineMessageId; + this.chatInstance = chatInstance; + this.payload = payload; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1879154829; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new incoming shipping query; for bots only. Only for invoices with flexible price. + */ + public static class UpdateNewShippingQuery extends Update { + /** + * Unique query identifier. + */ + public long id; + /** + * Identifier of the user who sent the query. + */ + public int senderUserId; + /** + * Invoice payload. + */ + public String invoicePayload; + /** + * User shipping address. + */ + public Address shippingAddress; + + /** + * A new incoming shipping query; for bots only. Only for invoices with flexible price. + */ + public UpdateNewShippingQuery() { + } + + /** + * A new incoming shipping query; for bots only. Only for invoices with flexible price. + * + * @param id Unique query identifier. + * @param senderUserId Identifier of the user who sent the query. + * @param invoicePayload Invoice payload. + * @param shippingAddress User shipping address. + */ + public UpdateNewShippingQuery(long id, int senderUserId, String invoicePayload, Address shippingAddress) { + this.id = id; + this.senderUserId = senderUserId; + this.invoicePayload = invoicePayload; + this.shippingAddress = shippingAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -817474682; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new incoming pre-checkout query; for bots only. Contains full information about a checkout. + */ + public static class UpdateNewPreCheckoutQuery extends Update { + /** + * Unique query identifier. + */ + public long id; + /** + * Identifier of the user who sent the query. + */ + public int senderUserId; + /** + * Currency for the product price. + */ + public String currency; + /** + * Total price for the product, in the minimal quantity of the currency. + */ + public long totalAmount; + /** + * Invoice payload. + */ + public byte[] invoicePayload; + /** + * Identifier of a shipping option chosen by the user; may be empty if not applicable. + */ + public String shippingOptionId; + /** + * Information about the order; may be null. + */ + public OrderInfo orderInfo; + + /** + * A new incoming pre-checkout query; for bots only. Contains full information about a checkout. + */ + public UpdateNewPreCheckoutQuery() { + } + + /** + * A new incoming pre-checkout query; for bots only. Contains full information about a checkout. + * + * @param id Unique query identifier. + * @param senderUserId Identifier of the user who sent the query. + * @param currency Currency for the product price. + * @param totalAmount Total price for the product, in the minimal quantity of the currency. + * @param invoicePayload Invoice payload. + * @param shippingOptionId Identifier of a shipping option chosen by the user; may be empty if not applicable. + * @param orderInfo Information about the order; may be null. + */ + public UpdateNewPreCheckoutQuery(long id, int senderUserId, String currency, long totalAmount, byte[] invoicePayload, String shippingOptionId, OrderInfo orderInfo) { + this.id = id; + this.senderUserId = senderUserId; + this.currency = currency; + this.totalAmount = totalAmount; + this.invoicePayload = invoicePayload; + this.shippingOptionId = shippingOptionId; + this.orderInfo = orderInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 87964006; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new incoming event; for bots only. + */ + public static class UpdateNewCustomEvent extends Update { + /** + * A JSON-serialized event. + */ + public String event; + + /** + * A new incoming event; for bots only. + */ + public UpdateNewCustomEvent() { + } + + /** + * A new incoming event; for bots only. + * + * @param event A JSON-serialized event. + */ + public UpdateNewCustomEvent(String event) { + this.event = event; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1994222092; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A new incoming query; for bots only. + */ + public static class UpdateNewCustomQuery extends Update { + /** + * The query identifier. + */ + public long id; + /** + * JSON-serialized query data. + */ + public String data; + /** + * Query timeout. + */ + public int timeout; + + /** + * A new incoming query; for bots only. + */ + public UpdateNewCustomQuery() { + } + + /** + * A new incoming query; for bots only. + * + * @param id The query identifier. + * @param data JSON-serialized query data. + * @param timeout Query timeout. + */ + public UpdateNewCustomQuery(long id, String data, int timeout) { + this.id = id; + this.data = data; + this.timeout = timeout; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -687670874; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A poll was updated; for bots only. + */ + public static class UpdatePoll extends Update { + /** + * New data about the poll. + */ + public Poll poll; + + /** + * A poll was updated; for bots only. + */ + public UpdatePoll() { + } + + /** + * A poll was updated; for bots only. + * + * @param poll New data about the poll. + */ + public UpdatePoll(Poll poll) { + this.poll = poll; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1771342902; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A user changed the answer to a poll; for bots only. + */ + public static class UpdatePollAnswer extends Update { + /** + * Unique poll identifier. + */ + public long pollId; + /** + * The user, who changed the answer to the poll. + */ + public int userId; + /** + * 0-based identifiers of answer options, chosen by the user. + */ + public int[] optionIds; + + /** + * A user changed the answer to a poll; for bots only. + */ + public UpdatePollAnswer() { + } + + /** + * A user changed the answer to a poll; for bots only. + * + * @param pollId Unique poll identifier. + * @param userId The user, who changed the answer to the poll. + * @param optionIds 0-based identifiers of answer options, chosen by the user. + */ + public UpdatePollAnswer(long pollId, int userId, int[] optionIds) { + this.pollId = pollId; + this.userId = userId; + this.optionIds = optionIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1606139344; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a list of updates. + */ + public static class Updates extends Object { + /** + * List of updates. + */ + public Update[] updates; + + /** + * Contains a list of updates. + */ + public Updates() { + } + + /** + * Contains a list of updates. + * + * @param updates List of updates. + */ + public Updates(Update[] updates) { + this.updates = updates; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 475842347; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a user. + */ + public static class User extends Object { + /** + * User identifier. + */ + public int id; + /** + * First name of the user. + */ + public String firstName; + /** + * Last name of the user. + */ + public String lastName; + /** + * Username of the user. + */ + public String username; + /** + * Phone number of the user. + */ + public String phoneNumber; + /** + * Current online status of the user. + */ + public UserStatus status; + /** + * Profile photo of the user; may be null. + */ + public ProfilePhoto profilePhoto; + /** + * The user is a contact of the current user. + */ + public boolean isContact; + /** + * The user is a contact of the current user and the current user is a contact of the user. + */ + public boolean isMutualContact; + /** + * True, if the user is verified. + */ + public boolean isVerified; + /** + * True, if the user is Telegram support account. + */ + public boolean isSupport; + /** + * If non-empty, it contains a human-readable description of the reason why access to this user must be restricted. + */ + public String restrictionReason; + /** + * True, if many users reported this user as a scam. + */ + public boolean isScam; + /** + * If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser. + */ + public boolean haveAccess; + /** + * Type of the user. + */ + public UserType type; + /** + * IETF language tag of the user's language; only available to bots. + */ + public String languageCode; + + /** + * Represents a user. + */ + public User() { + } + + /** + * Represents a user. + * + * @param id User identifier. + * @param firstName First name of the user. + * @param lastName Last name of the user. + * @param username Username of the user. + * @param phoneNumber Phone number of the user. + * @param status Current online status of the user. + * @param profilePhoto Profile photo of the user; may be null. + * @param isContact The user is a contact of the current user. + * @param isMutualContact The user is a contact of the current user and the current user is a contact of the user. + * @param isVerified True, if the user is verified. + * @param isSupport True, if the user is Telegram support account. + * @param restrictionReason If non-empty, it contains a human-readable description of the reason why access to this user must be restricted. + * @param isScam True, if many users reported this user as a scam. + * @param haveAccess If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser. + * @param type Type of the user. + * @param languageCode IETF language tag of the user's language; only available to bots. + */ + public User(int id, String firstName, String lastName, String username, String phoneNumber, UserStatus status, ProfilePhoto profilePhoto, boolean isContact, boolean isMutualContact, boolean isVerified, boolean isSupport, String restrictionReason, boolean isScam, boolean haveAccess, UserType type, String languageCode) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + this.username = username; + this.phoneNumber = phoneNumber; + this.status = status; + this.profilePhoto = profilePhoto; + this.isContact = isContact; + this.isMutualContact = isMutualContact; + this.isVerified = isVerified; + this.isSupport = isSupport; + this.restrictionReason = restrictionReason; + this.isScam = isScam; + this.haveAccess = haveAccess; + this.type = type; + this.languageCode = languageCode; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -824771497; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains full information about a user. + */ + public static class UserFullInfo extends Object { + /** + * User profile photo; may be null. + */ + public ChatPhoto photo; + /** + * True, if the user can be called. + */ + public boolean canBeCalled; + /** + * True, if a video call can be created with the user. + */ + public boolean supportsVideoCalls; + /** + * True, if the user can't be called due to their privacy settings. + */ + public boolean hasPrivateCalls; + /** + * True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used. + */ + public boolean needPhoneNumberPrivacyException; + /** + * A short user bio. + */ + public String bio; + /** + * For bots, the text that is included with the link when users share the bot. + */ + public String shareText; + /** + * Number of group chats where both the other user and the current user are a member; 0 for the current user. + */ + public int groupInCommonCount; + /** + * If the user is a bot, information about the bot; may be null. + */ + public BotInfo botInfo; + + /** + * Contains full information about a user. + */ + public UserFullInfo() { + } + + /** + * Contains full information about a user. + * + * @param photo User profile photo; may be null. + * @param canBeCalled True, if the user can be called. + * @param supportsVideoCalls True, if a video call can be created with the user. + * @param hasPrivateCalls True, if the user can't be called due to their privacy settings. + * @param needPhoneNumberPrivacyException True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used. + * @param bio A short user bio. + * @param shareText For bots, the text that is included with the link when users share the bot. + * @param groupInCommonCount Number of group chats where both the other user and the current user are a member; 0 for the current user. + * @param botInfo If the user is a bot, information about the bot; may be null. + */ + public UserFullInfo(ChatPhoto photo, boolean canBeCalled, boolean supportsVideoCalls, boolean hasPrivateCalls, boolean needPhoneNumberPrivacyException, String bio, String shareText, int groupInCommonCount, BotInfo botInfo) { + this.photo = photo; + this.canBeCalled = canBeCalled; + this.supportsVideoCalls = supportsVideoCalls; + this.hasPrivateCalls = hasPrivateCalls; + this.needPhoneNumberPrivacyException = needPhoneNumberPrivacyException; + this.bio = bio; + this.shareText = shareText; + this.groupInCommonCount = groupInCommonCount; + this.botInfo = botInfo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1067749716; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes available user privacy settings. + */ + public abstract static class UserPrivacySetting extends Object { + } + + /** + * A privacy setting for managing whether the user's online status is visible. + */ + public static class UserPrivacySettingShowStatus extends UserPrivacySetting { + + /** + * A privacy setting for managing whether the user's online status is visible. + */ + public UserPrivacySettingShowStatus() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1862829310; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A privacy setting for managing whether the user's profile photo is visible. + */ + public static class UserPrivacySettingShowProfilePhoto extends UserPrivacySetting { + + /** + * A privacy setting for managing whether the user's profile photo is visible. + */ + public UserPrivacySettingShowProfilePhoto() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1408485877; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A privacy setting for managing whether a link to the user's account is included in forwarded messages. + */ + public static class UserPrivacySettingShowLinkInForwardedMessages extends UserPrivacySetting { + + /** + * A privacy setting for managing whether a link to the user's account is included in forwarded messages. + */ + public UserPrivacySettingShowLinkInForwardedMessages() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 592688870; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A privacy setting for managing whether the user's phone number is visible. + */ + public static class UserPrivacySettingShowPhoneNumber extends UserPrivacySetting { + + /** + * A privacy setting for managing whether the user's phone number is visible. + */ + public UserPrivacySettingShowPhoneNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -791567831; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A privacy setting for managing whether the user can be invited to chats. + */ + public static class UserPrivacySettingAllowChatInvites extends UserPrivacySetting { + + /** + * A privacy setting for managing whether the user can be invited to chats. + */ + public UserPrivacySettingAllowChatInvites() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1271668007; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A privacy setting for managing whether the user can be called. + */ + public static class UserPrivacySettingAllowCalls extends UserPrivacySetting { + + /** + * A privacy setting for managing whether the user can be called. + */ + public UserPrivacySettingAllowCalls() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -906967291; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A privacy setting for managing whether peer-to-peer connections can be used for calls. + */ + public static class UserPrivacySettingAllowPeerToPeerCalls extends UserPrivacySetting { + + /** + * A privacy setting for managing whether peer-to-peer connections can be used for calls. + */ + public UserPrivacySettingAllowPeerToPeerCalls() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 352500032; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all". + */ + public static class UserPrivacySettingAllowFindingByPhoneNumber extends UserPrivacySetting { + + /** + * A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all". + */ + public UserPrivacySettingAllowFindingByPhoneNumber() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1846645423; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents a single rule for managing privacy settings. + */ + public abstract static class UserPrivacySettingRule extends Object { + } + + /** + * A rule to allow all users to do something. + */ + public static class UserPrivacySettingRuleAllowAll extends UserPrivacySettingRule { + + /** + * A rule to allow all users to do something. + */ + public UserPrivacySettingRuleAllowAll() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1967186881; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rule to allow all of a user's contacts to do something. + */ + public static class UserPrivacySettingRuleAllowContacts extends UserPrivacySettingRule { + + /** + * A rule to allow all of a user's contacts to do something. + */ + public UserPrivacySettingRuleAllowContacts() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1892733680; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rule to allow certain specified users to do something. + */ + public static class UserPrivacySettingRuleAllowUsers extends UserPrivacySettingRule { + /** + * The user identifiers, total number of users in all rules must not exceed 1000. + */ + public int[] userIds; + + /** + * A rule to allow certain specified users to do something. + */ + public UserPrivacySettingRuleAllowUsers() { + } + + /** + * A rule to allow certain specified users to do something. + * + * @param userIds The user identifiers, total number of users in all rules must not exceed 1000. + */ + public UserPrivacySettingRuleAllowUsers(int[] userIds) { + this.userIds = userIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 427601278; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rule to allow all members of certain specified basic groups and supergroups to doing something. + */ + public static class UserPrivacySettingRuleAllowChatMembers extends UserPrivacySettingRule { + /** + * The chat identifiers, total number of chats in all rules must not exceed 20. + */ + public long[] chatIds; + + /** + * A rule to allow all members of certain specified basic groups and supergroups to doing something. + */ + public UserPrivacySettingRuleAllowChatMembers() { + } + + /** + * A rule to allow all members of certain specified basic groups and supergroups to doing something. + * + * @param chatIds The chat identifiers, total number of chats in all rules must not exceed 20. + */ + public UserPrivacySettingRuleAllowChatMembers(long[] chatIds) { + this.chatIds = chatIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2048749863; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rule to restrict all users from doing something. + */ + public static class UserPrivacySettingRuleRestrictAll extends UserPrivacySettingRule { + + /** + * A rule to restrict all users from doing something. + */ + public UserPrivacySettingRuleRestrictAll() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1406495408; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rule to restrict all contacts of a user from doing something. + */ + public static class UserPrivacySettingRuleRestrictContacts extends UserPrivacySettingRule { + + /** + * A rule to restrict all contacts of a user from doing something. + */ + public UserPrivacySettingRuleRestrictContacts() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1008389378; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rule to restrict all specified users from doing something. + */ + public static class UserPrivacySettingRuleRestrictUsers extends UserPrivacySettingRule { + /** + * The user identifiers, total number of users in all rules must not exceed 1000. + */ + public int[] userIds; + + /** + * A rule to restrict all specified users from doing something. + */ + public UserPrivacySettingRuleRestrictUsers() { + } + + /** + * A rule to restrict all specified users from doing something. + * + * @param userIds The user identifiers, total number of users in all rules must not exceed 1000. + */ + public UserPrivacySettingRuleRestrictUsers(int[] userIds) { + this.userIds = userIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2119951802; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A rule to restrict all members of specified basic groups and supergroups from doing something. + */ + public static class UserPrivacySettingRuleRestrictChatMembers extends UserPrivacySettingRule { + /** + * The chat identifiers, total number of chats in all rules must not exceed 20. + */ + public long[] chatIds; + + /** + * A rule to restrict all members of specified basic groups and supergroups from doing something. + */ + public UserPrivacySettingRuleRestrictChatMembers() { + } + + /** + * A rule to restrict all members of specified basic groups and supergroups from doing something. + * + * @param chatIds The chat identifiers, total number of chats in all rules must not exceed 20. + */ + public UserPrivacySettingRuleRestrictChatMembers(long[] chatIds) { + this.chatIds = chatIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 392530897; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed. + */ + public static class UserPrivacySettingRules extends Object { + /** + * A list of rules. + */ + public UserPrivacySettingRule[] rules; + + /** + * A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed. + */ + public UserPrivacySettingRules() { + } + + /** + * A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed. + * + * @param rules A list of rules. + */ + public UserPrivacySettingRules(UserPrivacySettingRule[] rules) { + this.rules = rules; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 322477541; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Describes the last time the user was online. + */ + public abstract static class UserStatus extends Object { + } + + /** + * The user status was never changed. + */ + public static class UserStatusEmpty extends UserStatus { + + /** + * The user status was never changed. + */ + public UserStatusEmpty() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 164646985; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is online. + */ + public static class UserStatusOnline extends UserStatus { + /** + * Point in time (Unix timestamp) when the user's online status will expire. + */ + public int expires; + + /** + * The user is online. + */ + public UserStatusOnline() { + } + + /** + * The user is online. + * + * @param expires Point in time (Unix timestamp) when the user's online status will expire. + */ + public UserStatusOnline(int expires) { + this.expires = expires; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1529460876; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is offline. + */ + public static class UserStatusOffline extends UserStatus { + /** + * Point in time (Unix timestamp) when the user was last online. + */ + public int wasOnline; + + /** + * The user is offline. + */ + public UserStatusOffline() { + } + + /** + * The user is offline. + * + * @param wasOnline Point in time (Unix timestamp) when the user was last online. + */ + public UserStatusOffline(int wasOnline) { + this.wasOnline = wasOnline; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -759984891; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user was online recently. + */ + public static class UserStatusRecently extends UserStatus { + + /** + * The user was online recently. + */ + public UserStatusRecently() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -496024847; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is offline, but was online last week. + */ + public static class UserStatusLastWeek extends UserStatus { + + /** + * The user is offline, but was online last week. + */ + public UserStatusLastWeek() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 129960444; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * The user is offline, but was online last month. + */ + public static class UserStatusLastMonth extends UserStatus { + + /** + * The user is offline, but was online last month. + */ + public UserStatusLastMonth() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2011940674; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * This class is an abstract base class. + * Represents the type of a user. The following types are possible: regular users, deleted users and bots. + */ + public abstract static class UserType extends Object { + } + + /** + * A regular user. + */ + public static class UserTypeRegular extends UserType { + + /** + * A regular user. + */ + public UserTypeRegular() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -598644325; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user. + */ + public static class UserTypeDeleted extends UserType { + + /** + * A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user. + */ + public UserTypeDeleted() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1807729372; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * A bot (see https://core.telegram.org/bots). + */ + public static class UserTypeBot extends UserType { + /** + * True, if the bot can be invited to basic group and supergroup chats. + */ + public boolean canJoinGroups; + /** + * True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages. + */ + public boolean canReadAllGroupMessages; + /** + * True, if the bot supports inline queries. + */ + public boolean isInline; + /** + * Placeholder for inline queries (displayed on the application input field). + */ + public String inlineQueryPlaceholder; + /** + * True, if the location of the user should be sent with every inline query to this bot. + */ + public boolean needLocation; + + /** + * A bot (see https://core.telegram.org/bots). + */ + public UserTypeBot() { + } + + /** + * A bot (see https://core.telegram.org/bots). + * + * @param canJoinGroups True, if the bot can be invited to basic group and supergroup chats. + * @param canReadAllGroupMessages True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages. + * @param isInline True, if the bot supports inline queries. + * @param inlineQueryPlaceholder Placeholder for inline queries (displayed on the application input field). + * @param needLocation True, if the location of the user should be sent with every inline query to this bot. + */ + public UserTypeBot(boolean canJoinGroups, boolean canReadAllGroupMessages, boolean isInline, String inlineQueryPlaceholder, boolean needLocation) { + this.canJoinGroups = canJoinGroups; + this.canReadAllGroupMessages = canReadAllGroupMessages; + this.isInline = isInline; + this.inlineQueryPlaceholder = inlineQueryPlaceholder; + this.needLocation = needLocation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1262387765; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type. + */ + public static class UserTypeUnknown extends UserType { + + /** + * No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type. + */ + public UserTypeUnknown() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -724541123; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Represents a list of users. + */ + public static class Users extends Object { + /** + * Approximate total count of users found. + */ + public int totalCount; + /** + * A list of user identifiers. + */ + public int[] userIds; + + /** + * Represents a list of users. + */ + public Users() { + } + + /** + * Represents a list of users. + * + * @param totalCount Approximate total count of users found. + * @param userIds A list of user identifiers. + */ + public Users(int totalCount, int[] userIds) { + this.totalCount = totalCount; + this.userIds = userIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 273760088; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options. + */ + public static class ValidatedOrderInfo extends Object { + /** + * Temporary identifier of the order information. + */ + public String orderInfoId; + /** + * Available shipping options. + */ + public ShippingOption[] shippingOptions; + + /** + * Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options. + */ + public ValidatedOrderInfo() { + } + + /** + * Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options. + * + * @param orderInfoId Temporary identifier of the order information. + * @param shippingOptions Available shipping options. + */ + public ValidatedOrderInfo(String orderInfoId, ShippingOption[] shippingOptions) { + this.orderInfoId = orderInfoId; + this.shippingOptions = shippingOptions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1511451484; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a venue. + */ + public static class Venue extends Object { + /** + * Venue location; as defined by the sender. + */ + public Location location; + /** + * Venue name; as defined by the sender. + */ + public String title; + /** + * Venue address; as defined by the sender. + */ + public String address; + /** + * Provider of the venue database; as defined by the sender. Currently only "foursquare" and "gplaces" (Google Places) need to be supported. + */ + public String provider; + /** + * Identifier of the venue in the provider database; as defined by the sender. + */ + public String id; + /** + * Type of the venue in the provider database; as defined by the sender. + */ + public String type; + + /** + * Describes a venue. + */ + public Venue() { + } + + /** + * Describes a venue. + * + * @param location Venue location; as defined by the sender. + * @param title Venue name; as defined by the sender. + * @param address Venue address; as defined by the sender. + * @param provider Provider of the venue database; as defined by the sender. Currently only "foursquare" and "gplaces" (Google Places) need to be supported. + * @param id Identifier of the venue in the provider database; as defined by the sender. + * @param type Type of the venue in the provider database; as defined by the sender. + */ + public Venue(Location location, String title, String address, String provider, String id, String type) { + this.location = location; + this.title = title; + this.address = address; + this.provider = provider; + this.id = id; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1070406393; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a video file. + */ + public static class Video extends Object { + /** + * Duration of the video, in seconds; as defined by the sender. + */ + public int duration; + /** + * Video width; as defined by the sender. + */ + public int width; + /** + * Video height; as defined by the sender. + */ + public int height; + /** + * Original name of the file; as defined by the sender. + */ + public String fileName; + /** + * MIME type of the file; as defined by the sender. + */ + public String mimeType; + /** + * True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets. + */ + public boolean hasStickers; + /** + * True, if the video should be tried to be streamed. + */ + public boolean supportsStreaming; + /** + * Video minithumbnail; may be null. + */ + public Minithumbnail minithumbnail; + /** + * Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null. + */ + public Thumbnail thumbnail; + /** + * File containing the video. + */ + public File video; + + /** + * Describes a video file. + */ + public Video() { + } + + /** + * Describes a video file. + * + * @param duration Duration of the video, in seconds; as defined by the sender. + * @param width Video width; as defined by the sender. + * @param height Video height; as defined by the sender. + * @param fileName Original name of the file; as defined by the sender. + * @param mimeType MIME type of the file; as defined by the sender. + * @param hasStickers True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets. + * @param supportsStreaming True, if the video should be tried to be streamed. + * @param minithumbnail Video minithumbnail; may be null. + * @param thumbnail Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null. + * @param video File containing the video. + */ + public Video(int duration, int width, int height, String fileName, String mimeType, boolean hasStickers, boolean supportsStreaming, Minithumbnail minithumbnail, Thumbnail thumbnail, File video) { + this.duration = duration; + this.width = width; + this.height = height; + this.fileName = fileName; + this.mimeType = mimeType; + this.hasStickers = hasStickers; + this.supportsStreaming = supportsStreaming; + this.minithumbnail = minithumbnail; + this.thumbnail = thumbnail; + this.video = video; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 832856268; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format. + */ + public static class VideoNote extends Object { + /** + * Duration of the video, in seconds; as defined by the sender. + */ + public int duration; + /** + * Video width and height; as defined by the sender. + */ + public int length; + /** + * Video minithumbnail; may be null. + */ + public Minithumbnail minithumbnail; + /** + * Video thumbnail in JPEG format; as defined by the sender; may be null. + */ + public Thumbnail thumbnail; + /** + * File containing the video. + */ + public File video; + + /** + * Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format. + */ + public VideoNote() { + } + + /** + * Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format. + * + * @param duration Duration of the video, in seconds; as defined by the sender. + * @param length Video width and height; as defined by the sender. + * @param minithumbnail Video minithumbnail; may be null. + * @param thumbnail Video thumbnail in JPEG format; as defined by the sender; may be null. + * @param video File containing the video. + */ + public VideoNote(int duration, int length, Minithumbnail minithumbnail, Thumbnail thumbnail, File video) { + this.duration = duration; + this.length = length; + this.minithumbnail = minithumbnail; + this.thumbnail = thumbnail; + this.video = video; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -71734726; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel. + */ + public static class VoiceNote extends Object { + /** + * Duration of the voice note, in seconds; as defined by the sender. + */ + public int duration; + /** + * A waveform representation of the voice note in 5-bit format. + */ + public byte[] waveform; + /** + * MIME type of the file; as defined by the sender. + */ + public String mimeType; + /** + * File containing the voice note. + */ + public File voice; + + /** + * Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel. + */ + public VoiceNote() { + } + + /** + * Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel. + * + * @param duration Duration of the voice note, in seconds; as defined by the sender. + * @param waveform A waveform representation of the voice note in 5-bit format. + * @param mimeType MIME type of the file; as defined by the sender. + * @param voice File containing the voice note. + */ + public VoiceNote(int duration, byte[] waveform, String mimeType, File voice) { + this.duration = duration; + this.waveform = waveform; + this.mimeType = mimeType; + this.voice = voice; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2066012058; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes a web page preview. + */ + public static class WebPage extends Object { + /** + * Original URL of the link. + */ + public String url; + /** + * URL to display. + */ + public String displayUrl; + /** + * Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else. + */ + public String type; + /** + * Short name of the site (e.g., Google Docs, App Store). + */ + public String siteName; + /** + * Title of the content. + */ + public String title; + /** + * Description of the content. + */ + public FormattedText description; + /** + * Image representing the content; may be null. + */ + public Photo photo; + /** + * URL to show in the embedded preview. + */ + public String embedUrl; + /** + * MIME type of the embedded preview, (e.g., text/html or video/mp4). + */ + public String embedType; + /** + * Width of the embedded preview. + */ + public int embedWidth; + /** + * Height of the embedded preview. + */ + public int embedHeight; + /** + * Duration of the content, in seconds. + */ + public int duration; + /** + * Author of the content. + */ + public String author; + /** + * Preview of the content as an animation, if available; may be null. + */ + public Animation animation; + /** + * Preview of the content as an audio file, if available; may be null. + */ + public Audio audio; + /** + * Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null. + */ + public Document document; + /** + * Preview of the content as a sticker for small WEBP files, if available; may be null. + */ + public Sticker sticker; + /** + * Preview of the content as a video, if available; may be null. + */ + public Video video; + /** + * Preview of the content as a video note, if available; may be null. + */ + public VideoNote videoNote; + /** + * Preview of the content as a voice note, if available; may be null. + */ + public VoiceNote voiceNote; + /** + * Version of instant view, available for the web page (currently can be 1 or 2), 0 if none. + */ + public int instantViewVersion; + + /** + * Describes a web page preview. + */ + public WebPage() { + } + + /** + * Describes a web page preview. + * + * @param url Original URL of the link. + * @param displayUrl URL to display. + * @param type Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else. + * @param siteName Short name of the site (e.g., Google Docs, App Store). + * @param title Title of the content. + * @param description Description of the content. + * @param photo Image representing the content; may be null. + * @param embedUrl URL to show in the embedded preview. + * @param embedType MIME type of the embedded preview, (e.g., text/html or video/mp4). + * @param embedWidth Width of the embedded preview. + * @param embedHeight Height of the embedded preview. + * @param duration Duration of the content, in seconds. + * @param author Author of the content. + * @param animation Preview of the content as an animation, if available; may be null. + * @param audio Preview of the content as an audio file, if available; may be null. + * @param document Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null. + * @param sticker Preview of the content as a sticker for small WEBP files, if available; may be null. + * @param video Preview of the content as a video, if available; may be null. + * @param videoNote Preview of the content as a video note, if available; may be null. + * @param voiceNote Preview of the content as a voice note, if available; may be null. + * @param instantViewVersion Version of instant view, available for the web page (currently can be 1 or 2), 0 if none. + */ + public WebPage(String url, String displayUrl, String type, String siteName, String title, FormattedText description, Photo photo, String embedUrl, String embedType, int embedWidth, int embedHeight, int duration, String author, Animation animation, Audio audio, Document document, Sticker sticker, Video video, VideoNote videoNote, VoiceNote voiceNote, int instantViewVersion) { + this.url = url; + this.displayUrl = displayUrl; + this.type = type; + this.siteName = siteName; + this.title = title; + this.description = description; + this.photo = photo; + this.embedUrl = embedUrl; + this.embedType = embedType; + this.embedWidth = embedWidth; + this.embedHeight = embedHeight; + this.duration = duration; + this.author = author; + this.animation = animation; + this.audio = audio; + this.document = document; + this.sticker = sticker; + this.video = video; + this.videoNote = videoNote; + this.voiceNote = voiceNote; + this.instantViewVersion = instantViewVersion; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -577333714; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Describes an instant view page for a web page. + */ + public static class WebPageInstantView extends Object { + /** + * Content of the web page. + */ + public PageBlock[] pageBlocks; + /** + * Number of the instant view views; 0 if unknown. + */ + public int viewCount; + /** + * Version of the instant view, currently can be 1 or 2. + */ + public int version; + /** + * True, if the instant view must be shown from right to left. + */ + public boolean isRtl; + /** + * True, if the instant view contains the full page. A network request might be needed to get the full web page instant view. + */ + public boolean isFull; + + /** + * Describes an instant view page for a web page. + */ + public WebPageInstantView() { + } + + /** + * Describes an instant view page for a web page. + * + * @param pageBlocks Content of the web page. + * @param viewCount Number of the instant view views; 0 if unknown. + * @param version Version of the instant view, currently can be 1 or 2. + * @param isRtl True, if the instant view must be shown from right to left. + * @param isFull True, if the instant view contains the full page. A network request might be needed to get the full web page instant view. + */ + public WebPageInstantView(PageBlock[] pageBlocks, int viewCount, int version, boolean isRtl, boolean isFull) { + this.pageBlocks = pageBlocks; + this.viewCount = viewCount; + this.version = version; + this.isRtl = isRtl; + this.isFull = isFull; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1069193541; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Accepts an incoming call. + * + *

Returns {@link Ok Ok}

+ */ + public static class AcceptCall extends Function { + /** + * Call identifier. + */ + public int callId; + /** + * Description of the call protocols supported by the application. + */ + public CallProtocol protocol; + + /** + * Default constructor for a function, which accepts an incoming call. + * + *

Returns {@link Ok Ok}

+ */ + public AcceptCall() { + } + + /** + * Creates a function, which accepts an incoming call. + * + *

Returns {@link Ok Ok}

+ * + * @param callId Call identifier. + * @param protocol Description of the call protocols supported by the application. + */ + public AcceptCall(int callId, CallProtocol protocol) { + this.callId = callId; + this.protocol = protocol; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -646618416; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Accepts Telegram terms of services. + * + *

Returns {@link Ok Ok}

+ */ + public static class AcceptTermsOfService extends Function { + /** + * Terms of service identifier. + */ + public String termsOfServiceId; + + /** + * Default constructor for a function, which accepts Telegram terms of services. + * + *

Returns {@link Ok Ok}

+ */ + public AcceptTermsOfService() { + } + + /** + * Creates a function, which accepts Telegram terms of services. + * + *

Returns {@link Ok Ok}

+ * + * @param termsOfServiceId Terms of service identifier. + */ + public AcceptTermsOfService(String termsOfServiceId) { + this.termsOfServiceId = termsOfServiceId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2130576356; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a new member to a chat. Members can't be added to private or secret chats. Members will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddChatMember extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifier of the user. + */ + public int userId; + /** + * The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels. + */ + public int forwardLimit; + + /** + * Default constructor for a function, which adds a new member to a chat. Members can't be added to private or secret chats. Members will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ */ + public AddChatMember() { + } + + /** + * Creates a function, which adds a new member to a chat. Members can't be added to private or secret chats. Members will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param userId Identifier of the user. + * @param forwardLimit The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels. + */ + public AddChatMember(long chatId, int userId, int forwardLimit) { + this.chatId = chatId; + this.userId = userId; + this.forwardLimit = forwardLimit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1182817962; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds multiple new members to a chat. Currently this option is only available for supergroups and channels. This option can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Members will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddChatMembers extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifiers of the users to be added to the chat. + */ + public int[] userIds; + + /** + * Default constructor for a function, which adds multiple new members to a chat. Currently this option is only available for supergroups and channels. This option can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Members will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ */ + public AddChatMembers() { + } + + /** + * Creates a function, which adds multiple new members to a chat. Currently this option is only available for supergroups and channels. This option can't be used to join a chat. Members can't be added to a channel if it has more than 200 members. Members will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param userIds Identifiers of the users to be added to the chat. + */ + public AddChatMembers(long chatId, int[] userIds) { + this.chatId = chatId; + this.userIds = userIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1234094617; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddChatToList extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * The chat list. Use getChatListsToAddChat to get suitable chat lists. + */ + public ChatList chatList; + + /** + * Default constructor for a function, which adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed. + * + *

Returns {@link Ok Ok}

+ */ + public AddChatToList() { + } + + /** + * Creates a function, which adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param chatList The chat list. Use getChatListsToAddChat to get suitable chat lists. + */ + public AddChatToList(long chatId, ChatList chatList) { + this.chatId = chatId; + this.chatList = chatList; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -80523595; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a user to the contact list or edits an existing contact by their user identifier. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddContact extends Function { + /** + * The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored. + */ + public Contact contact; + /** + * True, if the new contact needs to be allowed to see current user's phone number. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field UserFullInfo.needPhoneNumberPrivacyException to check whether the current user needs to be asked to share their phone number. + */ + public boolean sharePhoneNumber; + + /** + * Default constructor for a function, which adds a user to the contact list or edits an existing contact by their user identifier. + * + *

Returns {@link Ok Ok}

+ */ + public AddContact() { + } + + /** + * Creates a function, which adds a user to the contact list or edits an existing contact by their user identifier. + * + *

Returns {@link Ok Ok}

+ * + * @param contact The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored. + * @param sharePhoneNumber True, if the new contact needs to be allowed to see current user's phone number. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field UserFullInfo.needPhoneNumberPrivacyException to check whether the current user needs to be asked to share their phone number. + */ + public AddContact(Contact contact, boolean sharePhoneNumber) { + this.contact = contact; + this.sharePhoneNumber = sharePhoneNumber; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1869640000; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddCustomServerLanguagePack extends Function { + /** + * Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link. + */ + public String languagePackId; + + /** + * Default constructor for a function, which adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public AddCustomServerLanguagePack() { + } + + /** + * Creates a function, which adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param languagePackId Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link. + */ + public AddCustomServerLanguagePack(String languagePackId) { + this.languagePackId = languagePackId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 4492771; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddFavoriteSticker extends Function { + /** + * Sticker file to add. + */ + public InputFile sticker; + + /** + * Default constructor for a function, which adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list. + * + *

Returns {@link Ok Ok}

+ */ + public AddFavoriteSticker() { + } + + /** + * Creates a function, which adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list. + * + *

Returns {@link Ok Ok}

+ * + * @param sticker Sticker file to add. + */ + public AddFavoriteSticker(InputFile sticker) { + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 324504799; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message. + * + *

Returns {@link Message Message}

+ */ + public static class AddLocalMessage extends Function { + /** + * Target chat. + */ + public long chatId; + /** + * Identifier of the user who will be shown as the sender of the message; may be 0 for channel posts. + */ + public int senderUserId; + /** + * Identifier of the message to reply to or 0. + */ + public long replyToMessageId; + /** + * Pass true to disable notification for the message. + */ + public boolean disableNotification; + /** + * The content of the message to be added. + */ + public InputMessageContent inputMessageContent; + + /** + * Default constructor for a function, which adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message. + * + *

Returns {@link Message Message}

+ */ + public AddLocalMessage() { + } + + /** + * Creates a function, which adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message. + * + *

Returns {@link Message Message}

+ * + * @param chatId Target chat. + * @param senderUserId Identifier of the user who will be shown as the sender of the message; may be 0 for channel posts. + * @param replyToMessageId Identifier of the message to reply to or 0. + * @param disableNotification Pass true to disable notification for the message. + * @param inputMessageContent The content of the message to be added. + */ + public AddLocalMessage(long chatId, int senderUserId, long replyToMessageId, boolean disableNotification, InputMessageContent inputMessageContent) { + this.chatId = chatId; + this.senderUserId = senderUserId; + this.replyToMessageId = replyToMessageId; + this.disableNotification = disableNotification; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -348943149; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a message to TDLib internal log. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddLogMessage extends Function { + /** + * The minimum verbosity level needed for the message to be logged, 0-1023. + */ + public int verbosityLevel; + /** + * Text of a message to log. + */ + public String text; + + /** + * Default constructor for a function, which adds a message to TDLib internal log. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ */ + public AddLogMessage() { + } + + /** + * Creates a function, which adds a message to TDLib internal log. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ * + * @param verbosityLevel The minimum verbosity level needed for the message to be logged, 0-1023. + * @param text Text of a message to log. + */ + public AddLogMessage(int verbosityLevel, String text) { + this.verbosityLevel = verbosityLevel; + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1597427692; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds the specified data to data usage statistics. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddNetworkStatistics extends Function { + /** + * The network statistics entry with the data to be added to statistics. + */ + public NetworkStatisticsEntry entry; + + /** + * Default constructor for a function, which adds the specified data to data usage statistics. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public AddNetworkStatistics() { + } + + /** + * Creates a function, which adds the specified data to data usage statistics. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param entry The network statistics entry with the data to be added to statistics. + */ + public AddNetworkStatistics(NetworkStatisticsEntry entry) { + this.entry = entry; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1264825305; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a proxy server for network requests. Can be called before authorization. + * + *

Returns {@link Proxy Proxy}

+ */ + public static class AddProxy extends Function { + /** + * Proxy server IP address. + */ + public String server; + /** + * Proxy server port. + */ + public int port; + /** + * True, if the proxy should be enabled. + */ + public boolean enable; + /** + * Proxy type. + */ + public ProxyType type; + + /** + * Default constructor for a function, which adds a proxy server for network requests. Can be called before authorization. + * + *

Returns {@link Proxy Proxy}

+ */ + public AddProxy() { + } + + /** + * Creates a function, which adds a proxy server for network requests. Can be called before authorization. + * + *

Returns {@link Proxy Proxy}

+ * + * @param server Proxy server IP address. + * @param port Proxy server port. + * @param enable True, if the proxy should be enabled. + * @param type Proxy type. + */ + public AddProxy(String server, int port, boolean enable, ProxyType type) { + this.server = server; + this.port = port; + this.enable = enable; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 331529432; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list. + * + *

Returns {@link Stickers Stickers}

+ */ + public static class AddRecentSticker extends Function { + /** + * Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers. + */ + public boolean isAttached; + /** + * Sticker file to add. + */ + public InputFile sticker; + + /** + * Default constructor for a function, which manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list. + * + *

Returns {@link Stickers Stickers}

+ */ + public AddRecentSticker() { + } + + /** + * Creates a function, which manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list. + * + *

Returns {@link Stickers Stickers}

+ * + * @param isAttached Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers. + * @param sticker Sticker file to add. + */ + public AddRecentSticker(boolean isAttached, InputFile sticker) { + this.isAttached = isAttached; + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1478109026; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddRecentlyFoundChat extends Function { + /** + * Identifier of the chat to add. + */ + public long chatId; + + /** + * Default constructor for a function, which adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first. + * + *

Returns {@link Ok Ok}

+ */ + public AddRecentlyFoundChat() { + } + + /** + * Creates a function, which adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Identifier of the chat to add. + */ + public AddRecentlyFoundChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1746396787; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list. + * + *

Returns {@link Ok Ok}

+ */ + public static class AddSavedAnimation extends Function { + /** + * The animation file to be added. Only animations known to the server (i.e. successfully sent via a message) can be added to the list. + */ + public InputFile animation; + + /** + * Default constructor for a function, which manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list. + * + *

Returns {@link Ok Ok}

+ */ + public AddSavedAnimation() { + } + + /** + * Creates a function, which manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list. + * + *

Returns {@link Ok Ok}

+ * + * @param animation The animation file to be added. Only animations known to the server (i.e. successfully sent via a message) can be added to the list. + */ + public AddSavedAnimation(InputFile animation) { + this.animation = animation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1538525088; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds a new sticker to a set; for bots only. Returns the sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public static class AddStickerToSet extends Function { + /** + * Sticker set owner. + */ + public int userId; + /** + * Sticker set name. + */ + public String name; + /** + * Sticker to add to the set. + */ + public InputSticker sticker; + + /** + * Default constructor for a function, which adds a new sticker to a set; for bots only. Returns the sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public AddStickerToSet() { + } + + /** + * Creates a function, which adds a new sticker to a set; for bots only. Returns the sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ * + * @param userId Sticker set owner. + * @param name Sticker set name. + * @param sticker Sticker to add to the set. + */ + public AddStickerToSet(int userId, String name, InputSticker sticker) { + this.userId = userId; + this.name = name; + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -454661588; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the result of a callback query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class AnswerCallbackQuery extends Function { + /** + * Identifier of the callback query. + */ + public long callbackQueryId; + /** + * Text of the answer. + */ + public String text; + /** + * If true, an alert should be shown to the user instead of a toast notification. + */ + public boolean showAlert; + /** + * URL to be opened. + */ + public String url; + /** + * Time during which the result of the query can be cached, in seconds. + */ + public int cacheTime; + + /** + * Default constructor for a function, which sets the result of a callback query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public AnswerCallbackQuery() { + } + + /** + * Creates a function, which sets the result of a callback query; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param callbackQueryId Identifier of the callback query. + * @param text Text of the answer. + * @param showAlert If true, an alert should be shown to the user instead of a toast notification. + * @param url URL to be opened. + * @param cacheTime Time during which the result of the query can be cached, in seconds. + */ + public AnswerCallbackQuery(long callbackQueryId, String text, boolean showAlert, String url, int cacheTime) { + this.callbackQueryId = callbackQueryId; + this.text = text; + this.showAlert = showAlert; + this.url = url; + this.cacheTime = cacheTime; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1153028490; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Answers a custom query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class AnswerCustomQuery extends Function { + /** + * Identifier of a custom query. + */ + public long customQueryId; + /** + * JSON-serialized answer to the query. + */ + public String data; + + /** + * Default constructor for a function, which answers a custom query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public AnswerCustomQuery() { + } + + /** + * Creates a function, which answers a custom query; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param customQueryId Identifier of a custom query. + * @param data JSON-serialized answer to the query. + */ + public AnswerCustomQuery(long customQueryId, String data) { + this.customQueryId = customQueryId; + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1293603521; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the result of an inline query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class AnswerInlineQuery extends Function { + /** + * Identifier of the inline query. + */ + public long inlineQueryId; + /** + * True, if the result of the query can be cached for the specified user. + */ + public boolean isPersonal; + /** + * The results of the query. + */ + public InputInlineQueryResult[] results; + /** + * Allowed time to cache the results of the query, in seconds. + */ + public int cacheTime; + /** + * Offset for the next inline query; pass an empty string if there are no more results. + */ + public String nextOffset; + /** + * If non-empty, this text should be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switchPmParameter. + */ + public String switchPmText; + /** + * The parameter for the bot start message. + */ + public String switchPmParameter; + + /** + * Default constructor for a function, which sets the result of an inline query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public AnswerInlineQuery() { + } + + /** + * Creates a function, which sets the result of an inline query; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param inlineQueryId Identifier of the inline query. + * @param isPersonal True, if the result of the query can be cached for the specified user. + * @param results The results of the query. + * @param cacheTime Allowed time to cache the results of the query, in seconds. + * @param nextOffset Offset for the next inline query; pass an empty string if there are no more results. + * @param switchPmText If non-empty, this text should be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switchPmParameter. + * @param switchPmParameter The parameter for the bot start message. + */ + public AnswerInlineQuery(long inlineQueryId, boolean isPersonal, InputInlineQueryResult[] results, int cacheTime, String nextOffset, String switchPmText, String switchPmParameter) { + this.inlineQueryId = inlineQueryId; + this.isPersonal = isPersonal; + this.results = results; + this.cacheTime = cacheTime; + this.nextOffset = nextOffset; + this.switchPmText = switchPmText; + this.switchPmParameter = switchPmParameter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 485879477; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the result of a pre-checkout query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class AnswerPreCheckoutQuery extends Function { + /** + * Identifier of the pre-checkout query. + */ + public long preCheckoutQueryId; + /** + * An error message, empty on success. + */ + public String errorMessage; + + /** + * Default constructor for a function, which sets the result of a pre-checkout query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public AnswerPreCheckoutQuery() { + } + + /** + * Creates a function, which sets the result of a pre-checkout query; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param preCheckoutQueryId Identifier of the pre-checkout query. + * @param errorMessage An error message, empty on success. + */ + public AnswerPreCheckoutQuery(long preCheckoutQueryId, String errorMessage) { + this.preCheckoutQueryId = preCheckoutQueryId; + this.errorMessage = errorMessage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1486789653; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the result of a shipping query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class AnswerShippingQuery extends Function { + /** + * Identifier of the shipping query. + */ + public long shippingQueryId; + /** + * Available shipping options. + */ + public ShippingOption[] shippingOptions; + /** + * An error message, empty on success. + */ + public String errorMessage; + + /** + * Default constructor for a function, which sets the result of a shipping query; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public AnswerShippingQuery() { + } + + /** + * Creates a function, which sets the result of a shipping query; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param shippingQueryId Identifier of the shipping query. + * @param shippingOptions Available shipping options. + * @param errorMessage An error message, empty on success. + */ + public AnswerShippingQuery(long shippingQueryId, ShippingOption[] shippingOptions, String errorMessage) { + this.shippingQueryId = shippingQueryId; + this.shippingOptions = shippingOptions; + this.errorMessage = errorMessage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -434601324; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Blocks an original sender of a message in the Replies chat. + * + *

Returns {@link Ok Ok}

+ */ + public static class BlockChatFromReplies extends Function { + /** + * The identifier of an incoming message in the Replies chat. + */ + public long messageId; + /** + * Pass true if the message must be deleted. + */ + public boolean deleteMessage; + /** + * Pass true if all messages from the same sender must be deleted. + */ + public boolean deleteAllMessages; + /** + * Pass true if the sender must be reported to the Telegram moderators. + */ + public boolean reportSpam; + + /** + * Default constructor for a function, which blocks an original sender of a message in the Replies chat. + * + *

Returns {@link Ok Ok}

+ */ + public BlockChatFromReplies() { + } + + /** + * Creates a function, which blocks an original sender of a message in the Replies chat. + * + *

Returns {@link Ok Ok}

+ * + * @param messageId The identifier of an incoming message in the Replies chat. + * @param deleteMessage Pass true if the message must be deleted. + * @param deleteAllMessages Pass true if all messages from the same sender must be deleted. + * @param reportSpam Pass true if the sender must be reported to the Telegram moderators. + */ + public BlockChatFromReplies(long messageId, boolean deleteMessage, boolean deleteAllMessages, boolean reportSpam) { + this.messageId = messageId; + this.deleteMessage = deleteMessage; + this.deleteAllMessages = deleteAllMessages; + this.reportSpam = reportSpam; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -869244252; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks whether the current session can be used to transfer a chat ownership to another user. + * + *

Returns {@link CanTransferOwnershipResult CanTransferOwnershipResult}

+ */ + public static class CanTransferOwnership extends Function { + + /** + * Default constructor for a function, which checks whether the current session can be used to transfer a chat ownership to another user. + * + *

Returns {@link CanTransferOwnershipResult CanTransferOwnershipResult}

+ */ + public CanTransferOwnership() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 634602508; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Stops the downloading of a file. If a file has already been downloaded, does nothing. + * + *

Returns {@link Ok Ok}

+ */ + public static class CancelDownloadFile extends Function { + /** + * Identifier of a file to stop downloading. + */ + public int fileId; + /** + * Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server. + */ + public boolean onlyIfPending; + + /** + * Default constructor for a function, which stops the downloading of a file. If a file has already been downloaded, does nothing. + * + *

Returns {@link Ok Ok}

+ */ + public CancelDownloadFile() { + } + + /** + * Creates a function, which stops the downloading of a file. If a file has already been downloaded, does nothing. + * + *

Returns {@link Ok Ok}

+ * + * @param fileId Identifier of a file to stop downloading. + * @param onlyIfPending Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server. + */ + public CancelDownloadFile(int fileId, boolean onlyIfPending) { + this.fileId = fileId; + this.onlyIfPending = onlyIfPending; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1954524450; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined. + * + *

Returns {@link Ok Ok}

+ */ + public static class CancelUploadFile extends Function { + /** + * Identifier of the file to stop uploading. + */ + public int fileId; + + /** + * Default constructor for a function, which stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined. + * + *

Returns {@link Ok Ok}

+ */ + public CancelUploadFile() { + } + + /** + * Creates a function, which stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined. + * + *

Returns {@link Ok Ok}

+ * + * @param fileId Identifier of the file to stop uploading. + */ + public CancelUploadFile(int fileId) { + this.fileId = fileId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1623539600; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes imported contacts using the list of current user contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result depends on the result of the previous query, so only one query is possible at the same time. + * + *

Returns {@link ImportedContacts ImportedContacts}

+ */ + public static class ChangeImportedContacts extends Function { + /** + * The new list of contacts, contact's vCard are ignored and are not imported. + */ + public Contact[] contacts; + + /** + * Default constructor for a function, which changes imported contacts using the list of current user contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result depends on the result of the previous query, so only one query is possible at the same time. + * + *

Returns {@link ImportedContacts ImportedContacts}

+ */ + public ChangeImportedContacts() { + } + + /** + * Creates a function, which changes imported contacts using the list of current user contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result depends on the result of the previous query, so only one query is possible at the same time. + * + *

Returns {@link ImportedContacts ImportedContacts}

+ * + * @param contacts The new list of contacts, contact's vCard are ignored and are not imported. + */ + public ChangeImportedContacts(Contact[] contacts) { + this.contacts = contacts; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1968207955; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public static class ChangePhoneNumber extends Function { + /** + * The new phone number of the user in international format. + */ + public String phoneNumber; + /** + * Settings for the authentication of the user's phone number. + */ + public PhoneNumberAuthenticationSettings settings; + + /** + * Default constructor for a function, which changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public ChangePhoneNumber() { + } + + /** + * Creates a function, which changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ * + * @param phoneNumber The new phone number of the user in international format. + * @param settings Settings for the authentication of the user's phone number. + */ + public ChangePhoneNumber(String phoneNumber, PhoneNumberAuthenticationSettings settings) { + this.phoneNumber = phoneNumber; + this.settings = settings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -124666973; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Installs/uninstalls or activates/archives a sticker set. + * + *

Returns {@link Ok Ok}

+ */ + public static class ChangeStickerSet extends Function { + /** + * Identifier of the sticker set. + */ + public long setId; + /** + * The new value of isInstalled. + */ + public boolean isInstalled; + /** + * The new value of isArchived. A sticker set can't be installed and archived simultaneously. + */ + public boolean isArchived; + + /** + * Default constructor for a function, which installs/uninstalls or activates/archives a sticker set. + * + *

Returns {@link Ok Ok}

+ */ + public ChangeStickerSet() { + } + + /** + * Creates a function, which installs/uninstalls or activates/archives a sticker set. + * + *

Returns {@link Ok Ok}

+ * + * @param setId Identifier of the sticker set. + * @param isInstalled The new value of isInstalled. + * @param isArchived The new value of isArchived. A sticker set can't be installed and archived simultaneously. + */ + public ChangeStickerSet(long setId, boolean isInstalled, boolean isArchived) { + this.setId = setId; + this.isInstalled = isInstalled; + this.isArchived = isArchived; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 449357293; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckAuthenticationBotToken extends Function { + /** + * The bot token. + */ + public String token; + + /** + * Default constructor for a function, which checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in. + * + *

Returns {@link Ok Ok}

+ */ + public CheckAuthenticationBotToken() { + } + + /** + * Creates a function, which checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in. + * + *

Returns {@link Ok Ok}

+ * + * @param token The bot token. + */ + public CheckAuthenticationBotToken(String token) { + this.token = token; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 639321206; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckAuthenticationCode extends Function { + /** + * The verification code received via SMS, Telegram message, phone call, or flash call. + */ + public String code; + + /** + * Default constructor for a function, which checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode. + * + *

Returns {@link Ok Ok}

+ */ + public CheckAuthenticationCode() { + } + + /** + * Creates a function, which checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode. + * + *

Returns {@link Ok Ok}

+ * + * @param code The verification code received via SMS, Telegram message, phone call, or flash call. + */ + public CheckAuthenticationCode(String code) { + this.code = code; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -302103382; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckAuthenticationPassword extends Function { + /** + * The password to check. + */ + public String password; + + /** + * Default constructor for a function, which checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public CheckAuthenticationPassword() { + } + + /** + * Creates a function, which checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ * + * @param password The password to check. + */ + public CheckAuthenticationPassword(String password) { + this.password = password; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2025698400; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the authentication code sent to confirm a new phone number of the user. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckChangePhoneNumberCode extends Function { + /** + * Verification code received by SMS, phone call or flash call. + */ + public String code; + + /** + * Default constructor for a function, which checks the authentication code sent to confirm a new phone number of the user. + * + *

Returns {@link Ok Ok}

+ */ + public CheckChangePhoneNumberCode() { + } + + /** + * Creates a function, which checks the authentication code sent to confirm a new phone number of the user. + * + *

Returns {@link Ok Ok}

+ * + * @param code Verification code received by SMS, phone call or flash call. + */ + public CheckChangePhoneNumberCode(String code) { + this.code = code; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1720278429; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the validity of an invite link for a chat and returns information about the corresponding chat. + * + *

Returns {@link ChatInviteLinkInfo ChatInviteLinkInfo}

+ */ + public static class CheckChatInviteLink extends Function { + /** + * Invite link to be checked; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". + */ + public String inviteLink; + + /** + * Default constructor for a function, which checks the validity of an invite link for a chat and returns information about the corresponding chat. + * + *

Returns {@link ChatInviteLinkInfo ChatInviteLinkInfo}

+ */ + public CheckChatInviteLink() { + } + + /** + * Creates a function, which checks the validity of an invite link for a chat and returns information about the corresponding chat. + * + *

Returns {@link ChatInviteLinkInfo ChatInviteLinkInfo}

+ * + * @param inviteLink Invite link to be checked; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". + */ + public CheckChatInviteLink(String inviteLink) { + this.inviteLink = inviteLink; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -496940997; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks whether a username can be set for a chat. + * + *

Returns {@link CheckChatUsernameResult CheckChatUsernameResult}

+ */ + public static class CheckChatUsername extends Function { + /** + * Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if chat is being created. + */ + public long chatId; + /** + * Username to be checked. + */ + public String username; + + /** + * Default constructor for a function, which checks whether a username can be set for a chat. + * + *

Returns {@link CheckChatUsernameResult CheckChatUsernameResult}

+ */ + public CheckChatUsername() { + } + + /** + * Creates a function, which checks whether a username can be set for a chat. + * + *

Returns {@link CheckChatUsernameResult CheckChatUsernameResult}

+ * + * @param chatId Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if chat is being created. + * @param username Username to be checked. + */ + public CheckChatUsername(long chatId, String username) { + this.chatId = chatId; + this.username = username; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -119119344; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckCreatedPublicChatsLimit extends Function { + /** + * Type of the public chats, for which to check the limit. + */ + public PublicChatType type; + + /** + * Default constructor for a function, which checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. + * + *

Returns {@link Ok Ok}

+ */ + public CheckCreatedPublicChatsLimit() { + } + + /** + * Creates a function, which checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. + * + *

Returns {@link Ok Ok}

+ * + * @param type Type of the public chats, for which to check the limit. + */ + public CheckCreatedPublicChatsLimit(PublicChatType type) { + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -445546591; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckDatabaseEncryptionKey extends Function { + /** + * Encryption key to check or set up. + */ + public byte[] encryptionKey; + + /** + * Default constructor for a function, which checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey. + * + *

Returns {@link Ok Ok}

+ */ + public CheckDatabaseEncryptionKey() { + } + + /** + * Creates a function, which checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey. + * + *

Returns {@link Ok Ok}

+ * + * @param encryptionKey Encryption key to check or set up. + */ + public CheckDatabaseEncryptionKey(byte[] encryptionKey) { + this.encryptionKey = encryptionKey; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1018769307; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the email address verification code for Telegram Passport. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckEmailAddressVerificationCode extends Function { + /** + * Verification code. + */ + public String code; + + /** + * Default constructor for a function, which checks the email address verification code for Telegram Passport. + * + *

Returns {@link Ok Ok}

+ */ + public CheckEmailAddressVerificationCode() { + } + + /** + * Creates a function, which checks the email address verification code for Telegram Passport. + * + *

Returns {@link Ok Ok}

+ * + * @param code Verification code. + */ + public CheckEmailAddressVerificationCode(String code) { + this.code = code; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -426386685; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks phone number confirmation code. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckPhoneNumberConfirmationCode extends Function { + /** + * The phone number confirmation code. + */ + public String code; + + /** + * Default constructor for a function, which checks phone number confirmation code. + * + *

Returns {@link Ok Ok}

+ */ + public CheckPhoneNumberConfirmationCode() { + } + + /** + * Creates a function, which checks phone number confirmation code. + * + *

Returns {@link Ok Ok}

+ * + * @param code The phone number confirmation code. + */ + public CheckPhoneNumberConfirmationCode(String code) { + this.code = code; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1348060966; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the phone number verification code for Telegram Passport. + * + *

Returns {@link Ok Ok}

+ */ + public static class CheckPhoneNumberVerificationCode extends Function { + /** + * Verification code. + */ + public String code; + + /** + * Default constructor for a function, which checks the phone number verification code for Telegram Passport. + * + *

Returns {@link Ok Ok}

+ */ + public CheckPhoneNumberVerificationCode() { + } + + /** + * Creates a function, which checks the phone number verification code for Telegram Passport. + * + *

Returns {@link Ok Ok}

+ * + * @param code Verification code. + */ + public CheckPhoneNumberVerificationCode(String code) { + this.code = code; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1497462718; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Checks the 2-step verification recovery email address verification code. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public static class CheckRecoveryEmailAddressCode extends Function { + /** + * Verification code. + */ + public String code; + + /** + * Default constructor for a function, which checks the 2-step verification recovery email address verification code. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public CheckRecoveryEmailAddressCode() { + } + + /** + * Creates a function, which checks the 2-step verification recovery email address verification code. + * + *

Returns {@link PasswordState PasswordState}

+ * + * @param code Verification code. + */ + public CheckRecoveryEmailAddressCode(String code) { + this.code = code; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1997039589; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public static class CleanFileName extends Function { + /** + * File name or path to the file. + */ + public String fileName; + + /** + * Default constructor for a function, which removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public CleanFileName() { + } + + /** + * Creates a function, which removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ * + * @param fileName File name or path to the file. + */ + public CleanFileName(String fileName) { + this.fileName = fileName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 967964667; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Clears draft messages in all chats. + * + *

Returns {@link Ok Ok}

+ */ + public static class ClearAllDraftMessages extends Function { + /** + * If true, local draft messages in secret chats will not be cleared. + */ + public boolean excludeSecretChats; + + /** + * Default constructor for a function, which clears draft messages in all chats. + * + *

Returns {@link Ok Ok}

+ */ + public ClearAllDraftMessages() { + } + + /** + * Creates a function, which clears draft messages in all chats. + * + *

Returns {@link Ok Ok}

+ * + * @param excludeSecretChats If true, local draft messages in secret chats will not be cleared. + */ + public ClearAllDraftMessages(boolean excludeSecretChats) { + this.excludeSecretChats = excludeSecretChats; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -46369573; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Clears all imported contacts, contact list remains unchanged. + * + *

Returns {@link Ok Ok}

+ */ + public static class ClearImportedContacts extends Function { + + /** + * Default constructor for a function, which clears all imported contacts, contact list remains unchanged. + * + *

Returns {@link Ok Ok}

+ */ + public ClearImportedContacts() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 869503298; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Clears the list of recently used stickers. + * + *

Returns {@link Ok Ok}

+ */ + public static class ClearRecentStickers extends Function { + /** + * Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers. + */ + public boolean isAttached; + + /** + * Default constructor for a function, which clears the list of recently used stickers. + * + *

Returns {@link Ok Ok}

+ */ + public ClearRecentStickers() { + } + + /** + * Creates a function, which clears the list of recently used stickers. + * + *

Returns {@link Ok Ok}

+ * + * @param isAttached Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers. + */ + public ClearRecentStickers(boolean isAttached) { + this.isAttached = isAttached; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -321242684; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Clears the list of recently found chats. + * + *

Returns {@link Ok Ok}

+ */ + public static class ClearRecentlyFoundChats extends Function { + + /** + * Default constructor for a function, which clears the list of recently found chats. + * + *

Returns {@link Ok Ok}

+ */ + public ClearRecentlyFoundChats() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -285582542; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization. + * + *

Returns {@link Ok Ok}

+ */ + public static class Close extends Function { + + /** + * Default constructor for a function, which closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization. + * + *

Returns {@link Ok Ok}

+ */ + public Close() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1187782273; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed. + * + *

Returns {@link Ok Ok}

+ */ + public static class CloseChat extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed. + * + *

Returns {@link Ok Ok}

+ */ + public CloseChat() { + } + + /** + * Creates a function, which informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + */ + public CloseChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 39749353; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Closes a secret chat, effectively transferring its state to secretChatStateClosed. + * + *

Returns {@link Ok Ok}

+ */ + public static class CloseSecretChat extends Function { + /** + * Secret chat identifier. + */ + public int secretChatId; + + /** + * Default constructor for a function, which closes a secret chat, effectively transferring its state to secretChatStateClosed. + * + *

Returns {@link Ok Ok}

+ */ + public CloseSecretChat() { + } + + /** + * Creates a function, which closes a secret chat, effectively transferring its state to secretChatStateClosed. + * + *

Returns {@link Ok Ok}

+ * + * @param secretChatId Secret chat identifier. + */ + public CloseSecretChat(int secretChatId) { + this.secretChatId = secretChatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -471006133; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Confirms QR code authentication on another device. Returns created session on success. + * + *

Returns {@link Session Session}

+ */ + public static class ConfirmQrCodeAuthentication extends Function { + /** + * A link from a QR code. The link must be scanned by the in-app camera. + */ + public String link; + + /** + * Default constructor for a function, which confirms QR code authentication on another device. Returns created session on success. + * + *

Returns {@link Session Session}

+ */ + public ConfirmQrCodeAuthentication() { + } + + /** + * Creates a function, which confirms QR code authentication on another device. Returns created session on success. + * + *

Returns {@link Session Session}

+ * + * @param link A link from a QR code. The link must be scanned by the in-app camera. + */ + public ConfirmQrCodeAuthentication(String link) { + this.link = link; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -376199379; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an existing chat corresponding to a known basic group. + * + *

Returns {@link Chat Chat}

+ */ + public static class CreateBasicGroupChat extends Function { + /** + * Basic group identifier. + */ + public int basicGroupId; + /** + * If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect. + */ + public boolean force; + + /** + * Default constructor for a function, which returns an existing chat corresponding to a known basic group. + * + *

Returns {@link Chat Chat}

+ */ + public CreateBasicGroupChat() { + } + + /** + * Creates a function, which returns an existing chat corresponding to a known basic group. + * + *

Returns {@link Chat Chat}

+ * + * @param basicGroupId Basic group identifier. + * @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect. + */ + public CreateBasicGroupChat(int basicGroupId, boolean force) { + this.basicGroupId = basicGroupId; + this.force = force; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 642492777; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Creates a new call. + * + *

Returns {@link CallId CallId}

+ */ + public static class CreateCall extends Function { + /** + * Identifier of the user to be called. + */ + public int userId; + /** + * Description of the call protocols supported by the application. + */ + public CallProtocol protocol; + /** + * True, if a video call needs to be created. + */ + public boolean isVideo; + + /** + * Default constructor for a function, which creates a new call. + * + *

Returns {@link CallId CallId}

+ */ + public CreateCall() { + } + + /** + * Creates a function, which creates a new call. + * + *

Returns {@link CallId CallId}

+ * + * @param userId Identifier of the user to be called. + * @param protocol Description of the call protocols supported by the application. + * @param isVideo True, if a video call needs to be created. + */ + public CreateCall(int userId, CallProtocol protocol, boolean isVideo) { + this.userId = userId; + this.protocol = protocol; + this.isVideo = isVideo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1837533340; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Creates new chat filter. Returns information about the created chat filter. + * + *

Returns {@link ChatFilterInfo ChatFilterInfo}

+ */ + public static class CreateChatFilter extends Function { + /** + * Chat filter. + */ + public ChatFilter filter; + + /** + * Default constructor for a function, which creates new chat filter. Returns information about the created chat filter. + * + *

Returns {@link ChatFilterInfo ChatFilterInfo}

+ */ + public CreateChatFilter() { + } + + /** + * Creates a function, which creates new chat filter. Returns information about the created chat filter. + * + *

Returns {@link ChatFilterInfo ChatFilterInfo}

+ * + * @param filter Chat filter. + */ + public CreateChatFilter(ChatFilter filter) { + this.filter = filter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 49065126; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ */ + public static class CreateNewBasicGroupChat extends Function { + /** + * Identifiers of users to be added to the basic group. + */ + public int[] userIds; + /** + * Title of the new basic group; 1-128 characters. + */ + public String title; + + /** + * Default constructor for a function, which creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ */ + public CreateNewBasicGroupChat() { + } + + /** + * Creates a function, which creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ * + * @param userIds Identifiers of users to be added to the basic group. + * @param title Title of the new basic group; 1-128 characters. + */ + public CreateNewBasicGroupChat(int[] userIds, String title) { + this.userIds = userIds; + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1874532069; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Creates a new secret chat. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ */ + public static class CreateNewSecretChat extends Function { + /** + * Identifier of the target user. + */ + public int userId; + + /** + * Default constructor for a function, which creates a new secret chat. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ */ + public CreateNewSecretChat() { + } + + /** + * Creates a function, which creates a new secret chat. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ * + * @param userId Identifier of the target user. + */ + public CreateNewSecretChat(int userId) { + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1689344881; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Creates a new sticker set; for bots only. Returns the newly created sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public static class CreateNewStickerSet extends Function { + /** + * Sticker set owner. + */ + public int userId; + /** + * Sticker set title; 1-64 characters. + */ + public String title; + /** + * Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<botUsername>* is case insensitive); 1-64 characters. + */ + public String name; + /** + * True, if stickers are masks. Animated stickers can't be masks. + */ + public boolean isMasks; + /** + * List of stickers to be added to the set; must be non-empty. All stickers must be of the same type. + */ + public InputSticker[] stickers; + + /** + * Default constructor for a function, which creates a new sticker set; for bots only. Returns the newly created sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public CreateNewStickerSet() { + } + + /** + * Creates a function, which creates a new sticker set; for bots only. Returns the newly created sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ * + * @param userId Sticker set owner. + * @param title Sticker set title; 1-64 characters. + * @param name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<botUsername>* is case insensitive); 1-64 characters. + * @param isMasks True, if stickers are masks. Animated stickers can't be masks. + * @param stickers List of stickers to be added to the set; must be non-empty. All stickers must be of the same type. + */ + public CreateNewStickerSet(int userId, String title, String name, boolean isMasks, InputSticker[] stickers) { + this.userId = userId; + this.title = title; + this.name = name; + this.isMasks = isMasks; + this.stickers = stickers; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1139329506; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ */ + public static class CreateNewSupergroupChat extends Function { + /** + * Title of the new chat; 1-128 characters. + */ + public String title; + /** + * True, if a channel chat should be created. + */ + public boolean isChannel; + /** + * Chat description; 0-255 characters. + */ + public String description; + /** + * Chat location if a location-based supergroup is being created. + */ + public ChatLocation location; + + /** + * Default constructor for a function, which creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ */ + public CreateNewSupergroupChat() { + } + + /** + * Creates a function, which creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat. + * + *

Returns {@link Chat Chat}

+ * + * @param title Title of the new chat; 1-128 characters. + * @param isChannel True, if a channel chat should be created. + * @param description Chat description; 0-255 characters. + * @param location Chat location if a location-based supergroup is being created. + */ + public CreateNewSupergroupChat(String title, boolean isChannel, String description, ChatLocation location) { + this.title = title; + this.isChannel = isChannel; + this.description = description; + this.location = location; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -8999251; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an existing chat corresponding to a given user. + * + *

Returns {@link Chat Chat}

+ */ + public static class CreatePrivateChat extends Function { + /** + * User identifier. + */ + public int userId; + /** + * If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect. + */ + public boolean force; + + /** + * Default constructor for a function, which returns an existing chat corresponding to a given user. + * + *

Returns {@link Chat Chat}

+ */ + public CreatePrivateChat() { + } + + /** + * Creates a function, which returns an existing chat corresponding to a given user. + * + *

Returns {@link Chat Chat}

+ * + * @param userId User identifier. + * @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect. + */ + public CreatePrivateChat(int userId, boolean force) { + this.userId = userId; + this.force = force; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1807530364; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an existing chat corresponding to a known secret chat. + * + *

Returns {@link Chat Chat}

+ */ + public static class CreateSecretChat extends Function { + /** + * Secret chat identifier. + */ + public int secretChatId; + + /** + * Default constructor for a function, which returns an existing chat corresponding to a known secret chat. + * + *

Returns {@link Chat Chat}

+ */ + public CreateSecretChat() { + } + + /** + * Creates a function, which returns an existing chat corresponding to a known secret chat. + * + *

Returns {@link Chat Chat}

+ * + * @param secretChatId Secret chat identifier. + */ + public CreateSecretChat(int secretChatId) { + this.secretChatId = secretChatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1930285615; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an existing chat corresponding to a known supergroup or channel. + * + *

Returns {@link Chat Chat}

+ */ + public static class CreateSupergroupChat extends Function { + /** + * Supergroup or channel identifier. + */ + public int supergroupId; + /** + * If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect. + */ + public boolean force; + + /** + * Default constructor for a function, which returns an existing chat corresponding to a known supergroup or channel. + * + *

Returns {@link Chat Chat}

+ */ + public CreateSupergroupChat() { + } + + /** + * Creates a function, which returns an existing chat corresponding to a known supergroup or channel. + * + *

Returns {@link Chat Chat}

+ * + * @param supergroupId Supergroup or channel identifier. + * @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect. + */ + public CreateSupergroupChat(int supergroupId, boolean force) { + this.supergroupId = supergroupId; + this.force = force; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 352742758; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Creates a new temporary password for processing payments. + * + *

Returns {@link TemporaryPasswordState TemporaryPasswordState}

+ */ + public static class CreateTemporaryPassword extends Function { + /** + * Persistent user password. + */ + public String password; + /** + * Time during which the temporary password will be valid, in seconds; should be between 60 and 86400. + */ + public int validFor; + + /** + * Default constructor for a function, which creates a new temporary password for processing payments. + * + *

Returns {@link TemporaryPasswordState TemporaryPasswordState}

+ */ + public CreateTemporaryPassword() { + } + + /** + * Creates a function, which creates a new temporary password for processing payments. + * + *

Returns {@link TemporaryPasswordState TemporaryPasswordState}

+ * + * @param password Persistent user password. + * @param validFor Time during which the temporary password will be valid, in seconds; should be between 60 and 86400. + */ + public CreateTemporaryPassword(String password, int validFor) { + this.password = password; + this.validFor = validFor; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1626509434; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteAccount extends Function { + /** + * The reason why the account was deleted; optional. + */ + public String reason; + + /** + * Default constructor for a function, which deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteAccount() { + } + + /** + * Creates a function, which deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ * + * @param reason The reason why the account was deleted; optional. + */ + public DeleteAccount(String reason) { + this.reason = reason; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1203056508; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes existing chat filter. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteChatFilter extends Function { + /** + * Chat filter identifier. + */ + public int chatFilterId; + + /** + * Default constructor for a function, which deletes existing chat filter. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteChatFilter() { + } + + /** + * Creates a function, which deletes existing chat filter. + * + *

Returns {@link Ok Ok}

+ * + * @param chatFilterId Chat filter identifier. + */ + public DeleteChatFilter(int chatFilterId) { + this.chatFilterId = chatFilterId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -523220877; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes all messages in the chat. Use Chat.canBeDeletedOnlyForSelf and Chat.canBeDeletedForAllUsers fields to find whether and how the method can be applied to the chat. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteChatHistory extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Pass true if the chat should be removed from the chat list. + */ + public boolean removeFromChatList; + /** + * Pass true to try to delete chat history for all users. + */ + public boolean revoke; + + /** + * Default constructor for a function, which deletes all messages in the chat. Use Chat.canBeDeletedOnlyForSelf and Chat.canBeDeletedForAllUsers fields to find whether and how the method can be applied to the chat. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteChatHistory() { + } + + /** + * Creates a function, which deletes all messages in the chat. Use Chat.canBeDeletedOnlyForSelf and Chat.canBeDeletedForAllUsers fields to find whether and how the method can be applied to the chat. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param removeFromChatList Pass true if the chat should be removed from the chat list. + * @param revoke Pass true to try to delete chat history for all users. + */ + public DeleteChatHistory(long chatId, boolean removeFromChatList, boolean revoke) { + this.chatId = chatId; + this.removeFromChatList = removeFromChatList; + this.revoke = revoke; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1472081761; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires canDeleteMessages administrator privileges. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteChatMessagesFromUser extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * User identifier. + */ + public int userId; + + /** + * Default constructor for a function, which deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires canDeleteMessages administrator privileges. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteChatMessagesFromUser() { + } + + /** + * Creates a function, which deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires canDeleteMessages administrator privileges. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param userId User identifier. + */ + public DeleteChatMessagesFromUser(long chatId, int userId) { + this.chatId = chatId; + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1599689199; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteChatReplyMarkup extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * The message identifier of the used keyboard. + */ + public long messageId; + + /** + * Default constructor for a function, which deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteChatReplyMarkup() { + } + + /** + * Creates a function, which deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param messageId The message identifier of the used keyboard. + */ + public DeleteChatReplyMarkup(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 100637531; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes a file from the TDLib file cache. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteFile extends Function { + /** + * Identifier of the file to delete. + */ + public int fileId; + + /** + * Default constructor for a function, which deletes a file from the TDLib file cache. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteFile() { + } + + /** + * Creates a function, which deletes a file from the TDLib file cache. + * + *

Returns {@link Ok Ok}

+ * + * @param fileId Identifier of the file to delete. + */ + public DeleteFile(int fileId) { + this.fileId = fileId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1807653676; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteLanguagePack extends Function { + /** + * Identifier of the language pack to delete. + */ + public String languagePackId; + + /** + * Default constructor for a function, which deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteLanguagePack() { + } + + /** + * Creates a function, which deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param languagePackId Identifier of the language pack to delete. + */ + public DeleteLanguagePack(String languagePackId) { + this.languagePackId = languagePackId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2108761026; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes messages. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteMessages extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifiers of the messages to be deleted. + */ + public long[] messageIds; + /** + * Pass true to try to delete messages for all chat members. Always true for supergroups, channels and secret chats. + */ + public boolean revoke; + + /** + * Default constructor for a function, which deletes messages. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteMessages() { + } + + /** + * Creates a function, which deletes messages. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param messageIds Identifiers of the messages to be deleted. + * @param revoke Pass true to try to delete messages for all chat members. Always true for supergroups, channels and secret chats. + */ + public DeleteMessages(long chatId, long[] messageIds, boolean revoke) { + this.chatId = chatId; + this.messageIds = messageIds; + this.revoke = revoke; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1130090173; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes a Telegram Passport element. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeletePassportElement extends Function { + /** + * Element type. + */ + public PassportElementType type; + + /** + * Default constructor for a function, which deletes a Telegram Passport element. + * + *

Returns {@link Ok Ok}

+ */ + public DeletePassportElement() { + } + + /** + * Creates a function, which deletes a Telegram Passport element. + * + *

Returns {@link Ok Ok}

+ * + * @param type Element type. + */ + public DeletePassportElement(PassportElementType type) { + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1719555468; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes a profile photo. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteProfilePhoto extends Function { + /** + * Identifier of the profile photo to delete. + */ + public long profilePhotoId; + + /** + * Default constructor for a function, which deletes a profile photo. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteProfilePhoto() { + } + + /** + * Creates a function, which deletes a profile photo. + * + *

Returns {@link Ok Ok}

+ * + * @param profilePhotoId Identifier of the profile photo to delete. + */ + public DeleteProfilePhoto(long profilePhotoId) { + this.profilePhotoId = profilePhotoId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1319794625; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes saved credentials for all payment provider bots. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteSavedCredentials extends Function { + + /** + * Default constructor for a function, which deletes saved credentials for all payment provider bots. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteSavedCredentials() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 826300114; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes saved order info. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteSavedOrderInfo extends Function { + + /** + * Default constructor for a function, which deletes saved order info. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteSavedOrderInfo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1629058164; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can't be deleted using this method. + * + *

Returns {@link Ok Ok}

+ */ + public static class DeleteSupergroup extends Function { + /** + * Identifier of the supergroup or channel. + */ + public int supergroupId; + + /** + * Default constructor for a function, which deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can't be deleted using this method. + * + *

Returns {@link Ok Ok}

+ */ + public DeleteSupergroup() { + } + + /** + * Creates a function, which deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can't be deleted using this method. + * + *

Returns {@link Ok Ok}

+ * + * @param supergroupId Identifier of the supergroup or channel. + */ + public DeleteSupergroup(int supergroupId) { + this.supergroupId = supergroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1999855965; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class Destroy extends Function { + + /** + * Default constructor for a function, which closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public Destroy() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 685331274; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Disables the currently enabled proxy. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class DisableProxy extends Function { + + /** + * Default constructor for a function, which disables the currently enabled proxy. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public DisableProxy() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2100095102; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Discards a call. + * + *

Returns {@link Ok Ok}

+ */ + public static class DiscardCall extends Function { + /** + * Call identifier. + */ + public int callId; + /** + * True, if the user was disconnected. + */ + public boolean isDisconnected; + /** + * The call duration, in seconds. + */ + public int duration; + /** + * True, if the call was a video call. + */ + public boolean isVideo; + /** + * Identifier of the connection used during the call. + */ + public long connectionId; + + /** + * Default constructor for a function, which discards a call. + * + *

Returns {@link Ok Ok}

+ */ + public DiscardCall() { + } + + /** + * Creates a function, which discards a call. + * + *

Returns {@link Ok Ok}

+ * + * @param callId Call identifier. + * @param isDisconnected True, if the user was disconnected. + * @param duration The call duration, in seconds. + * @param isVideo True, if the call was a video call. + * @param connectionId Identifier of the connection used during the call. + */ + public DiscardCall(int callId, boolean isDisconnected, int duration, boolean isVideo, long connectionId) { + this.callId = callId; + this.isDisconnected = isDisconnected; + this.duration = duration; + this.isVideo = isVideo; + this.connectionId = connectionId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1784044162; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Disconnects all websites from the current user's Telegram account. + * + *

Returns {@link Ok Ok}

+ */ + public static class DisconnectAllWebsites extends Function { + + /** + * Default constructor for a function, which disconnects all websites from the current user's Telegram account. + * + *

Returns {@link Ok Ok}

+ */ + public DisconnectAllWebsites() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1082985981; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Disconnects website from the current user's Telegram account. + * + *

Returns {@link Ok Ok}

+ */ + public static class DisconnectWebsite extends Function { + /** + * Website identifier. + */ + public long websiteId; + + /** + * Default constructor for a function, which disconnects website from the current user's Telegram account. + * + *

Returns {@link Ok Ok}

+ */ + public DisconnectWebsite() { + } + + /** + * Creates a function, which disconnects website from the current user's Telegram account. + * + *

Returns {@link Ok Ok}

+ * + * @param websiteId Website identifier. + */ + public DisconnectWebsite(long websiteId) { + this.websiteId = websiteId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -778767395; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates. + * + *

Returns {@link File File}

+ */ + public static class DownloadFile extends Function { + /** + * Identifier of the file to download. + */ + public int fileId; + /** + * Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first. + */ + public int priority; + /** + * The starting position from which the file should be downloaded. + */ + public int offset; + /** + * Number of bytes which should be downloaded starting from the "offset" position before the download will be automatically cancelled; use 0 to download without a limit. + */ + public int limit; + /** + * If false, this request returns file state just after the download has been started. If true, this request returns file state only after the download has succeeded, has failed, has been cancelled or a new downloadFile request with different offset/limit parameters was sent. + */ + public boolean synchronous; + + /** + * Default constructor for a function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates. + * + *

Returns {@link File File}

+ */ + public DownloadFile() { + } + + /** + * Creates a function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates. + * + *

Returns {@link File File}

+ * + * @param fileId Identifier of the file to download. + * @param priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first. + * @param offset The starting position from which the file should be downloaded. + * @param limit Number of bytes which should be downloaded starting from the "offset" position before the download will be automatically cancelled; use 0 to download without a limit. + * @param synchronous If false, this request returns file state just after the download has been started. If true, this request returns file state only after the download has succeeded, has failed, has been cancelled or a new downloadFile request with different offset/limit parameters was sent. + */ + public DownloadFile(int fileId, int priority, int offset, int limit, boolean synchronous) { + this.fileId = fileId; + this.priority = priority; + this.offset = offset; + this.limit = limit; + this.synchronous = synchronous; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1102026662; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits existing chat filter. Returns information about the edited chat filter. + * + *

Returns {@link ChatFilterInfo ChatFilterInfo}

+ */ + public static class EditChatFilter extends Function { + /** + * Chat filter identifier. + */ + public int chatFilterId; + /** + * The edited chat filter. + */ + public ChatFilter filter; + + /** + * Default constructor for a function, which edits existing chat filter. Returns information about the edited chat filter. + * + *

Returns {@link ChatFilterInfo ChatFilterInfo}

+ */ + public EditChatFilter() { + } + + /** + * Creates a function, which edits existing chat filter. Returns information about the edited chat filter. + * + *

Returns {@link ChatFilterInfo ChatFilterInfo}

+ * + * @param chatFilterId Chat filter identifier. + * @param filter The edited chat filter. + */ + public EditChatFilter(int chatFilterId, ChatFilter filter) { + this.chatFilterId = chatFilterId; + this.filter = filter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1674793086; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits information about a custom local language pack in the current localization target. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class EditCustomLanguagePackInfo extends Function { + /** + * New information about the custom local language pack. + */ + public LanguagePackInfo info; + + /** + * Default constructor for a function, which edits information about a custom local language pack in the current localization target. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public EditCustomLanguagePackInfo() { + } + + /** + * Creates a function, which edits information about a custom local language pack in the current localization target. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param info New information about the custom local language pack. + */ + public EditCustomLanguagePackInfo(LanguagePackInfo info) { + this.info = info; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1320751257; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the caption of an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class EditInlineMessageCaption extends Function { + /** + * Inline message identifier. + */ + public String inlineMessageId; + /** + * The new message reply markup. + */ + public ReplyMarkup replyMarkup; + /** + * New message content caption; 0-GetOption("message_caption_length_max") characters. + */ + public FormattedText caption; + + /** + * Default constructor for a function, which edits the caption of an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public EditInlineMessageCaption() { + } + + /** + * Creates a function, which edits the caption of an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param inlineMessageId Inline message identifier. + * @param replyMarkup The new message reply markup. + * @param caption New message content caption; 0-GetOption("message_caption_length_max") characters. + */ + public EditInlineMessageCaption(String inlineMessageId, ReplyMarkup replyMarkup, FormattedText caption) { + this.inlineMessageId = inlineMessageId; + this.replyMarkup = replyMarkup; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -760985929; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the content of a live location in an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class EditInlineMessageLiveLocation extends Function { + /** + * Inline message identifier. + */ + public String inlineMessageId; + /** + * The new message reply markup. + */ + public ReplyMarkup replyMarkup; + /** + * New location content of the message; may be null. Pass null to stop sharing the live location. + */ + public Location location; + + /** + * Default constructor for a function, which edits the content of a live location in an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public EditInlineMessageLiveLocation() { + } + + /** + * Creates a function, which edits the content of a live location in an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param inlineMessageId Inline message identifier. + * @param replyMarkup The new message reply markup. + * @param location New location content of the message; may be null. Pass null to stop sharing the live location. + */ + public EditInlineMessageLiveLocation(String inlineMessageId, ReplyMarkup replyMarkup, Location location) { + this.inlineMessageId = inlineMessageId; + this.replyMarkup = replyMarkup; + this.location = location; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 655046316; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class EditInlineMessageMedia extends Function { + /** + * Inline message identifier. + */ + public String inlineMessageId; + /** + * The new message reply markup; for bots only. + */ + public ReplyMarkup replyMarkup; + /** + * New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo. + */ + public InputMessageContent inputMessageContent; + + /** + * Default constructor for a function, which edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public EditInlineMessageMedia() { + } + + /** + * Creates a function, which edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param inlineMessageId Inline message identifier. + * @param replyMarkup The new message reply markup; for bots only. + * @param inputMessageContent New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo. + */ + public EditInlineMessageMedia(String inlineMessageId, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.inlineMessageId = inlineMessageId; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 23553921; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the reply markup of an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class EditInlineMessageReplyMarkup extends Function { + /** + * Inline message identifier. + */ + public String inlineMessageId; + /** + * The new message reply markup. + */ + public ReplyMarkup replyMarkup; + + /** + * Default constructor for a function, which edits the reply markup of an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public EditInlineMessageReplyMarkup() { + } + + /** + * Creates a function, which edits the reply markup of an inline message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param inlineMessageId Inline message identifier. + * @param replyMarkup The new message reply markup. + */ + public EditInlineMessageReplyMarkup(String inlineMessageId, ReplyMarkup replyMarkup) { + this.inlineMessageId = inlineMessageId; + this.replyMarkup = replyMarkup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -67565858; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the text of an inline text or game message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class EditInlineMessageText extends Function { + /** + * Inline message identifier. + */ + public String inlineMessageId; + /** + * The new message reply markup. + */ + public ReplyMarkup replyMarkup; + /** + * New text content of the message. Should be of type InputMessageText. + */ + public InputMessageContent inputMessageContent; + + /** + * Default constructor for a function, which edits the text of an inline text or game message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public EditInlineMessageText() { + } + + /** + * Creates a function, which edits the text of an inline text or game message sent via a bot; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param inlineMessageId Inline message identifier. + * @param replyMarkup The new message reply markup. + * @param inputMessageContent New text content of the message. Should be of type InputMessageText. + */ + public EditInlineMessageText(String inlineMessageId, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.inlineMessageId = inlineMessageId; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -855457307; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the message content caption. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public static class EditMessageCaption extends Function { + /** + * The chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * The new message reply markup; for bots only. + */ + public ReplyMarkup replyMarkup; + /** + * New message content caption; 0-GetOption("message_caption_length_max") characters. + */ + public FormattedText caption; + + /** + * Default constructor for a function, which edits the message content caption. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public EditMessageCaption() { + } + + /** + * Creates a function, which edits the message content caption. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ * + * @param chatId The chat the message belongs to. + * @param messageId Identifier of the message. + * @param replyMarkup The new message reply markup; for bots only. + * @param caption New message content caption; 0-GetOption("message_caption_length_max") characters. + */ + public EditMessageCaption(long chatId, long messageId, ReplyMarkup replyMarkup, FormattedText caption) { + this.chatId = chatId; + this.messageId = messageId; + this.replyMarkup = replyMarkup; + this.caption = caption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1154677038; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public static class EditMessageLiveLocation extends Function { + /** + * The chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * The new message reply markup; for bots only. + */ + public ReplyMarkup replyMarkup; + /** + * New location content of the message; may be null. Pass null to stop sharing the live location. + */ + public Location location; + + /** + * Default constructor for a function, which edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public EditMessageLiveLocation() { + } + + /** + * Creates a function, which edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ * + * @param chatId The chat the message belongs to. + * @param messageId Identifier of the message. + * @param replyMarkup The new message reply markup; for bots only. + * @param location New location content of the message; may be null. Pass null to stop sharing the live location. + */ + public EditMessageLiveLocation(long chatId, long messageId, ReplyMarkup replyMarkup, Location location) { + this.chatId = chatId; + this.messageId = messageId; + this.replyMarkup = replyMarkup; + this.location = location; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1146772745; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public static class EditMessageMedia extends Function { + /** + * The chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * The new message reply markup; for bots only. + */ + public ReplyMarkup replyMarkup; + /** + * New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo. + */ + public InputMessageContent inputMessageContent; + + /** + * Default constructor for a function, which edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public EditMessageMedia() { + } + + /** + * Creates a function, which edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ * + * @param chatId The chat the message belongs to. + * @param messageId Identifier of the message. + * @param replyMarkup The new message reply markup; for bots only. + * @param inputMessageContent New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo. + */ + public EditMessageMedia(long chatId, long messageId, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.chatId = chatId; + this.messageId = messageId; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1152678125; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public static class EditMessageReplyMarkup extends Function { + /** + * The chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * The new message reply markup. + */ + public ReplyMarkup replyMarkup; + + /** + * Default constructor for a function, which edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public EditMessageReplyMarkup() { + } + + /** + * Creates a function, which edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ * + * @param chatId The chat the message belongs to. + * @param messageId Identifier of the message. + * @param replyMarkup The new message reply markup. + */ + public EditMessageReplyMarkup(long chatId, long messageId, ReplyMarkup replyMarkup) { + this.chatId = chatId; + this.messageId = messageId; + this.replyMarkup = replyMarkup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 332127881; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed. + * + *

Returns {@link Ok Ok}

+ */ + public static class EditMessageSchedulingState extends Function { + /** + * The chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * The new message scheduling state. Pass null to send the message immediately. + */ + public MessageSchedulingState schedulingState; + + /** + * Default constructor for a function, which edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed. + * + *

Returns {@link Ok Ok}

+ */ + public EditMessageSchedulingState() { + } + + /** + * Creates a function, which edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId The chat the message belongs to. + * @param messageId Identifier of the message. + * @param schedulingState The new message scheduling state. Pass null to send the message immediately. + */ + public EditMessageSchedulingState(long chatId, long messageId, MessageSchedulingState schedulingState) { + this.chatId = chatId; + this.messageId = messageId; + this.schedulingState = schedulingState; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1372976192; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public static class EditMessageText extends Function { + /** + * The chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * The new message reply markup; for bots only. + */ + public ReplyMarkup replyMarkup; + /** + * New text content of the message. Should be of type InputMessageText. + */ + public InputMessageContent inputMessageContent; + + /** + * Default constructor for a function, which edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ */ + public EditMessageText() { + } + + /** + * Creates a function, which edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side. + * + *

Returns {@link Message Message}

+ * + * @param chatId The chat the message belongs to. + * @param messageId Identifier of the message. + * @param replyMarkup The new message reply markup; for bots only. + * @param inputMessageContent New text content of the message. Should be of type InputMessageText. + */ + public EditMessageText(long chatId, long messageId, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.chatId = chatId; + this.messageId = messageId; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 196272567; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Edits an existing proxy server for network requests. Can be called before authorization. + * + *

Returns {@link Proxy Proxy}

+ */ + public static class EditProxy extends Function { + /** + * Proxy identifier. + */ + public int proxyId; + /** + * Proxy server IP address. + */ + public String server; + /** + * Proxy server port. + */ + public int port; + /** + * True, if the proxy should be enabled. + */ + public boolean enable; + /** + * Proxy type. + */ + public ProxyType type; + + /** + * Default constructor for a function, which edits an existing proxy server for network requests. Can be called before authorization. + * + *

Returns {@link Proxy Proxy}

+ */ + public EditProxy() { + } + + /** + * Creates a function, which edits an existing proxy server for network requests. Can be called before authorization. + * + *

Returns {@link Proxy Proxy}

+ * + * @param proxyId Proxy identifier. + * @param server Proxy server IP address. + * @param port Proxy server port. + * @param enable True, if the proxy should be enabled. + * @param type Proxy type. + */ + public EditProxy(int proxyId, String server, int port, boolean enable, ProxyType type) { + this.proxyId = proxyId; + this.server = server; + this.port = port; + this.enable = enable; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1605883821; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class EnableProxy extends Function { + /** + * Proxy identifier. + */ + public int proxyId; + + /** + * Default constructor for a function, which enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public EnableProxy() { + } + + /** + * Creates a function, which enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param proxyId Proxy identifier. + */ + public EnableProxy(int proxyId) { + this.proxyId = proxyId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1494450838; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Finishes the file generation. + * + *

Returns {@link Ok Ok}

+ */ + public static class FinishFileGeneration extends Function { + /** + * The identifier of the generation process. + */ + public long generationId; + /** + * If set, means that file generation has failed and should be terminated. + */ + public Error error; + + /** + * Default constructor for a function, which finishes the file generation. + * + *

Returns {@link Ok Ok}

+ */ + public FinishFileGeneration() { + } + + /** + * Creates a function, which finishes the file generation. + * + *

Returns {@link Ok Ok}

+ * + * @param generationId The identifier of the generation process. + * @param error If set, means that file generation has failed and should be terminated. + */ + public FinishFileGeneration(long generationId, Error error) { + this.generationId = generationId; + this.error = error; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1055060835; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in messageIds. If a message can't be forwarded, null will be returned instead of the message. + * + *

Returns {@link Messages Messages}

+ */ + public static class ForwardMessages extends Function { + /** + * Identifier of the chat to which to forward messages. + */ + public long chatId; + /** + * Identifier of the chat from which to forward messages. + */ + public long fromChatId; + /** + * Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. + */ + public long[] messageIds; + /** + * Options to be used to send the messages. + */ + public MessageSendOptions options; + /** + * True, if content of the messages needs to be copied without links to the original messages. Always true if the messages are forwarded to a secret chat. + */ + public boolean sendCopy; + /** + * True, if media caption of message copies needs to be removed. Ignored if sendCopy is false. + */ + public boolean removeCaption; + + /** + * Default constructor for a function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in messageIds. If a message can't be forwarded, null will be returned instead of the message. + * + *

Returns {@link Messages Messages}

+ */ + public ForwardMessages() { + } + + /** + * Creates a function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in messageIds. If a message can't be forwarded, null will be returned instead of the message. + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Identifier of the chat to which to forward messages. + * @param fromChatId Identifier of the chat from which to forward messages. + * @param messageIds Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. + * @param options Options to be used to send the messages. + * @param sendCopy True, if content of the messages needs to be copied without links to the original messages. Always true if the messages are forwarded to a secret chat. + * @param removeCaption True, if media caption of message copies needs to be removed. Ignored if sendCopy is false. + */ + public ForwardMessages(long chatId, long fromChatId, long[] messageIds, MessageSendOptions options, boolean sendCopy, boolean removeCaption) { + this.chatId = chatId; + this.fromChatId = fromChatId; + this.messageIds = messageIds; + this.options = options; + this.sendCopy = sendCopy; + this.removeCaption = removeCaption; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2086130821; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and canInviteUsers right. + * + *

Returns {@link ChatInviteLink ChatInviteLink}

+ */ + public static class GenerateChatInviteLink extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and canInviteUsers right. + * + *

Returns {@link ChatInviteLink ChatInviteLink}

+ */ + public GenerateChatInviteLink() { + } + + /** + * Creates a function, which generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and canInviteUsers right. + * + *

Returns {@link ChatInviteLink ChatInviteLink}

+ * + * @param chatId Chat identifier. + */ + public GenerateChatInviteLink(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1945532500; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the period of inactivity after which the account of the current user will automatically be deleted. + * + *

Returns {@link AccountTtl AccountTtl}

+ */ + public static class GetAccountTtl extends Function { + + /** + * Default constructor for a function, which returns the period of inactivity after which the account of the current user will automatically be deleted. + * + *

Returns {@link AccountTtl AccountTtl}

+ */ + public GetAccountTtl() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -443905161; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all active live locations that should be updated by the application. The list is persistent across application restarts only if the message database is used. + * + *

Returns {@link Messages Messages}

+ */ + public static class GetActiveLiveLocationMessages extends Function { + + /** + * Default constructor for a function, which returns all active live locations that should be updated by the application. The list is persistent across application restarts only if the message database is used. + * + *

Returns {@link Messages Messages}

+ */ + public GetActiveLiveLocationMessages() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1425459567; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all active sessions of the current user. + * + *

Returns {@link Sessions Sessions}

+ */ + public static class GetActiveSessions extends Function { + + /** + * Default constructor for a function, which returns all active sessions of the current user. + * + *

Returns {@link Sessions Sessions}

+ */ + public GetActiveSessions() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1119710526; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all available Telegram Passport elements. + * + *

Returns {@link PassportElements PassportElements}

+ */ + public static class GetAllPassportElements extends Function { + /** + * Password of the current user. + */ + public String password; + + /** + * Default constructor for a function, which returns all available Telegram Passport elements. + * + *

Returns {@link PassportElements PassportElements}

+ */ + public GetAllPassportElements() { + } + + /** + * Creates a function, which returns all available Telegram Passport elements. + * + *

Returns {@link PassportElements PassportElements}

+ * + * @param password Password of the current user. + */ + public GetAllPassportElements(String password) { + this.password = password; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2038945045; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns application config, provided by the server. Can be called before authorization. + * + *

Returns {@link JsonValue JsonValue}

+ */ + public static class GetApplicationConfig extends Function { + + /** + * Default constructor for a function, which returns application config, provided by the server. Can be called before authorization. + * + *

Returns {@link JsonValue JsonValue}

+ */ + public GetApplicationConfig() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1823144318; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of archived sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public static class GetArchivedStickerSets extends Function { + /** + * Pass true to return mask stickers sets; pass false to return ordinary sticker sets. + */ + public boolean isMasks; + /** + * Identifier of the sticker set from which to return the result. + */ + public long offsetStickerSetId; + /** + * The maximum number of sticker sets to return. + */ + public int limit; + + /** + * Default constructor for a function, which returns a list of archived sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public GetArchivedStickerSets() { + } + + /** + * Creates a function, which returns a list of archived sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ * + * @param isMasks Pass true to return mask stickers sets; pass false to return ordinary sticker sets. + * @param offsetStickerSetId Identifier of the sticker set from which to return the result. + * @param limit The maximum number of sticker sets to return. + */ + public GetArchivedStickerSets(boolean isMasks, long offsetStickerSetId, int limit) { + this.isMasks = isMasks; + this.offsetStickerSetId = offsetStickerSetId; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1996943238; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public static class GetAttachedStickerSets extends Function { + /** + * File identifier. + */ + public int fileId; + + /** + * Default constructor for a function, which returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public GetAttachedStickerSets() { + } + + /** + * Creates a function, which returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ * + * @param fileId File identifier. + */ + public GetAttachedStickerSets(int fileId) { + this.fileId = fileId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1302172429; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization. + * + *

Returns {@link AuthorizationState AuthorizationState}

+ */ + public static class GetAuthorizationState extends Function { + + /** + * Default constructor for a function, which returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization. + * + *

Returns {@link AuthorizationState AuthorizationState}

+ */ + public GetAuthorizationState() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1949154877; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns auto-download settings presets for the current user. + * + *

Returns {@link AutoDownloadSettingsPresets AutoDownloadSettingsPresets}

+ */ + public static class GetAutoDownloadSettingsPresets extends Function { + + /** + * Default constructor for a function, which returns auto-download settings presets for the current user. + * + *

Returns {@link AutoDownloadSettingsPresets AutoDownloadSettingsPresets}

+ */ + public GetAutoDownloadSettingsPresets() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1721088201; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Constructs a persistent HTTP URL for a background. + * + *

Returns {@link HttpUrl HttpUrl}

+ */ + public static class GetBackgroundUrl extends Function { + /** + * Background name. + */ + public String name; + /** + * Background type. + */ + public BackgroundType type; + + /** + * Default constructor for a function, which constructs a persistent HTTP URL for a background. + * + *

Returns {@link HttpUrl HttpUrl}

+ */ + public GetBackgroundUrl() { + } + + /** + * Creates a function, which constructs a persistent HTTP URL for a background. + * + *

Returns {@link HttpUrl HttpUrl}

+ * + * @param name Background name. + * @param type Background type. + */ + public GetBackgroundUrl(String name, BackgroundType type) { + this.name = name; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 733769682; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns backgrounds installed by the user. + * + *

Returns {@link Backgrounds Backgrounds}

+ */ + public static class GetBackgrounds extends Function { + /** + * True, if the backgrounds need to be ordered for dark theme. + */ + public boolean forDarkTheme; + + /** + * Default constructor for a function, which returns backgrounds installed by the user. + * + *

Returns {@link Backgrounds Backgrounds}

+ */ + public GetBackgrounds() { + } + + /** + * Creates a function, which returns backgrounds installed by the user. + * + *

Returns {@link Backgrounds Backgrounds}

+ * + * @param forDarkTheme True, if the backgrounds need to be ordered for dark theme. + */ + public GetBackgrounds(boolean forDarkTheme) { + this.forDarkTheme = forDarkTheme; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 249072633; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a bank card. + * + *

Returns {@link BankCardInfo BankCardInfo}

+ */ + public static class GetBankCardInfo extends Function { + /** + * The bank card number. + */ + public String bankCardNumber; + + /** + * Default constructor for a function, which returns information about a bank card. + * + *

Returns {@link BankCardInfo BankCardInfo}

+ */ + public GetBankCardInfo() { + } + + /** + * Creates a function, which returns information about a bank card. + * + *

Returns {@link BankCardInfo BankCardInfo}

+ * + * @param bankCardNumber The bank card number. + */ + public GetBankCardInfo(String bankCardNumber) { + this.bankCardNumber = bankCardNumber; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1310515792; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link BasicGroup BasicGroup}

+ */ + public static class GetBasicGroup extends Function { + /** + * Basic group identifier. + */ + public int basicGroupId; + + /** + * Default constructor for a function, which returns information about a basic group by its identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link BasicGroup BasicGroup}

+ */ + public GetBasicGroup() { + } + + /** + * Creates a function, which returns information about a basic group by its identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link BasicGroup BasicGroup}

+ * + * @param basicGroupId Basic group identifier. + */ + public GetBasicGroup(int basicGroupId) { + this.basicGroupId = basicGroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 561775568; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns full information about a basic group by its identifier. + * + *

Returns {@link BasicGroupFullInfo BasicGroupFullInfo}

+ */ + public static class GetBasicGroupFullInfo extends Function { + /** + * Basic group identifier. + */ + public int basicGroupId; + + /** + * Default constructor for a function, which returns full information about a basic group by its identifier. + * + *

Returns {@link BasicGroupFullInfo BasicGroupFullInfo}

+ */ + public GetBasicGroupFullInfo() { + } + + /** + * Creates a function, which returns full information about a basic group by its identifier. + * + *

Returns {@link BasicGroupFullInfo BasicGroupFullInfo}

+ * + * @param basicGroupId Basic group identifier. + */ + public GetBasicGroupFullInfo(int basicGroupId) { + this.basicGroupId = basicGroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1770517905; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns chats that were blocked by the current user. + * + *

Returns {@link Chats Chats}

+ */ + public static class GetBlockedChats extends Function { + /** + * Number of chats to skip in the result; must be non-negative. + */ + public int offset; + /** + * The maximum number of chats to return; up to 100. + */ + public int limit; + + /** + * Default constructor for a function, which returns chats that were blocked by the current user. + * + *

Returns {@link Chats Chats}

+ */ + public GetBlockedChats() { + } + + /** + * Creates a function, which returns chats that were blocked by the current user. + * + *

Returns {@link Chats Chats}

+ * + * @param offset Number of chats to skip in the result; must be non-negative. + * @param limit The maximum number of chats to return; up to 100. + */ + public GetBlockedChats(int offset, int limit) { + this.offset = offset; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -733106443; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires. + * + *

Returns {@link CallbackQueryAnswer CallbackQueryAnswer}

+ */ + public static class GetCallbackQueryAnswer extends Function { + /** + * Identifier of the chat with the message. + */ + public long chatId; + /** + * Identifier of the message from which the query originated. + */ + public long messageId; + /** + * Query payload. + */ + public CallbackQueryPayload payload; + + /** + * Default constructor for a function, which sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires. + * + *

Returns {@link CallbackQueryAnswer CallbackQueryAnswer}

+ */ + public GetCallbackQueryAnswer() { + } + + /** + * Creates a function, which sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires. + * + *

Returns {@link CallbackQueryAnswer CallbackQueryAnswer}

+ * + * @param chatId Identifier of the chat with the message. + * @param messageId Identifier of the message from which the query originated. + * @param payload Query payload. + */ + public GetCallbackQueryAnswer(long chatId, long messageId, CallbackQueryPayload payload) { + this.chatId = chatId; + this.messageId = messageId; + this.payload = payload; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 116357727; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a chat by its identifier, this is an offline request if the current user is not a bot. + * + *

Returns {@link Chat Chat}

+ */ + public static class GetChat extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which returns information about a chat by its identifier, this is an offline request if the current user is not a bot. + * + *

Returns {@link Chat Chat}

+ */ + public GetChat() { + } + + /** + * Creates a function, which returns information about a chat by its identifier, this is an offline request if the current user is not a bot. + * + *

Returns {@link Chat Chat}

+ * + * @param chatId Chat identifier. + */ + public GetChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1866601536; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of administrators of the chat with their custom titles. + * + *

Returns {@link ChatAdministrators ChatAdministrators}

+ */ + public static class GetChatAdministrators extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which returns a list of administrators of the chat with their custom titles. + * + *

Returns {@link ChatAdministrators ChatAdministrators}

+ */ + public GetChatAdministrators() { + } + + /** + * Creates a function, which returns a list of administrators of the chat with their custom titles. + * + *

Returns {@link ChatAdministrators ChatAdministrators}

+ * + * @param chatId Chat identifier. + */ + public GetChatAdministrators(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1544468155; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing eventId). + * + *

Returns {@link ChatEvents ChatEvents}

+ */ + public static class GetChatEventLog extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Search query by which to filter events. + */ + public String query; + /** + * Identifier of an event from which to return results. Use 0 to get results from the latest events. + */ + public long fromEventId; + /** + * The maximum number of events to return; up to 100. + */ + public int limit; + /** + * The types of events to return. By default, all types will be returned. + */ + public ChatEventLogFilters filters; + /** + * User identifiers by which to filter events. By default, events relating to all users will be returned. + */ + public int[] userIds; + + /** + * Default constructor for a function, which returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing eventId). + * + *

Returns {@link ChatEvents ChatEvents}

+ */ + public GetChatEventLog() { + } + + /** + * Creates a function, which returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing eventId). + * + *

Returns {@link ChatEvents ChatEvents}

+ * + * @param chatId Chat identifier. + * @param query Search query by which to filter events. + * @param fromEventId Identifier of an event from which to return results. Use 0 to get results from the latest events. + * @param limit The maximum number of events to return; up to 100. + * @param filters The types of events to return. By default, all types will be returned. + * @param userIds User identifiers by which to filter events. By default, events relating to all users will be returned. + */ + public GetChatEventLog(long chatId, String query, long fromEventId, int limit, ChatEventLogFilters filters, int[] userIds) { + this.chatId = chatId; + this.query = query; + this.fromEventId = fromEventId; + this.limit = limit; + this.filters = filters; + this.userIds = userIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 206900967; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a chat filter by its identifier. + * + *

Returns {@link ChatFilter ChatFilter}

+ */ + public static class GetChatFilter extends Function { + /** + * Chat filter identifier. + */ + public int chatFilterId; + + /** + * Default constructor for a function, which returns information about a chat filter by its identifier. + * + *

Returns {@link ChatFilter ChatFilter}

+ */ + public GetChatFilter() { + } + + /** + * Creates a function, which returns information about a chat filter by its identifier. + * + *

Returns {@link ChatFilter ChatFilter}

+ * + * @param chatFilterId Chat filter identifier. + */ + public GetChatFilter(int chatFilterId) { + this.chatFilterId = chatFilterId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1826317803; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns default icon name for a filter. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public static class GetChatFilterDefaultIconName extends Function { + /** + * Chat filter. + */ + public ChatFilter filter; + + /** + * Default constructor for a function, which returns default icon name for a filter. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public GetChatFilterDefaultIconName() { + } + + /** + * Creates a function, which returns default icon name for a filter. Can be called synchronously. + * + *

Returns {@link Text Text}

+ * + * @param filter Chat filter. + */ + public GetChatFilterDefaultIconName(ChatFilter filter) { + this.filter = filter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1339828680; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. This is an offline request if onlyLocal is true. + * + *

Returns {@link Messages Messages}

+ */ + public static class GetChatHistory extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + */ + public long fromMessageId; + /** + * Specify 0 to get results from exactly the fromMessageId or a negative offset up to 99 to get additionally some newer messages. + */ + public int offset; + /** + * The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + */ + public int limit; + /** + * If true, returns only messages that are available locally without sending network requests. + */ + public boolean onlyLocal; + + /** + * Default constructor for a function, which returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. This is an offline request if onlyLocal is true. + * + *

Returns {@link Messages Messages}

+ */ + public GetChatHistory() { + } + + /** + * Creates a function, which returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. This is an offline request if onlyLocal is true. + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Chat identifier. + * @param fromMessageId Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + * @param offset Specify 0 to get results from exactly the fromMessageId or a negative offset up to 99 to get additionally some newer messages. + * @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + * @param onlyLocal If true, returns only messages that are available locally without sending network requests. + */ + public GetChatHistory(long chatId, long fromMessageId, int offset, int limit, boolean onlyLocal) { + this.chatId = chatId; + this.fromMessageId = fromMessageId; + this.offset = offset; + this.limit = limit; + this.onlyLocal = onlyLocal; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -799960451; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns chat lists to which the chat can be added. This is an offline request. + * + *

Returns {@link ChatLists ChatLists}

+ */ + public static class GetChatListsToAddChat extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which returns chat lists to which the chat can be added. This is an offline request. + * + *

Returns {@link ChatLists ChatLists}

+ */ + public GetChatListsToAddChat() { + } + + /** + * Creates a function, which returns chat lists to which the chat can be added. This is an offline request. + * + *

Returns {@link ChatLists ChatLists}

+ * + * @param chatId Chat identifier. + */ + public GetChatListsToAddChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 654956193; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a single member of a chat. + * + *

Returns {@link ChatMember ChatMember}

+ */ + public static class GetChatMember extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * User identifier. + */ + public int userId; + + /** + * Default constructor for a function, which returns information about a single member of a chat. + * + *

Returns {@link ChatMember ChatMember}

+ */ + public GetChatMember() { + } + + /** + * Creates a function, which returns information about a single member of a chat. + * + *

Returns {@link ChatMember ChatMember}

+ * + * @param chatId Chat identifier. + * @param userId User identifier. + */ + public GetChatMember(long chatId, int userId) { + this.chatId = chatId; + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 677085892; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the last message sent in a chat no later than the specified date. + * + *

Returns {@link Message Message}

+ */ + public static class GetChatMessageByDate extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Point in time (Unix timestamp) relative to which to search for messages. + */ + public int date; + + /** + * Default constructor for a function, which returns the last message sent in a chat no later than the specified date. + * + *

Returns {@link Message Message}

+ */ + public GetChatMessageByDate() { + } + + /** + * Creates a function, which returns the last message sent in a chat no later than the specified date. + * + *

Returns {@link Message Message}

+ * + * @param chatId Chat identifier. + * @param date Point in time (Unix timestamp) relative to which to search for messages. + */ + public GetChatMessageByDate(long chatId, int date) { + this.chatId = chatId; + this.date = date; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1062564150; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns approximate number of messages of the specified type in the chat. + * + *

Returns {@link Count Count}

+ */ + public static class GetChatMessageCount extends Function { + /** + * Identifier of the chat in which to count messages. + */ + public long chatId; + /** + * Filter for message content; searchMessagesFilterEmpty is unsupported in this function. + */ + public SearchMessagesFilter filter; + /** + * If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown. + */ + public boolean returnLocal; + + /** + * Default constructor for a function, which returns approximate number of messages of the specified type in the chat. + * + *

Returns {@link Count Count}

+ */ + public GetChatMessageCount() { + } + + /** + * Creates a function, which returns approximate number of messages of the specified type in the chat. + * + *

Returns {@link Count Count}

+ * + * @param chatId Identifier of the chat in which to count messages. + * @param filter Filter for message content; searchMessagesFilterEmpty is unsupported in this function. + * @param returnLocal If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown. + */ + public GetChatMessageCount(long chatId, SearchMessagesFilter filter, boolean returnLocal) { + this.chatId = chatId; + this.filter = filter; + this.returnLocal = returnLocal; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 205435308; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns list of chats with non-default notification settings. + * + *

Returns {@link Chats Chats}

+ */ + public static class GetChatNotificationSettingsExceptions extends Function { + /** + * If specified, only chats from the specified scope will be returned. + */ + public NotificationSettingsScope scope; + /** + * If true, also chats with non-default sound will be returned. + */ + public boolean compareSound; + + /** + * Default constructor for a function, which returns list of chats with non-default notification settings. + * + *

Returns {@link Chats Chats}

+ */ + public GetChatNotificationSettingsExceptions() { + } + + /** + * Creates a function, which returns list of chats with non-default notification settings. + * + *

Returns {@link Chats Chats}

+ * + * @param scope If specified, only chats from the specified scope will be returned. + * @param compareSound If true, also chats with non-default sound will be returned. + */ + public GetChatNotificationSettingsExceptions(NotificationSettingsScope scope, boolean compareSound) { + this.scope = scope; + this.compareSound = compareSound; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 201199121; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a pinned chat message. + * + *

Returns {@link Message Message}

+ */ + public static class GetChatPinnedMessage extends Function { + /** + * Identifier of the chat the message belongs to. + */ + public long chatId; + + /** + * Default constructor for a function, which returns information about a pinned chat message. + * + *

Returns {@link Message Message}

+ */ + public GetChatPinnedMessage() { + } + + /** + * Creates a function, which returns information about a pinned chat message. + * + *

Returns {@link Message Message}

+ * + * @param chatId Identifier of the chat the message belongs to. + */ + public GetChatPinnedMessage(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 359865008; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). + * + *

Returns {@link Messages Messages}

+ */ + public static class GetChatScheduledMessages extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). + * + *

Returns {@link Messages Messages}

+ */ + public GetChatScheduledMessages() { + } + + /** + * Creates a function, which returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Chat identifier. + */ + public GetChatScheduledMessages(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -549638149; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns detailed statistics about a chat. Currently this method can be used only for supergroups and channels. Can be used only if SupergroupFullInfo.canGetStatistics == true. + * + *

Returns {@link ChatStatistics ChatStatistics}

+ */ + public static class GetChatStatistics extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Pass true if a dark theme is used by the application. + */ + public boolean isDark; + + /** + * Default constructor for a function, which returns detailed statistics about a chat. Currently this method can be used only for supergroups and channels. Can be used only if SupergroupFullInfo.canGetStatistics == true. + * + *

Returns {@link ChatStatistics ChatStatistics}

+ */ + public GetChatStatistics() { + } + + /** + * Creates a function, which returns detailed statistics about a chat. Currently this method can be used only for supergroups and channels. Can be used only if SupergroupFullInfo.canGetStatistics == true. + * + *

Returns {@link ChatStatistics ChatStatistics}

+ * + * @param chatId Chat identifier. + * @param isDark Pass true if a dark theme is used by the application. + */ + public GetChatStatistics(long chatId, boolean isDark) { + this.chatId = chatId; + this.isDark = isDark; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 327057816; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an HTTP URL with the chat statistics. Currently this method of getting the statistics are disabled and can be deleted in the future. + * + *

Returns {@link HttpUrl HttpUrl}

+ */ + public static class GetChatStatisticsUrl extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Parameters from "tg://statsrefresh?params=******" link. + */ + public String parameters; + /** + * Pass true if a URL with the dark theme must be returned. + */ + public boolean isDark; + + /** + * Default constructor for a function, which returns an HTTP URL with the chat statistics. Currently this method of getting the statistics are disabled and can be deleted in the future. + * + *

Returns {@link HttpUrl HttpUrl}

+ */ + public GetChatStatisticsUrl() { + } + + /** + * Creates a function, which returns an HTTP URL with the chat statistics. Currently this method of getting the statistics are disabled and can be deleted in the future. + * + *

Returns {@link HttpUrl HttpUrl}

+ * + * @param chatId Chat identifier. + * @param parameters Parameters from "tg://statsrefresh?params=******" link. + * @param isDark Pass true if a URL with the dark theme must be returned. + */ + public GetChatStatisticsUrl(long chatId, String parameters, boolean isDark) { + this.chatId = chatId; + this.parameters = parameters; + this.isDark = isDark; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1114621183; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an ordered list of chats in a chat list. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. (For example, to get a list of chats from the beginning, the offsetOrder should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). For optimal performance the number of returned chats is chosen by the library. + * + *

Returns {@link Chats Chats}

+ */ + public static class GetChats extends Function { + /** + * The chat list in which to return chats. + */ + public ChatList chatList; + /** + * Chat order to return chats from. + */ + public long offsetOrder; + /** + * Chat identifier to return chats from. + */ + public long offsetChatId; + /** + * The maximum number of chats to be returned. It is possible that fewer chats than the limit are returned even if the end of the list is not reached. + */ + public int limit; + + /** + * Default constructor for a function, which returns an ordered list of chats in a chat list. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. (For example, to get a list of chats from the beginning, the offsetOrder should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). For optimal performance the number of returned chats is chosen by the library. + * + *

Returns {@link Chats Chats}

+ */ + public GetChats() { + } + + /** + * Creates a function, which returns an ordered list of chats in a chat list. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. (For example, to get a list of chats from the beginning, the offsetOrder should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). For optimal performance the number of returned chats is chosen by the library. + * + *

Returns {@link Chats Chats}

+ * + * @param chatList The chat list in which to return chats. + * @param offsetOrder Chat order to return chats from. + * @param offsetChatId Chat identifier to return chats from. + * @param limit The maximum number of chats to be returned. It is possible that fewer chats than the limit are returned even if the end of the list is not reached. + */ + public GetChats(ChatList chatList, long offsetOrder, long offsetChatId, int limit) { + this.chatList = chatList; + this.offsetOrder = offsetOrder; + this.offsetChatId = offsetChatId; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1847129537; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all website where the current user used Telegram to log in. + * + *

Returns {@link ConnectedWebsites ConnectedWebsites}

+ */ + public static class GetConnectedWebsites extends Function { + + /** + * Default constructor for a function, which returns all website where the current user used Telegram to log in. + * + *

Returns {@link ConnectedWebsites ConnectedWebsites}

+ */ + public GetConnectedWebsites() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -170536110; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all user contacts. + * + *

Returns {@link Users Users}

+ */ + public static class GetContacts extends Function { + + /** + * Default constructor for a function, which returns all user contacts. + * + *

Returns {@link Users Users}

+ */ + public GetContacts() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1417722768; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about existing countries. Can be called before authorization. + * + *

Returns {@link Countries Countries}

+ */ + public static class GetCountries extends Function { + + /** + * Default constructor for a function, which returns information about existing countries. Can be called before authorization. + * + *

Returns {@link Countries Countries}

+ */ + public GetCountries() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -51902050; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Uses current user IP address to find their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization. + * + *

Returns {@link Text Text}

+ */ + public static class GetCountryCode extends Function { + + /** + * Default constructor for a function, which uses current user IP address to find their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization. + * + *

Returns {@link Text Text}

+ */ + public GetCountryCode() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1540593906; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of public chats of the specified type, owned by the user. + * + *

Returns {@link Chats Chats}

+ */ + public static class GetCreatedPublicChats extends Function { + /** + * Type of the public chats to return. + */ + public PublicChatType type; + + /** + * Default constructor for a function, which returns a list of public chats of the specified type, owned by the user. + * + *

Returns {@link Chats Chats}

+ */ + public GetCreatedPublicChats() { + } + + /** + * Creates a function, which returns a list of public chats of the specified type, owned by the user. + * + *

Returns {@link Chats Chats}

+ * + * @param type Type of the public chats to return. + */ + public GetCreatedPublicChats(PublicChatType type) { + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 710354415; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization. + * + *

Returns {@link Updates Updates}

+ */ + public static class GetCurrentState extends Function { + + /** + * Default constructor for a function, which returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization. + * + *

Returns {@link Updates Updates}

+ */ + public GetCurrentState() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1191417719; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns database statistics. + * + *

Returns {@link DatabaseStatistics DatabaseStatistics}

+ */ + public static class GetDatabaseStatistics extends Function { + + /** + * Default constructor for a function, which returns database statistics. + * + *

Returns {@link DatabaseStatistics DatabaseStatistics}

+ */ + public GetDatabaseStatistics() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1942760263; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:someUnsupportedFeature" for testing. Returns a 404 error for unknown links. Can be called before authorization. + * + *

Returns {@link DeepLinkInfo DeepLinkInfo}

+ */ + public static class GetDeepLinkInfo extends Function { + /** + * The link. + */ + public String link; + + /** + * Default constructor for a function, which returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:someUnsupportedFeature" for testing. Returns a 404 error for unknown links. Can be called before authorization. + * + *

Returns {@link DeepLinkInfo DeepLinkInfo}

+ */ + public GetDeepLinkInfo() { + } + + /** + * Creates a function, which returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:someUnsupportedFeature" for testing. Returns a 404 error for unknown links. Can be called before authorization. + * + *

Returns {@link DeepLinkInfo DeepLinkInfo}

+ * + * @param link The link. + */ + public GetDeepLinkInfo(String link) { + this.link = link; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 680673150; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation. + * + *

Returns {@link HttpUrl HttpUrl}

+ */ + public static class GetEmojiSuggestionsUrl extends Function { + /** + * Language code for which the emoji replacements will be suggested. + */ + public String languageCode; + + /** + * Default constructor for a function, which returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation. + * + *

Returns {@link HttpUrl HttpUrl}

+ */ + public GetEmojiSuggestionsUrl() { + } + + /** + * Creates a function, which returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation. + * + *

Returns {@link HttpUrl HttpUrl}

+ * + * @param languageCode Language code for which the emoji replacements will be suggested. + */ + public GetEmojiSuggestionsUrl(String languageCode) { + this.languageCode = languageCode; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1404101841; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns favorite stickers. + * + *

Returns {@link Stickers Stickers}

+ */ + public static class GetFavoriteStickers extends Function { + + /** + * Default constructor for a function, which returns favorite stickers. + * + *

Returns {@link Stickers Stickers}

+ */ + public GetFavoriteStickers() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -338964672; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a file; this is an offline request. + * + *

Returns {@link File File}

+ */ + public static class GetFile extends Function { + /** + * Identifier of the file to get. + */ + public int fileId; + + /** + * Default constructor for a function, which returns information about a file; this is an offline request. + * + *

Returns {@link File File}

+ */ + public GetFile() { + } + + /** + * Creates a function, which returns information about a file; this is an offline request. + * + *

Returns {@link File File}

+ * + * @param fileId Identifier of the file to get. + */ + public GetFile(int fileId) { + this.fileId = fileId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1553923406; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns file downloaded prefix size from a given offset. + * + *

Returns {@link Count Count}

+ */ + public static class GetFileDownloadedPrefixSize extends Function { + /** + * Identifier of the file. + */ + public int fileId; + /** + * Offset from which downloaded prefix size should be calculated. + */ + public int offset; + + /** + * Default constructor for a function, which returns file downloaded prefix size from a given offset. + * + *

Returns {@link Count Count}

+ */ + public GetFileDownloadedPrefixSize() { + } + + /** + * Creates a function, which returns file downloaded prefix size from a given offset. + * + *

Returns {@link Count Count}

+ * + * @param fileId Identifier of the file. + * @param offset Offset from which downloaded prefix size should be calculated. + */ + public GetFileDownloadedPrefixSize(int fileId, int offset) { + this.fileId = fileId; + this.offset = offset; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1668864864; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public static class GetFileExtension extends Function { + /** + * The MIME type of the file. + */ + public String mimeType; + + /** + * Default constructor for a function, which returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public GetFileExtension() { + } + + /** + * Creates a function, which returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ * + * @param mimeType The MIME type of the file. + */ + public GetFileExtension(String mimeType) { + this.mimeType = mimeType; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -106055372; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public static class GetFileMimeType extends Function { + /** + * The name of the file or path to the file. + */ + public String fileName; + + /** + * Default constructor for a function, which returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public GetFileMimeType() { + } + + /** + * Creates a function, which returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously. + * + *

Returns {@link Text Text}

+ * + * @param fileName The name of the file or path to the file. + */ + public GetFileMimeType(String fileName) { + this.fileName = fileName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2073879671; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only. + * + *

Returns {@link GameHighScores GameHighScores}

+ */ + public static class GetGameHighScores extends Function { + /** + * The chat that contains the message with the game. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * User identifier. + */ + public int userId; + + /** + * Default constructor for a function, which returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only. + * + *

Returns {@link GameHighScores GameHighScores}

+ */ + public GetGameHighScores() { + } + + /** + * Creates a function, which returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only. + * + *

Returns {@link GameHighScores GameHighScores}

+ * + * @param chatId The chat that contains the message with the game. + * @param messageId Identifier of the message. + * @param userId User identifier. + */ + public GetGameHighScores(long chatId, long messageId, int userId) { + this.chatId = chatId; + this.messageId = messageId; + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1920923753; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of common group chats with a given user. Chats are sorted by their type and creation date. + * + *

Returns {@link Chats Chats}

+ */ + public static class GetGroupsInCommon extends Function { + /** + * User identifier. + */ + public int userId; + /** + * Chat identifier starting from which to return chats; use 0 for the first request. + */ + public long offsetChatId; + /** + * The maximum number of chats to be returned; up to 100. + */ + public int limit; + + /** + * Default constructor for a function, which returns a list of common group chats with a given user. Chats are sorted by their type and creation date. + * + *

Returns {@link Chats Chats}

+ */ + public GetGroupsInCommon() { + } + + /** + * Creates a function, which returns a list of common group chats with a given user. Chats are sorted by their type and creation date. + * + *

Returns {@link Chats Chats}

+ * + * @param userId User identifier. + * @param offsetChatId Chat identifier starting from which to return chats; use 0 for the first request. + * @param limit The maximum number of chats to be returned; up to 100. + */ + public GetGroupsInCommon(int userId, long offsetChatId, int limit) { + this.userId = userId; + this.offsetChatId = offsetChatId; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -23238689; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the total number of imported contacts. + * + *

Returns {@link Count Count}

+ */ + public static class GetImportedContactCount extends Function { + + /** + * Default constructor for a function, which returns the total number of imported contacts. + * + *

Returns {@link Count Count}

+ */ + public GetImportedContactCount() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -656336346; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELSTOOMUCH error. + * + *

Returns {@link Chats Chats}

+ */ + public static class GetInactiveSupergroupChats extends Function { + + /** + * Default constructor for a function, which returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELSTOOMUCH error. + * + *

Returns {@link Chats Chats}

+ */ + public GetInactiveSupergroupChats() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -657720907; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns game high scores and some part of the high score table in the range of the specified user; for bots only. + * + *

Returns {@link GameHighScores GameHighScores}

+ */ + public static class GetInlineGameHighScores extends Function { + /** + * Inline message identifier. + */ + public String inlineMessageId; + /** + * User identifier. + */ + public int userId; + + /** + * Default constructor for a function, which returns game high scores and some part of the high score table in the range of the specified user; for bots only. + * + *

Returns {@link GameHighScores GameHighScores}

+ */ + public GetInlineGameHighScores() { + } + + /** + * Creates a function, which returns game high scores and some part of the high score table in the range of the specified user; for bots only. + * + *

Returns {@link GameHighScores GameHighScores}

+ * + * @param inlineMessageId Inline message identifier. + * @param userId User identifier. + */ + public GetInlineGameHighScores(String inlineMessageId, int userId) { + this.inlineMessageId = inlineMessageId; + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1833445800; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires. + * + *

Returns {@link InlineQueryResults InlineQueryResults}

+ */ + public static class GetInlineQueryResults extends Function { + /** + * The identifier of the target bot. + */ + public int botUserId; + /** + * Identifier of the chat where the query was sent. + */ + public long chatId; + /** + * Location of the user, only if needed. + */ + public Location userLocation; + /** + * Text of the query. + */ + public String query; + /** + * Offset of the first entry to return. + */ + public String offset; + + /** + * Default constructor for a function, which sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires. + * + *

Returns {@link InlineQueryResults InlineQueryResults}

+ */ + public GetInlineQueryResults() { + } + + /** + * Creates a function, which sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires. + * + *

Returns {@link InlineQueryResults InlineQueryResults}

+ * + * @param botUserId The identifier of the target bot. + * @param chatId Identifier of the chat where the query was sent. + * @param userLocation Location of the user, only if needed. + * @param query Text of the query. + * @param offset Offset of the first entry to return. + */ + public GetInlineQueryResults(int botUserId, long chatId, Location userLocation, String query, String offset) { + this.botUserId = botUserId; + this.chatId = chatId; + this.userLocation = userLocation; + this.query = query; + this.offset = offset; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1182511172; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of installed sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public static class GetInstalledStickerSets extends Function { + /** + * Pass true to return mask sticker sets; pass false to return ordinary sticker sets. + */ + public boolean isMasks; + + /** + * Default constructor for a function, which returns a list of installed sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public GetInstalledStickerSets() { + } + + /** + * Creates a function, which returns a list of installed sticker sets. + * + *

Returns {@link StickerSets StickerSets}

+ * + * @param isMasks Pass true to return mask sticker sets; pass false to return ordinary sticker sets. + */ + public GetInstalledStickerSets(boolean isMasks) { + this.isMasks = isMasks; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1214523749; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram. + * + *

Returns {@link Text Text}

+ */ + public static class GetInviteText extends Function { + + /** + * Default constructor for a function, which returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram. + * + *

Returns {@link Text Text}

+ */ + public GetInviteText() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 794573512; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public static class GetJsonString extends Function { + /** + * The JsonValue object. + */ + public JsonValue jsonValue; + + /** + * Default constructor for a function, which converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously. + * + *

Returns {@link Text Text}

+ */ + public GetJsonString() { + } + + /** + * Creates a function, which converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously. + * + *

Returns {@link Text Text}

+ * + * @param jsonValue The JsonValue object. + */ + public GetJsonString(JsonValue jsonValue) { + this.jsonValue = jsonValue; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 663458849; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously. + * + *

Returns {@link JsonValue JsonValue}

+ */ + public static class GetJsonValue extends Function { + /** + * The JSON-serialized string. + */ + public String json; + + /** + * Default constructor for a function, which converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously. + * + *

Returns {@link JsonValue JsonValue}

+ */ + public GetJsonValue() { + } + + /** + * Creates a function, which converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously. + * + *

Returns {@link JsonValue JsonValue}

+ * + * @param json The JSON-serialized string. + */ + public GetJsonValue(String json) { + this.json = json; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1829086715; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization. + * + *

Returns {@link LanguagePackInfo LanguagePackInfo}

+ */ + public static class GetLanguagePackInfo extends Function { + /** + * Language pack identifier. + */ + public String languagePackId; + + /** + * Default constructor for a function, which returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization. + * + *

Returns {@link LanguagePackInfo LanguagePackInfo}

+ */ + public GetLanguagePackInfo() { + } + + /** + * Creates a function, which returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization. + * + *

Returns {@link LanguagePackInfo LanguagePackInfo}

+ * + * @param languagePackId Language pack identifier. + */ + public GetLanguagePackInfo(String languagePackId) { + this.languagePackId = languagePackId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2077809320; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously. + * + *

Returns {@link LanguagePackStringValue LanguagePackStringValue}

+ */ + public static class GetLanguagePackString extends Function { + /** + * Path to the language pack database in which strings are stored. + */ + public String languagePackDatabasePath; + /** + * Localization target to which the language pack belongs. + */ + public String localizationTarget; + /** + * Language pack identifier. + */ + public String languagePackId; + /** + * Language pack key of the string to be returned. + */ + public String key; + + /** + * Default constructor for a function, which returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously. + * + *

Returns {@link LanguagePackStringValue LanguagePackStringValue}

+ */ + public GetLanguagePackString() { + } + + /** + * Creates a function, which returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously. + * + *

Returns {@link LanguagePackStringValue LanguagePackStringValue}

+ * + * @param languagePackDatabasePath Path to the language pack database in which strings are stored. + * @param localizationTarget Localization target to which the language pack belongs. + * @param languagePackId Language pack identifier. + * @param key Language pack key of the string to be returned. + */ + public GetLanguagePackString(String languagePackDatabasePath, String localizationTarget, String languagePackId, String key) { + this.languagePackDatabasePath = languagePackDatabasePath; + this.localizationTarget = localizationTarget; + this.languagePackId = languagePackId; + this.key = key; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 150789747; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns strings from a language pack in the current localization target by their keys. Can be called before authorization. + * + *

Returns {@link LanguagePackStrings LanguagePackStrings}

+ */ + public static class GetLanguagePackStrings extends Function { + /** + * Language pack identifier of the strings to be returned. + */ + public String languagePackId; + /** + * Language pack keys of the strings to be returned; leave empty to request all available strings. + */ + public String[] keys; + + /** + * Default constructor for a function, which returns strings from a language pack in the current localization target by their keys. Can be called before authorization. + * + *

Returns {@link LanguagePackStrings LanguagePackStrings}

+ */ + public GetLanguagePackStrings() { + } + + /** + * Creates a function, which returns strings from a language pack in the current localization target by their keys. Can be called before authorization. + * + *

Returns {@link LanguagePackStrings LanguagePackStrings}

+ * + * @param languagePackId Language pack identifier of the strings to be returned. + * @param keys Language pack keys of the strings to be returned; leave empty to request all available strings. + */ + public GetLanguagePackStrings(String languagePackId, String[] keys) { + this.languagePackId = languagePackId; + this.keys = keys; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1246259088; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about the current localization target. This is an offline request if onlyLocal is true. Can be called before authorization. + * + *

Returns {@link LocalizationTargetInfo LocalizationTargetInfo}

+ */ + public static class GetLocalizationTargetInfo extends Function { + /** + * If true, returns only locally available information without sending network requests. + */ + public boolean onlyLocal; + + /** + * Default constructor for a function, which returns information about the current localization target. This is an offline request if onlyLocal is true. Can be called before authorization. + * + *

Returns {@link LocalizationTargetInfo LocalizationTargetInfo}

+ */ + public GetLocalizationTargetInfo() { + } + + /** + * Creates a function, which returns information about the current localization target. This is an offline request if onlyLocal is true. Can be called before authorization. + * + *

Returns {@link LocalizationTargetInfo LocalizationTargetInfo}

+ * + * @param onlyLocal If true, returns only locally available information without sending network requests. + */ + public GetLocalizationTargetInfo(boolean onlyLocal) { + this.onlyLocal = onlyLocal; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1849499526; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link LogStream LogStream}

+ */ + public static class GetLogStream extends Function { + + /** + * Default constructor for a function, which returns information about currently used log stream for internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link LogStream LogStream}

+ */ + public GetLogStream() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1167608667; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously. + * + *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

+ */ + public static class GetLogTagVerbosityLevel extends Function { + /** + * Logging tag to change verbosity level. + */ + public String tag; + + /** + * Default constructor for a function, which returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously. + * + *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

+ */ + public GetLogTagVerbosityLevel() { + } + + /** + * Creates a function, which returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously. + * + *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

+ * + * @param tag Logging tag to change verbosity level. + */ + public GetLogTagVerbosityLevel(String tag) { + this.tag = tag; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 951004547; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously. + * + *

Returns {@link LogTags LogTags}

+ */ + public static class GetLogTags extends Function { + + /** + * Default constructor for a function, which returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously. + * + *

Returns {@link LogTags LogTags}

+ */ + public GetLogTags() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -254449190; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns current verbosity level of the internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

+ */ + public static class GetLogVerbosityLevel extends Function { + + /** + * Default constructor for a function, which returns current verbosity level of the internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

+ */ + public GetLogVerbosityLevel() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 594057956; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button. + * + *

Returns {@link HttpUrl HttpUrl}

+ */ + public static class GetLoginUrl extends Function { + /** + * Chat identifier of the message with the button. + */ + public long chatId; + /** + * Message identifier of the message with the button. + */ + public long messageId; + /** + * Button identifier. + */ + public int buttonId; + /** + * True, if the user allowed the bot to send them messages. + */ + public boolean allowWriteAccess; + + /** + * Default constructor for a function, which returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button. + * + *

Returns {@link HttpUrl HttpUrl}

+ */ + public GetLoginUrl() { + } + + /** + * Creates a function, which returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button. + * + *

Returns {@link HttpUrl HttpUrl}

+ * + * @param chatId Chat identifier of the message with the button. + * @param messageId Message identifier of the message with the button. + * @param buttonId Button identifier. + * @param allowWriteAccess True, if the user allowed the bot to send them messages. + */ + public GetLoginUrl(long chatId, long messageId, int buttonId, boolean allowWriteAccess) { + this.chatId = chatId; + this.messageId = messageId; + this.buttonId = buttonId; + this.allowWriteAccess = allowWriteAccess; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 694973925; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button. + * + *

Returns {@link LoginUrlInfo LoginUrlInfo}

+ */ + public static class GetLoginUrlInfo extends Function { + /** + * Chat identifier of the message with the button. + */ + public long chatId; + /** + * Message identifier of the message with the button. + */ + public long messageId; + /** + * Button identifier. + */ + public int buttonId; + + /** + * Default constructor for a function, which returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button. + * + *

Returns {@link LoginUrlInfo LoginUrlInfo}

+ */ + public GetLoginUrlInfo() { + } + + /** + * Creates a function, which returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button. + * + *

Returns {@link LoginUrlInfo LoginUrlInfo}

+ * + * @param chatId Chat identifier of the message with the button. + * @param messageId Message identifier of the message with the button. + * @param buttonId Button identifier. + */ + public GetLoginUrlInfo(long chatId, long messageId, int buttonId) { + this.chatId = chatId; + this.messageId = messageId; + this.buttonId = buttonId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -980042966; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded. + * + *

Returns {@link File File}

+ */ + public static class GetMapThumbnailFile extends Function { + /** + * Location of the map center. + */ + public Location location; + /** + * Map zoom level; 13-20. + */ + public int zoom; + /** + * Map width in pixels before applying scale; 16-1024. + */ + public int width; + /** + * Map height in pixels before applying scale; 16-1024. + */ + public int height; + /** + * Map scale; 1-3. + */ + public int scale; + /** + * Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown. + */ + public long chatId; + + /** + * Default constructor for a function, which returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded. + * + *

Returns {@link File File}

+ */ + public GetMapThumbnailFile() { + } + + /** + * Creates a function, which returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded. + * + *

Returns {@link File File}

+ * + * @param location Location of the map center. + * @param zoom Map zoom level; 13-20. + * @param width Map width in pixels before applying scale; 16-1024. + * @param height Map height in pixels before applying scale; 16-1024. + * @param scale Map scale; 1-3. + * @param chatId Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown. + */ + public GetMapThumbnailFile(Location location, int zoom, int width, int height, int scale, long chatId) { + this.location = location; + this.zoom = zoom; + this.width = width; + this.height = height; + this.scale = scale; + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -152660070; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ */ + public static class GetMarkdownText extends Function { + /** + * The text. + */ + public FormattedText text; + + /** + * Default constructor for a function, which replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ */ + public GetMarkdownText() { + } + + /** + * Creates a function, which replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ * + * @param text The text. + */ + public GetMarkdownText(FormattedText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 164524584; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the current user. + * + *

Returns {@link User User}

+ */ + public static class GetMe extends Function { + + /** + * Default constructor for a function, which returns the current user. + * + *

Returns {@link User User}

+ */ + public GetMe() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -191516033; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a message. + * + *

Returns {@link Message Message}

+ */ + public static class GetMessage extends Function { + /** + * Identifier of the chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message to get. + */ + public long messageId; + + /** + * Default constructor for a function, which returns information about a message. + * + *

Returns {@link Message Message}

+ */ + public GetMessage() { + } + + /** + * Creates a function, which returns information about a message. + * + *

Returns {@link Message Message}

+ * + * @param chatId Identifier of the chat the message belongs to. + * @param messageId Identifier of the message to get. + */ + public GetMessage(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1821196160; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username. + * + *

Returns {@link Text Text}

+ */ + public static class GetMessageEmbeddingCode extends Function { + /** + * Identifier of the chat to which the message belongs. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * Pass true to return an HTML code for embedding of the whole media album. + */ + public boolean forAlbum; + + /** + * Default constructor for a function, which returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username. + * + *

Returns {@link Text Text}

+ */ + public GetMessageEmbeddingCode() { + } + + /** + * Creates a function, which returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username. + * + *

Returns {@link Text Text}

+ * + * @param chatId Identifier of the chat to which the message belongs. + * @param messageId Identifier of the message. + * @param forAlbum Pass true to return an HTML code for embedding of the whole media album. + */ + public GetMessageEmbeddingCode(long chatId, long messageId, boolean forAlbum) { + this.chatId = chatId; + this.messageId = messageId; + this.forAlbum = forAlbum; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1654967561; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. This is an offline request. + * + *

Returns {@link MessageLink MessageLink}

+ */ + public static class GetMessageLink extends Function { + /** + * Identifier of the chat to which the message belongs. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * Pass true to create a link for the whole media album. + */ + public boolean forAlbum; + /** + * Pass true to create a link to the message as a channel post comment, or from a message thread. + */ + public boolean forComment; + + /** + * Default constructor for a function, which returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. This is an offline request. + * + *

Returns {@link MessageLink MessageLink}

+ */ + public GetMessageLink() { + } + + /** + * Creates a function, which returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. This is an offline request. + * + *

Returns {@link MessageLink MessageLink}

+ * + * @param chatId Identifier of the chat to which the message belongs. + * @param messageId Identifier of the message. + * @param forAlbum Pass true to create a link for the whole media album. + * @param forComment Pass true to create a link to the message as a channel post comment, or from a message thread. + */ + public GetMessageLink(long chatId, long messageId, boolean forAlbum, boolean forComment) { + this.chatId = chatId; + this.messageId = messageId; + this.forAlbum = forAlbum; + this.forComment = forComment; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -177667137; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a public or private message link. + * + *

Returns {@link MessageLinkInfo MessageLinkInfo}

+ */ + public static class GetMessageLinkInfo extends Function { + /** + * The message link in the format "https://t.me/c/...", or "tg://privatepost?...", or "https://t.me/username/...", or "tg://resolve?...". + */ + public String url; + + /** + * Default constructor for a function, which returns information about a public or private message link. + * + *

Returns {@link MessageLinkInfo MessageLinkInfo}

+ */ + public GetMessageLinkInfo() { + } + + /** + * Creates a function, which returns information about a public or private message link. + * + *

Returns {@link MessageLinkInfo MessageLinkInfo}

+ * + * @param url The message link in the format "https://t.me/c/...", or "tg://privatepost?...", or "https://t.me/username/...", or "tg://resolve?...". + */ + public GetMessageLinkInfo(String url) { + this.url = url; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -700533672; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a message, if it is available locally without sending network request. This is an offline request. + * + *

Returns {@link Message Message}

+ */ + public static class GetMessageLocally extends Function { + /** + * Identifier of the chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message to get. + */ + public long messageId; + + /** + * Default constructor for a function, which returns information about a message, if it is available locally without sending network request. This is an offline request. + * + *

Returns {@link Message Message}

+ */ + public GetMessageLocally() { + } + + /** + * Creates a function, which returns information about a message, if it is available locally without sending network request. This is an offline request. + * + *

Returns {@link Message Message}

+ * + * @param chatId Identifier of the chat the message belongs to. + * @param messageId Identifier of the message to get. + */ + public GetMessageLocally(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -603575444; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns forwarded copies of a channel message to another public channels. For optimal performance the number of returned messages is chosen by the library. The method is under development and may or may not work. + * + *

Returns {@link FoundMessages FoundMessages}

+ */ + public static class GetMessagePublicForwards extends Function { + /** + * Chat identifier of the message. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + /** + * Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results. + */ + public String offset; + /** + * The maximum number of messages to be returned; must be positive and can't be greater than 100. Fewer messages may be returned than specified by the limit, even if the end of the list has not been reached. + */ + public int limit; + + /** + * Default constructor for a function, which returns forwarded copies of a channel message to another public channels. For optimal performance the number of returned messages is chosen by the library. The method is under development and may or may not work. + * + *

Returns {@link FoundMessages FoundMessages}

+ */ + public GetMessagePublicForwards() { + } + + /** + * Creates a function, which returns forwarded copies of a channel message to another public channels. For optimal performance the number of returned messages is chosen by the library. The method is under development and may or may not work. + * + *

Returns {@link FoundMessages FoundMessages}

+ * + * @param chatId Chat identifier of the message. + * @param messageId Message identifier. + * @param offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results. + * @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. Fewer messages may be returned than specified by the limit, even if the end of the list has not been reached. + */ + public GetMessagePublicForwards(long chatId, long messageId, String offset, int limit) { + this.chatId = chatId; + this.messageId = messageId; + this.offset = offset; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1611049289; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns detailed statistics about a message. Can be used only if Message.canGetStatistics == true. The method is under development and may or may not work. + * + *

Returns {@link MessageStatistics MessageStatistics}

+ */ + public static class GetMessageStatistics extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + /** + * Pass true if a dark theme is used by the application. + */ + public boolean isDark; + + /** + * Default constructor for a function, which returns detailed statistics about a message. Can be used only if Message.canGetStatistics == true. The method is under development and may or may not work. + * + *

Returns {@link MessageStatistics MessageStatistics}

+ */ + public GetMessageStatistics() { + } + + /** + * Creates a function, which returns detailed statistics about a message. Can be used only if Message.canGetStatistics == true. The method is under development and may or may not work. + * + *

Returns {@link MessageStatistics MessageStatistics}

+ * + * @param chatId Chat identifier. + * @param messageId Message identifier. + * @param isDark Pass true if a dark theme is used by the application. + */ + public GetMessageStatistics(long chatId, long messageId, boolean isDark) { + this.chatId = chatId; + this.messageId = messageId; + this.isDark = isDark; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1270194648; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a message thread. Can be used only if message.canGetMessageThread == true. + * + *

Returns {@link MessageThreadInfo MessageThreadInfo}

+ */ + public static class GetMessageThread extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + + /** + * Default constructor for a function, which returns information about a message thread. Can be used only if message.canGetMessageThread == true. + * + *

Returns {@link MessageThreadInfo MessageThreadInfo}

+ */ + public GetMessageThread() { + } + + /** + * Creates a function, which returns information about a message thread. Can be used only if message.canGetMessageThread == true. + * + *

Returns {@link MessageThreadInfo MessageThreadInfo}

+ * + * @param chatId Chat identifier. + * @param messageId Identifier of the message. + */ + public GetMessageThread(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2062695998; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns messages in a message thread of a message. Can be used only if message.canGetMessageThread == true. Message thread of a channel message is in the channel's linked supergroup. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ */ + public static class GetMessageThreadHistory extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Message identifier, which thread history needs to be returned. + */ + public long messageId; + /** + * Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + */ + public long fromMessageId; + /** + * Specify 0 to get results from exactly the fromMessageId or a negative offset up to 99 to get additionally some newer messages. + */ + public int offset; + /** + * The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. Fewer messages may be returned than specified by the limit, even if the end of the message thread history has not been reached. + */ + public int limit; + + /** + * Default constructor for a function, which returns messages in a message thread of a message. Can be used only if message.canGetMessageThread == true. Message thread of a channel message is in the channel's linked supergroup. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ */ + public GetMessageThreadHistory() { + } + + /** + * Creates a function, which returns messages in a message thread of a message. Can be used only if message.canGetMessageThread == true. Message thread of a channel message is in the channel's linked supergroup. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Chat identifier. + * @param messageId Message identifier, which thread history needs to be returned. + * @param fromMessageId Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + * @param offset Specify 0 to get results from exactly the fromMessageId or a negative offset up to 99 to get additionally some newer messages. + * @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. Fewer messages may be returned than specified by the limit, even if the end of the message thread history has not been reached. + */ + public GetMessageThreadHistory(long chatId, long messageId, long fromMessageId, int offset, int limit) { + this.chatId = chatId; + this.messageId = messageId; + this.fromMessageId = fromMessageId; + this.offset = offset; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1808411608; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about messages. If a message is not found, returns null on the corresponding position of the result. + * + *

Returns {@link Messages Messages}

+ */ + public static class GetMessages extends Function { + /** + * Identifier of the chat the messages belong to. + */ + public long chatId; + /** + * Identifiers of the messages to get. + */ + public long[] messageIds; + + /** + * Default constructor for a function, which returns information about messages. If a message is not found, returns null on the corresponding position of the result. + * + *

Returns {@link Messages Messages}

+ */ + public GetMessages() { + } + + /** + * Creates a function, which returns information about messages. If a message is not found, returns null on the corresponding position of the result. + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Identifier of the chat the messages belong to. + * @param messageIds Identifiers of the messages to get. + */ + public GetMessages(long chatId, long[] messageIds) { + this.chatId = chatId; + this.messageIds = messageIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 425299338; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns network data usage statistics. Can be called before authorization. + * + *

Returns {@link NetworkStatistics NetworkStatistics}

+ */ + public static class GetNetworkStatistics extends Function { + /** + * If true, returns only data for the current library launch. + */ + public boolean onlyCurrent; + + /** + * Default constructor for a function, which returns network data usage statistics. Can be called before authorization. + * + *

Returns {@link NetworkStatistics NetworkStatistics}

+ */ + public GetNetworkStatistics() { + } + + /** + * Creates a function, which returns network data usage statistics. Can be called before authorization. + * + *

Returns {@link NetworkStatistics NetworkStatistics}

+ * + * @param onlyCurrent If true, returns only data for the current library launch. + */ + public GetNetworkStatistics(boolean onlyCurrent) { + this.onlyCurrent = onlyCurrent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -986228706; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization. + * + *

Returns {@link OptionValue OptionValue}

+ */ + public static class GetOption extends Function { + /** + * The name of the option. + */ + public String name; + + /** + * Default constructor for a function, which returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization. + * + *

Returns {@link OptionValue OptionValue}

+ */ + public GetOption() { + } + + /** + * Creates a function, which returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization. + * + *

Returns {@link OptionValue OptionValue}

+ * + * @param name The name of the option. + */ + public GetOption(String name) { + this.name = name; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1572495746; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a Telegram Passport authorization form for sharing data with a service. + * + *

Returns {@link PassportAuthorizationForm PassportAuthorizationForm}

+ */ + public static class GetPassportAuthorizationForm extends Function { + /** + * User identifier of the service's bot. + */ + public int botUserId; + /** + * Telegram Passport element types requested by the service. + */ + public String scope; + /** + * Service's publicKey. + */ + public String publicKey; + /** + * Authorization form nonce provided by the service. + */ + public String nonce; + + /** + * Default constructor for a function, which returns a Telegram Passport authorization form for sharing data with a service. + * + *

Returns {@link PassportAuthorizationForm PassportAuthorizationForm}

+ */ + public GetPassportAuthorizationForm() { + } + + /** + * Creates a function, which returns a Telegram Passport authorization form for sharing data with a service. + * + *

Returns {@link PassportAuthorizationForm PassportAuthorizationForm}

+ * + * @param botUserId User identifier of the service's bot. + * @param scope Telegram Passport element types requested by the service. + * @param publicKey Service's publicKey. + * @param nonce Authorization form nonce provided by the service. + */ + public GetPassportAuthorizationForm(int botUserId, String scope, String publicKey, String nonce) { + this.botUserId = botUserId; + this.scope = scope; + this.publicKey = publicKey; + this.nonce = nonce; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1468394095; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form. + * + *

Returns {@link PassportElementsWithErrors PassportElementsWithErrors}

+ */ + public static class GetPassportAuthorizationFormAvailableElements extends Function { + /** + * Authorization form identifier. + */ + public int autorizationFormId; + /** + * Password of the current user. + */ + public String password; + + /** + * Default constructor for a function, which returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form. + * + *

Returns {@link PassportElementsWithErrors PassportElementsWithErrors}

+ */ + public GetPassportAuthorizationFormAvailableElements() { + } + + /** + * Creates a function, which returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form. + * + *

Returns {@link PassportElementsWithErrors PassportElementsWithErrors}

+ * + * @param autorizationFormId Authorization form identifier. + * @param password Password of the current user. + */ + public GetPassportAuthorizationFormAvailableElements(int autorizationFormId, String password) { + this.autorizationFormId = autorizationFormId; + this.password = password; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1738134754; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns one of the available Telegram Passport elements. + * + *

Returns {@link PassportElement PassportElement}

+ */ + public static class GetPassportElement extends Function { + /** + * Telegram Passport element type. + */ + public PassportElementType type; + /** + * Password of the current user. + */ + public String password; + + /** + * Default constructor for a function, which returns one of the available Telegram Passport elements. + * + *

Returns {@link PassportElement PassportElement}

+ */ + public GetPassportElement() { + } + + /** + * Creates a function, which returns one of the available Telegram Passport elements. + * + *

Returns {@link PassportElement PassportElement}

+ * + * @param type Telegram Passport element type. + * @param password Password of the current user. + */ + public GetPassportElement(PassportElementType type, String password) { + this.type = type; + this.password = password; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1882398342; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the current state of 2-step verification. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public static class GetPasswordState extends Function { + + /** + * Default constructor for a function, which returns the current state of 2-step verification. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public GetPasswordState() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -174752904; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy. + * + *

Returns {@link PaymentForm PaymentForm}

+ */ + public static class GetPaymentForm extends Function { + /** + * Chat identifier of the Invoice message. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + + /** + * Default constructor for a function, which returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy. + * + *

Returns {@link PaymentForm PaymentForm}

+ */ + public GetPaymentForm() { + } + + /** + * Creates a function, which returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy. + * + *

Returns {@link PaymentForm PaymentForm}

+ * + * @param chatId Chat identifier of the Invoice message. + * @param messageId Message identifier. + */ + public GetPaymentForm(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2146950882; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a successful payment. + * + *

Returns {@link PaymentReceipt PaymentReceipt}

+ */ + public static class GetPaymentReceipt extends Function { + /** + * Chat identifier of the PaymentSuccessful message. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + + /** + * Default constructor for a function, which returns information about a successful payment. + * + *

Returns {@link PaymentReceipt PaymentReceipt}

+ */ + public GetPaymentReceipt() { + } + + /** + * Creates a function, which returns information about a successful payment. + * + *

Returns {@link PaymentReceipt PaymentReceipt}

+ * + * @param chatId Chat identifier of the PaymentSuccessful message. + * @param messageId Message identifier. + */ + public GetPaymentReceipt(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1013758294; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a phone number by its prefix. Can be called before authorization. + * + *

Returns {@link PhoneNumberInfo PhoneNumberInfo}

+ */ + public static class GetPhoneNumberInfo extends Function { + /** + * The phone number prefix. + */ + public String phoneNumberPrefix; + + /** + * Default constructor for a function, which returns information about a phone number by its prefix. Can be called before authorization. + * + *

Returns {@link PhoneNumberInfo PhoneNumberInfo}

+ */ + public GetPhoneNumberInfo() { + } + + /** + * Creates a function, which returns information about a phone number by its prefix. Can be called before authorization. + * + *

Returns {@link PhoneNumberInfo PhoneNumberInfo}

+ * + * @param phoneNumberPrefix The phone number prefix. + */ + public GetPhoneNumberInfo(String phoneNumberPrefix) { + this.phoneNumberPrefix = phoneNumberPrefix; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1608344583; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library. + * + *

Returns {@link Users Users}

+ */ + public static class GetPollVoters extends Function { + /** + * Identifier of the chat to which the poll belongs. + */ + public long chatId; + /** + * Identifier of the message containing the poll. + */ + public long messageId; + /** + * 0-based identifier of the answer option. + */ + public int optionId; + /** + * Number of users to skip in the result; must be non-negative. + */ + public int offset; + /** + * The maximum number of users to be returned; must be positive and can't be greater than 50. Fewer users may be returned than specified by the limit, even if the end of the voter list has not been reached. + */ + public int limit; + + /** + * Default constructor for a function, which returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library. + * + *

Returns {@link Users Users}

+ */ + public GetPollVoters() { + } + + /** + * Creates a function, which returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library. + * + *

Returns {@link Users Users}

+ * + * @param chatId Identifier of the chat to which the poll belongs. + * @param messageId Identifier of the message containing the poll. + * @param optionId 0-based identifier of the answer option. + * @param offset Number of users to skip in the result; must be non-negative. + * @param limit The maximum number of users to be returned; must be positive and can't be greater than 50. Fewer users may be returned than specified by the limit, even if the end of the voter list has not been reached. + */ + public GetPollVoters(long chatId, long messageId, int optionId, int offset, int limit) { + this.chatId = chatId; + this.messageId = messageId; + this.optionId = optionId; + this.offset = offset; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2075288734; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown. + * + *

Returns {@link Text Text}

+ */ + public static class GetPreferredCountryLanguage extends Function { + /** + * A two-letter ISO 3166-1 alpha-2 country code. + */ + public String countryCode; + + /** + * Default constructor for a function, which returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown. + * + *

Returns {@link Text Text}

+ */ + public GetPreferredCountryLanguage() { + } + + /** + * Creates a function, which returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown. + * + *

Returns {@link Text Text}

+ * + * @param countryCode A two-letter ISO 3166-1 alpha-2 country code. + */ + public GetPreferredCountryLanguage(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -933049386; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns list of proxies that are currently set up. Can be called before authorization. + * + *

Returns {@link Proxies Proxies}

+ */ + public static class GetProxies extends Function { + + /** + * Default constructor for a function, which returns list of proxies that are currently set up. Can be called before authorization. + * + *

Returns {@link Proxies Proxies}

+ */ + public GetProxies() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -95026381; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization. + * + *

Returns {@link Text Text}

+ */ + public static class GetProxyLink extends Function { + /** + * Proxy identifier. + */ + public int proxyId; + + /** + * Default constructor for a function, which returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization. + * + *

Returns {@link Text Text}

+ */ + public GetProxyLink() { + } + + /** + * Creates a function, which returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization. + * + *

Returns {@link Text Text}

+ * + * @param proxyId Proxy identifier. + */ + public GetProxyLink(int proxyId) { + this.proxyId = proxyId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1285597664; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously. + * + *

Returns {@link PushReceiverId PushReceiverId}

+ */ + public static class GetPushReceiverId extends Function { + /** + * JSON-encoded push notification payload. + */ + public String payload; + + /** + * Default constructor for a function, which returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously. + * + *

Returns {@link PushReceiverId PushReceiverId}

+ */ + public GetPushReceiverId() { + } + + /** + * Creates a function, which returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously. + * + *

Returns {@link PushReceiverId PushReceiverId}

+ * + * @param payload JSON-encoded push notification payload. + */ + public GetPushReceiverId(String payload) { + this.payload = payload; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -286505294; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns up to 20 recently used inline bots in the order of their last usage. + * + *

Returns {@link Users Users}

+ */ + public static class GetRecentInlineBots extends Function { + + /** + * Default constructor for a function, which returns up to 20 recently used inline bots in the order of their last usage. + * + *

Returns {@link Users Users}

+ */ + public GetRecentInlineBots() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1437823548; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of recently used stickers. + * + *

Returns {@link Stickers Stickers}

+ */ + public static class GetRecentStickers extends Function { + /** + * Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers. + */ + public boolean isAttached; + + /** + * Default constructor for a function, which returns a list of recently used stickers. + * + *

Returns {@link Stickers Stickers}

+ */ + public GetRecentStickers() { + } + + /** + * Creates a function, which returns a list of recently used stickers. + * + *

Returns {@link Stickers Stickers}

+ * + * @param isAttached Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers. + */ + public GetRecentStickers(boolean isAttached) { + this.isAttached = isAttached; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -579622241; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns t.me URLs recently visited by a newly registered user. + * + *

Returns {@link TMeUrls TMeUrls}

+ */ + public static class GetRecentlyVisitedTMeUrls extends Function { + /** + * Google Play referrer to identify the user. + */ + public String referrer; + + /** + * Default constructor for a function, which returns t.me URLs recently visited by a newly registered user. + * + *

Returns {@link TMeUrls TMeUrls}

+ */ + public GetRecentlyVisitedTMeUrls() { + } + + /** + * Creates a function, which returns t.me URLs recently visited by a newly registered user. + * + *

Returns {@link TMeUrls TMeUrls}

+ * + * @param referrer Google Play referrer to identify the user. + */ + public GetRecentlyVisitedTMeUrls(String referrer) { + this.referrer = referrer; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 806754961; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns recommended chat filters for the current user. + * + *

Returns {@link RecommendedChatFilters RecommendedChatFilters}

+ */ + public static class GetRecommendedChatFilters extends Function { + + /** + * Default constructor for a function, which returns recommended chat filters for the current user. + * + *

Returns {@link RecommendedChatFilters RecommendedChatFilters}

+ */ + public GetRecommendedChatFilters() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -779390746; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user. + * + *

Returns {@link RecoveryEmailAddress RecoveryEmailAddress}

+ */ + public static class GetRecoveryEmailAddress extends Function { + /** + * The password for the current user. + */ + public String password; + + /** + * Default constructor for a function, which returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user. + * + *

Returns {@link RecoveryEmailAddress RecoveryEmailAddress}

+ */ + public GetRecoveryEmailAddress() { + } + + /** + * Creates a function, which returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user. + * + *

Returns {@link RecoveryEmailAddress RecoveryEmailAddress}

+ * + * @param password The password for the current user. + */ + public GetRecoveryEmailAddress(String password) { + this.password = password; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1594770947; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application. + * + *

Returns {@link File File}

+ */ + public static class GetRemoteFile extends Function { + /** + * Remote identifier of the file to get. + */ + public String remoteFileId; + /** + * File type, if known. + */ + public FileType fileType; + + /** + * Default constructor for a function, which returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application. + * + *

Returns {@link File File}

+ */ + public GetRemoteFile() { + } + + /** + * Creates a function, which returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application. + * + *

Returns {@link File File}

+ * + * @param remoteFileId Remote identifier of the file to get. + * @param fileType File type, if known. + */ + public GetRemoteFile(String remoteFileId, FileType fileType) { + this.remoteFileId = remoteFileId; + this.fileType = fileType; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2137204530; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively. + * + *

Returns {@link Message Message}

+ */ + public static class GetRepliedMessage extends Function { + /** + * Identifier of the chat the message belongs to. + */ + public long chatId; + /** + * Identifier of the message reply to which to get. + */ + public long messageId; + + /** + * Default constructor for a function, which returns information about a message that is replied by a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively. + * + *

Returns {@link Message Message}

+ */ + public GetRepliedMessage() { + } + + /** + * Creates a function, which returns information about a message that is replied by a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively. + * + *

Returns {@link Message Message}

+ * + * @param chatId Identifier of the chat the message belongs to. + * @param messageId Identifier of the message reply to which to get. + */ + public GetRepliedMessage(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -641918531; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns saved animations. + * + *

Returns {@link Animations Animations}

+ */ + public static class GetSavedAnimations extends Function { + + /** + * Default constructor for a function, which returns saved animations. + * + *

Returns {@link Animations Animations}

+ */ + public GetSavedAnimations() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 7051032; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns saved order info, if any. + * + *

Returns {@link OrderInfo OrderInfo}

+ */ + public static class GetSavedOrderInfo extends Function { + + /** + * Default constructor for a function, which returns saved order info, if any. + * + *

Returns {@link OrderInfo OrderInfo}

+ */ + public GetSavedOrderInfo() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1152016675; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the notification settings for chats of a given type. + * + *

Returns {@link ScopeNotificationSettings ScopeNotificationSettings}

+ */ + public static class GetScopeNotificationSettings extends Function { + /** + * Types of chats for which to return the notification settings information. + */ + public NotificationSettingsScope scope; + + /** + * Default constructor for a function, which returns the notification settings for chats of a given type. + * + *

Returns {@link ScopeNotificationSettings ScopeNotificationSettings}

+ */ + public GetScopeNotificationSettings() { + } + + /** + * Creates a function, which returns the notification settings for chats of a given type. + * + *

Returns {@link ScopeNotificationSettings ScopeNotificationSettings}

+ * + * @param scope Types of chats for which to return the notification settings information. + */ + public GetScopeNotificationSettings(NotificationSettingsScope scope) { + this.scope = scope; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -995613361; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a secret chat by its identifier. This is an offline request. + * + *

Returns {@link SecretChat SecretChat}

+ */ + public static class GetSecretChat extends Function { + /** + * Secret chat identifier. + */ + public int secretChatId; + + /** + * Default constructor for a function, which returns information about a secret chat by its identifier. This is an offline request. + * + *

Returns {@link SecretChat SecretChat}

+ */ + public GetSecretChat() { + } + + /** + * Creates a function, which returns information about a secret chat by its identifier. This is an offline request. + * + *

Returns {@link SecretChat SecretChat}

+ * + * @param secretChatId Secret chat identifier. + */ + public GetSecretChat(int secretChatId) { + this.secretChatId = secretChatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 40599169; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Loads asynchronous or zoomed in chat or message statistics graph. + * + *

Returns {@link StatisticsGraph StatisticsGraph}

+ */ + public static class GetStatisticsGraph extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * The token for graph loading. + */ + public String token; + /** + * X-value for zoomed in graph or 0 otherwise. + */ + public long x; + + /** + * Default constructor for a function, which loads asynchronous or zoomed in chat or message statistics graph. + * + *

Returns {@link StatisticsGraph StatisticsGraph}

+ */ + public GetStatisticsGraph() { + } + + /** + * Creates a function, which loads asynchronous or zoomed in chat or message statistics graph. + * + *

Returns {@link StatisticsGraph StatisticsGraph}

+ * + * @param chatId Chat identifier. + * @param token The token for graph loading. + * @param x X-value for zoomed in graph or 0 otherwise. + */ + public GetStatisticsGraph(long chatId, String token, long x) { + this.chatId = chatId; + this.token = token; + this.x = x; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 687537922; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object. + * + *

Returns {@link Emojis Emojis}

+ */ + public static class GetStickerEmojis extends Function { + /** + * Sticker file identifier. + */ + public InputFile sticker; + + /** + * Default constructor for a function, which returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object. + * + *

Returns {@link Emojis Emojis}

+ */ + public GetStickerEmojis() { + } + + /** + * Creates a function, which returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object. + * + *

Returns {@link Emojis Emojis}

+ * + * @param sticker Sticker file identifier. + */ + public GetStickerEmojis(InputFile sticker) { + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1895508665; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a sticker set by its identifier. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public static class GetStickerSet extends Function { + /** + * Identifier of the sticker set. + */ + public long setId; + + /** + * Default constructor for a function, which returns information about a sticker set by its identifier. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public GetStickerSet() { + } + + /** + * Creates a function, which returns information about a sticker set by its identifier. + * + *

Returns {@link StickerSet StickerSet}

+ * + * @param setId Identifier of the sticker set. + */ + public GetStickerSet(long setId) { + this.setId = setId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1052318659; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned. + * + *

Returns {@link Stickers Stickers}

+ */ + public static class GetStickers extends Function { + /** + * String representation of emoji. If empty, returns all known installed stickers. + */ + public String emoji; + /** + * The maximum number of stickers to be returned. + */ + public int limit; + + /** + * Default constructor for a function, which returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned. + * + *

Returns {@link Stickers Stickers}

+ */ + public GetStickers() { + } + + /** + * Creates a function, which returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned. + * + *

Returns {@link Stickers Stickers}

+ * + * @param emoji String representation of emoji. If empty, returns all known installed stickers. + * @param limit The maximum number of stickers to be returned. + */ + public GetStickers(String emoji, int limit) { + this.emoji = emoji; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1594919556; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns storage usage statistics. Can be called before authorization. + * + *

Returns {@link StorageStatistics StorageStatistics}

+ */ + public static class GetStorageStatistics extends Function { + /** + * The maximum number of chats with the largest storage usage for which separate statistics should be returned. All other chats will be grouped in entries with chatId == 0. If the chat info database is not used, the chatLimit is ignored and is always set to 0. + */ + public int chatLimit; + + /** + * Default constructor for a function, which returns storage usage statistics. Can be called before authorization. + * + *

Returns {@link StorageStatistics StorageStatistics}

+ */ + public GetStorageStatistics() { + } + + /** + * Creates a function, which returns storage usage statistics. Can be called before authorization. + * + *

Returns {@link StorageStatistics StorageStatistics}

+ * + * @param chatLimit The maximum number of chats with the largest storage usage for which separate statistics should be returned. All other chats will be grouped in entries with chatId == 0. If the chat info database is not used, the chatLimit is ignored and is always set to 0. + */ + public GetStorageStatistics(int chatLimit) { + this.chatLimit = chatLimit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -853193929; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Quickly returns approximate storage usage statistics. Can be called before authorization. + * + *

Returns {@link StorageStatisticsFast StorageStatisticsFast}

+ */ + public static class GetStorageStatisticsFast extends Function { + + /** + * Default constructor for a function, which quickly returns approximate storage usage statistics. Can be called before authorization. + * + *

Returns {@link StorageStatisticsFast StorageStatisticsFast}

+ */ + public GetStorageStatisticsFast() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 61368066; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Basic group chats need to be first upgraded to supergroups before they can be set as a discussion group. + * + *

Returns {@link Chats Chats}

+ */ + public static class GetSuitableDiscussionChats extends Function { + + /** + * Default constructor for a function, which returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Basic group chats need to be first upgraded to supergroups before they can be set as a discussion group. + * + *

Returns {@link Chats Chats}

+ */ + public GetSuitableDiscussionChats() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 49044982; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link Supergroup Supergroup}

+ */ + public static class GetSupergroup extends Function { + /** + * Supergroup or channel identifier. + */ + public int supergroupId; + + /** + * Default constructor for a function, which returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link Supergroup Supergroup}

+ */ + public GetSupergroup() { + } + + /** + * Creates a function, which returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link Supergroup Supergroup}

+ * + * @param supergroupId Supergroup or channel identifier. + */ + public GetSupergroup(int supergroupId) { + this.supergroupId = supergroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2063063706; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute. + * + *

Returns {@link SupergroupFullInfo SupergroupFullInfo}

+ */ + public static class GetSupergroupFullInfo extends Function { + /** + * Supergroup or channel identifier. + */ + public int supergroupId; + + /** + * Default constructor for a function, which returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute. + * + *

Returns {@link SupergroupFullInfo SupergroupFullInfo}

+ */ + public GetSupergroupFullInfo() { + } + + /** + * Creates a function, which returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute. + * + *

Returns {@link SupergroupFullInfo SupergroupFullInfo}

+ * + * @param supergroupId Supergroup or channel identifier. + */ + public GetSupergroupFullInfo(int supergroupId) { + this.supergroupId = supergroupId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1150331262; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.canGetMembers == true; additionally, administrator privileges may be required for some filters. + * + *

Returns {@link ChatMembers ChatMembers}

+ */ + public static class GetSupergroupMembers extends Function { + /** + * Identifier of the supergroup or channel. + */ + public int supergroupId; + /** + * The type of users to return. By default, supergroupMembersRecent. + */ + public SupergroupMembersFilter filter; + /** + * Number of users to skip. + */ + public int offset; + /** + * The maximum number of users be returned; up to 200. + */ + public int limit; + + /** + * Default constructor for a function, which returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.canGetMembers == true; additionally, administrator privileges may be required for some filters. + * + *

Returns {@link ChatMembers ChatMembers}

+ */ + public GetSupergroupMembers() { + } + + /** + * Creates a function, which returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.canGetMembers == true; additionally, administrator privileges may be required for some filters. + * + *

Returns {@link ChatMembers ChatMembers}

+ * + * @param supergroupId Identifier of the supergroup or channel. + * @param filter The type of users to return. By default, supergroupMembersRecent. + * @param offset Number of users to skip. + * @param limit The maximum number of users be returned; up to 200. + */ + public GetSupergroupMembers(int supergroupId, SupergroupMembersFilter filter, int offset, int limit) { + this.supergroupId = supergroupId; + this.filter = filter; + this.offset = offset; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1427643098; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a user that can be contacted to get support. + * + *

Returns {@link User User}

+ */ + public static class GetSupportUser extends Function { + + /** + * Default constructor for a function, which returns a user that can be contacted to get support. + * + *

Returns {@link User User}

+ */ + public GetSupportUser() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1733497700; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about the current temporary password. + * + *

Returns {@link TemporaryPasswordState TemporaryPasswordState}

+ */ + public static class GetTemporaryPasswordState extends Function { + + /** + * Default constructor for a function, which returns information about the current temporary password. + * + *

Returns {@link TemporaryPasswordState TemporaryPasswordState}

+ */ + public GetTemporaryPasswordState() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -12670830; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously. + * + *

Returns {@link TextEntities TextEntities}

+ */ + public static class GetTextEntities extends Function { + /** + * The text in which to look for entites. + */ + public String text; + + /** + * Default constructor for a function, which returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously. + * + *

Returns {@link TextEntities TextEntities}

+ */ + public GetTextEntities() { + } + + /** + * Creates a function, which returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously. + * + *

Returns {@link TextEntities TextEntities}

+ * + * @param text The text in which to look for entites. + */ + public GetTextEntities(String text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -341490693; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of frequently used chats. Supported only if the chat info database is enabled. + * + *

Returns {@link Chats Chats}

+ */ + public static class GetTopChats extends Function { + /** + * Category of chats to be returned. + */ + public TopChatCategory category; + /** + * The maximum number of chats to be returned; up to 30. + */ + public int limit; + + /** + * Default constructor for a function, which returns a list of frequently used chats. Supported only if the chat info database is enabled. + * + *

Returns {@link Chats Chats}

+ */ + public GetTopChats() { + } + + /** + * Creates a function, which returns a list of frequently used chats. Supported only if the chat info database is enabled. + * + *

Returns {@link Chats Chats}

+ * + * @param category Category of chats to be returned. + * @param limit The maximum number of chats to be returned; up to 30. + */ + public GetTopChats(TopChatCategory category, int limit) { + this.category = category; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -388410847; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of trending sticker sets. For the optimal performance the number of returned sticker sets is chosen by the library. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public static class GetTrendingStickerSets extends Function { + /** + * The offset from which to return the sticker sets; must be non-negative. + */ + public int offset; + /** + * The maximum number of sticker sets to be returned; must be non-negative. Fewer sticker sets may be returned than specified by the limit, even if the end of the list has not been reached. + */ + public int limit; + + /** + * Default constructor for a function, which returns a list of trending sticker sets. For the optimal performance the number of returned sticker sets is chosen by the library. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public GetTrendingStickerSets() { + } + + /** + * Creates a function, which returns a list of trending sticker sets. For the optimal performance the number of returned sticker sets is chosen by the library. + * + *

Returns {@link StickerSets StickerSets}

+ * + * @param offset The offset from which to return the sticker sets; must be non-negative. + * @param limit The maximum number of sticker sets to be returned; must be non-negative. Fewer sticker sets may be returned than specified by the limit, even if the end of the list has not been reached. + */ + public GetTrendingStickerSets(int offset, int limit) { + this.offset = offset; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1494581948; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about a user by their identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link User User}

+ */ + public static class GetUser extends Function { + /** + * User identifier. + */ + public int userId; + + /** + * Default constructor for a function, which returns information about a user by their identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link User User}

+ */ + public GetUser() { + } + + /** + * Creates a function, which returns information about a user by their identifier. This is an offline request if the current user is not a bot. + * + *

Returns {@link User User}

+ * + * @param userId User identifier. + */ + public GetUser(int userId) { + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -47586017; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns full information about a user by their identifier. + * + *

Returns {@link UserFullInfo UserFullInfo}

+ */ + public static class GetUserFullInfo extends Function { + /** + * User identifier. + */ + public int userId; + + /** + * Default constructor for a function, which returns full information about a user by their identifier. + * + *

Returns {@link UserFullInfo UserFullInfo}

+ */ + public GetUserFullInfo() { + } + + /** + * Creates a function, which returns full information about a user by their identifier. + * + *

Returns {@link UserFullInfo UserFullInfo}

+ * + * @param userId User identifier. + */ + public GetUserFullInfo(int userId) { + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -655443263; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the current privacy settings. + * + *

Returns {@link UserPrivacySettingRules UserPrivacySettingRules}

+ */ + public static class GetUserPrivacySettingRules extends Function { + /** + * The privacy setting. + */ + public UserPrivacySetting setting; + + /** + * Default constructor for a function, which returns the current privacy settings. + * + *

Returns {@link UserPrivacySettingRules UserPrivacySettingRules}

+ */ + public GetUserPrivacySettingRules() { + } + + /** + * Creates a function, which returns the current privacy settings. + * + *

Returns {@link UserPrivacySettingRules UserPrivacySettingRules}

+ * + * @param setting The privacy setting. + */ + public GetUserPrivacySettingRules(UserPrivacySetting setting) { + this.setting = setting; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2077223311; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already. + * + *

Returns {@link ChatPhotos ChatPhotos}

+ */ + public static class GetUserProfilePhotos extends Function { + /** + * User identifier. + */ + public int userId; + /** + * The number of photos to skip; must be non-negative. + */ + public int offset; + /** + * The maximum number of photos to be returned; up to 100. + */ + public int limit; + + /** + * Default constructor for a function, which returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already. + * + *

Returns {@link ChatPhotos ChatPhotos}

+ */ + public GetUserProfilePhotos() { + } + + /** + * Creates a function, which returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already. + * + *

Returns {@link ChatPhotos ChatPhotos}

+ * + * @param userId User identifier. + * @param offset The number of photos to skip; must be non-negative. + * @param limit The maximum number of photos to be returned; up to 100. + */ + public GetUserProfilePhotos(int userId, int offset, int limit) { + this.userId = userId; + this.offset = offset; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -768699141; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page. + * + *

Returns {@link WebPageInstantView WebPageInstantView}

+ */ + public static class GetWebPageInstantView extends Function { + /** + * The web page URL. + */ + public String url; + /** + * If true, the full instant view for the web page will be returned. + */ + public boolean forceFull; + + /** + * Default constructor for a function, which returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page. + * + *

Returns {@link WebPageInstantView WebPageInstantView}

+ */ + public GetWebPageInstantView() { + } + + /** + * Creates a function, which returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page. + * + *

Returns {@link WebPageInstantView WebPageInstantView}

+ * + * @param url The web page URL. + * @param forceFull If true, the full instant view for the web page will be returned. + */ + public GetWebPageInstantView(String url, boolean forceFull) { + this.url = url; + this.forceFull = forceFull; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1962649975; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview. + * + *

Returns {@link WebPage WebPage}

+ */ + public static class GetWebPagePreview extends Function { + /** + * Message text with formatting. + */ + public FormattedText text; + + /** + * Default constructor for a function, which returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview. + * + *

Returns {@link WebPage WebPage}

+ */ + public GetWebPagePreview() { + } + + /** + * Creates a function, which returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview. + * + *

Returns {@link WebPage WebPage}

+ * + * @param text Message text with formatting. + */ + public GetWebPagePreview(FormattedText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 573441580; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Hides a suggested action. + * + *

Returns {@link Ok Ok}

+ */ + public static class HideSuggestedAction extends Function { + /** + * Suggested action to hide. + */ + public SuggestedAction action; + + /** + * Default constructor for a function, which hides a suggested action. + * + *

Returns {@link Ok Ok}

+ */ + public HideSuggestedAction() { + } + + /** + * Creates a function, which hides a suggested action. + * + *

Returns {@link Ok Ok}

+ * + * @param action Suggested action to hide. + */ + public HideSuggestedAction(SuggestedAction action) { + this.action = action; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1561384065; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored. + * + *

Returns {@link ImportedContacts ImportedContacts}

+ */ + public static class ImportContacts extends Function { + /** + * The list of contacts to import or edit; contacts' vCard are ignored and are not imported. + */ + public Contact[] contacts; + + /** + * Default constructor for a function, which adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored. + * + *

Returns {@link ImportedContacts ImportedContacts}

+ */ + public ImportContacts() { + } + + /** + * Creates a function, which adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored. + * + *

Returns {@link ImportedContacts ImportedContacts}

+ * + * @param contacts The list of contacts to import or edit; contacts' vCard are ignored and are not imported. + */ + public ImportContacts(Contact[] contacts) { + this.contacts = contacts; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -215132767; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds current user as a new member to a chat. Private and secret chats can't be joined using this method. + * + *

Returns {@link Ok Ok}

+ */ + public static class JoinChat extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which adds current user as a new member to a chat. Private and secret chats can't be joined using this method. + * + *

Returns {@link Ok Ok}

+ */ + public JoinChat() { + } + + /** + * Creates a function, which adds current user as a new member to a chat. Private and secret chats can't be joined using this method. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + */ + public JoinChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 326769313; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Uses an invite link to add the current user to the chat if possible. The new member will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Chat Chat}

+ */ + public static class JoinChatByInviteLink extends Function { + /** + * Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". + */ + public String inviteLink; + + /** + * Default constructor for a function, which uses an invite link to add the current user to the chat if possible. The new member will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Chat Chat}

+ */ + public JoinChatByInviteLink() { + } + + /** + * Creates a function, which uses an invite link to add the current user to the chat if possible. The new member will not be added until the chat state has been synchronized with the server. + * + *

Returns {@link Chat Chat}

+ * + * @param inviteLink Invite link to import; should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/", or "https://telegram.dog/joinchat/". + */ + public JoinChatByInviteLink(String inviteLink) { + this.inviteLink = inviteLink; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1049973882; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes current user from chat members. Private and secret chats can't be left using this method. + * + *

Returns {@link Ok Ok}

+ */ + public static class LeaveChat extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which removes current user from chat members. Private and secret chats can't be left using this method. + * + *

Returns {@link Ok Ok}

+ */ + public LeaveChat() { + } + + /** + * Creates a function, which removes current user from chat members. Private and secret chats can't be left using this method. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + */ + public LeaveChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1825080735; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent. + * + *

Returns {@link Ok Ok}

+ */ + public static class LogOut extends Function { + + /** + * Default constructor for a function, which closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent. + * + *

Returns {@link Ok Ok}

+ */ + public LogOut() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1581923301; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats). + * + *

Returns {@link Ok Ok}

+ */ + public static class OpenChat extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats). + * + *

Returns {@link Ok Ok}

+ */ + public OpenChat() { + } + + /** + * Creates a function, which informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats). + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + */ + public OpenChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -323371509; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed. + * + *

Returns {@link Ok Ok}

+ */ + public static class OpenMessageContent extends Function { + /** + * Chat identifier of the message. + */ + public long chatId; + /** + * Identifier of the message with the opened content. + */ + public long messageId; + + /** + * Default constructor for a function, which informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed. + * + *

Returns {@link Ok Ok}

+ */ + public OpenMessageContent() { + } + + /** + * Creates a function, which informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier of the message. + * @param messageId Identifier of the message with the opened content. + */ + public OpenMessageContent(long chatId, long messageId) { + this.chatId = chatId; + this.messageId = messageId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -739088005; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted. + * + *

Returns {@link StorageStatistics StorageStatistics}

+ */ + public static class OptimizeStorage extends Function { + /** + * Limit on the total size of files after deletion. Pass -1 to use the default limit. + */ + public long size; + /** + * Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit. + */ + public int ttl; + /** + * Limit on the total count of files after deletion. Pass -1 to use the default limit. + */ + public int count; + /** + * The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value. + */ + public int immunityDelay; + /** + * If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted. + */ + public FileType[] fileTypes; + /** + * If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos). + */ + public long[] chatIds; + /** + * If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos). + */ + public long[] excludeChatIds; + /** + * Pass true if deleted file statistics need to be returned instead of the whole storage usage statistics. Affects only returned statistics. + */ + public boolean returnDeletedFileStatistics; + /** + * Same as in getStorageStatistics. Affects only returned statistics. + */ + public int chatLimit; + + /** + * Default constructor for a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted. + * + *

Returns {@link StorageStatistics StorageStatistics}

+ */ + public OptimizeStorage() { + } + + /** + * Creates a function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted. + * + *

Returns {@link StorageStatistics StorageStatistics}

+ * + * @param size Limit on the total size of files after deletion. Pass -1 to use the default limit. + * @param ttl Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit. + * @param count Limit on the total count of files after deletion. Pass -1 to use the default limit. + * @param immunityDelay The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value. + * @param fileTypes If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted. + * @param chatIds If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos). + * @param excludeChatIds If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos). + * @param returnDeletedFileStatistics Pass true if deleted file statistics need to be returned instead of the whole storage usage statistics. Affects only returned statistics. + * @param chatLimit Same as in getStorageStatistics. Affects only returned statistics. + */ + public OptimizeStorage(long size, int ttl, int count, int immunityDelay, FileType[] fileTypes, long[] chatIds, long[] excludeChatIds, boolean returnDeletedFileStatistics, int chatLimit) { + this.size = size; + this.ttl = ttl; + this.count = count; + this.immunityDelay = immunityDelay; + this.fileTypes = fileTypes; + this.chatIds = chatIds; + this.excludeChatIds = excludeChatIds; + this.returnDeletedFileStatistics = returnDeletedFileStatistics; + this.chatLimit = chatLimit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 853186759; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ */ + public static class ParseMarkdown extends Function { + /** + * The text to parse. For example, "__italic__ ~~strikethrough~~ **bold** `code` ```pre``` __[italic__ textUrl](telegram.org) _Italic**bold italic_Bold**". + */ + public FormattedText text; + + /** + * Default constructor for a function, which parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ */ + public ParseMarkdown() { + } + + /** + * Creates a function, which parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ * + * @param text The text to parse. For example, "__italic__ ~~strikethrough~~ **bold** `code` ```pre``` __[italic__ textUrl](telegram.org) _Italic**bold italic_Bold**". + */ + public ParseMarkdown(FormattedText text) { + this.text = text; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 756366063; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ */ + public static class ParseTextEntities extends Function { + /** + * The text to parse. + */ + public String text; + /** + * Text parse mode. + */ + public TextParseMode parseMode; + + /** + * Default constructor for a function, which parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ */ + public ParseTextEntities() { + } + + /** + * Creates a function, which parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. Can be called synchronously. + * + *

Returns {@link FormattedText FormattedText}

+ * + * @param text The text to parse. + * @param parseMode Text parse mode. + */ + public ParseTextEntities(String text, TextParseMode parseMode) { + this.text = text; + this.parseMode = parseMode; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1709194593; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Pins a message in a chat; requires canPinMessages rights. + * + *

Returns {@link Ok Ok}

+ */ + public static class PinChatMessage extends Function { + /** + * Identifier of the chat. + */ + public long chatId; + /** + * Identifier of the new pinned message. + */ + public long messageId; + /** + * True, if there should be no notification about the pinned message. + */ + public boolean disableNotification; + + /** + * Default constructor for a function, which pins a message in a chat; requires canPinMessages rights. + * + *

Returns {@link Ok Ok}

+ */ + public PinChatMessage() { + } + + /** + * Creates a function, which pins a message in a chat; requires canPinMessages rights. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Identifier of the chat. + * @param messageId Identifier of the new pinned message. + * @param disableNotification True, if there should be no notification about the pinned message. + */ + public PinChatMessage(long chatId, long messageId, boolean disableNotification) { + this.chatId = chatId; + this.messageId = messageId; + this.disableNotification = disableNotification; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -554712351; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization. + * + *

Returns {@link Seconds Seconds}

+ */ + public static class PingProxy extends Function { + /** + * Proxy identifier. Use 0 to ping a Telegram server without a proxy. + */ + public int proxyId; + + /** + * Default constructor for a function, which computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization. + * + *

Returns {@link Seconds Seconds}

+ */ + public PingProxy() { + } + + /** + * Creates a function, which computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization. + * + *

Returns {@link Seconds Seconds}

+ * + * @param proxyId Proxy identifier. Use 0 to ping a Telegram server without a proxy. + */ + public PingProxy(int proxyId) { + this.proxyId = proxyId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -979681103; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class ProcessPushNotification extends Function { + /** + * JSON-encoded push notification payload with all fields sent by the server, and "google.sentTime" and "google.notification.sound" fields added. + */ + public String payload; + + /** + * Default constructor for a function, which handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public ProcessPushNotification() { + } + + /** + * Creates a function, which handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param payload JSON-encoded push notification payload with all fields sent by the server, and "google.sentTime" and "google.notification.sound" fields added. + */ + public ProcessPushNotification(String payload) { + this.payload = payload; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 786679952; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Marks all mentions in a chat as read. + * + *

Returns {@link Ok Ok}

+ */ + public static class ReadAllChatMentions extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which marks all mentions in a chat as read. + * + *

Returns {@link Ok Ok}

+ */ + public ReadAllChatMentions() { + } + + /** + * Creates a function, which marks all mentions in a chat as read. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + */ + public ReadAllChatMentions(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1357558453; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file. + * + *

Returns {@link FilePart FilePart}

+ */ + public static class ReadFilePart extends Function { + /** + * Identifier of the file. The file must be located in the TDLib file cache. + */ + public int fileId; + /** + * The offset from which to read the file. + */ + public int offset; + /** + * Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position. + */ + public int count; + + /** + * Default constructor for a function, which reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file. + * + *

Returns {@link FilePart FilePart}

+ */ + public ReadFilePart() { + } + + /** + * Creates a function, which reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file. + * + *

Returns {@link FilePart FilePart}

+ * + * @param fileId Identifier of the file. The file must be located in the TDLib file cache. + * @param offset The offset from which to read the file. + * @param count Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position. + */ + public ReadFilePart(int fileId, int offset, int count) { + this.fileId = fileId; + this.offset = offset; + this.count = count; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -407749314; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public static class RecoverAuthenticationPassword extends Function { + /** + * Recovery code to check. + */ + public String recoveryCode; + + /** + * Default constructor for a function, which recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public RecoverAuthenticationPassword() { + } + + /** + * Creates a function, which recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ * + * @param recoveryCode Recovery code to check. + */ + public RecoverAuthenticationPassword(String recoveryCode) { + this.recoveryCode = recoveryCode; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 787436412; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Recovers the password using a recovery code sent to an email address that was previously set up. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public static class RecoverPassword extends Function { + /** + * Recovery code to check. + */ + public String recoveryCode; + + /** + * Default constructor for a function, which recovers the password using a recovery code sent to an email address that was previously set up. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public RecoverPassword() { + } + + /** + * Creates a function, which recovers the password using a recovery code sent to an email address that was previously set up. + * + *

Returns {@link PasswordState PasswordState}

+ * + * @param recoveryCode Recovery code to check. + */ + public RecoverPassword(String recoveryCode) { + this.recoveryCode = recoveryCode; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1660185903; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription. + * + *

Returns {@link PushReceiverId PushReceiverId}

+ */ + public static class RegisterDevice extends Function { + /** + * Device token. + */ + public DeviceToken deviceToken; + /** + * List of user identifiers of other users currently using the application. + */ + public int[] otherUserIds; + + /** + * Default constructor for a function, which registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription. + * + *

Returns {@link PushReceiverId PushReceiverId}

+ */ + public RegisterDevice() { + } + + /** + * Creates a function, which registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription. + * + *

Returns {@link PushReceiverId PushReceiverId}

+ * + * @param deviceToken Device token. + * @param otherUserIds List of user identifiers of other users currently using the application. + */ + public RegisterDevice(DeviceToken deviceToken, int[] otherUserIds) { + this.deviceToken = deviceToken; + this.otherUserIds = otherUserIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1734127493; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration. + * + *

Returns {@link Ok Ok}

+ */ + public static class RegisterUser extends Function { + /** + * The first name of the user; 1-64 characters. + */ + public String firstName; + /** + * The last name of the user; 0-64 characters. + */ + public String lastName; + + /** + * Default constructor for a function, which finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration. + * + *

Returns {@link Ok Ok}

+ */ + public RegisterUser() { + } + + /** + * Creates a function, which finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration. + * + *

Returns {@link Ok Ok}

+ * + * @param firstName The first name of the user; 1-64 characters. + * @param lastName The last name of the user; 0-64 characters. + */ + public RegisterUser(String firstName, String lastName) { + this.firstName = firstName; + this.lastName = lastName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -109994467; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes background from the list of installed backgrounds. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveBackground extends Function { + /** + * The background identifier. + */ + public long backgroundId; + + /** + * Default constructor for a function, which removes background from the list of installed backgrounds. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveBackground() { + } + + /** + * Creates a function, which removes background from the list of installed backgrounds. + * + *

Returns {@link Ok Ok}

+ * + * @param backgroundId The background identifier. + */ + public RemoveBackground(long backgroundId) { + this.backgroundId = backgroundId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1484545642; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a chat action bar without any other action. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveChatActionBar extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which removes a chat action bar without any other action. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveChatActionBar() { + } + + /** + * Creates a function, which removes a chat action bar without any other action. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + */ + public RemoveChatActionBar(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1650968070; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes users from the contact list. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveContacts extends Function { + /** + * Identifiers of users to be deleted. + */ + public int[] userIds; + + /** + * Default constructor for a function, which removes users from the contact list. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveContacts() { + } + + /** + * Creates a function, which removes users from the contact list. + * + *

Returns {@link Ok Ok}

+ * + * @param userIds Identifiers of users to be deleted. + */ + public RemoveContacts(int[] userIds) { + this.userIds = userIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -615510759; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a sticker from the list of favorite stickers. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveFavoriteSticker extends Function { + /** + * Sticker file to delete from the list. + */ + public InputFile sticker; + + /** + * Default constructor for a function, which removes a sticker from the list of favorite stickers. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveFavoriteSticker() { + } + + /** + * Creates a function, which removes a sticker from the list of favorite stickers. + * + *

Returns {@link Ok Ok}

+ * + * @param sticker Sticker file to delete from the list. + */ + public RemoveFavoriteSticker(InputFile sticker) { + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1152945264; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveNotification extends Function { + /** + * Identifier of notification group to which the notification belongs. + */ + public int notificationGroupId; + /** + * Identifier of removed notification. + */ + public int notificationId; + + /** + * Default constructor for a function, which removes an active notification from notification list. Needs to be called only if the notification is removed by the current user. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveNotification() { + } + + /** + * Creates a function, which removes an active notification from notification list. Needs to be called only if the notification is removed by the current user. + * + *

Returns {@link Ok Ok}

+ * + * @param notificationGroupId Identifier of notification group to which the notification belongs. + * @param notificationId Identifier of removed notification. + */ + public RemoveNotification(int notificationGroupId, int notificationId) { + this.notificationGroupId = notificationGroupId; + this.notificationId = notificationId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 862630734; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveNotificationGroup extends Function { + /** + * Notification group identifier. + */ + public int notificationGroupId; + /** + * The maximum identifier of removed notifications. + */ + public int maxNotificationId; + + /** + * Default constructor for a function, which removes a group of active notifications. Needs to be called only if the notification group is removed by the current user. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveNotificationGroup() { + } + + /** + * Creates a function, which removes a group of active notifications. Needs to be called only if the notification group is removed by the current user. + * + *

Returns {@link Ok Ok}

+ * + * @param notificationGroupId Notification group identifier. + * @param maxNotificationId The maximum identifier of removed notifications. + */ + public RemoveNotificationGroup(int notificationGroupId, int maxNotificationId) { + this.notificationGroupId = notificationGroupId; + this.maxNotificationId = maxNotificationId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1713005454; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a proxy server. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveProxy extends Function { + /** + * Proxy identifier. + */ + public int proxyId; + + /** + * Default constructor for a function, which removes a proxy server. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveProxy() { + } + + /** + * Creates a function, which removes a proxy server. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param proxyId Proxy identifier. + */ + public RemoveProxy(int proxyId) { + this.proxyId = proxyId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1369219847; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a hashtag from the list of recently used hashtags. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveRecentHashtag extends Function { + /** + * Hashtag to delete. + */ + public String hashtag; + + /** + * Default constructor for a function, which removes a hashtag from the list of recently used hashtags. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveRecentHashtag() { + } + + /** + * Creates a function, which removes a hashtag from the list of recently used hashtags. + * + *

Returns {@link Ok Ok}

+ * + * @param hashtag Hashtag to delete. + */ + public RemoveRecentHashtag(String hashtag) { + this.hashtag = hashtag; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1013735260; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a sticker from the list of recently used stickers. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveRecentSticker extends Function { + /** + * Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers. + */ + public boolean isAttached; + /** + * Sticker file to delete. + */ + public InputFile sticker; + + /** + * Default constructor for a function, which removes a sticker from the list of recently used stickers. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveRecentSticker() { + } + + /** + * Creates a function, which removes a sticker from the list of recently used stickers. + * + *

Returns {@link Ok Ok}

+ * + * @param isAttached Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers. + * @param sticker Sticker file to delete. + */ + public RemoveRecentSticker(boolean isAttached, InputFile sticker) { + this.isAttached = isAttached; + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1246577677; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a chat from the list of recently found chats. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveRecentlyFoundChat extends Function { + /** + * Identifier of the chat to be removed. + */ + public long chatId; + + /** + * Default constructor for a function, which removes a chat from the list of recently found chats. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveRecentlyFoundChat() { + } + + /** + * Creates a function, which removes a chat from the list of recently found chats. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Identifier of the chat to be removed. + */ + public RemoveRecentlyFoundChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 717340444; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes an animation from the list of saved animations. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveSavedAnimation extends Function { + /** + * Animation file to be removed. + */ + public InputFile animation; + + /** + * Default constructor for a function, which removes an animation from the list of saved animations. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveSavedAnimation() { + } + + /** + * Creates a function, which removes an animation from the list of saved animations. + * + *

Returns {@link Ok Ok}

+ * + * @param animation Animation file to be removed. + */ + public RemoveSavedAnimation(InputFile animation) { + this.animation = animation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -495605479; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveStickerFromSet extends Function { + /** + * Sticker. + */ + public InputFile sticker; + + /** + * Default constructor for a function, which removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveStickerFromSet() { + } + + /** + * Creates a function, which removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot. + * + *

Returns {@link Ok Ok}

+ * + * @param sticker Sticker. + */ + public RemoveStickerFromSet(InputFile sticker) { + this.sticker = sticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1642196644; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled. + * + *

Returns {@link Ok Ok}

+ */ + public static class RemoveTopChat extends Function { + /** + * Category of frequently used chats. + */ + public TopChatCategory category; + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled. + * + *

Returns {@link Ok Ok}

+ */ + public RemoveTopChat() { + } + + /** + * Creates a function, which removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled. + * + *

Returns {@link Ok Ok}

+ * + * @param category Category of frequently used chats. + * @param chatId Chat identifier. + */ + public RemoveTopChat(TopChatCategory category, long chatId) { + this.category = category; + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1907876267; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the order of chat filters. + * + *

Returns {@link Ok Ok}

+ */ + public static class ReorderChatFilters extends Function { + /** + * Identifiers of chat filters in the new correct order. + */ + public int[] chatFilterIds; + + /** + * Default constructor for a function, which changes the order of chat filters. + * + *

Returns {@link Ok Ok}

+ */ + public ReorderChatFilters() { + } + + /** + * Creates a function, which changes the order of chat filters. + * + *

Returns {@link Ok Ok}

+ * + * @param chatFilterIds Identifiers of chat filters in the new correct order. + */ + public ReorderChatFilters(int[] chatFilterIds) { + this.chatFilterIds = chatFilterIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1258111097; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the order of installed sticker sets. + * + *

Returns {@link Ok Ok}

+ */ + public static class ReorderInstalledStickerSets extends Function { + /** + * Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets. + */ + public boolean isMasks; + /** + * Identifiers of installed sticker sets in the new correct order. + */ + public long[] stickerSetIds; + + /** + * Default constructor for a function, which changes the order of installed sticker sets. + * + *

Returns {@link Ok Ok}

+ */ + public ReorderInstalledStickerSets() { + } + + /** + * Creates a function, which changes the order of installed sticker sets. + * + *

Returns {@link Ok Ok}

+ * + * @param isMasks Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets. + * @param stickerSetIds Identifiers of installed sticker sets in the new correct order. + */ + public ReorderInstalledStickerSets(boolean isMasks, long[] stickerSetIds) { + this.isMasks = isMasks; + this.stickerSetIds = stickerSetIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1114537563; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chats with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators. + * + *

Returns {@link Ok Ok}

+ */ + public static class ReportChat extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * The reason for reporting the chat. + */ + public ChatReportReason reason; + /** + * Identifiers of reported messages, if any. + */ + public long[] messageIds; + + /** + * Default constructor for a function, which reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chats with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators. + * + *

Returns {@link Ok Ok}

+ */ + public ReportChat() { + } + + /** + * Creates a function, which reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chats with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param reason The reason for reporting the chat. + * @param messageIds Identifiers of reported messages, if any. + */ + public ReportChat(long chatId, ChatReportReason reason, long[] messageIds) { + this.chatId = chatId; + this.reason = reason; + this.messageIds = messageIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -312579772; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup. + * + *

Returns {@link Ok Ok}

+ */ + public static class ReportSupergroupSpam extends Function { + /** + * Supergroup identifier. + */ + public int supergroupId; + /** + * User identifier. + */ + public int userId; + /** + * Identifiers of messages sent in the supergroup by the user. This list must be non-empty. + */ + public long[] messageIds; + + /** + * Default constructor for a function, which reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup. + * + *

Returns {@link Ok Ok}

+ */ + public ReportSupergroupSpam() { + } + + /** + * Creates a function, which reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup. + * + *

Returns {@link Ok Ok}

+ * + * @param supergroupId Supergroup identifier. + * @param userId User identifier. + * @param messageIds Identifiers of messages sent in the supergroup by the user. This list must be non-empty. + */ + public ReportSupergroupSpam(int supergroupId, int userId, long[] messageIds) { + this.supergroupId = supergroupId; + this.userId = userId; + this.messageIds = messageIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2125451498; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Requests to send a password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public static class RequestAuthenticationPasswordRecovery extends Function { + + /** + * Default constructor for a function, which requests to send a password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public RequestAuthenticationPasswordRecovery() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1393896118; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Requests to send a password recovery code to an email address that was previously set up. + * + *

Returns {@link EmailAddressAuthenticationCodeInfo EmailAddressAuthenticationCodeInfo}

+ */ + public static class RequestPasswordRecovery extends Function { + + /** + * Default constructor for a function, which requests to send a password recovery code to an email address that was previously set up. + * + *

Returns {@link EmailAddressAuthenticationCodeInfo EmailAddressAuthenticationCodeInfo}

+ */ + public RequestPasswordRecovery() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -13777582; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public static class RequestQrCodeAuthentication extends Function { + /** + * List of user identifiers of other users currently using the application. + */ + public int[] otherUserIds; + + /** + * Default constructor for a function, which requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public RequestQrCodeAuthentication() { + } + + /** + * Creates a function, which requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ * + * @param otherUserIds List of user identifiers of other users currently using the application. + */ + public RequestQrCodeAuthentication(int[] otherUserIds) { + this.otherUserIds = otherUserIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -104224560; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode and the nextCodeType of the result is not null. + * + *

Returns {@link Ok Ok}

+ */ + public static class ResendAuthenticationCode extends Function { + + /** + * Default constructor for a function, which re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode and the nextCodeType of the result is not null. + * + *

Returns {@link Ok Ok}

+ */ + public ResendAuthenticationCode() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -814377191; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Re-sends the authentication code sent to confirm a new phone number for the user. Works only if the previously received authenticationCodeInfo nextCodeType was not null. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public static class ResendChangePhoneNumberCode extends Function { + + /** + * Default constructor for a function, which re-sends the authentication code sent to confirm a new phone number for the user. Works only if the previously received authenticationCodeInfo nextCodeType was not null. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public ResendChangePhoneNumberCode() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -786772060; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Re-sends the code to verify an email address to be added to a user's Telegram Passport. + * + *

Returns {@link EmailAddressAuthenticationCodeInfo EmailAddressAuthenticationCodeInfo}

+ */ + public static class ResendEmailAddressVerificationCode extends Function { + + /** + * Default constructor for a function, which re-sends the code to verify an email address to be added to a user's Telegram Passport. + * + *

Returns {@link EmailAddressAuthenticationCodeInfo EmailAddressAuthenticationCodeInfo}

+ */ + public ResendEmailAddressVerificationCode() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1872416732; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.canRetry is true and after specified in messageSendingStateFailed.retryAfter time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in messageIds. If a message can't be re-sent, null will be returned instead of the message. + * + *

Returns {@link Messages Messages}

+ */ + public static class ResendMessages extends Function { + /** + * Identifier of the chat to send messages. + */ + public long chatId; + /** + * Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order. + */ + public long[] messageIds; + + /** + * Default constructor for a function, which resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.canRetry is true and after specified in messageSendingStateFailed.retryAfter time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in messageIds. If a message can't be re-sent, null will be returned instead of the message. + * + *

Returns {@link Messages Messages}

+ */ + public ResendMessages() { + } + + /** + * Creates a function, which resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.canRetry is true and after specified in messageSendingStateFailed.retryAfter time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in messageIds. If a message can't be re-sent, null will be returned instead of the message. + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Identifier of the chat to send messages. + * @param messageIds Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order. + */ + public ResendMessages(long chatId, long[] messageIds) { + this.chatId = chatId; + this.messageIds = messageIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -940655817; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Resends phone number confirmation code. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public static class ResendPhoneNumberConfirmationCode extends Function { + + /** + * Default constructor for a function, which resends phone number confirmation code. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public ResendPhoneNumberConfirmationCode() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2069068522; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Re-sends the code to verify a phone number to be added to a user's Telegram Passport. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public static class ResendPhoneNumberVerificationCode extends Function { + + /** + * Default constructor for a function, which re-sends the code to verify a phone number to be added to a user's Telegram Passport. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public ResendPhoneNumberVerificationCode() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1367629820; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Resends the 2-step verification recovery email address verification code. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public static class ResendRecoveryEmailAddressCode extends Function { + + /** + * Default constructor for a function, which resends the 2-step verification recovery email address verification code. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public ResendRecoveryEmailAddressCode() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 433483548; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown. + * + *

Returns {@link Ok Ok}

+ */ + public static class ResetAllNotificationSettings extends Function { + + /** + * Default constructor for a function, which resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown. + * + *

Returns {@link Ok Ok}

+ */ + public ResetAllNotificationSettings() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -174020359; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Resets list of installed backgrounds to its default value. + * + *

Returns {@link Ok Ok}

+ */ + public static class ResetBackgrounds extends Function { + + /** + * Default constructor for a function, which resets list of installed backgrounds to its default value. + * + *

Returns {@link Ok Ok}

+ */ + public ResetBackgrounds() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 204852088; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Resets all network data usage statistics to zero. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class ResetNetworkStatistics extends Function { + + /** + * Default constructor for a function, which resets all network data usage statistics to zero. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public ResetNetworkStatistics() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1646452102; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Saves application log event on the server. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class SaveApplicationLogEvent extends Function { + /** + * Event type. + */ + public String type; + /** + * Optional chat identifier, associated with the event. + */ + public long chatId; + /** + * The log event data. + */ + public JsonValue data; + + /** + * Default constructor for a function, which saves application log event on the server. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public SaveApplicationLogEvent() { + } + + /** + * Creates a function, which saves application log event on the server. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param type Event type. + * @param chatId Optional chat identifier, associated with the event. + * @param data The log event data. + */ + public SaveApplicationLogEvent(String type, long chatId, JsonValue data) { + this.type = type; + this.chatId = chatId; + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -811154930; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for a background by its name. + * + *

Returns {@link Background Background}

+ */ + public static class SearchBackground extends Function { + /** + * The name of the background. + */ + public String name; + + /** + * Default constructor for a function, which searches for a background by its name. + * + *

Returns {@link Background Background}

+ */ + public SearchBackground() { + } + + /** + * Creates a function, which searches for a background by its name. + * + *

Returns {@link Background Background}

+ * + * @param name The name of the background. + */ + public SearchBackground(String name) { + this.name = name; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2130996959; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ */ + public static class SearchCallMessages extends Function { + /** + * Identifier of the message from which to search; use 0 to get results from the last message. + */ + public long fromMessageId; + /** + * The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + */ + public int limit; + /** + * If true, returns only messages with missed calls. + */ + public boolean onlyMissed; + + /** + * Default constructor for a function, which searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ */ + public SearchCallMessages() { + } + + /** + * Creates a function, which searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ * + * @param fromMessageId Identifier of the message from which to search; use 0 to get results from the last message. + * @param limit The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + * @param onlyMissed If true, returns only messages with missed calls. + */ + public SearchCallMessages(long fromMessageId, int limit, boolean onlyMissed) { + this.fromMessageId = fromMessageId; + this.limit = limit; + this.onlyMissed = onlyMissed; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1077230820; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels. + * + *

Returns {@link ChatMembers ChatMembers}

+ */ + public static class SearchChatMembers extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Query to search for. + */ + public String query; + /** + * The maximum number of users to be returned. + */ + public int limit; + /** + * The type of users to return. By default, chatMembersFilterMembers. + */ + public ChatMembersFilter filter; + + /** + * Default constructor for a function, which searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels. + * + *

Returns {@link ChatMembers ChatMembers}

+ */ + public SearchChatMembers() { + } + + /** + * Creates a function, which searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels. + * + *

Returns {@link ChatMembers ChatMembers}

+ * + * @param chatId Chat identifier. + * @param query Query to search for. + * @param limit The maximum number of users to be returned. + * @param filter The type of users to return. By default, chatMembersFilterMembers. + */ + public SearchChatMembers(long chatId, String query, int limit, ChatMembersFilter filter) { + this.chatId = chatId; + this.query = query; + this.limit = limit; + this.filter = filter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -445823291; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing messageId. Cannot be used in secret chats with a non-empty query (searchSecretMessages should be used instead), or without an enabled message database. For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ */ + public static class SearchChatMessages extends Function { + /** + * Identifier of the chat in which to search messages. + */ + public long chatId; + /** + * Query to search for. + */ + public String query; + /** + * If not 0, only messages sent by the specified user will be returned. Not supported in secret chats. + */ + public int senderUserId; + /** + * Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + */ + public long fromMessageId; + /** + * Specify 0 to get results from exactly the fromMessageId or a negative offset to get the specified message and some newer messages. + */ + public int offset; + /** + * The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + */ + public int limit; + /** + * Filter for message content in the search results. + */ + public SearchMessagesFilter filter; + /** + * If not 0, only messages in the specified thread will be returned; supergroups only. + */ + public long messageThreadId; + + /** + * Default constructor for a function, which searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing messageId. Cannot be used in secret chats with a non-empty query (searchSecretMessages should be used instead), or without an enabled message database. For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ */ + public SearchChatMessages() { + } + + /** + * Creates a function, which searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing messageId. Cannot be used in secret chats with a non-empty query (searchSecretMessages should be used instead), or without an enabled message database. For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Identifier of the chat in which to search messages. + * @param query Query to search for. + * @param senderUserId If not 0, only messages sent by the specified user will be returned. Not supported in secret chats. + * @param fromMessageId Identifier of the message starting from which history must be fetched; use 0 to get results from the last message. + * @param offset Specify 0 to get results from exactly the fromMessageId or a negative offset to get the specified message and some newer messages. + * @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + * @param filter Filter for message content in the search results. + * @param messageThreadId If not 0, only messages in the specified thread will be returned; supergroups only. + */ + public SearchChatMessages(long chatId, String query, int senderUserId, long fromMessageId, int offset, int limit, SearchMessagesFilter filter, long messageThreadId) { + this.chatId = chatId; + this.query = query; + this.senderUserId = senderUserId; + this.fromMessageId = fromMessageId; + this.offset = offset; + this.limit = limit; + this.filter = filter; + this.messageThreadId = messageThreadId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1445943052; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user. + * + *

Returns {@link Messages Messages}

+ */ + public static class SearchChatRecentLocationMessages extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * The maximum number of messages to be returned. + */ + public int limit; + + /** + * Default constructor for a function, which returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user. + * + *

Returns {@link Messages Messages}

+ */ + public SearchChatRecentLocationMessages() { + } + + /** + * Creates a function, which returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user. + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Chat identifier. + * @param limit The maximum number of messages to be returned. + */ + public SearchChatRecentLocationMessages(long chatId, int limit) { + this.chatId = chatId; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 950238950; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list. + * + *

Returns {@link Chats Chats}

+ */ + public static class SearchChats extends Function { + /** + * Query to search for. If the query is empty, returns up to 20 recently found chats. + */ + public String query; + /** + * The maximum number of chats to be returned. + */ + public int limit; + + /** + * Default constructor for a function, which searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list. + * + *

Returns {@link Chats Chats}

+ */ + public SearchChats() { + } + + /** + * Creates a function, which searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list. + * + *

Returns {@link Chats Chats}

+ * + * @param query Query to search for. If the query is empty, returns up to 20 recently found chats. + * @param limit The maximum number of chats to be returned. + */ + public SearchChats(String query, int limit) { + this.query = query; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1879787060; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats. + * + *

Returns {@link ChatsNearby ChatsNearby}

+ */ + public static class SearchChatsNearby extends Function { + /** + * Current user location. + */ + public Location location; + + /** + * Default constructor for a function, which returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats. + * + *

Returns {@link ChatsNearby ChatsNearby}

+ */ + public SearchChatsNearby() { + } + + /** + * Creates a function, which returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats. + * + *

Returns {@link ChatsNearby ChatsNearby}

+ * + * @param location Current user location. + */ + public SearchChatsNearby(Location location) { + this.location = location; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -196753377; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list. + * + *

Returns {@link Chats Chats}

+ */ + public static class SearchChatsOnServer extends Function { + /** + * Query to search for. + */ + public String query; + /** + * The maximum number of chats to be returned. + */ + public int limit; + + /** + * Default constructor for a function, which searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list. + * + *

Returns {@link Chats Chats}

+ */ + public SearchChatsOnServer() { + } + + /** + * Creates a function, which searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list. + * + *

Returns {@link Chats Chats}

+ * + * @param query Query to search for. + * @param limit The maximum number of chats to be returned. + */ + public SearchChatsOnServer(String query, int limit) { + this.query = query; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1158402188; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for the specified query in the first names, last names and usernames of the known user contacts. + * + *

Returns {@link Users Users}

+ */ + public static class SearchContacts extends Function { + /** + * Query to search for; may be empty to return all contacts. + */ + public String query; + /** + * The maximum number of users to be returned. + */ + public int limit; + + /** + * Default constructor for a function, which searches for the specified query in the first names, last names and usernames of the known user contacts. + * + *

Returns {@link Users Users}

+ */ + public SearchContacts() { + } + + /** + * Creates a function, which searches for the specified query in the first names, last names and usernames of the known user contacts. + * + *

Returns {@link Users Users}

+ * + * @param query Query to search for; may be empty to return all contacts. + * @param limit The maximum number of users to be returned. + */ + public SearchContacts(String query, int limit) { + this.query = query; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1794690715; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for emojis by keywords. Supported only if the file database is enabled. + * + *

Returns {@link Emojis Emojis}

+ */ + public static class SearchEmojis extends Function { + /** + * Text to search for. + */ + public String text; + /** + * True, if only emojis, which exactly match text needs to be returned. + */ + public boolean exactMatch; + /** + * List of possible IETF language tags of the user's input language; may be empty if unknown. + */ + public String[] inputLanguageCodes; + + /** + * Default constructor for a function, which searches for emojis by keywords. Supported only if the file database is enabled. + * + *

Returns {@link Emojis Emojis}

+ */ + public SearchEmojis() { + } + + /** + * Creates a function, which searches for emojis by keywords. Supported only if the file database is enabled. + * + *

Returns {@link Emojis Emojis}

+ * + * @param text Text to search for. + * @param exactMatch True, if only emojis, which exactly match text needs to be returned. + * @param inputLanguageCodes List of possible IETF language tags of the user's input language; may be empty if unknown. + */ + public SearchEmojis(String text, boolean exactMatch, String[] inputLanguageCodes) { + this.text = text; + this.exactMatch = exactMatch; + this.inputLanguageCodes = inputLanguageCodes; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 398837927; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for recently used hashtags by their prefix. + * + *

Returns {@link Hashtags Hashtags}

+ */ + public static class SearchHashtags extends Function { + /** + * Hashtag prefix to search for. + */ + public String prefix; + /** + * The maximum number of hashtags to be returned. + */ + public int limit; + + /** + * Default constructor for a function, which searches for recently used hashtags by their prefix. + * + *

Returns {@link Hashtags Hashtags}

+ */ + public SearchHashtags() { + } + + /** + * Creates a function, which searches for recently used hashtags by their prefix. + * + *

Returns {@link Hashtags Hashtags}

+ * + * @param prefix Hashtag prefix to search for. + * @param limit The maximum number of hashtags to be returned. + */ + public SearchHashtags(String prefix, int limit) { + this.prefix = prefix; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1043637617; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for installed sticker sets by looking for specified query in their title and name. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public static class SearchInstalledStickerSets extends Function { + /** + * Pass true to return mask sticker sets; pass false to return ordinary sticker sets. + */ + public boolean isMasks; + /** + * Query to search for. + */ + public String query; + /** + * The maximum number of sticker sets to return. + */ + public int limit; + + /** + * Default constructor for a function, which searches for installed sticker sets by looking for specified query in their title and name. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public SearchInstalledStickerSets() { + } + + /** + * Creates a function, which searches for installed sticker sets by looking for specified query in their title and name. + * + *

Returns {@link StickerSets StickerSets}

+ * + * @param isMasks Pass true to return mask sticker sets; pass false to return ordinary sticker sets. + * @param query Query to search for. + * @param limit The maximum number of sticker sets to return. + */ + public SearchInstalledStickerSets(boolean isMasks, String query, int limit) { + this.isMasks = isMasks; + this.query = query; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 681171344; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chatId, messageId)). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ */ + public static class SearchMessages extends Function { + /** + * Chat list in which to search messages; pass null to search in all chats regardless of their chat list. + */ + public ChatList chatList; + /** + * Query to search for. + */ + public String query; + /** + * The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message. + */ + public int offsetDate; + /** + * The chat identifier of the last found message, or 0 for the first request. + */ + public long offsetChatId; + /** + * The message identifier of the last found message, or 0 for the first request. + */ + public long offsetMessageId; + /** + * The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + */ + public int limit; + /** + * Filter for message content in the search results; searchMessagesFilterCall, searchMessagesFilterMissedCall, searchMessagesFilterMention, searchMessagesFilterUnreadMention and searchMessagesFilterFailedToSend are unsupported in this function. + */ + public SearchMessagesFilter filter; + /** + * If not 0, the minimum date of the messages to return. + */ + public int minDate; + /** + * If not 0, the maximum date of the messages to return. + */ + public int maxDate; + + /** + * Default constructor for a function, which searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chatId, messageId)). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ */ + public SearchMessages() { + } + + /** + * Creates a function, which searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chatId, messageId)). For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link Messages Messages}

+ * + * @param chatList Chat list in which to search messages; pass null to search in all chats regardless of their chat list. + * @param query Query to search for. + * @param offsetDate The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message. + * @param offsetChatId The chat identifier of the last found message, or 0 for the first request. + * @param offsetMessageId The message identifier of the last found message, or 0 for the first request. + * @param limit The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + * @param filter Filter for message content in the search results; searchMessagesFilterCall, searchMessagesFilterMissedCall, searchMessagesFilterMention, searchMessagesFilterUnreadMention and searchMessagesFilterFailedToSend are unsupported in this function. + * @param minDate If not 0, the minimum date of the messages to return. + * @param maxDate If not 0, the maximum date of the messages to return. + */ + public SearchMessages(ChatList chatList, String query, int offsetDate, long offsetChatId, long offsetMessageId, int limit, SearchMessagesFilter filter, int minDate, int maxDate) { + this.chatList = chatList; + this.query = query; + this.offsetDate = offsetDate; + this.offsetChatId = offsetChatId; + this.offsetMessageId = offsetMessageId; + this.limit = limit; + this.filter = filter; + this.minDate = minDate; + this.maxDate = maxDate; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -225214062; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned. + * + *

Returns {@link Chat Chat}

+ */ + public static class SearchPublicChat extends Function { + /** + * Username to be resolved. + */ + public String username; + + /** + * Default constructor for a function, which searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned. + * + *

Returns {@link Chat Chat}

+ */ + public SearchPublicChat() { + } + + /** + * Creates a function, which searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned. + * + *

Returns {@link Chat Chat}

+ * + * @param username Username to be resolved. + */ + public SearchPublicChat(String username) { + this.username = username; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 857135533; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results. + * + *

Returns {@link Chats Chats}

+ */ + public static class SearchPublicChats extends Function { + /** + * Query to search for. + */ + public String query; + + /** + * Default constructor for a function, which searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results. + * + *

Returns {@link Chats Chats}

+ */ + public SearchPublicChats() { + } + + /** + * Creates a function, which searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results. + * + *

Returns {@link Chats Chats}

+ * + * @param query Query to search for. + */ + public SearchPublicChats(String query) { + this.query = query; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 970385337; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link FoundMessages FoundMessages}

+ */ + public static class SearchSecretMessages extends Function { + /** + * Identifier of the chat in which to search. Specify 0 to search in all secret chats. + */ + public long chatId; + /** + * Query to search for. If empty, searchChatMessages should be used instead. + */ + public String query; + /** + * Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results. + */ + public String offset; + /** + * The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + */ + public int limit; + /** + * A filter for message content in the search results. + */ + public SearchMessagesFilter filter; + + /** + * Default constructor for a function, which searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link FoundMessages FoundMessages}

+ */ + public SearchSecretMessages() { + } + + /** + * Creates a function, which searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library. + * + *

Returns {@link FoundMessages FoundMessages}

+ * + * @param chatId Identifier of the chat in which to search. Specify 0 to search in all secret chats. + * @param query Query to search for. If empty, searchChatMessages should be used instead. + * @param offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results. + * @param limit The maximum number of messages to be returned; up to 100. Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached. + * @param filter A filter for message content in the search results. + */ + public SearchSecretMessages(long chatId, String query, String offset, int limit, SearchMessagesFilter filter) { + this.chatId = chatId; + this.query = query; + this.offset = offset; + this.limit = limit; + this.filter = filter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -852865892; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for a sticker set by its name. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public static class SearchStickerSet extends Function { + /** + * Name of the sticker set. + */ + public String name; + + /** + * Default constructor for a function, which searches for a sticker set by its name. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public SearchStickerSet() { + } + + /** + * Creates a function, which searches for a sticker set by its name. + * + *

Returns {@link StickerSet StickerSet}

+ * + * @param name Name of the sticker set. + */ + public SearchStickerSet(String name) { + this.name = name; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1157930222; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public static class SearchStickerSets extends Function { + /** + * Query to search for. + */ + public String query; + + /** + * Default constructor for a function, which searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results. + * + *

Returns {@link StickerSets StickerSets}

+ */ + public SearchStickerSets() { + } + + /** + * Creates a function, which searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results. + * + *

Returns {@link StickerSets StickerSets}

+ * + * @param query Query to search for. + */ + public SearchStickerSets(String query) { + this.query = query; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1082314629; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Searches for stickers from public sticker sets that correspond to a given emoji. + * + *

Returns {@link Stickers Stickers}

+ */ + public static class SearchStickers extends Function { + /** + * String representation of emoji; must be non-empty. + */ + public String emoji; + /** + * The maximum number of stickers to be returned. + */ + public int limit; + + /** + * Default constructor for a function, which searches for stickers from public sticker sets that correspond to a given emoji. + * + *

Returns {@link Stickers Stickers}

+ */ + public SearchStickers() { + } + + /** + * Creates a function, which searches for stickers from public sticker sets that correspond to a given emoji. + * + *

Returns {@link Stickers Stickers}

+ * + * @param emoji String representation of emoji; must be non-empty. + * @param limit The maximum number of stickers to be returned. + */ + public SearchStickers(String emoji, int limit) { + this.emoji = emoji; + this.limit = limit; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1555771203; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message. + * + *

Returns {@link Message Message}

+ */ + public static class SendBotStartMessage extends Function { + /** + * Identifier of the bot. + */ + public int botUserId; + /** + * Identifier of the target chat. + */ + public long chatId; + /** + * A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking). + */ + public String parameter; + + /** + * Default constructor for a function, which invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message. + * + *

Returns {@link Message Message}

+ */ + public SendBotStartMessage() { + } + + /** + * Creates a function, which invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message. + * + *

Returns {@link Message Message}

+ * + * @param botUserId Identifier of the bot. + * @param chatId Identifier of the target chat. + * @param parameter A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking). + */ + public SendBotStartMessage(int botUserId, long chatId, String parameter) { + this.botUserId = botUserId; + this.chatId = chatId; + this.parameter = parameter; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1112181339; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends debug information for a call. + * + *

Returns {@link Ok Ok}

+ */ + public static class SendCallDebugInformation extends Function { + /** + * Call identifier. + */ + public int callId; + /** + * Debug information in application-specific format. + */ + public String debugInformation; + + /** + * Default constructor for a function, which sends debug information for a call. + * + *

Returns {@link Ok Ok}

+ */ + public SendCallDebugInformation() { + } + + /** + * Creates a function, which sends debug information for a call. + * + *

Returns {@link Ok Ok}

+ * + * @param callId Call identifier. + * @param debugInformation Debug information in application-specific format. + */ + public SendCallDebugInformation(int callId, String debugInformation) { + this.callId = callId; + this.debugInformation = debugInformation; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2019243839; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a call rating. + * + *

Returns {@link Ok Ok}

+ */ + public static class SendCallRating extends Function { + /** + * Call identifier. + */ + public int callId; + /** + * Call rating; 1-5. + */ + public int rating; + /** + * An optional user comment if the rating is less than 5. + */ + public String comment; + /** + * List of the exact types of problems with the call, specified by the user. + */ + public CallProblem[] problems; + + /** + * Default constructor for a function, which sends a call rating. + * + *

Returns {@link Ok Ok}

+ */ + public SendCallRating() { + } + + /** + * Creates a function, which sends a call rating. + * + *

Returns {@link Ok Ok}

+ * + * @param callId Call identifier. + * @param rating Call rating; 1-5. + * @param comment An optional user comment if the rating is less than 5. + * @param problems List of the exact types of problems with the call, specified by the user. + */ + public SendCallRating(int callId, int rating, String comment, CallProblem[] problems) { + this.callId = callId; + this.rating = rating; + this.comment = comment; + this.problems = problems; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1402719502; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends call signaling data. + * + *

Returns {@link Ok Ok}

+ */ + public static class SendCallSignalingData extends Function { + /** + * Call identifier. + */ + public int callId; + /** + * The data. + */ + public byte[] data; + + /** + * Default constructor for a function, which sends call signaling data. + * + *

Returns {@link Ok Ok}

+ */ + public SendCallSignalingData() { + } + + /** + * Creates a function, which sends call signaling data. + * + *

Returns {@link Ok Ok}

+ * + * @param callId Call identifier. + * @param data The data. + */ + public SendCallSignalingData(int callId, byte[] data) { + this.callId = callId; + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1412280732; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a notification about user activity in a chat. + * + *

Returns {@link Ok Ok}

+ */ + public static class SendChatAction extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * If not 0, a message thread identifier in which the action was performed. + */ + public long messageThreadId; + /** + * The action description. + */ + public ChatAction action; + + /** + * Default constructor for a function, which sends a notification about user activity in a chat. + * + *

Returns {@link Ok Ok}

+ */ + public SendChatAction() { + } + + /** + * Creates a function, which sends a notification about user activity in a chat. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param messageThreadId If not 0, a message thread identifier in which the action was performed. + * @param action The action description. + */ + public SendChatAction(long chatId, long messageThreadId, ChatAction action) { + this.chatId = chatId; + this.messageThreadId = messageThreadId; + this.action = action; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2096947540; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats. + * + *

Returns {@link Ok Ok}

+ */ + public static class SendChatScreenshotTakenNotification extends Function { + /** + * Chat identifier. + */ + public long chatId; + + /** + * Default constructor for a function, which sends a notification about a screenshot taken in a chat. Supported only in private and secret chats. + * + *

Returns {@link Ok Ok}

+ */ + public SendChatScreenshotTakenNotification() { + } + + /** + * Creates a function, which sends a notification about a screenshot taken in a chat. Supported only in private and secret chats. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + */ + public SendChatScreenshotTakenNotification(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 448399457; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message. + * + *

Returns {@link Message Message}

+ */ + public static class SendChatSetTtlMessage extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New TTL value, in seconds. + */ + public int ttl; + + /** + * Default constructor for a function, which changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message. + * + *

Returns {@link Message Message}

+ */ + public SendChatSetTtlMessage() { + } + + /** + * Creates a function, which changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message. + * + *

Returns {@link Message Message}

+ * + * @param chatId Chat identifier. + * @param ttl New TTL value, in seconds. + */ + public SendChatSetTtlMessage(long chatId, int ttl) { + this.chatId = chatId; + this.ttl = ttl; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1432535564; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a custom request; for bots only. + * + *

Returns {@link CustomRequestResult CustomRequestResult}

+ */ + public static class SendCustomRequest extends Function { + /** + * The method name. + */ + public String method; + /** + * JSON-serialized method parameters. + */ + public String parameters; + + /** + * Default constructor for a function, which sends a custom request; for bots only. + * + *

Returns {@link CustomRequestResult CustomRequestResult}

+ */ + public SendCustomRequest() { + } + + /** + * Creates a function, which sends a custom request; for bots only. + * + *

Returns {@link CustomRequestResult CustomRequestResult}

+ * + * @param method The method name. + * @param parameters JSON-serialized method parameters. + */ + public SendCustomRequest(String method, String parameters) { + this.method = method; + this.parameters = parameters; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 285045153; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a code to verify an email address to be added to a user's Telegram Passport. + * + *

Returns {@link EmailAddressAuthenticationCodeInfo EmailAddressAuthenticationCodeInfo}

+ */ + public static class SendEmailAddressVerificationCode extends Function { + /** + * Email address. + */ + public String emailAddress; + + /** + * Default constructor for a function, which sends a code to verify an email address to be added to a user's Telegram Passport. + * + *

Returns {@link EmailAddressAuthenticationCodeInfo EmailAddressAuthenticationCodeInfo}

+ */ + public SendEmailAddressVerificationCode() { + } + + /** + * Creates a function, which sends a code to verify an email address to be added to a user's Telegram Passport. + * + *

Returns {@link EmailAddressAuthenticationCodeInfo EmailAddressAuthenticationCodeInfo}

+ * + * @param emailAddress Email address. + */ + public SendEmailAddressVerificationCode(String emailAddress) { + this.emailAddress = emailAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -221621379; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message. + * + *

Returns {@link Message Message}

+ */ + public static class SendInlineQueryResultMessage extends Function { + /** + * Target chat. + */ + public long chatId; + /** + * If not 0, a message thread identifier in which the message will be sent. + */ + public long messageThreadId; + /** + * Identifier of a message to reply to or 0. + */ + public long replyToMessageId; + /** + * Options to be used to send the message. + */ + public MessageSendOptions options; + /** + * Identifier of the inline query. + */ + public long queryId; + /** + * Identifier of the inline result. + */ + public String resultId; + /** + * If true, there will be no mention of a bot, via which the message is sent. Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and GetOption("venue_search_bot_username"). + */ + public boolean hideViaBot; + + /** + * Default constructor for a function, which sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message. + * + *

Returns {@link Message Message}

+ */ + public SendInlineQueryResultMessage() { + } + + /** + * Creates a function, which sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message. + * + *

Returns {@link Message Message}

+ * + * @param chatId Target chat. + * @param messageThreadId If not 0, a message thread identifier in which the message will be sent. + * @param replyToMessageId Identifier of a message to reply to or 0. + * @param options Options to be used to send the message. + * @param queryId Identifier of the inline query. + * @param resultId Identifier of the inline result. + * @param hideViaBot If true, there will be no mention of a bot, via which the message is sent. Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and GetOption("venue_search_bot_username"). + */ + public SendInlineQueryResultMessage(long chatId, long messageThreadId, long replyToMessageId, MessageSendOptions options, long queryId, String resultId, boolean hideViaBot) { + this.chatId = chatId; + this.messageThreadId = messageThreadId; + this.replyToMessageId = replyToMessageId; + this.options = options; + this.queryId = queryId; + this.resultId = resultId; + this.hideViaBot = hideViaBot; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -948639588; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a message. Returns the sent message. + * + *

Returns {@link Message Message}

+ */ + public static class SendMessage extends Function { + /** + * Target chat. + */ + public long chatId; + /** + * If not 0, a message thread identifier in which the message will be sent. + */ + public long messageThreadId; + /** + * Identifier of the message to reply to or 0. + */ + public long replyToMessageId; + /** + * Options to be used to send the message. + */ + public MessageSendOptions options; + /** + * Markup for replying to the message; for bots only. + */ + public ReplyMarkup replyMarkup; + /** + * The content of the message to be sent. + */ + public InputMessageContent inputMessageContent; + + /** + * Default constructor for a function, which sends a message. Returns the sent message. + * + *

Returns {@link Message Message}

+ */ + public SendMessage() { + } + + /** + * Creates a function, which sends a message. Returns the sent message. + * + *

Returns {@link Message Message}

+ * + * @param chatId Target chat. + * @param messageThreadId If not 0, a message thread identifier in which the message will be sent. + * @param replyToMessageId Identifier of the message to reply to or 0. + * @param options Options to be used to send the message. + * @param replyMarkup Markup for replying to the message; for bots only. + * @param inputMessageContent The content of the message to be sent. + */ + public SendMessage(long chatId, long messageThreadId, long replyToMessageId, MessageSendOptions options, ReplyMarkup replyMarkup, InputMessageContent inputMessageContent) { + this.chatId = chatId; + this.messageThreadId = messageThreadId; + this.replyToMessageId = replyToMessageId; + this.options = options; + this.replyMarkup = replyMarkup; + this.inputMessageContent = inputMessageContent; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 960453021; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages. + * + *

Returns {@link Messages Messages}

+ */ + public static class SendMessageAlbum extends Function { + /** + * Target chat. + */ + public long chatId; + /** + * If not 0, a message thread identifier in which the messages will be sent. + */ + public long messageThreadId; + /** + * Identifier of a message to reply to or 0. + */ + public long replyToMessageId; + /** + * Options to be used to send the messages. + */ + public MessageSendOptions options; + /** + * Contents of messages to be sent. + */ + public InputMessageContent[] inputMessageContents; + + /** + * Default constructor for a function, which sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages. + * + *

Returns {@link Messages Messages}

+ */ + public SendMessageAlbum() { + } + + /** + * Creates a function, which sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages. + * + *

Returns {@link Messages Messages}

+ * + * @param chatId Target chat. + * @param messageThreadId If not 0, a message thread identifier in which the messages will be sent. + * @param replyToMessageId Identifier of a message to reply to or 0. + * @param options Options to be used to send the messages. + * @param inputMessageContents Contents of messages to be sent. + */ + public SendMessageAlbum(long chatId, long messageThreadId, long replyToMessageId, MessageSendOptions options, InputMessageContent[] inputMessageContents) { + this.chatId = chatId; + this.messageThreadId = messageThreadId; + this.replyToMessageId = replyToMessageId; + this.options = options; + this.inputMessageContents = inputMessageContents; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 983360432; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements need to be used. + * + *

Returns {@link Ok Ok}

+ */ + public static class SendPassportAuthorizationForm extends Function { + /** + * Authorization form identifier. + */ + public int autorizationFormId; + /** + * Types of Telegram Passport elements chosen by user to complete the authorization form. + */ + public PassportElementType[] types; + + /** + * Default constructor for a function, which sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements need to be used. + * + *

Returns {@link Ok Ok}

+ */ + public SendPassportAuthorizationForm() { + } + + /** + * Creates a function, which sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements need to be used. + * + *

Returns {@link Ok Ok}

+ * + * @param autorizationFormId Authorization form identifier. + * @param types Types of Telegram Passport elements chosen by user to complete the authorization form. + */ + public SendPassportAuthorizationForm(int autorizationFormId, PassportElementType[] types) { + this.autorizationFormId = autorizationFormId; + this.types = types; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -602402218; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a filled-out payment form to the bot for final verification. + * + *

Returns {@link PaymentResult PaymentResult}

+ */ + public static class SendPaymentForm extends Function { + /** + * Chat identifier of the Invoice message. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + /** + * Identifier returned by ValidateOrderInfo, or an empty string. + */ + public String orderInfoId; + /** + * Identifier of a chosen shipping option, if applicable. + */ + public String shippingOptionId; + /** + * The credentials chosen by user for payment. + */ + public InputCredentials credentials; + + /** + * Default constructor for a function, which sends a filled-out payment form to the bot for final verification. + * + *

Returns {@link PaymentResult PaymentResult}

+ */ + public SendPaymentForm() { + } + + /** + * Creates a function, which sends a filled-out payment form to the bot for final verification. + * + *

Returns {@link PaymentResult PaymentResult}

+ * + * @param chatId Chat identifier of the Invoice message. + * @param messageId Message identifier. + * @param orderInfoId Identifier returned by ValidateOrderInfo, or an empty string. + * @param shippingOptionId Identifier of a chosen shipping option, if applicable. + * @param credentials The credentials chosen by user for payment. + */ + public SendPaymentForm(long chatId, long messageId, String orderInfoId, String shippingOptionId, InputCredentials credentials) { + this.chatId = chatId; + this.messageId = messageId; + this.orderInfoId = orderInfoId; + this.shippingOptionId = shippingOptionId; + this.credentials = credentials; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 591581572; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends phone number confirmation code. Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or "tg://confirmphone?phone=*******&hash=**********" link. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public static class SendPhoneNumberConfirmationCode extends Function { + /** + * Value of the "hash" parameter from the link. + */ + public String hash; + /** + * Value of the "phone" parameter from the link. + */ + public String phoneNumber; + /** + * Settings for the authentication of the user's phone number. + */ + public PhoneNumberAuthenticationSettings settings; + + /** + * Default constructor for a function, which sends phone number confirmation code. Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or "tg://confirmphone?phone=*******&hash=**********" link. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public SendPhoneNumberConfirmationCode() { + } + + /** + * Creates a function, which sends phone number confirmation code. Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or "tg://confirmphone?phone=*******&hash=**********" link. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ * + * @param hash Value of the "hash" parameter from the link. + * @param phoneNumber Value of the "phone" parameter from the link. + * @param settings Settings for the authentication of the user's phone number. + */ + public SendPhoneNumberConfirmationCode(String hash, String phoneNumber, PhoneNumberAuthenticationSettings settings) { + this.hash = hash; + this.phoneNumber = phoneNumber; + this.settings = settings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1901171495; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a code to verify a phone number to be added to a user's Telegram Passport. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public static class SendPhoneNumberVerificationCode extends Function { + /** + * The phone number of the user, in international format. + */ + public String phoneNumber; + /** + * Settings for the authentication of the user's phone number. + */ + public PhoneNumberAuthenticationSettings settings; + + /** + * Default constructor for a function, which sends a code to verify a phone number to be added to a user's Telegram Passport. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ */ + public SendPhoneNumberVerificationCode() { + } + + /** + * Creates a function, which sends a code to verify a phone number to be added to a user's Telegram Passport. + * + *

Returns {@link AuthenticationCodeInfo AuthenticationCodeInfo}

+ * + * @param phoneNumber The phone number of the user, in international format. + * @param settings Settings for the authentication of the user's phone number. + */ + public SendPhoneNumberVerificationCode(String phoneNumber, PhoneNumberAuthenticationSettings settings) { + this.phoneNumber = phoneNumber; + this.settings = settings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2081689035; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the period of inactivity after which the account of the current user will automatically be deleted. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetAccountTtl extends Function { + /** + * New account TTL. + */ + public AccountTtl ttl; + + /** + * Default constructor for a function, which changes the period of inactivity after which the account of the current user will automatically be deleted. + * + *

Returns {@link Ok Ok}

+ */ + public SetAccountTtl() { + } + + /** + * Creates a function, which changes the period of inactivity after which the account of the current user will automatically be deleted. + * + *

Returns {@link Ok Ok}

+ * + * @param ttl New account TTL. + */ + public SetAccountTtl(AccountTtl ttl) { + this.ttl = ttl; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 701389032; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Succeeds after a specified amount of time has passed. Can be called before initialization. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetAlarm extends Function { + /** + * Number of seconds before the function returns. + */ + public double seconds; + + /** + * Default constructor for a function, which succeeds after a specified amount of time has passed. Can be called before initialization. + * + *

Returns {@link Ok Ok}

+ */ + public SetAlarm() { + } + + /** + * Creates a function, which succeeds after a specified amount of time has passed. Can be called before initialization. + * + *

Returns {@link Ok Ok}

+ * + * @param seconds Number of seconds before the function returns. + */ + public SetAlarm(double seconds) { + this.seconds = seconds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -873497067; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetAuthenticationPhoneNumber extends Function { + /** + * The phone number of the user, in international format. + */ + public String phoneNumber; + /** + * Settings for the authentication of the user's phone number. + */ + public PhoneNumberAuthenticationSettings settings; + + /** + * Default constructor for a function, which sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ */ + public SetAuthenticationPhoneNumber() { + } + + /** + * Creates a function, which sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword. + * + *

Returns {@link Ok Ok}

+ * + * @param phoneNumber The phone number of the user, in international format. + * @param settings Settings for the authentication of the user's phone number. + */ + public SetAuthenticationPhoneNumber(String phoneNumber, PhoneNumberAuthenticationSettings settings) { + this.phoneNumber = phoneNumber; + this.settings = settings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 868276259; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets auto-download settings. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetAutoDownloadSettings extends Function { + /** + * New user auto-download settings. + */ + public AutoDownloadSettings settings; + /** + * Type of the network for which the new settings are applied. + */ + public NetworkType type; + + /** + * Default constructor for a function, which sets auto-download settings. + * + *

Returns {@link Ok Ok}

+ */ + public SetAutoDownloadSettings() { + } + + /** + * Creates a function, which sets auto-download settings. + * + *

Returns {@link Ok Ok}

+ * + * @param settings New user auto-download settings. + * @param type Type of the network for which the new settings are applied. + */ + public SetAutoDownloadSettings(AutoDownloadSettings settings, NetworkType type) { + this.settings = settings; + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -353671948; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the background selected by the user; adds background to the list of installed backgrounds. + * + *

Returns {@link Background Background}

+ */ + public static class SetBackground extends Function { + /** + * The input background to use, null for filled backgrounds. + */ + public InputBackground background; + /** + * Background type; null for default background. The method will return error 404 if type is null. + */ + public BackgroundType type; + /** + * True, if the background is chosen for dark theme. + */ + public boolean forDarkTheme; + + /** + * Default constructor for a function, which changes the background selected by the user; adds background to the list of installed backgrounds. + * + *

Returns {@link Background Background}

+ */ + public SetBackground() { + } + + /** + * Creates a function, which changes the background selected by the user; adds background to the list of installed backgrounds. + * + *

Returns {@link Background Background}

+ * + * @param background The input background to use, null for filled backgrounds. + * @param type Background type; null for default background. The method will return error 404 if type is null. + * @param forDarkTheme True, if the background is chosen for dark theme. + */ + public SetBackground(InputBackground background, BackgroundType type, boolean forDarkTheme) { + this.background = background; + this.type = type; + this.forDarkTheme = forDarkTheme; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1035439225; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the bio of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetBio extends Function { + /** + * The new value of the user bio; 0-70 characters without line feeds. + */ + public String bio; + + /** + * Default constructor for a function, which changes the bio of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public SetBio() { + } + + /** + * Creates a function, which changes the bio of the current user. + * + *

Returns {@link Ok Ok}

+ * + * @param bio The new value of the user bio; 0-70 characters without line feeds. + */ + public SetBio(String bio) { + this.bio = bio; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1619582124; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetBotUpdatesStatus extends Function { + /** + * The number of pending updates. + */ + public int pendingUpdateCount; + /** + * The last error message. + */ + public String errorMessage; + + /** + * Default constructor for a function, which informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public SetBotUpdatesStatus() { + } + + /** + * Creates a function, which informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param pendingUpdateCount The number of pending updates. + * @param errorMessage The last error message. + */ + public SetBotUpdatesStatus(int pendingUpdateCount, String errorMessage) { + this.pendingUpdateCount = pendingUpdateCount; + this.errorMessage = errorMessage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1154926191; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes application-specific data associated with a chat. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatClientData extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New value of clientData. + */ + public String clientData; + + /** + * Default constructor for a function, which changes application-specific data associated with a chat. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatClientData() { + } + + /** + * Creates a function, which changes application-specific data associated with a chat. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param clientData New value of clientData. + */ + public SetChatClientData(long chatId, String clientData) { + this.chatId = chatId; + this.clientData = clientData; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -827119811; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes information about a chat. Available for basic groups, supergroups, and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatDescription extends Function { + /** + * Identifier of the chat. + */ + public long chatId; + /** + * New chat description; 0-255 characters. + */ + public String description; + + /** + * Default constructor for a function, which changes information about a chat. Available for basic groups, supergroups, and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatDescription() { + } + + /** + * Creates a function, which changes information about a chat. Available for basic groups, supergroups, and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Identifier of the chat. + * @param description New chat description; 0-255 characters. + */ + public SetChatDescription(long chatId, String description) { + this.chatId = chatId; + this.description = description; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1957213277; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the discussion group of a channel chat; requires canChangeInfo rights in the channel if it is specified. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatDiscussionGroup extends Function { + /** + * Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires canPinMessages rights in the supergroup). + */ + public long chatId; + /** + * Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats need to be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable needs to be used first to change that. + */ + public long discussionChatId; + + /** + * Default constructor for a function, which changes the discussion group of a channel chat; requires canChangeInfo rights in the channel if it is specified. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatDiscussionGroup() { + } + + /** + * Creates a function, which changes the discussion group of a channel chat; requires canChangeInfo rights in the channel if it is specified. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires canPinMessages rights in the supergroup). + * @param discussionChatId Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats need to be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable needs to be used first to change that. + */ + public SetChatDiscussionGroup(long chatId, long discussionChatId) { + this.chatId = chatId; + this.discussionChatId = discussionChatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -918801736; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the draft message in a chat. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatDraftMessage extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * If not 0, a message thread identifier in which the draft was changed. + */ + public long messageThreadId; + /** + * New draft message; may be null. + */ + public DraftMessage draftMessage; + + /** + * Default constructor for a function, which changes the draft message in a chat. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatDraftMessage() { + } + + /** + * Creates a function, which changes the draft message in a chat. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param messageThreadId If not 0, a message thread identifier in which the draft was changed. + * @param draftMessage New draft message; may be null. + */ + public SetChatDraftMessage(long chatId, long messageThreadId, DraftMessage draftMessage) { + this.chatId = chatId; + this.messageThreadId = messageThreadId; + this.draftMessage = draftMessage; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1683889946; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.canSetLocation to check whether the method is allowed to use. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatLocation extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New location for the chat; must be valid and not null. + */ + public ChatLocation location; + + /** + * Default constructor for a function, which changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.canSetLocation to check whether the method is allowed to use. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatLocation() { + } + + /** + * Creates a function, which changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.canSetLocation to check whether the method is allowed to use. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param location New location for the chat; must be valid and not null. + */ + public SetChatLocation(long chatId, ChatLocation location) { + this.chatId = chatId; + this.location = location; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -767091286; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership. The chat member status will not be changed until it has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatMemberStatus extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * User identifier. + */ + public int userId; + /** + * The new status of the member in the chat. + */ + public ChatMemberStatus status; + + /** + * Default constructor for a function, which changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership. The chat member status will not be changed until it has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatMemberStatus() { + } + + /** + * Creates a function, which changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership. The chat member status will not be changed until it has been synchronized with the server. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param userId User identifier. + * @param status The new status of the member in the chat. + */ + public SetChatMemberStatus(long chatId, int userId, ChatMemberStatus status) { + this.chatId = chatId; + this.userId = userId; + this.status = status; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1754439241; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatNotificationSettings extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever. + */ + public ChatNotificationSettings notificationSettings; + + /** + * Default constructor for a function, which changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatNotificationSettings() { + } + + /** + * Creates a function, which changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param notificationSettings New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever. + */ + public SetChatNotificationSettings(long chatId, ChatNotificationSettings notificationSettings) { + this.chatId = chatId; + this.notificationSettings = notificationSettings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 777199614; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the chat members permissions. Supported only for basic groups and supergroups. Requires canRestrictMembers administrator right. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatPermissions extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New non-administrator members permissions in the chat. + */ + public ChatPermissions permissions; + + /** + * Default constructor for a function, which changes the chat members permissions. Supported only for basic groups and supergroups. Requires canRestrictMembers administrator right. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatPermissions() { + } + + /** + * Creates a function, which changes the chat members permissions. Supported only for basic groups and supergroups. Requires canRestrictMembers administrator right. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param permissions New non-administrator members permissions in the chat. + */ + public SetChatPermissions(long chatId, ChatPermissions permissions) { + this.chatId = chatId; + this.permissions = permissions; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2138507006; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatPhoto extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New chat photo. Pass null to delete the chat photo. + */ + public InputChatPhoto photo; + + /** + * Default constructor for a function, which changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatPhoto() { + } + + /** + * Creates a function, which changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param photo New chat photo. Pass null to delete the chat photo. + */ + public SetChatPhoto(long chatId, InputChatPhoto photo) { + this.chatId = chatId; + this.photo = photo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -377778941; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the slow mode delay of a chat. Available only for supergroups; requires canRestrictMembers rights. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatSlowModeDelay extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New slow mode delay for the chat; must be one of 0, 10, 30, 60, 300, 900, 3600. + */ + public int slowModeDelay; + + /** + * Default constructor for a function, which changes the slow mode delay of a chat. Available only for supergroups; requires canRestrictMembers rights. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatSlowModeDelay() { + } + + /** + * Creates a function, which changes the slow mode delay of a chat. Available only for supergroups; requires canRestrictMembers rights. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param slowModeDelay New slow mode delay for the chat; must be one of 0, 10, 30, 60, 300, 900, 3600. + */ + public SetChatSlowModeDelay(long chatId, int slowModeDelay) { + this.chatId = chatId; + this.slowModeDelay = slowModeDelay; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -540350914; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the chat title. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetChatTitle extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New title of the chat; 1-128 characters. + */ + public String title; + + /** + * Default constructor for a function, which changes the chat title. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public SetChatTitle() { + } + + /** + * Creates a function, which changes the chat title. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param title New title of the chat; 1-128 characters. + */ + public SetChatTitle(long chatId, String title) { + this.chatId = chatId; + this.title = title; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 164282047; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the list of commands supported by the bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetCommands extends Function { + /** + * List of the bot's commands. + */ + public BotCommand[] commands; + + /** + * Default constructor for a function, which sets the list of commands supported by the bot; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public SetCommands() { + } + + /** + * Creates a function, which sets the list of commands supported by the bot; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param commands List of the bot's commands. + */ + public SetCommands(BotCommand[] commands) { + this.commands = commands; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 355010146; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds or changes a custom local language pack to the current localization target. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetCustomLanguagePack extends Function { + /** + * Information about the language pack. Language pack ID must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization. + */ + public LanguagePackInfo info; + /** + * Strings of the new language pack. + */ + public LanguagePackString[] strings; + + /** + * Default constructor for a function, which adds or changes a custom local language pack to the current localization target. + * + *

Returns {@link Ok Ok}

+ */ + public SetCustomLanguagePack() { + } + + /** + * Creates a function, which adds or changes a custom local language pack to the current localization target. + * + *

Returns {@link Ok Ok}

+ * + * @param info Information about the language pack. Language pack ID must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization. + * @param strings Strings of the new language pack. + */ + public SetCustomLanguagePack(LanguagePackInfo info, LanguagePackString[] strings) { + this.info = info; + this.strings = strings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -296742819; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds, edits or deletes a string in a custom local language pack. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetCustomLanguagePackString extends Function { + /** + * Identifier of a previously added custom local language pack in the current localization target. + */ + public String languagePackId; + /** + * New language pack string. + */ + public LanguagePackString newString; + + /** + * Default constructor for a function, which adds, edits or deletes a string in a custom local language pack. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public SetCustomLanguagePackString() { + } + + /** + * Creates a function, which adds, edits or deletes a string in a custom local language pack. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param languagePackId Identifier of a previously added custom local language pack in the current localization target. + * @param newString New language pack string. + */ + public SetCustomLanguagePackString(String languagePackId, LanguagePackString newString) { + this.languagePackId = languagePackId; + this.newString = newString; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1316365592; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetDatabaseEncryptionKey extends Function { + /** + * New encryption key. + */ + public byte[] newEncryptionKey; + + /** + * Default constructor for a function, which changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain. + * + *

Returns {@link Ok Ok}

+ */ + public SetDatabaseEncryptionKey() { + } + + /** + * Creates a function, which changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain. + * + *

Returns {@link Ok Ok}

+ * + * @param newEncryptionKey New encryption key. + */ + public SetDatabaseEncryptionKey(byte[] newEncryptionKey) { + this.newEncryptionKey = newEncryptionKey; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1204599371; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Informs TDLib on a file generation progress. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetFileGenerationProgress extends Function { + /** + * The identifier of the generation process. + */ + public long generationId; + /** + * Expected size of the generated file, in bytes; 0 if unknown. + */ + public int expectedSize; + /** + * The number of bytes already generated. + */ + public int localPrefixSize; + + /** + * Default constructor for a function, which informs TDLib on a file generation progress. + * + *

Returns {@link Ok Ok}

+ */ + public SetFileGenerationProgress() { + } + + /** + * Creates a function, which informs TDLib on a file generation progress. + * + *

Returns {@link Ok Ok}

+ * + * @param generationId The identifier of the generation process. + * @param expectedSize Expected size of the generated file, in bytes; 0 if unknown. + * @param localPrefixSize The number of bytes already generated. + */ + public SetFileGenerationProgress(long generationId, int expectedSize, int localPrefixSize) { + this.generationId = generationId; + this.expectedSize = expectedSize; + this.localPrefixSize = localPrefixSize; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -540459953; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Updates the game score of the specified user in the game; for bots only. + * + *

Returns {@link Message Message}

+ */ + public static class SetGameScore extends Function { + /** + * The chat to which the message with the game belongs. + */ + public long chatId; + /** + * Identifier of the message. + */ + public long messageId; + /** + * True, if the message should be edited. + */ + public boolean editMessage; + /** + * User identifier. + */ + public int userId; + /** + * The new score. + */ + public int score; + /** + * Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table. + */ + public boolean force; + + /** + * Default constructor for a function, which updates the game score of the specified user in the game; for bots only. + * + *

Returns {@link Message Message}

+ */ + public SetGameScore() { + } + + /** + * Creates a function, which updates the game score of the specified user in the game; for bots only. + * + *

Returns {@link Message Message}

+ * + * @param chatId The chat to which the message with the game belongs. + * @param messageId Identifier of the message. + * @param editMessage True, if the message should be edited. + * @param userId User identifier. + * @param score The new score. + * @param force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table. + */ + public SetGameScore(long chatId, long messageId, boolean editMessage, int userId, int score, boolean force) { + this.chatId = chatId; + this.messageId = messageId; + this.editMessage = editMessage; + this.userId = userId; + this.score = score; + this.force = force; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1768307069; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Updates the game score of the specified user in a game; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetInlineGameScore extends Function { + /** + * Inline message identifier. + */ + public String inlineMessageId; + /** + * True, if the message should be edited. + */ + public boolean editMessage; + /** + * User identifier. + */ + public int userId; + /** + * The new score. + */ + public int score; + /** + * Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table. + */ + public boolean force; + + /** + * Default constructor for a function, which updates the game score of the specified user in a game; for bots only. + * + *

Returns {@link Ok Ok}

+ */ + public SetInlineGameScore() { + } + + /** + * Creates a function, which updates the game score of the specified user in a game; for bots only. + * + *

Returns {@link Ok Ok}

+ * + * @param inlineMessageId Inline message identifier. + * @param editMessage True, if the message should be edited. + * @param userId User identifier. + * @param score The new score. + * @param force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table. + */ + public SetInlineGameScore(String inlineMessageId, boolean editMessage, int userId, int score, boolean force) { + this.inlineMessageId = inlineMessageId; + this.editMessage = editMessage; + this.userId = userId; + this.score = score; + this.force = force; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 758435487; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetLocation extends Function { + /** + * The new location of the user. + */ + public Location location; + + /** + * Default constructor for a function, which changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer. + * + *

Returns {@link Ok Ok}

+ */ + public SetLocation() { + } + + /** + * Creates a function, which changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer. + * + *

Returns {@link Ok Ok}

+ * + * @param location The new location of the user. + */ + public SetLocation(Location location) { + this.location = location; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 93926257; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets new log stream for internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetLogStream extends Function { + /** + * New log stream. + */ + public LogStream logStream; + + /** + * Default constructor for a function, which sets new log stream for internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ */ + public SetLogStream() { + } + + /** + * Creates a function, which sets new log stream for internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ * + * @param logStream New log stream. + */ + public SetLogStream(LogStream logStream) { + this.logStream = logStream; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1364199535; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetLogTagVerbosityLevel extends Function { + /** + * Logging tag to change verbosity level. + */ + public String tag; + /** + * New verbosity level; 1-1024. + */ + public int newVerbosityLevel; + + /** + * Default constructor for a function, which sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ */ + public SetLogTagVerbosityLevel() { + } + + /** + * Creates a function, which sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ * + * @param tag Logging tag to change verbosity level. + * @param newVerbosityLevel New verbosity level; 1-1024. + */ + public SetLogTagVerbosityLevel(String tag, int newVerbosityLevel) { + this.tag = tag; + this.newVerbosityLevel = newVerbosityLevel; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2095589738; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the verbosity level of the internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetLogVerbosityLevel extends Function { + /** + * New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging. + */ + public int newVerbosityLevel; + + /** + * Default constructor for a function, which sets the verbosity level of the internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ */ + public SetLogVerbosityLevel() { + } + + /** + * Creates a function, which sets the verbosity level of the internal logging of TDLib. Can be called synchronously. + * + *

Returns {@link Ok Ok}

+ * + * @param newVerbosityLevel New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging. + */ + public SetLogVerbosityLevel(int newVerbosityLevel) { + this.newVerbosityLevel = newVerbosityLevel; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -303429678; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the first and last name of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetName extends Function { + /** + * The new value of the first name for the user; 1-64 characters. + */ + public String firstName; + /** + * The new value of the optional last name for the user; 0-64 characters. + */ + public String lastName; + + /** + * Default constructor for a function, which changes the first and last name of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public SetName() { + } + + /** + * Creates a function, which changes the first and last name of the current user. + * + *

Returns {@link Ok Ok}

+ * + * @param firstName The new value of the first name for the user; 1-64 characters. + * @param lastName The new value of the optional last name for the user; 0-64 characters. + */ + public SetName(String firstName, String lastName) { + this.firstName = firstName; + this.lastName = lastName; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1711693584; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it should be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetNetworkType extends Function { + /** + * The new network type. By default, networkTypeOther. + */ + public NetworkType type; + + /** + * Default constructor for a function, which sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it should be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics. + * + *

Returns {@link Ok Ok}

+ */ + public SetNetworkType() { + } + + /** + * Creates a function, which sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it should be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics. + * + *

Returns {@link Ok Ok}

+ * + * @param type The new network type. By default, networkTypeOther. + */ + public SetNetworkType(NetworkType type) { + this.type = type; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -701635234; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetOption extends Function { + /** + * The name of the option. + */ + public String name; + /** + * The new value of the option. + */ + public OptionValue value; + + /** + * Default constructor for a function, which sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public SetOption() { + } + + /** + * Creates a function, which sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param name The name of the option. + * @param value The new value of the option. + */ + public SetOption(String name, OptionValue value) { + this.name = name; + this.value = value; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2114670322; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Adds an element to the user's Telegram Passport. May return an error with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must be verified first. + * + *

Returns {@link PassportElement PassportElement}

+ */ + public static class SetPassportElement extends Function { + /** + * Input Telegram Passport element. + */ + public InputPassportElement element; + /** + * Password of the current user. + */ + public String password; + + /** + * Default constructor for a function, which adds an element to the user's Telegram Passport. May return an error with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must be verified first. + * + *

Returns {@link PassportElement PassportElement}

+ */ + public SetPassportElement() { + } + + /** + * Creates a function, which adds an element to the user's Telegram Passport. May return an error with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must be verified first. + * + *

Returns {@link PassportElement PassportElement}

+ * + * @param element Input Telegram Passport element. + * @param password Password of the current user. + */ + public SetPassportElement(InputPassportElement element, String password) { + this.element = element; + this.password = password; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2068173212; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetPassportElementErrors extends Function { + /** + * User identifier. + */ + public int userId; + /** + * The errors. + */ + public InputPassportElementError[] errors; + + /** + * Default constructor for a function, which informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed. + * + *

Returns {@link Ok Ok}

+ */ + public SetPassportElementErrors() { + } + + /** + * Creates a function, which informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed. + * + *

Returns {@link Ok Ok}

+ * + * @param userId User identifier. + * @param errors The errors. + */ + public SetPassportElementErrors(int userId, InputPassportElementError[] errors) { + this.userId = userId; + this.errors = errors; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1455869875; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the password for the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public static class SetPassword extends Function { + /** + * Previous password of the user. + */ + public String oldPassword; + /** + * New password of the user; may be empty to remove the password. + */ + public String newPassword; + /** + * New password hint; may be empty. + */ + public String newHint; + /** + * Pass true if the recovery email address should be changed. + */ + public boolean setRecoveryEmailAddress; + /** + * New recovery email address; may be empty. + */ + public String newRecoveryEmailAddress; + + /** + * Default constructor for a function, which changes the password for the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public SetPassword() { + } + + /** + * Creates a function, which changes the password for the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. + * + *

Returns {@link PasswordState PasswordState}

+ * + * @param oldPassword Previous password of the user. + * @param newPassword New password of the user; may be empty to remove the password. + * @param newHint New password hint; may be empty. + * @param setRecoveryEmailAddress Pass true if the recovery email address should be changed. + * @param newRecoveryEmailAddress New recovery email address; may be empty. + */ + public SetPassword(String oldPassword, String newPassword, String newHint, boolean setRecoveryEmailAddress, String newRecoveryEmailAddress) { + this.oldPassword = oldPassword; + this.newPassword = newPassword; + this.newHint = newHint; + this.setRecoveryEmailAddress = setRecoveryEmailAddress; + this.newRecoveryEmailAddress = newRecoveryEmailAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1193589027; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the order of pinned chats. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetPinnedChats extends Function { + /** + * Chat list in which to change the order of pinned chats. + */ + public ChatList chatList; + /** + * The new list of pinned chats. + */ + public long[] chatIds; + + /** + * Default constructor for a function, which changes the order of pinned chats. + * + *

Returns {@link Ok Ok}

+ */ + public SetPinnedChats() { + } + + /** + * Creates a function, which changes the order of pinned chats. + * + *

Returns {@link Ok Ok}

+ * + * @param chatList Chat list in which to change the order of pinned chats. + * @param chatIds The new list of pinned chats. + */ + public SetPinnedChats(ChatList chatList, long[] chatIds) { + this.chatList = chatList; + this.chatIds = chatIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -695640000; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the user answer to a poll. A poll in quiz mode can be answered only once. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetPollAnswer extends Function { + /** + * Identifier of the chat to which the poll belongs. + */ + public long chatId; + /** + * Identifier of the message containing the poll. + */ + public long messageId; + /** + * 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers. + */ + public int[] optionIds; + + /** + * Default constructor for a function, which changes the user answer to a poll. A poll in quiz mode can be answered only once. + * + *

Returns {@link Ok Ok}

+ */ + public SetPollAnswer() { + } + + /** + * Creates a function, which changes the user answer to a poll. A poll in quiz mode can be answered only once. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Identifier of the chat to which the poll belongs. + * @param messageId Identifier of the message containing the poll. + * @param optionIds 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers. + */ + public SetPollAnswer(long chatId, long messageId, int[] optionIds) { + this.chatId = chatId; + this.messageId = messageId; + this.optionIds = optionIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1399388792; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes a profile photo for the current user. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetProfilePhoto extends Function { + /** + * Profile photo to set. + */ + public InputChatPhoto photo; + + /** + * Default constructor for a function, which changes a profile photo for the current user. + * + *

Returns {@link Ok Ok}

+ */ + public SetProfilePhoto() { + } + + /** + * Creates a function, which changes a profile photo for the current user. + * + *

Returns {@link Ok Ok}

+ * + * @param photo Profile photo to set. + */ + public SetProfilePhoto(InputChatPhoto photo) { + this.photo = photo; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2069678882; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If newRecoveryEmailAddress is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public static class SetRecoveryEmailAddress extends Function { + /** + * Password of the current user. + */ + public String password; + /** + * New recovery email address. + */ + public String newRecoveryEmailAddress; + + /** + * Default constructor for a function, which changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If newRecoveryEmailAddress is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation. + * + *

Returns {@link PasswordState PasswordState}

+ */ + public SetRecoveryEmailAddress() { + } + + /** + * Creates a function, which changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If newRecoveryEmailAddress is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation. + * + *

Returns {@link PasswordState PasswordState}

+ * + * @param password Password of the current user. + * @param newRecoveryEmailAddress New recovery email address. + */ + public SetRecoveryEmailAddress(String password, String newRecoveryEmailAddress) { + this.password = password; + this.newRecoveryEmailAddress = newRecoveryEmailAddress; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1981836385; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes notification settings for chats of a given type. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetScopeNotificationSettings extends Function { + /** + * Types of chats for which to change the notification settings. + */ + public NotificationSettingsScope scope; + /** + * The new notification settings for the given scope. + */ + public ScopeNotificationSettings notificationSettings; + + /** + * Default constructor for a function, which changes notification settings for chats of a given type. + * + *

Returns {@link Ok Ok}

+ */ + public SetScopeNotificationSettings() { + } + + /** + * Creates a function, which changes notification settings for chats of a given type. + * + *

Returns {@link Ok Ok}

+ * + * @param scope Types of chats for which to change the notification settings. + * @param notificationSettings The new notification settings for the given scope. + */ + public SetScopeNotificationSettings(NotificationSettingsScope scope, ScopeNotificationSettings notificationSettings) { + this.scope = scope; + this.notificationSettings = notificationSettings; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2049984966; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetStickerPositionInSet extends Function { + /** + * Sticker. + */ + public InputFile sticker; + /** + * New position of the sticker in the set, zero-based. + */ + public int position; + + /** + * Default constructor for a function, which changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot. + * + *

Returns {@link Ok Ok}

+ */ + public SetStickerPositionInSet() { + } + + /** + * Creates a function, which changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot. + * + *

Returns {@link Ok Ok}

+ * + * @param sticker Sticker. + * @param position New position of the sticker in the set, zero-based. + */ + public SetStickerPositionInSet(InputFile sticker, int position) { + this.sticker = sticker; + this.position = position; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 2075281185; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets a sticker set thumbnail; for bots only. Returns the sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public static class SetStickerSetThumbnail extends Function { + /** + * Sticker set owner. + */ + public int userId; + /** + * Sticker set name. + */ + public String name; + /** + * Thumbnail to set in PNG or TGS format. Animated thumbnail must be set for animated sticker sets and only for them. Pass a zero InputFileId to delete the thumbnail. + */ + public InputFile thumbnail; + + /** + * Default constructor for a function, which sets a sticker set thumbnail; for bots only. Returns the sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ */ + public SetStickerSetThumbnail() { + } + + /** + * Creates a function, which sets a sticker set thumbnail; for bots only. Returns the sticker set. + * + *

Returns {@link StickerSet StickerSet}

+ * + * @param userId Sticker set owner. + * @param name Sticker set name. + * @param thumbnail Thumbnail to set in PNG or TGS format. Animated thumbnail must be set for animated sticker sets and only for them. Pass a zero InputFileId to delete the thumbnail. + */ + public SetStickerSetThumbnail(int userId, String name, InputFile thumbnail) { + this.userId = userId; + this.name = name; + this.thumbnail = thumbnail; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1694737404; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the sticker set of a supergroup; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetSupergroupStickerSet extends Function { + /** + * Identifier of the supergroup. + */ + public int supergroupId; + /** + * New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set. + */ + public long stickerSetId; + + /** + * Default constructor for a function, which changes the sticker set of a supergroup; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public SetSupergroupStickerSet() { + } + + /** + * Creates a function, which changes the sticker set of a supergroup; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ * + * @param supergroupId Identifier of the supergroup. + * @param stickerSetId New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set. + */ + public SetSupergroupStickerSet(int supergroupId, long stickerSetId) { + this.supergroupId = supergroupId; + this.stickerSetId = stickerSetId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -295782298; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetSupergroupUsername extends Function { + /** + * Identifier of the supergroup or channel. + */ + public int supergroupId; + /** + * New value of the username. Use an empty string to remove the username. + */ + public String username; + + /** + * Default constructor for a function, which changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel. + * + *

Returns {@link Ok Ok}

+ */ + public SetSupergroupUsername() { + } + + /** + * Creates a function, which changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel. + * + *

Returns {@link Ok Ok}

+ * + * @param supergroupId Identifier of the supergroup or channel. + * @param username New value of the username. Use an empty string to remove the username. + */ + public SetSupergroupUsername(int supergroupId, String username) { + this.supergroupId = supergroupId; + this.username = username; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1428333122; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetTdlibParameters extends Function { + /** + * Parameters. + */ + public TdlibParameters parameters; + + /** + * Default constructor for a function, which sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters. + * + *

Returns {@link Ok Ok}

+ */ + public SetTdlibParameters() { + } + + /** + * Creates a function, which sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters. + * + *

Returns {@link Ok Ok}

+ * + * @param parameters Parameters. + */ + public SetTdlibParameters(TdlibParameters parameters) { + this.parameters = parameters; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1912557997; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes user privacy settings. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetUserPrivacySettingRules extends Function { + /** + * The privacy setting. + */ + public UserPrivacySetting setting; + /** + * The new privacy rules. + */ + public UserPrivacySettingRules rules; + + /** + * Default constructor for a function, which changes user privacy settings. + * + *

Returns {@link Ok Ok}

+ */ + public SetUserPrivacySettingRules() { + } + + /** + * Creates a function, which changes user privacy settings. + * + *

Returns {@link Ok Ok}

+ * + * @param setting The privacy setting. + * @param rules The new privacy rules. + */ + public SetUserPrivacySettingRules(UserPrivacySetting setting, UserPrivacySettingRules rules) { + this.setting = setting; + this.rules = rules; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -473812741; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the username of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public static class SetUsername extends Function { + /** + * The new value of the username. Use an empty string to remove the username. + */ + public String username; + + /** + * Default constructor for a function, which changes the username of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public SetUsername() { + } + + /** + * Creates a function, which changes the username of the current user. + * + *

Returns {@link Ok Ok}

+ * + * @param username The new value of the username. Use an empty string to remove the username. + */ + public SetUsername(String username) { + this.username = username; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 439901214; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber. + * + *

Returns {@link Ok Ok}

+ */ + public static class SharePhoneNumber extends Function { + /** + * Identifier of the user with whom to share the phone number. The user must be a mutual contact. + */ + public int userId; + + /** + * Default constructor for a function, which shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber. + * + *

Returns {@link Ok Ok}

+ */ + public SharePhoneNumber() { + } + + /** + * Creates a function, which shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber. + * + *

Returns {@link Ok Ok}

+ * + * @param userId Identifier of the user with whom to share the phone number. The user must be a mutual contact. + */ + public SharePhoneNumber(int userId) { + this.userId = userId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -370669878; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Stops a poll. A poll in a message can be stopped when the message has canBeEdited flag set. + * + *

Returns {@link Ok Ok}

+ */ + public static class StopPoll extends Function { + /** + * Identifier of the chat to which the poll belongs. + */ + public long chatId; + /** + * Identifier of the message containing the poll. + */ + public long messageId; + /** + * The new message reply markup; for bots only. + */ + public ReplyMarkup replyMarkup; + + /** + * Default constructor for a function, which stops a poll. A poll in a message can be stopped when the message has canBeEdited flag set. + * + *

Returns {@link Ok Ok}

+ */ + public StopPoll() { + } + + /** + * Creates a function, which stops a poll. A poll in a message can be stopped when the message has canBeEdited flag set. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Identifier of the chat to which the poll belongs. + * @param messageId Identifier of the message containing the poll. + * @param replyMarkup The new message reply markup; for bots only. + */ + public StopPoll(long chatId, long messageId, ReplyMarkup replyMarkup) { + this.chatId = chatId; + this.messageId = messageId; + this.replyMarkup = replyMarkup; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1659374253; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class SynchronizeLanguagePack extends Function { + /** + * Language pack identifier. + */ + public String languagePackId; + + /** + * Default constructor for a function, which fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public SynchronizeLanguagePack() { + } + + /** + * Creates a function, which fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param languagePackId Language pack identifier. + */ + public SynchronizeLanguagePack(String languagePackId) { + this.languagePackId = languagePackId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2065307858; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Terminates all other sessions of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public static class TerminateAllOtherSessions extends Function { + + /** + * Default constructor for a function, which terminates all other sessions of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public TerminateAllOtherSessions() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1874485523; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Terminates a session of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public static class TerminateSession extends Function { + /** + * Session identifier. + */ + public long sessionId; + + /** + * Default constructor for a function, which terminates a session of the current user. + * + *

Returns {@link Ok Ok}

+ */ + public TerminateSession() { + } + + /** + * Creates a function, which terminates a session of the current user. + * + *

Returns {@link Ok Ok}

+ * + * @param sessionId Session identifier. + */ + public TerminateSession(long sessionId) { + this.sessionId = sessionId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -407385812; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the received bytes; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestBytes TestBytes}

+ */ + public static class TestCallBytes extends Function { + /** + * Bytes to return. + */ + public byte[] x; + + /** + * Default constructor for a function, which returns the received bytes; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestBytes TestBytes}

+ */ + public TestCallBytes() { + } + + /** + * Creates a function, which returns the received bytes; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestBytes TestBytes}

+ * + * @param x Bytes to return. + */ + public TestCallBytes(byte[] x) { + this.x = x; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -736011607; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Does nothing; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class TestCallEmpty extends Function { + + /** + * Default constructor for a function, which does nothing; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public TestCallEmpty() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -627291626; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the received string; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestString TestString}

+ */ + public static class TestCallString extends Function { + /** + * String to return. + */ + public String x; + + /** + * Default constructor for a function, which returns the received string; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestString TestString}

+ */ + public TestCallString() { + } + + /** + * Creates a function, which returns the received string; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestString TestString}

+ * + * @param x String to return. + */ + public TestCallString(String x) { + this.x = x; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1732818385; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorInt TestVectorInt}

+ */ + public static class TestCallVectorInt extends Function { + /** + * Vector of numbers to return. + */ + public int[] x; + + /** + * Default constructor for a function, which returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorInt TestVectorInt}

+ */ + public TestCallVectorInt() { + } + + /** + * Creates a function, which returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorInt TestVectorInt}

+ * + * @param x Vector of numbers to return. + */ + public TestCallVectorInt(int[] x) { + this.x = x; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2137277793; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorIntObject TestVectorIntObject}

+ */ + public static class TestCallVectorIntObject extends Function { + /** + * Vector of objects to return. + */ + public TestInt[] x; + + /** + * Default constructor for a function, which returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorIntObject TestVectorIntObject}

+ */ + public TestCallVectorIntObject() { + } + + /** + * Creates a function, which returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorIntObject TestVectorIntObject}

+ * + * @param x Vector of objects to return. + */ + public TestCallVectorIntObject(TestInt[] x) { + this.x = x; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1825428218; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorString TestVectorString}

+ */ + public static class TestCallVectorString extends Function { + /** + * Vector of strings to return. + */ + public String[] x; + + /** + * Default constructor for a function, which returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorString TestVectorString}

+ */ + public TestCallVectorString() { + } + + /** + * Creates a function, which returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorString TestVectorString}

+ * + * @param x Vector of strings to return. + */ + public TestCallVectorString(String[] x) { + this.x = x; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -408600900; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorStringObject TestVectorStringObject}

+ */ + public static class TestCallVectorStringObject extends Function { + /** + * Vector of objects to return. + */ + public TestString[] x; + + /** + * Default constructor for a function, which returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorStringObject TestVectorStringObject}

+ */ + public TestCallVectorStringObject() { + } + + /** + * Creates a function, which returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestVectorStringObject TestVectorStringObject}

+ * + * @param x Vector of objects to return. + */ + public TestCallVectorStringObject(TestString[] x) { + this.x = x; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1527666429; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Forces an updates.getDifference call to the Telegram servers; for testing only. + * + *

Returns {@link Ok Ok}

+ */ + public static class TestGetDifference extends Function { + + /** + * Default constructor for a function, which forces an updates.getDifference call to the Telegram servers; for testing only. + * + *

Returns {@link Ok Ok}

+ */ + public TestGetDifference() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1747084069; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class TestNetwork extends Function { + + /** + * Default constructor for a function, which sends a simple network request to the Telegram servers; for testing only. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public TestNetwork() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1343998901; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public static class TestProxy extends Function { + /** + * Proxy server IP address. + */ + public String server; + /** + * Proxy server port. + */ + public int port; + /** + * Proxy type. + */ + public ProxyType type; + /** + * Identifier of a datacenter, with which to test connection. + */ + public int dcId; + /** + * The maximum overall timeout for the request. + */ + public double timeout; + + /** + * Default constructor for a function, which sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ */ + public TestProxy() { + } + + /** + * Creates a function, which sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization. + * + *

Returns {@link Ok Ok}

+ * + * @param server Proxy server IP address. + * @param port Proxy server port. + * @param type Proxy type. + * @param dcId Identifier of a datacenter, with which to test connection. + * @param timeout The maximum overall timeout for the request. + */ + public TestProxy(String server, int port, ProxyType type, int dcId, double timeout) { + this.server = server; + this.port = port; + this.type = type; + this.dcId = dcId; + this.timeout = timeout; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1197366626; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously. + * + *

Returns {@link Error Error}

+ */ + public static class TestReturnError extends Function { + /** + * The error to be returned. + */ + public Error error; + + /** + * Default constructor for a function, which returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously. + * + *

Returns {@link Error Error}

+ */ + public TestReturnError() { + } + + /** + * Creates a function, which returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously. + * + *

Returns {@link Error Error}

+ * + * @param error The error to be returned. + */ + public TestReturnError(Error error) { + this.error = error; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 455179506; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Returns the squared received number; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestInt TestInt}

+ */ + public static class TestSquareInt extends Function { + /** + * Number to square. + */ + public int x; + + /** + * Default constructor for a function, which returns the squared received number; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestInt TestInt}

+ */ + public TestSquareInt() { + } + + /** + * Creates a function, which returns the squared received number; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link TestInt TestInt}

+ * + * @param x Number to square. + */ + public TestSquareInt(int x) { + this.x = x; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -60135024; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link Update Update}

+ */ + public static class TestUseUpdate extends Function { + + /** + * Default constructor for a function, which does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization. + * + *

Returns {@link Update Update}

+ */ + public TestUseUpdate() { + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 717094686; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the value of the default disableNotification parameter, used when a message is sent to a chat. + * + *

Returns {@link Ok Ok}

+ */ + public static class ToggleChatDefaultDisableNotification extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New value of defaultDisableNotification. + */ + public boolean defaultDisableNotification; + + /** + * Default constructor for a function, which changes the value of the default disableNotification parameter, used when a message is sent to a chat. + * + *

Returns {@link Ok Ok}

+ */ + public ToggleChatDefaultDisableNotification() { + } + + /** + * Creates a function, which changes the value of the default disableNotification parameter, used when a message is sent to a chat. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param defaultDisableNotification New value of defaultDisableNotification. + */ + public ToggleChatDefaultDisableNotification(long chatId, boolean defaultDisableNotification) { + this.chatId = chatId; + this.defaultDisableNotification = defaultDisableNotification; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 314794002; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the block state of a chat. Currently, only private chats and supergroups can be blocked. + * + *

Returns {@link Ok Ok}

+ */ + public static class ToggleChatIsBlocked extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New value of isBlocked. + */ + public boolean isBlocked; + + /** + * Default constructor for a function, which changes the block state of a chat. Currently, only private chats and supergroups can be blocked. + * + *

Returns {@link Ok Ok}

+ */ + public ToggleChatIsBlocked() { + } + + /** + * Creates a function, which changes the block state of a chat. Currently, only private chats and supergroups can be blocked. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param isBlocked New value of isBlocked. + */ + public ToggleChatIsBlocked(long chatId, boolean isBlocked) { + this.chatId = chatId; + this.isBlocked = isBlocked; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 202580115; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the marked as unread state of a chat. + * + *

Returns {@link Ok Ok}

+ */ + public static class ToggleChatIsMarkedAsUnread extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * New value of isMarkedAsUnread. + */ + public boolean isMarkedAsUnread; + + /** + * Default constructor for a function, which changes the marked as unread state of a chat. + * + *

Returns {@link Ok Ok}

+ */ + public ToggleChatIsMarkedAsUnread() { + } + + /** + * Creates a function, which changes the marked as unread state of a chat. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param isMarkedAsUnread New value of isMarkedAsUnread. + */ + public ToggleChatIsMarkedAsUnread(long chatId, boolean isMarkedAsUnread) { + this.chatId = chatId; + this.isMarkedAsUnread = isMarkedAsUnread; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -986129697; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/arhive chat list. + * + *

Returns {@link Ok Ok}

+ */ + public static class ToggleChatIsPinned extends Function { + /** + * Chat list in which to change the pinned state of the chat. + */ + public ChatList chatList; + /** + * Chat identifier. + */ + public long chatId; + /** + * True, if the chat is pinned. + */ + public boolean isPinned; + + /** + * Default constructor for a function, which changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/arhive chat list. + * + *

Returns {@link Ok Ok}

+ */ + public ToggleChatIsPinned() { + } + + /** + * Creates a function, which changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/arhive chat list. + * + *

Returns {@link Ok Ok}

+ * + * @param chatList Chat list in which to change the pinned state of the chat. + * @param chatId Chat identifier. + * @param isPinned True, if the chat is pinned. + */ + public ToggleChatIsPinned(ChatList chatList, long chatId, boolean isPinned) { + this.chatList = chatList; + this.chatId = chatId; + this.isPinned = isPinned; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1485429186; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Toggles whether the message history of a supergroup is available to new members; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public static class ToggleSupergroupIsAllHistoryAvailable extends Function { + /** + * The identifier of the supergroup. + */ + public int supergroupId; + /** + * The new value of isAllHistoryAvailable. + */ + public boolean isAllHistoryAvailable; + + /** + * Default constructor for a function, which toggles whether the message history of a supergroup is available to new members; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public ToggleSupergroupIsAllHistoryAvailable() { + } + + /** + * Creates a function, which toggles whether the message history of a supergroup is available to new members; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ * + * @param supergroupId The identifier of the supergroup. + * @param isAllHistoryAvailable The new value of isAllHistoryAvailable. + */ + public ToggleSupergroupIsAllHistoryAvailable(int supergroupId, boolean isAllHistoryAvailable) { + this.supergroupId = supergroupId; + this.isAllHistoryAvailable = isAllHistoryAvailable; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1701526555; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Toggles sender signatures messages sent in a channel; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public static class ToggleSupergroupSignMessages extends Function { + /** + * Identifier of the channel. + */ + public int supergroupId; + /** + * New value of signMessages. + */ + public boolean signMessages; + + /** + * Default constructor for a function, which toggles sender signatures messages sent in a channel; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ */ + public ToggleSupergroupSignMessages() { + } + + /** + * Creates a function, which toggles sender signatures messages sent in a channel; requires canChangeInfo rights. + * + *

Returns {@link Ok Ok}

+ * + * @param supergroupId Identifier of the channel. + * @param signMessages New value of signMessages. + */ + public ToggleSupergroupSignMessages(int supergroupId, boolean signMessages) { + this.supergroupId = supergroupId; + this.signMessages = signMessages; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -558196581; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats. + * + *

Returns {@link Ok Ok}

+ */ + public static class TransferChatOwnership extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user. + */ + public int userId; + /** + * The password of the current user. + */ + public String password; + + /** + * Default constructor for a function, which changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats. + * + *

Returns {@link Ok Ok}

+ */ + public TransferChatOwnership() { + } + + /** + * Creates a function, which changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param userId Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user. + * @param password The password of the current user. + */ + public TransferChatOwnership(long chatId, int userId, String password) { + this.chatId = chatId; + this.userId = userId; + this.password = password; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1925047127; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Removes the pinned message from a chat; requires canPinMessages rights in the group or channel. + * + *

Returns {@link Ok Ok}

+ */ + public static class UnpinChatMessage extends Function { + /** + * Identifier of the chat. + */ + public long chatId; + + /** + * Default constructor for a function, which removes the pinned message from a chat; requires canPinMessages rights in the group or channel. + * + *

Returns {@link Ok Ok}

+ */ + public UnpinChatMessage() { + } + + /** + * Creates a function, which removes the pinned message from a chat; requires canPinMessages rights in the group or channel. + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Identifier of the chat. + */ + public UnpinChatMessage(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 277557690; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group. + * + *

Returns {@link Chat Chat}

+ */ + public static class UpgradeBasicGroupChatToSupergroupChat extends Function { + /** + * Identifier of the chat to upgrade. + */ + public long chatId; + + /** + * Default constructor for a function, which creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group. + * + *

Returns {@link Chat Chat}

+ */ + public UpgradeBasicGroupChatToSupergroupChat() { + } + + /** + * Creates a function, which creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group. + * + *

Returns {@link Chat Chat}

+ * + * @param chatId Identifier of the chat to upgrade. + */ + public UpgradeBasicGroupChatToSupergroupChat(long chatId) { + this.chatId = chatId; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 300488122; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Asynchronously uploads a file to the cloud without sending it in a message. updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message. + * + *

Returns {@link File File}

+ */ + public static class UploadFile extends Function { + /** + * File to upload. + */ + public InputFile file; + /** + * File type. + */ + public FileType fileType; + /** + * Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which uploadFile was called will be uploaded first. + */ + public int priority; + + /** + * Default constructor for a function, which asynchronously uploads a file to the cloud without sending it in a message. updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message. + * + *

Returns {@link File File}

+ */ + public UploadFile() { + } + + /** + * Creates a function, which asynchronously uploads a file to the cloud without sending it in a message. updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message. + * + *

Returns {@link File File}

+ * + * @param file File to upload. + * @param fileType File type. + * @param priority Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which uploadFile was called will be uploaded first. + */ + public UploadFile(InputFile file, FileType fileType, int priority) { + this.file = file; + this.fileType = fileType; + this.priority = priority; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -745597786; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Uploads a PNG image with a sticker; for bots only; returns the uploaded file. + * + *

Returns {@link File File}

+ */ + public static class UploadStickerFile extends Function { + /** + * Sticker file owner. + */ + public int userId; + /** + * PNG image with the sticker; must be up to 512 KB in size and fit in 512x512 square. + */ + public InputFile pngSticker; + + /** + * Default constructor for a function, which uploads a PNG image with a sticker; for bots only; returns the uploaded file. + * + *

Returns {@link File File}

+ */ + public UploadStickerFile() { + } + + /** + * Creates a function, which uploads a PNG image with a sticker; for bots only; returns the uploaded file. + * + *

Returns {@link File File}

+ * + * @param userId Sticker file owner. + * @param pngSticker PNG image with the sticker; must be up to 512 KB in size and fit in 512x512 square. + */ + public UploadStickerFile(int userId, InputFile pngSticker) { + this.userId = userId; + this.pngSticker = pngSticker; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 1134087551; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Validates the order information provided by a user and returns the available shipping options for a flexible invoice. + * + *

Returns {@link ValidatedOrderInfo ValidatedOrderInfo}

+ */ + public static class ValidateOrderInfo extends Function { + /** + * Chat identifier of the Invoice message. + */ + public long chatId; + /** + * Message identifier. + */ + public long messageId; + /** + * The order information, provided by the user. + */ + public OrderInfo orderInfo; + /** + * True, if the order information can be saved. + */ + public boolean allowSave; + + /** + * Default constructor for a function, which validates the order information provided by a user and returns the available shipping options for a flexible invoice. + * + *

Returns {@link ValidatedOrderInfo ValidatedOrderInfo}

+ */ + public ValidateOrderInfo() { + } + + /** + * Creates a function, which validates the order information provided by a user and returns the available shipping options for a flexible invoice. + * + *

Returns {@link ValidatedOrderInfo ValidatedOrderInfo}

+ * + * @param chatId Chat identifier of the Invoice message. + * @param messageId Message identifier. + * @param orderInfo The order information, provided by the user. + * @param allowSave True, if the order information can be saved. + */ + public ValidateOrderInfo(long chatId, long messageId, OrderInfo orderInfo, boolean allowSave) { + this.chatId = chatId; + this.messageId = messageId; + this.orderInfo = orderInfo; + this.allowSave = allowSave; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = 9480644; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Informs TDLib that messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels). + * + *

Returns {@link Ok Ok}

+ */ + public static class ViewMessages extends Function { + /** + * Chat identifier. + */ + public long chatId; + /** + * If not 0, a message thread identifier in which the messages are being viewed. + */ + public long messageThreadId; + /** + * The identifiers of the messages being viewed. + */ + public long[] messageIds; + /** + * True, if messages in closed chats should be marked as read by the request. + */ + public boolean forceRead; + + /** + * Default constructor for a function, which informs TDLib that messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels). + * + *

Returns {@link Ok Ok}

+ */ + public ViewMessages() { + } + + /** + * Creates a function, which informs TDLib that messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels). + * + *

Returns {@link Ok Ok}

+ * + * @param chatId Chat identifier. + * @param messageThreadId If not 0, a message thread identifier in which the messages are being viewed. + * @param messageIds The identifiers of the messages being viewed. + * @param forceRead True, if messages in closed chats should be marked as read by the request. + */ + public ViewMessages(long chatId, long messageThreadId, long[] messageIds, boolean forceRead) { + this.chatId = chatId; + this.messageThreadId = messageThreadId; + this.messageIds = messageIds; + this.forceRead = forceRead; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -1155961496; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Informs the server that some trending sticker sets have been viewed by the user. + * + *

Returns {@link Ok Ok}

+ */ + public static class ViewTrendingStickerSets extends Function { + /** + * Identifiers of viewed trending sticker sets. + */ + public long[] stickerSetIds; + + /** + * Default constructor for a function, which informs the server that some trending sticker sets have been viewed by the user. + * + *

Returns {@link Ok Ok}

+ */ + public ViewTrendingStickerSets() { + } + + /** + * Creates a function, which informs the server that some trending sticker sets have been viewed by the user. + * + *

Returns {@link Ok Ok}

+ * + * @param stickerSetIds Identifiers of viewed trending sticker sets. + */ + public ViewTrendingStickerSets(long[] stickerSetIds) { + this.stickerSetIds = stickerSetIds; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -952416520; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + + /** + * Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file. + * + *

Returns {@link Ok Ok}

+ */ + public static class WriteGeneratedFilePart extends Function { + /** + * The identifier of the generation process. + */ + public long generationId; + /** + * The offset from which to write the data to the file. + */ + public int offset; + /** + * The data to write. + */ + public byte[] data; + + /** + * Default constructor for a function, which writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file. + * + *

Returns {@link Ok Ok}

+ */ + public WriteGeneratedFilePart() { + } + + /** + * Creates a function, which writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file. + * + *

Returns {@link Ok Ok}

+ * + * @param generationId The identifier of the generation process. + * @param offset The offset from which to write the data to the file. + * @param data The data to write. + */ + public WriteGeneratedFilePart(long generationId, int offset, byte[] data) { + this.generationId = generationId; + this.offset = offset; + this.data = data; + } + + /** + * Identifier uniquely determining type of the object. + */ + public static final int CONSTRUCTOR = -2062358189; + + /** + * @return this.CONSTRUCTOR + */ + @Override + public int getConstructor() { + return CONSTRUCTOR; + } + } + +} diff --git a/src/main/java/it/tdlight/tdlib/Client.java b/src/main/java/it/tdlight/tdlib/Client.java new file mode 100644 index 0000000..0e70ae1 --- /dev/null +++ b/src/main/java/it/tdlight/tdlib/Client.java @@ -0,0 +1,248 @@ +package it.tdlight.tdlib; + +import it.cavallium.concurrentlocks.ReentrantReadWriteUpdateLock; +import it.tdlight.common.Init; +import it.tdlight.common.Request; +import it.tdlight.common.Response; +import it.tdlight.jni.NativeClient; +import it.tdlight.jni.TdApi; +import it.tdlight.jni.TdApi.AuthorizationStateClosed; +import it.tdlight.jni.TdApi.AuthorizationStateClosing; +import it.tdlight.jni.TdApi.AuthorizationStateWaitTdlibParameters; +import it.tdlight.jni.TdApi.GetOption; +import it.tdlight.jni.TdApi.Object; +import it.tdlight.jni.TdApi.SetOption; +import it.tdlight.jni.TdApi.UpdateAuthorizationState; +import it.tdlight.common.TelegramClient; +import it.tdlight.common.ClientState; +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * Interface for interaction with TDLib. + */ +public class Client extends NativeClient implements TelegramClient { + + private ClientState state = ClientState.of(false, 0, false, false, false); + private final ReentrantReadWriteUpdateLock stateLock = new ReentrantReadWriteUpdateLock(); + + /** + * Creates a new TDLib client. + */ + public Client() { + try { + Init.start(); + } catch (Throwable throwable) { + throwable.printStackTrace(); + System.exit(1); + } + this.initializeClient(); + } + + @Override + public void send(Request request) { + long clientId; + stateLock.readLock().lock(); + try { + requireInitialized(); + requireReadyToSend(request.getFunction().getConstructor()); + clientId = state.getClientId(); + } finally { + stateLock.readLock().unlock(); + } + + nativeClientSend(clientId, request.getId(), request.getFunction()); + } + + @Override + public List receive(double timeout, int eventsSize, boolean receiveResponses, boolean receiveUpdates) { + long clientId; + stateLock.updateLock().lock(); + try { + if (!state.isInitialized()) { + sleep(timeout); + return Collections.emptyList(); + } + requireInitialized(); + if (!state.isReadyToReceive()) { + sleep(timeout); + return Collections.emptyList(); + } + requireReadyToReceive(); + clientId = state.getClientId(); + return Arrays.asList(this.internalReceive(clientId, timeout, eventsSize, receiveResponses, receiveUpdates)); + } finally { + stateLock.updateLock().unlock(); + } + } + + private void sleep(double timeout) { + long nanos = (long) (timeout * 1000000000d); + int nanosPart = (int) (nanos % 1000000L); + long millis = Duration.ofNanos(nanos - nanosPart).toMillis(); + try { + Thread.sleep(millis, nanosPart); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + + @Override + public Response receive(double timeout, boolean receiveResponses, boolean receiveUpdates) { + long clientId; + stateLock.updateLock().lock(); + try { + if (!state.isInitialized()) { + sleep(timeout); + return null; + } + requireInitialized(); + if (!state.isReadyToReceive()) { + sleep(timeout); + return null; + } + requireReadyToReceive(); + clientId = state.getClientId(); + + Response[] responses = this.internalReceive(clientId, timeout, 1, receiveResponses, receiveUpdates); + + if (responses.length > 0) { + return responses[0]; + } + + return null; + } finally { + stateLock.updateLock().unlock(); + } + } + + private Response[] internalReceive(long clientId, double timeout, int eventsSize, boolean receiveResponses, boolean receiveUpdates) { + long[] eventIds = new long[eventsSize]; + TdApi.Object[] events = new TdApi.Object[eventsSize]; + + if (!(receiveResponses && receiveUpdates)) { + throw new IllegalArgumentException("The variables receiveResponses and receiveUpdates must be both true, because you are using the original TDLib!"); + } + + int resultSize = nativeClientReceive(clientId, eventIds, events, timeout); + + Response[] responses = new Response[resultSize]; + + for (int i = 0; i < resultSize; i++) { + responses[i] = new Response(eventIds[i], events[i]); + if (eventIds[i] == 0) { + handleStateEvent(events[i]); + } + } + + return responses; + } + + private void handleStateEvent(Object event) { + if (event == null) { + return; + } + + if (event.getConstructor() != UpdateAuthorizationState.CONSTRUCTOR) { + return; + } + + UpdateAuthorizationState updateAuthorizationState = (UpdateAuthorizationState) event; + + switch (updateAuthorizationState.authorizationState.getConstructor()) { + case AuthorizationStateWaitTdlibParameters.CONSTRUCTOR: + stateLock.writeLock().lock(); + try { + state.setReadyToSend(true); + } finally { + stateLock.writeLock().unlock(); + } + break; + case AuthorizationStateClosing.CONSTRUCTOR: + stateLock.writeLock().lock(); + try { + state.setReadyToSend(false); + } finally { + stateLock.writeLock().unlock(); + } + break; + case AuthorizationStateClosed.CONSTRUCTOR: + stateLock.writeLock().lock(); + try { + state.setReadyToSend(false).setReadyToReceive(false); + } finally { + stateLock.writeLock().unlock(); + } + break; + } + } + + @Override + public Response execute(Request request) { + stateLock.readLock().lock(); + try { + requireInitialized(); + requireReadyToSend(request.getFunction().getConstructor()); + } finally { + stateLock.readLock().unlock(); + } + + Object object = nativeClientExecute(request.getFunction()); + return new Response(0, object); + } + + @Override + public void destroyClient() { + stateLock.writeLock().lock(); + try { + if (state.isInitialized() && state.hasClientId()) { + if (state.isReadyToSend() || state.isReadyToReceive()) { + throw new IllegalStateException("You need to close the Client before destroying it!"); + } + destroyNativeClient(this.state.getClientId()); + state = ClientState.of(false, 0, false, false, false); + } + } finally { + stateLock.writeLock().unlock(); + } + } + + @Override + public void initializeClient() { + stateLock.writeLock().lock(); + try { + if (!state.isInitialized() && !state.hasClientId()) { + long clientId = createNativeClient(); + state = ClientState.of(true, clientId, true, true, false); + } + } finally { + stateLock.writeLock().unlock(); + } + } + + private void requireInitialized() { + if (!state.isInitialized() || !state.hasClientId()) { + throw new IllegalStateException("Client not initialized"); + } + } + + private void requireReadyToSend(int constructor) { + if (!state.isReadyToSend()) { + switch (constructor) { + case SetOption.CONSTRUCTOR: + case GetOption.CONSTRUCTOR: + case TdApi.SetTdlibParameters.CONSTRUCTOR: + return; + } + throw new IllegalStateException("Client not ready to send"); + } + } + + private void requireReadyToReceive() { + if (!state.isReadyToReceive()) { + throw new IllegalStateException("Client not ready to receive"); + } + } +} diff --git a/src/main/java/it/tdlight/tdlight/Client.java b/src/main/java/it/tdlight/tdlight/Client.java index 3a7bc5a..c917c59 100644 --- a/src/main/java/it/tdlight/tdlight/Client.java +++ b/src/main/java/it/tdlight/tdlight/Client.java @@ -1,5 +1,10 @@ package it.tdlight.tdlight; +import it.tdlight.common.ClientState; +import it.tdlight.common.Init; +import it.tdlight.common.Request; +import it.tdlight.common.Response; +import it.tdlight.common.TelegramClient; import it.tdlight.jni.NativeClient; import it.tdlight.jni.TdApi; import it.tdlight.jni.TdApi.AuthorizationStateClosed; diff --git a/tdlib/pom.xml b/tdlib/pom.xml new file mode 100644 index 0000000..b0ca4d7 --- /dev/null +++ b/tdlib/pom.xml @@ -0,0 +1,137 @@ + + 4.0.0 + it.tdlight + tdlib-java + 3.169.0-SNAPSHOT + TDLib Java Wrapper + jar + + UTF-8 + + + + + mchv-release + MCHV Release Apache Maven Packages + https://mvn.mchv.eu/repository/mchv + + + mchv-snapshot + MCHV Snapshot Apache Maven Packages + https://mvn.mchv.eu/repository/mchv-snapshot + + + + + + mchv-release-distribution + MCHV Release Apache Maven Packages Distribution + https://mvn.mchv.eu/repository/mchv + + + mchv-snapshot-distribution + MCHV Snapshot Apache Maven Packages Distribution + https://mvn.mchv.eu/repository/mchv-snapshot + + + + scm:git:https://git.ignuranza.net/tdlight-team/tdlight-java.git + scm:git:https://git.ignuranza.net/tdlight-team/tdlight-java.git + HEAD + + + + + it.tdlight + tdlib-natives-linux-amd64 + 2.0.2 + + + it.tdlight + tdlib-natives-linux-aarch64 + 2.0.2 + + + it.tdlight + tdlib-natives-windows-amd64 + 2.0.2 + + + + it.cavallium + concurrent-locks + 1.0.5 + + + + ../src/main/java + + + maven-clean-plugin + 3.1.0 + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.1 + + UTF-8 + 1.8 + 1.8 + + it/tdlight/tdlight/** + + + + + org.apache.maven.plugins + maven-release-plugin + 3.0.0-M1 + + false + false + clean verify + true + v@{project.version} + + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 3.0.0-M1 + + + maven-deploy-plugin + 2.8.2 + + + org.codehaus.mojo + templating-maven-plugin + 1.0.0 + + + filtering-java-templates + + filter-sources + + + ../src/main/java-templates-tdlib + + + + + + + diff --git a/pom.xml b/tdlight/pom.xml similarity index 91% rename from pom.xml rename to tdlight/pom.xml index 92a0f5c..d4359cb 100644 --- a/pom.xml +++ b/tdlight/pom.xml @@ -63,8 +63,14 @@ 2.0.1-SNAPSHOT --> + + it.cavallium + concurrent-locks + 1.0.5 + + ../src/main/java maven-clean-plugin @@ -108,6 +114,9 @@ UTF-8 1.8 1.8 + + it/tdlight/tdlib/** + @@ -144,6 +153,9 @@ filter-sources + + ../src/main/java-templates-tdlight +