Record Class TelegramProperties
java.lang.Object
java.lang.Record
dev.voroby.springframework.telegram.properties.TelegramProperties
@ConfigurationProperties(prefix="spring.telegram.client")
public record TelegramProperties(boolean useTestDc, String databaseDirectory, String filesDirectory, String databaseEncryptionKey, boolean useFileDatabase, boolean useChatInfoDatabase, boolean useMessageDatabase, boolean useSecretChats, int apiId, String apiHash, String phone, String systemLanguageCode, String deviceModel, String systemVersion, String applicationVersion, int logVerbosityLevel, TelegramProperties.Proxy proxy)
extends Record
Telegram client configuration properties.
- Author:
- Pavel Vorobyev
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTelegramProperties(boolean useTestDc, String databaseDirectory, String filesDirectory, String databaseEncryptionKey, boolean useFileDatabase, boolean useChatInfoDatabase, boolean useMessageDatabase, boolean useSecretChats, int apiId, String apiHash, String phone, String systemLanguageCode, String deviceModel, String systemVersion, String applicationVersion, int logVerbosityLevel, TelegramProperties.Proxy proxy) Creates an instance of aTelegramPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapiHash()Returns the value of theapiHashrecord component.intapiId()Returns the value of theapiIdrecord component.Returns the value of theapplicationVersionrecord component.Returns the value of thedatabaseDirectoryrecord component.Returns the value of thedatabaseEncryptionKeyrecord component.Returns the value of thedeviceModelrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefilesDirectoryrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thelogVerbosityLevelrecord component.phone()Returns the value of thephonerecord component.proxy()Returns the value of theproxyrecord component.Returns the value of thesystemLanguageCoderecord component.Returns the value of thesystemVersionrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseChatInfoDatabaserecord component.booleanReturns the value of theuseFileDatabaserecord component.booleanReturns the value of theuseMessageDatabaserecord component.booleanReturns the value of theuseSecretChatsrecord component.booleanReturns the value of theuseTestDcrecord component.
-
Constructor Details
-
TelegramProperties
public TelegramProperties(boolean useTestDc, String databaseDirectory, String filesDirectory, String databaseEncryptionKey, boolean useFileDatabase, boolean useChatInfoDatabase, boolean useMessageDatabase, boolean useSecretChats, int apiId, String apiHash, String phone, String systemLanguageCode, String deviceModel, String systemVersion, String applicationVersion, int logVerbosityLevel, TelegramProperties.Proxy proxy) Creates an instance of aTelegramPropertiesrecord class.- Parameters:
useTestDc- the value for theuseTestDcrecord componentdatabaseDirectory- the value for thedatabaseDirectoryrecord componentfilesDirectory- the value for thefilesDirectoryrecord componentdatabaseEncryptionKey- the value for thedatabaseEncryptionKeyrecord componentuseFileDatabase- the value for theuseFileDatabaserecord componentuseChatInfoDatabase- the value for theuseChatInfoDatabaserecord componentuseMessageDatabase- the value for theuseMessageDatabaserecord componentuseSecretChats- the value for theuseSecretChatsrecord componentapiId- the value for theapiIdrecord componentapiHash- the value for theapiHashrecord componentphone- the value for thephonerecord componentsystemLanguageCode- the value for thesystemLanguageCoderecord componentdeviceModel- the value for thedeviceModelrecord componentsystemVersion- the value for thesystemVersionrecord componentapplicationVersion- the value for theapplicationVersionrecord componentlogVerbosityLevel- the value for thelogVerbosityLevelrecord componentproxy- the value for theproxyrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
useTestDc
public boolean useTestDc()Returns the value of theuseTestDcrecord component.- Returns:
- the value of the
useTestDcrecord component
-
databaseDirectory
Returns the value of thedatabaseDirectoryrecord component.- Returns:
- the value of the
databaseDirectoryrecord component
-
filesDirectory
Returns the value of thefilesDirectoryrecord component.- Returns:
- the value of the
filesDirectoryrecord component
-
databaseEncryptionKey
Returns the value of thedatabaseEncryptionKeyrecord component.- Returns:
- the value of the
databaseEncryptionKeyrecord component
-
useFileDatabase
public boolean useFileDatabase()Returns the value of theuseFileDatabaserecord component.- Returns:
- the value of the
useFileDatabaserecord component
-
useChatInfoDatabase
public boolean useChatInfoDatabase()Returns the value of theuseChatInfoDatabaserecord component.- Returns:
- the value of the
useChatInfoDatabaserecord component
-
useMessageDatabase
public boolean useMessageDatabase()Returns the value of theuseMessageDatabaserecord component.- Returns:
- the value of the
useMessageDatabaserecord component
-
useSecretChats
public boolean useSecretChats()Returns the value of theuseSecretChatsrecord component.- Returns:
- the value of the
useSecretChatsrecord component
-
apiId
public int apiId()Returns the value of theapiIdrecord component.- Returns:
- the value of the
apiIdrecord component
-
apiHash
Returns the value of theapiHashrecord component.- Returns:
- the value of the
apiHashrecord component
-
phone
Returns the value of thephonerecord component.- Returns:
- the value of the
phonerecord component
-
systemLanguageCode
Returns the value of thesystemLanguageCoderecord component.- Returns:
- the value of the
systemLanguageCoderecord component
-
deviceModel
Returns the value of thedeviceModelrecord component.- Returns:
- the value of the
deviceModelrecord component
-
systemVersion
Returns the value of thesystemVersionrecord component.- Returns:
- the value of the
systemVersionrecord component
-
applicationVersion
Returns the value of theapplicationVersionrecord component.- Returns:
- the value of the
applicationVersionrecord component
-
logVerbosityLevel
public int logVerbosityLevel()Returns the value of thelogVerbosityLevelrecord component.- Returns:
- the value of the
logVerbosityLevelrecord component
-
proxy
Returns the value of theproxyrecord component.- Returns:
- the value of the
proxyrecord component
-