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
-
Constructor Summary
ConstructorDescriptionTelegramProperties
(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 aTelegramProperties
record class. -
Method Summary
Modifier and TypeMethodDescriptionapiHash()
Returns the value of theapiHash
record component.int
apiId()
Returns the value of theapiId
record component.Returns the value of theapplicationVersion
record component.Returns the value of thedatabaseDirectory
record component.Returns the value of thedatabaseEncryptionKey
record component.Returns the value of thedeviceModel
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefilesDirectory
record component.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thelogVerbosityLevel
record component.phone()
Returns the value of thephone
record component.proxy()
Returns the value of theproxy
record component.Returns the value of thesystemLanguageCode
record component.Returns the value of thesystemVersion
record component.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of theuseChatInfoDatabase
record component.boolean
Returns the value of theuseFileDatabase
record component.boolean
Returns the value of theuseMessageDatabase
record component.boolean
Returns the value of theuseSecretChats
record component.boolean
Returns the value of theuseTestDc
record 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 aTelegramProperties
record class.- Parameters:
useTestDc
- the value for theuseTestDc
record componentdatabaseDirectory
- the value for thedatabaseDirectory
record componentfilesDirectory
- the value for thefilesDirectory
record componentdatabaseEncryptionKey
- the value for thedatabaseEncryptionKey
record componentuseFileDatabase
- the value for theuseFileDatabase
record componentuseChatInfoDatabase
- the value for theuseChatInfoDatabase
record componentuseMessageDatabase
- the value for theuseMessageDatabase
record componentuseSecretChats
- the value for theuseSecretChats
record componentapiId
- the value for theapiId
record componentapiHash
- the value for theapiHash
record componentphone
- the value for thephone
record componentsystemLanguageCode
- the value for thesystemLanguageCode
record componentdeviceModel
- the value for thedeviceModel
record componentsystemVersion
- the value for thesystemVersion
record componentapplicationVersion
- the value for theapplicationVersion
record componentlogVerbosityLevel
- the value for thelogVerbosityLevel
record componentproxy
- the value for theproxy
record 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 theuseTestDc
record component.- Returns:
- the value of the
useTestDc
record component
-
databaseDirectory
Returns the value of thedatabaseDirectory
record component.- Returns:
- the value of the
databaseDirectory
record component
-
filesDirectory
Returns the value of thefilesDirectory
record component.- Returns:
- the value of the
filesDirectory
record component
-
databaseEncryptionKey
Returns the value of thedatabaseEncryptionKey
record component.- Returns:
- the value of the
databaseEncryptionKey
record component
-
useFileDatabase
public boolean useFileDatabase()Returns the value of theuseFileDatabase
record component.- Returns:
- the value of the
useFileDatabase
record component
-
useChatInfoDatabase
public boolean useChatInfoDatabase()Returns the value of theuseChatInfoDatabase
record component.- Returns:
- the value of the
useChatInfoDatabase
record component
-
useMessageDatabase
public boolean useMessageDatabase()Returns the value of theuseMessageDatabase
record component.- Returns:
- the value of the
useMessageDatabase
record component
-
useSecretChats
public boolean useSecretChats()Returns the value of theuseSecretChats
record component.- Returns:
- the value of the
useSecretChats
record component
-
apiId
public int apiId()Returns the value of theapiId
record component.- Returns:
- the value of the
apiId
record component
-
apiHash
Returns the value of theapiHash
record component.- Returns:
- the value of the
apiHash
record component
-
phone
Returns the value of thephone
record component.- Returns:
- the value of the
phone
record component
-
systemLanguageCode
Returns the value of thesystemLanguageCode
record component.- Returns:
- the value of the
systemLanguageCode
record component
-
deviceModel
Returns the value of thedeviceModel
record component.- Returns:
- the value of the
deviceModel
record component
-
systemVersion
Returns the value of thesystemVersion
record component.- Returns:
- the value of the
systemVersion
record component
-
applicationVersion
Returns the value of theapplicationVersion
record component.- Returns:
- the value of the
applicationVersion
record component
-
logVerbosityLevel
public int logVerbosityLevel()Returns the value of thelogVerbosityLevel
record component.- Returns:
- the value of the
logVerbosityLevel
record component
-
proxy
Returns the value of theproxy
record component.- Returns:
- the value of the
proxy
record component
-