docs
Toggle table of contents
35.1.0
common
Target filter
common
Switch theme
Search in API
Skip to content
docs
docs
/
dev.inmo.tgbotapi.types.business_connection
/
BusinessConnection
/
Enabled
Enabled
@
Serializable
data
class
Enabled
(
val
id
:
BusinessConnectionId
,
val
user
:
PreviewUser
,
val
userChatId
:
ChatId
,
val
date
:
TelegramDate
,
val
rights
:
BusinessBotRights
=
BusinessBotRights()
)
:
BusinessConnection
(
source
)
Members
Members & Extensions
Constructors
Enabled
Link copied to clipboard
constructor
(
id
:
BusinessConnectionId
,
user
:
PreviewUser
,
userChatId
:
ChatId
,
date
:
TelegramDate
,
rights
:
BusinessBotRights
=
BusinessBotRights()
)
Properties
business
Connection
Id
Link copied to clipboard
open
override
val
businessConnectionId
:
BusinessConnectionId
can
Reply
Link copied to clipboard
open
val
canReply
:
Boolean
date
Link copied to clipboard
@
SerialName
(
value
=
"date"
)
open
override
val
date
:
TelegramDate
id
Link copied to clipboard
@
SerialName
(
value
=
"id"
)
open
override
val
id
:
BusinessConnectionId
is
Enabled
Link copied to clipboard
@
EncodeDefault
open
override
val
isEnabled
:
Boolean
=
true
rights
Link copied to clipboard
@
SerialName
(
value
=
"rights"
)
open
override
val
rights
:
BusinessBotRights
user
Link copied to clipboard
@
SerialName
(
value
=
"user"
)
open
override
val
user
:
PreviewUser
user
Chat
Id
Link copied to clipboard
@
SerialName
(
value
=
"user_chat_id"
)
open
override
val
userChatId
:
ChatId
Functions
disabled
Or
Null
Link copied to clipboard
inline
fun
BusinessConnection
.
disabledOrNull
(
)
:
BusinessConnection.Disabled
?
disabled
Or
Throw
Link copied to clipboard
inline
fun
BusinessConnection
.
disabledOrThrow
(
)
:
BusinessConnection.Disabled
enabled
Or
Null
Link copied to clipboard
inline
fun
BusinessConnection
.
enabledOrNull
(
)
:
BusinessConnection.Enabled
?
enabled
Or
Throw
Link copied to clipboard
inline
fun
BusinessConnection
.
enabledOrThrow
(
)
:
BusinessConnection.Enabled
if
Disabled
Link copied to clipboard
inline
fun
<
T
>
BusinessConnection
.
ifDisabled
(
block
:
(
BusinessConnection.Disabled
)
->
T
)
:
T
?
if
Enabled
Link copied to clipboard
inline
fun
<
T
>
BusinessConnection
.
ifEnabled
(
block
:
(
BusinessConnection.Enabled
)
->
T
)
:
T
?