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 java.lang.Object implements TelegramBotConfigurationEachPropertyimplementation ofTelegramBotConfiguration.- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPREFIX
-
Constructor Summary
Constructors Constructor Description TelegramBotConfigurationProperties(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAtUsername()java.lang.StringgetName()java.lang.StringgetToken()booleanisEnabled()voidsetAtUsername(java.lang.String atUsername)voidsetEnabled(boolean enabled)Sets whether this configuration is enabled.voidsetToken(java.lang.String token)
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAtUsername
@NonNull public java.lang.String getAtUsername()
- Specified by:
getAtUsernamein interfaceTelegramBotConfiguration- Returns:
- bot username prefixed with @
-
setAtUsername
public void setAtUsername(@NonNull java.lang.String atUsername)- Parameters:
atUsername- bot username prefixed with @
-
getToken
@NonNull public java.lang.String getToken()
- Specified by:
getTokenin interfaceTelegramBotConfiguration- Returns:
- Telegram's token
-
setToken
public void setToken(@NonNull java.lang.String token)- Parameters:
token- Telegram's token
-
getName
@NonNull public java.lang.String getName()
- Specified by:
getNamein interfaceio.micronaut.core.naming.Named
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled)
Sets whether this configuration is enabled. Default true.- Parameters:
enabled- The enabled setting
-
-