ConversationAccount Class

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

public class ConversationAccount

Conversation account represents the identity of the conversation within a channel.

Constructor Summary

Constructor Description
ConversationAccount()

Empty ConversationAccount.

ConversationAccount(boolean withIsGroup, String withId, String withName)

Initializes a new instance of the ConversationAccount class.

ConversationAccount(boolean withIsGroup, String withConversationType, String withId, String withName, String withAadObjectId, RoleTypes withRole, String withTenantId)

Initializes a new instance of the ConversationAccount class.

ConversationAccount(String withId)

Initializes a new instance of the ConversationAccount class.

Method Summary

Modifier and Type Method and Description
static ConversationAccount clone(ConversationAccount conversationAccount)

Performs a deep copy of a ConversationAccount.

java.lang.String getAadObjectId()

Gets this account's #aadObjectId within Azure Active Directory (AAD).

java.lang.String getConversationType()

Get the #conversationType value.

java.lang.String getId()

Get the #id value.

java.lang.String getName()

Get the #name value.

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

Overflow properties.

RoleTypes getRole()

Get the #role value.

java.lang.String getTenantId()

Gets this conversation's #tenantId.

boolean isGroup()

Get the #isGroup value.

void setAadObjectId(String withAadObjectId)

Sets this account's #aadObjectId within Azure Active Directory (AAD).

void setConversationType(String withConversationType)

Set the #conversationType value.

void setId(String withId)

Set the #id value.

void setIsGroup(boolean withIsGroup)

Set the #isGroup value.

void setName(String withName)

Set the #name value.

void setProperties(String key, JsonNode value)

Set overflow properties.

void setRole(RoleTypes withRole)

Set the #role value.

void setTenantId(String withTenantId)

Sets this conversation's #tenantId.

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

ConversationAccount

public ConversationAccount()

Empty ConversationAccount.

ConversationAccount

public ConversationAccount(boolean withIsGroup, String withId, String withName)

Initializes a new instance of the ConversationAccount class.

Parameters:

withIsGroup - Indicates whether the conversation contains more than two participants at the time the activity was.
withId - Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).
withName - Display friendly name.

ConversationAccount

public ConversationAccount(boolean withIsGroup, String withConversationType, String withId, String withName, String withAadObjectId, RoleTypes withRole, String withTenantId)

Initializes a new instance of the ConversationAccount class.

Parameters:

withIsGroup - Indicates whether the conversation contains more than two participants at the time the activity was.
withConversationType - Indicates the type of the conversation in channels that distinguish between conversation.
withId - Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456).
withName - Display friendly name.
withAadObjectId - This account's object ID within Azure Active Directory (AAD).
withRole - Role of the entity behind the account (Example: User, Bot, etc.). Possible values include: 'user', 'bot'.
withTenantId - This conversation's tenant ID.

ConversationAccount

public ConversationAccount(String withId)

Initializes a new instance of the ConversationAccount class.

Parameters:

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

Method Details

clone

public static ConversationAccount clone(ConversationAccount conversationAccount)

Performs a deep copy of a ConversationAccount.

Parameters:

conversationAccount - The ConversationAccount to copy.

Returns:

The cloned ConversationAccount.

getAadObjectId

public String getAadObjectId()

Gets this account's #aadObjectId within Azure Active Directory (AAD).

Returns:

The AAD object id.

getConversationType

public String getConversationType()

Get the #conversationType value.

Returns:

the conversationType value

getId

public String getId()

Get the #id value.

Returns:

the id value

getName

public String getName()

Get the #name value.

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()

Get the #role value.

Returns:

the role value

getTenantId

public String getTenantId()

Gets this conversation's #tenantId.

Returns:

The tenantId value.

isGroup

public boolean isGroup()

Get the #isGroup value.

Returns:

the isGroup value

setAadObjectId

public void setAadObjectId(String withAadObjectId)

Sets this account's #aadObjectId within Azure Active Directory (AAD).

Parameters:

withAadObjectId - the AAD ID to set

setConversationType

public void setConversationType(String withConversationType)

Set the #conversationType value.

Parameters:

withConversationType - the conversationType value to set

setId

public void setId(String withId)

Set the #id value.

Parameters:

withId - the id value to set

setIsGroup

public void setIsGroup(boolean withIsGroup)

Set the #isGroup value.

Parameters:

withIsGroup - the isGroup value to set

setName

public void setName(String withName)

Set the #name value.

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)

Set the #role value.

Parameters:

withRole - the role value to set

setTenantId

public void setTenantId(String withTenantId)

Sets this conversation's #tenantId.

Parameters:

withTenantId - this conversation's tenant ID

Applies to