Skip to content

Commit 0a58494

Browse files
authored
Generated from 11f1a80d6726c7f9a7172dcc47ff1829d634740a (#3843)
refactoring Go out of readme
1 parent ade0c7d commit 0a58494

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment.py

+8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ class RoleAssignment(Model):
3030
:type role_definition_id: str
3131
:param principal_id: The principal ID.
3232
:type principal_id: str
33+
:param principal_type: The principal type of the assigned principal ID.
34+
Possible values include: 'User', 'Group', 'ServicePrincipal', 'Unknown',
35+
'DirectoryRoleTemplate', 'ForeignGroup', 'Application', 'MSI',
36+
'DirectoryObjectOrGroup', 'Everyone'
37+
:type principal_type: str or
38+
~azure.mgmt.authorization.v2018_09_01_preview.models.PrincipalType
3339
:param can_delegate: The Delegation flag for the roleassignment
3440
:type can_delegate: bool
3541
"""
@@ -47,6 +53,7 @@ class RoleAssignment(Model):
4753
'scope': {'key': 'properties.scope', 'type': 'str'},
4854
'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'},
4955
'principal_id': {'key': 'properties.principalId', 'type': 'str'},
56+
'principal_type': {'key': 'properties.principalType', 'type': 'str'},
5057
'can_delegate': {'key': 'properties.canDelegate', 'type': 'bool'},
5158
}
5259

@@ -58,4 +65,5 @@ def __init__(self, **kwargs):
5865
self.scope = kwargs.get('scope', None)
5966
self.role_definition_id = kwargs.get('role_definition_id', None)
6067
self.principal_id = kwargs.get('principal_id', None)
68+
self.principal_type = kwargs.get('principal_type', None)
6169
self.can_delegate = kwargs.get('can_delegate', None)

azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview/models/role_assignment_py3.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ class RoleAssignment(Model):
3030
:type role_definition_id: str
3131
:param principal_id: The principal ID.
3232
:type principal_id: str
33+
:param principal_type: The principal type of the assigned principal ID.
34+
Possible values include: 'User', 'Group', 'ServicePrincipal', 'Unknown',
35+
'DirectoryRoleTemplate', 'ForeignGroup', 'Application', 'MSI',
36+
'DirectoryObjectOrGroup', 'Everyone'
37+
:type principal_type: str or
38+
~azure.mgmt.authorization.v2018_09_01_preview.models.PrincipalType
3339
:param can_delegate: The Delegation flag for the roleassignment
3440
:type can_delegate: bool
3541
"""
@@ -47,15 +53,17 @@ class RoleAssignment(Model):
4753
'scope': {'key': 'properties.scope', 'type': 'str'},
4854
'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'},
4955
'principal_id': {'key': 'properties.principalId', 'type': 'str'},
56+
'principal_type': {'key': 'properties.principalType', 'type': 'str'},
5057
'can_delegate': {'key': 'properties.canDelegate', 'type': 'bool'},
5158
}
5259

53-
def __init__(self, *, scope: str=None, role_definition_id: str=None, principal_id: str=None, can_delegate: bool=None, **kwargs) -> None:
60+
def __init__(self, *, scope: str=None, role_definition_id: str=None, principal_id: str=None, principal_type=None, can_delegate: bool=None, **kwargs) -> None:
5461
super(RoleAssignment, self).__init__(**kwargs)
5562
self.id = None
5663
self.name = None
5764
self.type = None
5865
self.scope = scope
5966
self.role_definition_id = role_definition_id
6067
self.principal_id = principal_id
68+
self.principal_type = principal_type
6169
self.can_delegate = can_delegate

0 commit comments

Comments
 (0)