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
  • 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 a TelegramProperties record class.
      Parameters:
      useTestDc - the value for the useTestDc record component
      databaseDirectory - the value for the databaseDirectory record component
      filesDirectory - the value for the filesDirectory record component
      databaseEncryptionKey - the value for the databaseEncryptionKey record component
      useFileDatabase - the value for the useFileDatabase record component
      useChatInfoDatabase - the value for the useChatInfoDatabase record component
      useMessageDatabase - the value for the useMessageDatabase record component
      useSecretChats - the value for the useSecretChats record component
      apiId - the value for the apiId record component
      apiHash - the value for the apiHash record component
      phone - the value for the phone record component
      systemLanguageCode - the value for the systemLanguageCode record component
      deviceModel - the value for the deviceModel record component
      systemVersion - the value for the systemVersion record component
      applicationVersion - the value for the applicationVersion record component
      logVerbosityLevel - the value for the logVerbosityLevel record component
      proxy - the value for the proxy record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • useTestDc

      public boolean useTestDc()
      Returns the value of the useTestDc record component.
      Returns:
      the value of the useTestDc record component
    • databaseDirectory

      public String databaseDirectory()
      Returns the value of the databaseDirectory record component.
      Returns:
      the value of the databaseDirectory record component
    • filesDirectory

      public String filesDirectory()
      Returns the value of the filesDirectory record component.
      Returns:
      the value of the filesDirectory record component
    • databaseEncryptionKey

      public String databaseEncryptionKey()
      Returns the value of the databaseEncryptionKey record component.
      Returns:
      the value of the databaseEncryptionKey record component
    • useFileDatabase

      public boolean useFileDatabase()
      Returns the value of the useFileDatabase record component.
      Returns:
      the value of the useFileDatabase record component
    • useChatInfoDatabase

      public boolean useChatInfoDatabase()
      Returns the value of the useChatInfoDatabase record component.
      Returns:
      the value of the useChatInfoDatabase record component
    • useMessageDatabase

      public boolean useMessageDatabase()
      Returns the value of the useMessageDatabase record component.
      Returns:
      the value of the useMessageDatabase record component
    • useSecretChats

      public boolean useSecretChats()
      Returns the value of the useSecretChats record component.
      Returns:
      the value of the useSecretChats record component
    • apiId

      public int apiId()
      Returns the value of the apiId record component.
      Returns:
      the value of the apiId record component
    • apiHash

      public String apiHash()
      Returns the value of the apiHash record component.
      Returns:
      the value of the apiHash record component
    • phone

      public String phone()
      Returns the value of the phone record component.
      Returns:
      the value of the phone record component
    • systemLanguageCode

      public String systemLanguageCode()
      Returns the value of the systemLanguageCode record component.
      Returns:
      the value of the systemLanguageCode record component
    • deviceModel

      public String deviceModel()
      Returns the value of the deviceModel record component.
      Returns:
      the value of the deviceModel record component
    • systemVersion

      public String systemVersion()
      Returns the value of the systemVersion record component.
      Returns:
      the value of the systemVersion record component
    • applicationVersion

      public String applicationVersion()
      Returns the value of the applicationVersion record component.
      Returns:
      the value of the applicationVersion record component
    • logVerbosityLevel

      public int logVerbosityLevel()
      Returns the value of the logVerbosityLevel record component.
      Returns:
      the value of the logVerbosityLevel record component
    • proxy

      public TelegramProperties.Proxy proxy()
      Returns the value of the proxy record component.
      Returns:
      the value of the proxy record component