8000 Merge pull request #1037 from microsoft/eric/teamsChannelAccountUpdates · snifhex/botbuilder-python@ec9f9d1 · GitHub
[go: up one dir, main page]

Skip to content

Commit ec9f9d1

Browse files
authored
Merge pull request microsoft#1037 from microsoft/eric/teamsChannelAccountUpdates
Add tenant_id and user_role to TeamsChannelAccount
2 parents 46a02c1 + 718d3c2 commit ec9f9d1

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

libraries/botbuilder-schema/botbuilder/schema/teams/_models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,10 @@ class TeamsChannelAccount(ChannelAccount):
15371537
:type email: str
15381538
:param user_principal_name: Unique user principal name
15391539
:type user_principal_name: str
1540+
:param tenant_id: Tenant Id of the user.
1541+
:type tenant_id: str
1542+
:param user_role: User Role of the user.
1543+
:type user_role: str
15401544
"""
15411545

15421546
_attribute_map = {
@@ -1547,6 +1551,8 @@ class TeamsChannelAccount(ChannelAccount):
15471551
"email": {"key": "email", "type": "str"},
15481552
"userPrincipalName": {"key": "userPrincipalName", "type": "str"},
15491553
"aad_object_id": {"key": "objectId", "type": "str"},
1554+
"tenant_id": {"key": "tenantId", "type": "str"},
1555+
"user_role": {"key": "userRole", "type": "str"},
15501556
}
15511557

15521558
def __init__(self, **kwargs):
@@ -1555,6 +1561,8 @@ def __init__(self, **kwargs):
15551561
self.surname = kwargs.get("surname", None)
15561562
self.email = kwargs.get("email", None)
15571563
self.user_principal_name = kwargs.get("userPrincipalName", None)
1564+
self.tenant_id = kwargs.get("tenantId", None)
1565+
self.user_role = kwargs.get("userRole", None)
15581566

15591567

15601568
class TeamsPagedMembersResult(PagedMembersResult):

libraries/botbuilder-schema/botbuilder/schema/teams/_models_py3.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1800,8 +1800,12 @@ class TeamsChannelAccount(ChannelAccount):
18001800
:type surname: str
18011801
:param email: Email Id of the user.
18021802
:type email: str
1803-
:param user_principal_name: Unique user principal name
1803+
:param user_principal_name: Unique user principal name.
18041804
:type user_principal_name: str
1805+
:param tenant_id: Tenant Id of the user.
1806+
:type tenant_id: str
1807+
:param user_role: User Role of the user.
1808+
:type user_role: str
18051809
"""
18061810

18071811
_attribute_map = {
@@ -1812,6 +1816,8 @@ class TeamsChannelAccount(ChannelAccount):
18121816
"email": {"key": "email", "type": "str"},
18131817
"user_principal_name": {"key": "userPrincipalName", "type": "str"},
18141818
"aad_object_id": {"key": "objectId", "type": "str"},
1819+
"tenant_id": {"key": "tenantId", "type": "str"},
1820+
"user_role": {"key": "userRole", "type": "str"},
18151821
}
18161822

18171823
def __init__(
@@ -1823,13 +1829,17 @@ def __init__(
18231829
surname: str = None,
18241830
email: str = None,
18251831
user_principal_name: str = None,
1832+
tenant_id: str = None,
1833+
user_role: str = None,
18261834
**kwargs
18271835
) -> None:
18281836
super(TeamsChannelAccount, self).__init__(id=id, name=name, **kwargs)
18291837
self.given_name = given_name
18301838
self.surname = surname
18311839
self.email = email
18321840
self.user_principal_name = user_principal_name
1841+
self.tenant_id = tenant_id
1842+
self.user_role = user_role
18331843

18341844

18351845
class TeamsPagedMembersResult(PagedMembersResult):

0 commit comments

Comments
 (0)
0