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 TelegramBotConfiguration
EachProperty
implementation ofTelegramBotConfiguration
.- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PREFIX
-
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.String
getAtUsername()
java.lang.String
getName()
java.lang.String
getToken()
boolean
isEnabled()
void
setAtUsername(java.lang.String atUsername)
void
setEnabled(boolean enabled)
Sets whether this configuration is enabled.void
setToken(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:
getAtUsername
in 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:
getToken
in 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:
getName
in interfaceio.micronaut.core.naming.Named
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled)
Sets whether this configuration is enabled. Default true.- Parameters:
enabled
- The enabled setting
-
-