ChannelAccount Class

  • java.lang.Object
    • com.microsoft.bot.schema.ChannelAccount

public class ChannelAccount

Channel account information needed to route a message.

Constructor Summary

Constructor Description
ChannelAccount()

Initializes a new instance of the ChannelAccount class.

ChannelAccount(String withId)

Initializes a new instance of the ChannelAccount class.

ChannelAccount(String withId, String withName)

Initializes a new instance of the ChannelAccount class.

ChannelAccount(String withId, String withName, RoleTypes withRole)

Initializes a new instance of the ChannelAccount class.

ChannelAccount(String withId, String withName, RoleTypes withRole, String withAadObjectId)

Initializes a new instance of the ChannelAccount class.

Method Summary

Modifier and Type Method and Description
static ChannelAccount clone(ChannelAccount channelAccount)

Perform a deep copy of a ChannelAccount.

static java.util.List<ChannelAccount> cloneList(List<ChannelAccount> channelAccounts)

Performs a deep copy of a List of ChannelAccounts.

java.lang.String getAadObjectId()

This account's object ID within Azure Active Directory (AAD).

java.lang.String getId()

Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).

java.lang.String getName()

Display friendly name.

java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> getProperties()

Overflow properties.

RoleTypes getRole()

Role of the entity behind the account (Example: User, Bot, etc.).

void setAadObjectId(String withAadObjectId)

This account's object ID within Azure Active Directory (AAD).

void setId(String withId)

Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).

void setName(String withName)

Display friendly name.

void setProperties(String key, JsonNode value)

Set overflow properties.

void setRole(RoleTypes withRole)

Role of the entity behind the account (Example: User, Bot, etc.).

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

ChannelAccount

public ChannelAccount()

Initializes a new instance of the ChannelAccount class.

ChannelAccount

public ChannelAccount(String withId)

Initializes a new instance of the ChannelAccount class.

Parameters:

withId - Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).

ChannelAccount

public ChannelAccount(String withId, String withName)

Initializes a new instance of the ChannelAccount class.

Parameters:

withId - Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).
withName - Display friendly name.

ChannelAccount

public ChannelAccount(String withId, String withName, RoleTypes withRole)

Initializes a new instance of the ChannelAccount class.

Parameters:

withId - Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).
withName - Display friendly name.
withRole - Role of the entity behind the account (Example User, Bot, etc.). Possible values include: 'user', 'bot'

ChannelAccount

public ChannelAccount(String withId, String withName, RoleTypes withRole, String withAadObjectId)

Initializes a new instance of the ChannelAccount class.

Parameters:

withId - Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).
withName - Display friendly name.
withRole - Role of the entity behind the account (Example User, Bot, etc.). Possible values include: 'user', 'bot'
withAadObjectId - This account's object ID within Azure Active Directory (AAD).

Method Details

clone

public static ChannelAccount clone(ChannelAccount channelAccount)

Perform a deep copy of a ChannelAccount.

Parameters:

channelAccount - The ChannelAccount to copy.

Returns:

A cloned copy of the ChannelAccount.

cloneList

public static List cloneList(List channelAccounts)

Performs a deep copy of a List of ChannelAccounts.

Parameters:

channelAccounts - The List to clone.

Returns:

A cloned List of ChannelAccounts.

getAadObjectId

public String getAadObjectId()

This account's object ID within Azure Active Directory (AAD).

Returns:

The aadObjectId value.

getId

public String getId()

Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).

Returns:

the id value.

getName

public String getName()

Display friendly name.

Returns:

the name value.

getProperties

public Map getProperties()

Overflow properties. Properties that are not modelled as first class properties in the object are accessible here. Note: A property value can be be nested.

Returns:

A Key-Value map of the properties

getRole

public RoleTypes getRole()

Role of the entity behind the account (Example: User, Bot, etc.).

Returns:

the role value.

setAadObjectId

public void setAadObjectId(String withAadObjectId)

This account's object ID within Azure Active Directory (AAD).

Parameters:

withAadObjectId - The aadObjectId value to set.

setId

public void setId(String withId)

Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).

Parameters:

withId - the id value to set.

setName

public void setName(String withName)

Display friendly name.

Parameters:

withName - the name value to set.

setProperties

public void setProperties(String key, JsonNode value)

Set overflow properties.

Parameters:

key - Key for the property
value - JsonNode of value (can be nested)

setRole

public void setRole(RoleTypes withRole)

Role of the entity behind the account (Example: User, Bot, etc.).

Parameters:

withRole - the role value to set.

Applies to