Skip to content

Commit c0f1564

Browse files
committed
Generated from 38da2338b7f2a290829acc0a0cd49cf1edc4cc0b
Backward compat for ApplicationAddOwnerParameter
1 parent 7c6f69f commit c0f1564

23 files changed

+943
-77
lines changed

azure-graphrbac/azure/graphrbac/graph_rbac_management_client.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
from msrest import Serializer, Deserializer
1414
from msrestazure import AzureConfiguration
1515
from .version import VERSION
16-
from .operations.objects_operations import ObjectsOperations
16+
from .operations.signed_in_user_operations import SignedInUserOperations
1717
from .operations.applications_operations import ApplicationsOperations
18+
from .operations.deleted_applications_operations import DeletedApplicationsOperations
1819
from .operations.groups_operations import GroupsOperations
1920
from .operations.service_principals_operations import ServicePrincipalsOperations
2021
from .operations.users_operations import UsersOperations
22+
from .operations.objects_operations import ObjectsOperations
2123
from .operations.domains_operations import DomainsOperations
2224
from .operations.oauth2_operations import OAuth2Operations
2325
from . import models
@@ -61,16 +63,20 @@ class GraphRbacManagementClient(SDKClient):
6163
:ivar config: Configuration for client.
6264
:vartype config: GraphRbacManagementClientConfiguration
6365
64-
:ivar objects: Objects operations
65-
:vartype objects: azure.graphrbac.operations.ObjectsOperations
66+
:ivar signed_in_user: SignedInUser operations
67+
:vartype signed_in_user: azure.graphrbac.operations.SignedInUserOperations
6668
:ivar applications: Applications operations
6769
:vartype applications: azure.graphrbac.operations.ApplicationsOperations
70+
:ivar deleted_applications: DeletedApplications operations
71+
:vartype deleted_applications: azure.graphrbac.operations.DeletedApplicationsOperations
6872
:ivar groups: Groups operations
6973
:vartype groups: azure.graphrbac.operations.GroupsOperations
7074
:ivar service_principals: ServicePrincipals operations
7175
:vartype service_principals: azure.graphrbac.operations.ServicePrincipalsOperations
7276
:ivar users: Users operations
7377
:vartype users: azure.graphrbac.operations.UsersOperations
78+
:ivar objects: Objects operations
79+
:vartype objects: azure.graphrbac.operations.ObjectsOperations
7480
:ivar domains: Domains operations
7581
:vartype domains: azure.graphrbac.operations.DomainsOperations
7682
:ivar oauth2: OAuth2 operations
@@ -95,16 +101,20 @@ def __init__(
95101
self._serialize = Serializer(client_models)
96102
self._deserialize = Deserializer(client_models)
97103

98-
self.objects = ObjectsOperations(
104+
self.signed_in_user = SignedInUserOperations(
99105
self._client, self.config, self._serialize, self._deserialize)
100106
self.applications = ApplicationsOperations(
101107
self._client, self.config, self._serialize, self._deserialize)
108+
self.deleted_applications = DeletedApplicationsOperations(
109+
self._client, self.config, self._serialize, self._deserialize)
102110
self.groups = GroupsOperations(
103111
self._client, self.config, self._serialize, self._deserialize)
104112
self.service_principals = ServicePrincipalsOperations(
105113
self._client, self.config, self._serialize, self._deserialize)
106114
self.users = UsersOperations(
107115
self._client, self.config, self._serialize, self._deserialize)
116+
self.objects = ObjectsOperations(
117+
self._client, self.config, self._serialize, self._deserialize)
108118
self.domains = DomainsOperations(
109119
self._client, self.config, self._serialize, self._deserialize)
110120
self.oauth2 = OAuth2Operations(

azure-graphrbac/azure/graphrbac/models/__init__.py

+14-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@
1818
from .required_resource_access_py3 import RequiredResourceAccess
1919
from .application_create_parameters_py3 import ApplicationCreateParameters
2020
from .application_update_parameters_py3 import ApplicationUpdateParameters
21+
from .app_role_py3 import AppRole
2122
from .application_py3 import Application
23+
from .application_list_result_py3 import ApplicationListResult
24+
from .add_owner_parameters_py3 import AddOwnerParameters
2225
from .application_add_owner_parameters_py3 import ApplicationAddOwnerParameters
26+
from .directory_object_list_result_py3 import DirectoryObjectListResult
2327
from .key_credentials_update_parameters_py3 import KeyCredentialsUpdateParameters
2428
from .password_credentials_update_parameters_py3 import PasswordCredentialsUpdateParameters
2529
from .aad_object_py3 import AADObject
@@ -50,8 +54,12 @@
5054
from .required_resource_access import RequiredResourceAccess
5155
from .application_create_parameters import ApplicationCreateParameters
5256
from .application_update_parameters import ApplicationUpdateParameters
57+
from .app_role import AppRole
5358
from .application import Application
59+
from .application_list_result import ApplicationListResult
60+
from .add_owner_parameters import AddOwnerParameters
5461
from .application_add_owner_parameters import ApplicationAddOwnerParameters
62+
from .directory_object_list_result import DirectoryObjectListResult
5563
from .key_credentials_update_parameters import KeyCredentialsUpdateParameters
5664
from .password_credentials_update_parameters import PasswordCredentialsUpdateParameters
5765
from .aad_object import AADObject
@@ -73,12 +81,12 @@
7381
from .get_objects_parameters import GetObjectsParameters
7482
from .domain import Domain
7583
from .permissions import Permissions
76-
from .aad_object_paged import AADObjectPaged
7784
from .application_paged import ApplicationPaged
7885
from .directory_object_paged import DirectoryObjectPaged
7986
from .key_credential_paged import KeyCredentialPaged
8087
from .password_credential_paged import PasswordCredentialPaged
8188
from .ad_group_paged import ADGroupPaged
89+
from .aad_object_paged import AADObjectPaged
8290
from .str_paged import StrPaged
8391
from .service_principal_paged import ServicePrincipalPaged
8492
from .user_paged import UserPaged
@@ -96,8 +104,12 @@
96104
'RequiredResourceAccess',
97105
'ApplicationCreateParameters',
98106
'ApplicationUpdateParameters',
107+
'AppRole',
99108
'Application',
109+
'ApplicationListResult',
110+
'AddOwnerParameters',
100111
'ApplicationAddOwnerParameters',
112+
'DirectoryObjectListResult',
101113
'KeyCredentialsUpdateParameters',
102114
'PasswordCredentialsUpdateParameters',
103115
'AADObject',
@@ -119,12 +131,12 @@
119131
'GetObjectsParameters',
120132
'Domain',
121133
'Permissions',
122-
'AADObjectPaged',
123134
'ApplicationPaged',
124135
'DirectoryObjectPaged',
125136
'KeyCredentialPaged',
126137
'PasswordCredentialPaged',
127138
'ADGroupPaged',
139+
'AADObjectPaged',
128140
'StrPaged',
129141
'ServicePrincipalPaged',
130142
'UserPaged',

azure-graphrbac/azure/graphrbac/models/ad_group.py

+10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ class ADGroup(DirectoryObject):
3232
:type object_type: str
3333
:param display_name: The display name of the group.
3434
:type display_name: str
35+
:param mail_enabled: Whether the group is mail-enabled. Must be false.
36+
This is because only pure security groups can be created using the Graph
37+
API.
38+
:type mail_enabled: bool
39+
:param mail_nickname: The mail alias for the group.
40+
:type mail_nickname: str
3541
:param security_enabled: Whether the group is security-enable.
3642
:type security_enabled: bool
3743
:param mail: The primary email address of the group.
@@ -50,13 +56,17 @@ class ADGroup(DirectoryObject):
5056
'deletion_timestamp': {'key': 'deletionTimestamp', 'type': 'iso-8601'},
5157
'object_type': {'key': 'objectType', 'type': 'str'},
5258
'display_name': {'key': 'displayName', 'type': 'str'},
59+
'mail_enabled': {'key': 'mailEnabled', 'type': 'bool'},
60+
'mail_nickname': {'key': 'mailNickname', 'type': 'str'},
5361
'security_enabled': {'key': 'securityEnabled', 'type': 'bool'},
5462
'mail': {'key': 'mail', 'type': 'str'},
5563
}
5664

5765
def __init__(self, **kwargs):
5866
super(ADGroup, self).__init__(**kwargs)
5967
self.display_name = kwargs.get('display_name', None)
68+
self.mail_enabled = kwargs.get('mail_enabled', None)
69+
self.mail_nickname = kwargs.get('mail_nickname', None)
6070
self.security_enabled = kwargs.get('security_enabled', None)
6171
self.mail = kwargs.get('mail', None)
6272
self.object_type = 'Group'

azure-graphrbac/azure/graphrbac/models/ad_group_py3.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ class ADGroup(DirectoryObject):
3232
:type object_type: str
3333
:param display_name: The display name of the group.
3434
:type display_name: str
35+
:param mail_enabled: Whether the group is mail-enabled. Must be false.
36+
This is because only pure security groups can be created using the Graph
37+
API.
38+
:type mail_enabled: bool
39+
:param mail_nickname: The mail alias for the group.
40+
:type mail_nickname: str
3541
:param security_enabled: Whether the group is security-enable.
3642
:type security_enabled: bool
3743
:param mail: The primary email address of the group.
@@ -50,13 +56,17 @@ class ADGroup(DirectoryObject):
5056
'deletion_timestamp': {'key': 'deletionTimestamp', 'type': 'iso-8601'},
5157
'object_type': {'key': 'objectType', 'type': 'str'},
5258
'display_name': {'key': 'displayName', 'type': 'str'},
59+
'mail_enabled': {'key': 'mailEnabled', 'type': 'bool'},
60+
'mail_nickname': {'key': 'mailNickname', 'type': 'str'},
5361
'security_enabled': {'key': 'securityEnabled', 'type': 'bool'},
5462
'mail': {'key': 'mail', 'type': 'str'},
5563
}
5664

57-
def __init__(self, *, additional_properties=None, display_name: str=None, security_enabled: bool=None, mail: str=None, **kwargs) -> None:
65+
def __init__(self, *, additional_properties=None, display_name: str=None, mail_enabled: bool=None, mail_nickname: str=None, security_enabled: bool=None, mail: str=None, **kwargs) -> None:
5866
super(ADGroup, self).__init__(additional_properties=additional_properties, **kwargs)
5967
self.display_name = display_name
68+
self.mail_enabled = mail_enabled
69+
self.mail_nickname = mail_nickname
6070
self.security_enabled = security_enabled
6171
self.mail = mail
6272
self.object_type = 'Group'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class AddOwnerParameters(Model):
16+
"""Request parameters for adding a owner to an application.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param additional_properties: Unmatched properties from the message are
21+
deserialized this collection
22+
:type additional_properties: dict[str, object]
23+
:param url: Required. A owner object URL, such as
24+
"https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd",
25+
where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and
26+
"f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user,
27+
application, servicePrincipal, group) to be added.
28+
:type url: str
29+
"""
30+
31+
_validation = {
32+
'url': {'required': True},
33+
}
34+
35+
_attribute_map = {
36+
'additional_properties': {'key': '', 'type': '{object}'},
37+
'url': {'key': 'url', 'type': 'str'},
38+
}
39+
40+
def __init__(self, **kwargs):
41+
super(AddOwnerParameters, self).__init__(**kwargs)
42+
self.additional_properties = kwargs.get('additional_properties', None)
43+
self.url = kwargs.get('url', None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class AddOwnerParameters(Model):
16+
"""Request parameters for adding a owner to an application.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param additional_properties: Unmatched properties from the message are
21+
deserialized this collection
22+
:type additional_properties: dict[str, object]
23+
:param url: Required. A owner object URL, such as
24+
"https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd",
25+
where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and
26+
"f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user,
27+
application, servicePrincipal, group) to be added.
28+
:type url: str
29+
"""
30+
31+
_validation = {
32+
'url': {'required': True},
33+
}
34+
35+
_attribute_map = {
36+
'additional_properties': {'key': '', 'type': '{object}'},
37+
'url': {'key': 'url', 'type': 'str'},
38+
}
39+
40+
def __init__(self, *, url: str, additional_properties=None, **kwargs) -> None:
41+
super(AddOwnerParameters, self).__init__(**kwargs)
42+
self.additional_properties = additional_properties
43+
self.url = url
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class AppRole(Model):
16+
"""AppRole.
17+
18+
:param id: Unique role identifier inside the appRoles collection.
19+
:type id: str
20+
:param allowed_member_types: Specifies whether this app role definition
21+
can be assigned to users and groups by setting to 'User', or to other
22+
applications (that are accessing this application in daemon service
23+
scenarios) by setting to 'Application', or to both.
24+
:type allowed_member_types: list[str]
25+
:param description: Permission help text that appears in the admin app
26+
assignment and consent experiences.
27+
:type description: str
28+
:param display_name: Display name for the permission that appears in the
29+
admin consent and app assignment experiences.
30+
:type display_name: str
31+
:param is_enabled: When creating or updating a role definition, this must
32+
be set to true (which is the default). To delete a role, this must first
33+
be set to false. At that point, in a subsequent call, this role may be
34+
removed.
35+
:type is_enabled: bool
36+
:param value: Specifies the value of the roles claim that the application
37+
should expect in the authentication and access tokens.
38+
:type value: str
39+
"""
40+
41+
_attribute_map = {
42+
'id': {'key': 'id', 'type': 'str'},
43+
'allowed_member_types': {'key': 'allowedMemberTypes', 'type': '[str]'},
44+
'description': {'key': 'description', 'type': 'str'},
45+
'display_name': {'key': 'displayName', 'type': 'str'},
46+
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
47+
'value': {'key': 'value', 'type': 'str'},
48+
}
49+
50+
def __init__(self, **kwargs):
51+
super(AppRole, self).__init__(**kwargs)
52+
self.id = kwargs.get('id', None)
53+
self.allowed_member_types = kwargs.get('allowed_member_types', None)
54+
self.description = kwargs.get('description', None)
55+
self.display_name = kwargs.get('display_name', None)
56+
self.is_enabled = kwargs.get('is_enabled', None)
57+
self.value = kwargs.get('value', None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class AppRole(Model):
16+
"""AppRole.
17+
18+
:param id: Unique role identifier inside the appRoles collection.
19+
:type id: str
20+
:param allowed_member_types: Specifies whether this app role definition
21+
can be assigned to users and groups by setting to 'User', or to other
22+
applications (that are accessing this application in daemon service
23+
scenarios) by setting to 'Application', or to both.
24+
:type allowed_member_types: list[str]
25+
:param description: Permission help text that appears in the admin app
26+
assignment and consent experiences.
27+
:type description: str
28+
:param display_name: Display name for the permission that appears in the
29+
admin consent and app assignment experiences.
30+
:type display_name: str
31+
:param is_enabled: When creating or updating a role definition, this must
32+
be set to true (which is the default). To delete a role, this must first
33+
be set to false. At that point, in a subsequent call, this role may be
34+
removed.
35+
:type is_enabled: bool
36+
:param value: Specifies the value of the roles claim that the application
37+
should expect in the authentication and access tokens.
38+
:type value: str
39+
"""
40+
41+
_attribute_map = {
42+
'id': {'key': 'id', 'type': 'str'},
43+
'allowed_member_types': {'key': 'allowedMemberTypes', 'type': '[str]'},
44+
'description': {'key': 'description', 'type': 'str'},
45+
'display_name': {'key': 'displayName', 'type': 'str'},
46+
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
47+
'value': {'key': 'value', 'type': 'str'},
48+
}
49+
50+
def __init__(self, *, id: str=None, allowed_member_types=None, description: str=None, display_name: str=None, is_enabled: bool=None, value: str=None, **kwargs) -> None:
51+
super(AppRole, self).__init__(**kwargs)
52+
self.id = id
53+
self.allowed_member_types = allowed_member_types
54+
self.description = description
55+
self.display_name = display_name
56+
self.is_enabled = is_enabled
57+
self.value = value

0 commit comments

Comments
 (0)