Class TelegramBotConfigurationProperties

java.lang.Object
io.micronaut.chatbots.telegram.core.TelegramBotConfigurationProperties
All Implemented Interfaces:
BotConfiguration, TelegramBotConfiguration, io.micronaut.core.naming.Named, io.micronaut.core.util.Toggleable

@EachProperty("micronaut.chatbots.telegram.bots") public class TelegramBotConfigurationProperties extends Object implements TelegramBotConfiguration
EachProperty implementation of TelegramBotConfiguration.
Since:
1.0.0
Author:
Sergio del Amo
  • Field Details

  • Constructor Details

    • TelegramBotConfigurationProperties

      public TelegramBotConfigurationProperties(@Parameter String name)
  • Method Details

    • getAtUsername

      @NonNull public @NonNull String getAtUsername()
      Specified by:
      getAtUsername in interface TelegramBotConfiguration
      Returns:
      bot username prefixed with @
    • setAtUsername

      public void setAtUsername(@NonNull @NonNull String atUsername)
      Parameters:
      atUsername - bot username prefixed with @
    • getToken

      @NonNull public @NonNull String getToken()
      Specified by:
      getToken in interface TelegramBotConfiguration
      Returns:
      Telegram's token
    • setToken

      public void setToken(@NonNull @NonNull String token)
      Parameters:
      token - Telegram's token
    • getName

      @NonNull public @NonNull String getName()
      Specified by:
      getName in interface io.micronaut.core.naming.Named
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets whether this configuration is enabled. Default true.
      Parameters:
      enabled - The enabled setting