Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR graphrbac/data-plane] Rename Post to Grants #3533

Merged
merged 1 commit into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions azure-graphrbac/azure/graphrbac/graph_rbac_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.signed_in_user_operations import SignedInUserOperations
from .operations.objects_operations import ObjectsOperations
from .operations.applications_operations import ApplicationsOperations
from .operations.deleted_applications_operations import DeletedApplicationsOperations
from .operations.groups_operations import GroupsOperations
from .operations.service_principals_operations import ServicePrincipalsOperations
from .operations.users_operations import UsersOperations
from .operations.objects_operations import ObjectsOperations
from .operations.domains_operations import DomainsOperations
from .operations.oauth2_operations import OAuth2Operations
from . import models
Expand Down Expand Up @@ -63,20 +61,16 @@ class GraphRbacManagementClient(SDKClient):
:ivar config: Configuration for client.
:vartype config: GraphRbacManagementClientConfiguration

:ivar signed_in_user: SignedInUser operations
:vartype signed_in_user: azure.graphrbac.operations.SignedInUserOperations
:ivar objects: Objects operations
:vartype objects: azure.graphrbac.operations.ObjectsOperations
:ivar applications: Applications operations
:vartype applications: azure.graphrbac.operations.ApplicationsOperations
:ivar deleted_applications: DeletedApplications operations
:vartype deleted_applications: azure.graphrbac.operations.DeletedApplicationsOperations
:ivar groups: Groups operations
:vartype groups: azure.graphrbac.operations.GroupsOperations
:ivar service_principals: ServicePrincipals operations
:vartype service_principals: azure.graphrbac.operations.ServicePrincipalsOperations
:ivar users: Users operations
:vartype users: azure.graphrbac.operations.UsersOperations
:ivar objects: Objects operations
:vartype objects: azure.graphrbac.operations.ObjectsOperations
:ivar domains: Domains operations
:vartype domains: azure.graphrbac.operations.DomainsOperations
:ivar oauth2: OAuth2 operations
Expand All @@ -101,20 +95,16 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.signed_in_user = SignedInUserOperations(
self.objects = ObjectsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.applications = ApplicationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.deleted_applications = DeletedApplicationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.groups = GroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.service_principals = ServicePrincipalsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.users = UsersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.objects = ObjectsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.domains = DomainsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.oauth2 = OAuth2Operations(
Expand Down
21 changes: 10 additions & 11 deletions azure-graphrbac/azure/graphrbac/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@
from .password_credential_py3 import PasswordCredential
from .resource_access_py3 import ResourceAccess
from .required_resource_access_py3 import RequiredResourceAccess
from .app_role_py3 import AppRole
from .application_create_parameters_py3 import ApplicationCreateParameters
from .application_update_parameters_py3 import ApplicationUpdateParameters
from .application_py3 import Application
from .add_owner_parameters_py3 import AddOwnerParameters
from .application_add_owner_parameters_py3 import ApplicationAddOwnerParameters
from .key_credentials_update_parameters_py3 import KeyCredentialsUpdateParameters
from .password_credentials_update_parameters_py3 import PasswordCredentialsUpdateParameters
from .aad_object_py3 import AADObject
from .group_add_member_parameters_py3 import GroupAddMemberParameters
from .group_create_parameters_py3 import GroupCreateParameters
from .ad_group_py3 import ADGroup
from .group_get_member_groups_parameters_py3 import GroupGetMemberGroupsParameters
from .check_group_membership_parameters_py3 import CheckGroupMembershipParameters
from .check_group_membership_result_py3 import CheckGroupMembershipResult
from .service_principal_create_parameters_py3 import ServicePrincipalCreateParameters
from .service_principal_update_parameters_py3 import ServicePrincipalUpdateParameters
from .service_principal_py3 import ServicePrincipal
from .password_profile_py3 import PasswordProfile
from .user_base_py3 import UserBase
Expand All @@ -49,21 +48,20 @@
from .password_credential import PasswordCredential
from .resource_access import ResourceAccess
from .required_resource_access import RequiredResourceAccess
from .app_role import AppRole
from .application_create_parameters import ApplicationCreateParameters
from .application_update_parameters import ApplicationUpdateParameters
from .application import Application
from .add_owner_parameters import AddOwnerParameters
from .application_add_owner_parameters import ApplicationAddOwnerParameters
from .key_credentials_update_parameters import KeyCredentialsUpdateParameters
from .password_credentials_update_parameters import PasswordCredentialsUpdateParameters
from .aad_object import AADObject
from .group_add_member_parameters import GroupAddMemberParameters
from .group_create_parameters import GroupCreateParameters
from .ad_group import ADGroup
from .group_get_member_groups_parameters import GroupGetMemberGroupsParameters
from .check_group_membership_parameters import CheckGroupMembershipParameters
from .check_group_membership_result import CheckGroupMembershipResult
from .service_principal_create_parameters import ServicePrincipalCreateParameters
from .service_principal_update_parameters import ServicePrincipalUpdateParameters
from .service_principal import ServicePrincipal
from .password_profile import PasswordProfile
from .user_base import UserBase
Expand All @@ -75,8 +73,9 @@
from .get_objects_parameters import GetObjectsParameters
from .domain import Domain
from .permissions import Permissions
from .directory_object_paged import DirectoryObjectPaged
from .aad_object_paged import AADObjectPaged
from .application_paged import ApplicationPaged
from .directory_object_paged import DirectoryObjectPaged
from .key_credential_paged import KeyCredentialPaged
from .password_credential_paged import PasswordCredentialPaged
from .ad_group_paged import ADGroupPaged
Expand All @@ -95,21 +94,20 @@
'PasswordCredential',
'ResourceAccess',
'RequiredResourceAccess',
'AppRole',
'ApplicationCreateParameters',
'ApplicationUpdateParameters',
'Application',
'AddOwnerParameters',
'ApplicationAddOwnerParameters',
'KeyCredentialsUpdateParameters',
'PasswordCredentialsUpdateParameters',
'AADObject',
'GroupAddMemberParameters',
'GroupCreateParameters',
'ADGroup',
'GroupGetMemberGroupsParameters',
'CheckGroupMembershipParameters',
'CheckGroupMembershipResult',
'ServicePrincipalCreateParameters',
'ServicePrincipalUpdateParameters',
'ServicePrincipal',
'PasswordProfile',
'UserBase',
Expand All @@ -121,8 +119,9 @@
'GetObjectsParameters',
'Domain',
'Permissions',
'DirectoryObjectPaged',
'AADObjectPaged',
'ApplicationPaged',
'DirectoryObjectPaged',
'KeyCredentialPaged',
'PasswordCredentialPaged',
'ADGroupPaged',
Expand Down
120 changes: 120 additions & 0 deletions azure-graphrbac/azure/graphrbac/models/aad_object.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AADObject(Model):
"""The properties of an Active Directory object.

Variables are only populated by the server, and will be ignored when
sending a request.

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param object_id: The ID of the object.
:type object_id: str
:param object_type: The type of AAD object.
:type object_type: str
:param display_name: The display name of the object.
:type display_name: str
:param user_principal_name: The principal name of the object.
:type user_principal_name: str
:param mail: The primary email address of the object.
:type mail: str
:param mail_enabled: Whether the AAD object is mail-enabled.
:type mail_enabled: bool
:ivar mail_nickname: The mail alias for the user.
:vartype mail_nickname: str
:param security_enabled: Whether the AAD object is security-enabled.
:type security_enabled: bool
:param sign_in_name: The sign-in name of the object.
:type sign_in_name: str
:param service_principal_names: A collection of service principal names
associated with the object.
:type service_principal_names: list[str]
:param user_type: The user type of the object.
:type user_type: str
:ivar usage_location: A two letter country code (ISO standard 3166).
Required for users that will be assigned licenses due to legal requirement
to check for availability of services in countries. Examples include:
"US", "JP", and "GB".
:vartype usage_location: str
:ivar app_id: The application ID.
:vartype app_id: str
:ivar app_permissions: The application permissions.
:vartype app_permissions: list[str]
:ivar available_to_other_tenants: Whether the application is be available
to other tenants.
:vartype available_to_other_tenants: bool
:ivar identifier_uris: A collection of URIs for the application.
:vartype identifier_uris: list[str]
:ivar reply_urls: A collection of reply URLs for the application.
:vartype reply_urls: list[str]
:ivar homepage: The home page of the application.
:vartype homepage: str
"""

_validation = {
'mail_nickname': {'readonly': True},
'usage_location': {'readonly': True},
'app_id': {'readonly': True},
'app_permissions': {'readonly': True},
'available_to_other_tenants': {'readonly': True},
'identifier_uris': {'readonly': True},
'reply_urls': {'readonly': True},
'homepage': {'readonly': True},
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'object_id': {'key': 'objectId', 'type': 'str'},
'object_type': {'key': 'objectType', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'},
'mail': {'key': 'mail', 'type': 'str'},
'mail_enabled': {'key': 'mailEnabled', 'type': 'bool'},
'mail_nickname': {'key': 'mailNickname', 'type': 'str'},
'security_enabled': {'key': 'securityEnabled', 'type': 'bool'},
'sign_in_name': {'key': 'signInName', 'type': 'str'},
'service_principal_names': {'key': 'servicePrincipalNames', 'type': '[str]'},
'user_type': {'key': 'userType', 'type': 'str'},
'usage_location': {'key': 'usageLocation', 'type': 'str'},
'app_id': {'key': 'appId', 'type': 'str'},
'app_permissions': {'key': 'appPermissions', 'type': '[str]'},
'available_to_other_tenants': {'key': 'availableToOtherTenants', 'type': 'bool'},
'identifier_uris': {'key': 'identifierUris', 'type': '[str]'},
'reply_urls': {'key': 'replyUrls', 'type': '[str]'},
'homepage': {'key': 'homepage', 'type': 'str'},
}

def __init__(self, **kwargs):
super(AADObject, self).__init__(**kwargs)
self.additional_properties = kwargs.get('additional_properties', None)
self.object_id = kwargs.get('object_id', None)
self.object_type = kwargs.get('object_type', None)
self.display_name = kwargs.get('display_name', None)
self.user_principal_name = kwargs.get('user_principal_name', None)
self.mail = kwargs.get('mail', None)
self.mail_enabled = kwargs.get('mail_enabled', None)
self.mail_nickname = None
self.security_enabled = kwargs.get('security_enabled', None)
self.sign_in_name = kwargs.get('sign_in_name', None)
self.service_principal_names = kwargs.get('service_principal_names', None)
self.user_type = kwargs.get('user_type', None)
self.usage_location = None
self.app_id = None
self.app_permissions = None
self.available_to_other_tenants = None
self.identifier_uris = None
self.reply_urls = None
self.homepage = None
27 changes: 27 additions & 0 deletions azure-graphrbac/azure/graphrbac/models/aad_object_paged.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.paging import Paged


class AADObjectPaged(Paged):
"""
A paging container for iterating over a list of :class:`AADObject <azure.graphrbac.models.AADObject>` object
"""

_attribute_map = {
'next_link': {'key': 'odata\\.nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[AADObject]'}
}

def __init__(self, *args, **kwargs):

super(AADObjectPaged, self).__init__(*args, **kwargs)
Loading