Skip to content

Commit

Permalink
Merge pull request #1460 from AutorestCI/RestAPI-PR1716
Browse files Browse the repository at this point in the history
[GraphRBAC] Missing fields on User
  • Loading branch information
lmazuel authored Sep 21, 2017
2 parents 592f178 + 771b96e commit 5777be0
Show file tree
Hide file tree
Showing 45 changed files with 262 additions and 59 deletions.
14 changes: 14 additions & 0 deletions azure-graphrbac/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
Release History
===============

0.32.0 (2017-09-21)
+++++++++++++++++++

**Features**

- Add Application.oauth2_allow_implicit_flow (create, update, get)
- Add to User: immutable_id, given_name, surname, user_type, account_enabled
- Add to UserCreate: given_name, surname, user_type, mail
- Add to UserUpdate: immutable_id, given_name, surname, user_type, user_principal_name

**Bugfixes**

- Renamed User.signInName to an array User.signInNames

0.31.0 (2017-08-09)
+++++++++++++++++++

Expand Down
Empty file modified azure-graphrbac/azure/graphrbac/__init__.py
100755 → 100644
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/graph_rbac_management_client.py
100755 → 100644
Empty file.
8 changes: 8 additions & 0 deletions azure-graphrbac/azure/graphrbac/models/__init__.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
from .service_principal_create_parameters import ServicePrincipalCreateParameters
from .service_principal import ServicePrincipal
from .password_profile import PasswordProfile
from .user_base import UserBase
from .user_create_parameters import UserCreateParameters
from .user_update_parameters import UserUpdateParameters
from .sign_in_name import SignInName
from .user import User
from .user_get_member_groups_parameters import UserGetMemberGroupsParameters
from .get_objects_parameters import GetObjectsParameters
Expand All @@ -42,6 +44,9 @@
from .service_principal_paged import ServicePrincipalPaged
from .user_paged import UserPaged
from .domain_paged import DomainPaged
from .graph_rbac_management_client_enums import (
UserType,
)

__all__ = [
'GraphError', 'GraphErrorException',
Expand All @@ -62,8 +67,10 @@
'ServicePrincipalCreateParameters',
'ServicePrincipal',
'PasswordProfile',
'UserBase',
'UserCreateParameters',
'UserUpdateParameters',
'SignInName',
'User',
'UserGetMemberGroupsParameters',
'GetObjectsParameters',
Expand All @@ -77,4 +84,5 @@
'ServicePrincipalPaged',
'UserPaged',
'DomainPaged',
'UserType',
]
Empty file modified azure-graphrbac/azure/graphrbac/models/aad_object.py
100755 → 100644
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/aad_object_paged.py
100755 → 100644
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/ad_group.py
100755 → 100644
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/ad_group_paged.py
100755 → 100644
Empty file.
7 changes: 6 additions & 1 deletion azure-graphrbac/azure/graphrbac/models/application.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ class Application(Model):
:type reply_urls: list of str
:param homepage: The home page of the application.
:type homepage: str
:param oauth2_allow_implicit_flow: Whether to allow implicit grant flow
for OAuth2
:type oauth2_allow_implicit_flow: bool
"""

_attribute_map = {
Expand All @@ -46,9 +49,10 @@ class Application(Model):
'identifier_uris': {'key': 'identifierUris', 'type': '[str]'},
'reply_urls': {'key': 'replyUrls', 'type': '[str]'},
'homepage': {'key': 'homepage', 'type': 'str'},
'oauth2_allow_implicit_flow': {'key': 'oauth2AllowImplicitFlow', 'type': 'bool'},
}

def __init__(self, object_id=None, object_type=None, app_id=None, app_permissions=None, available_to_other_tenants=None, display_name=None, identifier_uris=None, reply_urls=None, homepage=None):
def __init__(self, object_id=None, object_type=None, app_id=None, app_permissions=None, available_to_other_tenants=None, display_name=None, identifier_uris=None, reply_urls=None, homepage=None, oauth2_allow_implicit_flow=None):
self.object_id = object_id
self.object_type = object_type
self.app_id = app_id
Expand All @@ -58,3 +62,4 @@ def __init__(self, object_id=None, object_type=None, app_id=None, app_permission
self.identifier_uris = identifier_uris
self.reply_urls = reply_urls
self.homepage = homepage
self.oauth2_allow_implicit_flow = oauth2_allow_implicit_flow
7 changes: 6 additions & 1 deletion azure-graphrbac/azure/graphrbac/models/application_create_parameters.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class ApplicationCreateParameters(Model):
:param password_credentials: The list of PasswordCredential objects.
:type password_credentials: list of :class:`PasswordCredential
<azure.graphrbac.models.PasswordCredential>`
:param oauth2_allow_implicit_flow: Whether to allow implicit grant flow
for OAuth2
:type oauth2_allow_implicit_flow: bool
"""

_validation = {
Expand All @@ -48,13 +51,15 @@ class ApplicationCreateParameters(Model):
'reply_urls': {'key': 'replyUrls', 'type': '[str]'},
'key_credentials': {'key': 'keyCredentials', 'type': '[KeyCredential]'},
'password_credentials': {'key': 'passwordCredentials', 'type': '[PasswordCredential]'},
'oauth2_allow_implicit_flow': {'key': 'oauth2AllowImplicitFlow', 'type': 'bool'},
}

def __init__(self, available_to_other_tenants, display_name, identifier_uris, homepage=None, reply_urls=None, key_credentials=None, password_credentials=None):
def __init__(self, available_to_other_tenants, display_name, identifier_uris, homepage=None, reply_urls=None, key_credentials=None, password_credentials=None, oauth2_allow_implicit_flow=None):
self.available_to_other_tenants = available_to_other_tenants
self.display_name = display_name
self.homepage = homepage
self.identifier_uris = identifier_uris
self.reply_urls = reply_urls
self.key_credentials = key_credentials
self.password_credentials = password_credentials
self.oauth2_allow_implicit_flow = oauth2_allow_implicit_flow
Empty file modified azure-graphrbac/azure/graphrbac/models/application_paged.py
100755 → 100644
Empty file.
7 changes: 6 additions & 1 deletion azure-graphrbac/azure/graphrbac/models/application_update_parameters.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class ApplicationUpdateParameters(Model):
:param password_credentials: The list of PasswordCredential objects.
:type password_credentials: list of :class:`PasswordCredential
<azure.graphrbac.models.PasswordCredential>`
:param oauth2_allow_implicit_flow: Whether to allow implicit grant flow
for OAuth2
:type oauth2_allow_implicit_flow: bool
"""

_attribute_map = {
Expand All @@ -42,13 +45,15 @@ class ApplicationUpdateParameters(Model):
'reply_urls': {'key': 'replyUrls', 'type': '[str]'},
'key_credentials': {'key': 'keyCredentials', 'type': '[KeyCredential]'},
'password_credentials': {'key': 'passwordCredentials', 'type': '[PasswordCredential]'},
'oauth2_allow_implicit_flow': {'key': 'oauth2AllowImplicitFlow', 'type': 'bool'},
}

def __init__(self, available_to_other_tenants=None, display_name=None, homepage=None, identifier_uris=None, reply_urls=None, key_credentials=None, password_credentials=None):
def __init__(self, available_to_other_tenants=None, display_name=None, homepage=None, identifier_uris=None, reply_urls=None, key_credentials=None, password_credentials=None, oauth2_allow_implicit_flow=None):
self.available_to_other_tenants = available_to_other_tenants
self.display_name = display_name
self.homepage = homepage
self.identifier_uris = identifier_uris
self.reply_urls = reply_urls
self.key_credentials = key_credentials
self.password_credentials = password_credentials
self.oauth2_allow_implicit_flow = oauth2_allow_implicit_flow
Empty file.
Empty file.
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/graph_error.py
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 enum import Enum


class UserType(Enum):

member = "Member"
guest = "Guest"
Empty file.
Empty file.
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/key_credential.py
100755 → 100644
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/key_credential_paged.py
100755 → 100644
Empty file.
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/password_credential.py
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/password_profile.py
100755 → 100644
Empty file.
Empty file modified azure-graphrbac/azure/graphrbac/models/service_principal.py
100755 → 100644
Empty file.
Empty file.
Empty file.
34 changes: 34 additions & 0 deletions azure-graphrbac/azure/graphrbac/models/sign_in_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 SignInName(Model):
"""Contains information about a sign-in name of a local account user in an
Azure Active Directory B2C tenant.
:param type: A string value that can be used to classify user sign-in
types in your directory, such as 'emailAddress' or 'userName'.
:type type: str
:param value: The sign-in used by the local account. Must be unique across
the company/tenant. For example, 'johnc@example.com'.
:type value: str
"""

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, type=None, value=None):
self.type = type
self.value = value
Empty file modified azure-graphrbac/azure/graphrbac/models/str_paged.py
100755 → 100644
Empty file.
81 changes: 52 additions & 29 deletions azure-graphrbac/azure/graphrbac/models/user.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,73 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .user_base import UserBase


class User(Model):
class User(UserBase):
"""Active Directory user information.
:param object_id: The object ID.
:type object_id: str
:param object_type: The object type.
:type object_type: str
:param user_principal_name: The principal name of the user.
:type user_principal_name: str
:param display_name: The display name of the user.
:type display_name: str
:param sign_in_name: The sign-in name of the user.
:type sign_in_name: str
:param mail: The primary email address of the user.
:type mail: str
:param mail_nickname: The mail alias for the user.
:type mail_nickname: str
:param immutable_id: This must be specified if you are using a federated
domain for the user's userPrincipalName (UPN) property when creating a new
user account. It is used to associate an on-premises Active Directory user
account with their Azure AD user object.
:type immutable_id: str
:param 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".
:type usage_location: str
:param given_name: The given name for the user.
:type given_name: str
:param surname: The user's surname (family name or last name).
:type surname: str
:param user_type: A string value that can be used to classify user types
in your directory, such as 'Member' and 'Guest'. Possible values include:
'Member', 'Guest'
:type user_type: str or :class:`UserType
<azure.graphrbac.models.UserType>`
:param account_enabled: Whether the account is enabled.
:type account_enabled: bool
:param display_name: The display name of the user.
:type display_name: str
:param user_principal_name: The principal name of the user.
:type user_principal_name: str
:param mail_nickname: The mail alias for the user.
:type mail_nickname: str
:param mail: The primary email address of the user.
:type mail: str
:param object_id: The object ID.
:type object_id: str
:param object_type: The object type.
:type object_type: str
:param sign_in_names: The sign-in names of the user.
:type sign_in_names: list of :class:`SignInName
<azure.graphrbac.models.SignInName>`
"""

_attribute_map = {
'object_id': {'key': 'objectId', 'type': 'str'},
'object_type': {'key': 'objectType', 'type': 'str'},
'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'},
'immutable_id': {'key': 'immutableId', 'type': 'str'},
'usage_location': {'key': 'usageLocation', 'type': 'str'},
'given_name': {'key': 'givenName', 'type': 'str'},
'surname': {'key': 'surname', 'type': 'str'},
'user_type': {'key': 'userType', 'type': 'str'},
'account_enabled': {'key': 'accountEnabled', 'type': 'bool'},
'display_name': {'key': 'displayName', 'type': 'str'},
'sign_in_name': {'key': 'signInName', 'type': 'str'},
'mail': {'key': 'mail', 'type': 'str'},
'user_principal_name': {'key': 'userPrincipalName', 'type': 'str'},
'mail_nickname': {'key': 'mailNickname', 'type': 'str'},
'usage_location': {'key': 'usageLocation', 'type': 'str'},
'mail': {'key': 'mail', 'type': 'str'},
'object_id': {'key': 'objectId', 'type': 'str'},
'object_type': {'key': 'objectType', 'type': 'str'},
'sign_in_names': {'key': 'signInNames', 'type': '[SignInName]'},
}

def __init__(self, object_id=None, object_type=None, user_principal_name=None, display_name=None, sign_in_name=None, mail=None, mail_nickname=None, usage_location=None):
self.object_id = object_id
self.object_type = object_type
self.user_principal_name = user_principal_name
def __init__(self, immutable_id=None, usage_location=None, given_name=None, surname=None, user_type=None, account_enabled=None, display_name=None, user_principal_name=None, mail_nickname=None, mail=None, object_id=None, object_type=None, sign_in_names=None):
super(User, self).__init__(immutable_id=immutable_id, usage_location=usage_location, given_name=given_name, surname=surname, user_type=user_type)
self.account_enabled = account_enabled
self.display_name = display_name
self.sign_in_name = sign_in_name
self.mail = mail
self.user_principal_name = user_principal_name
self.mail_nickname = mail_nickname
self.usage_location = usage_location
self.mail = mail
self.object_id = object_id
self.object_type = object_type
self.sign_in_names = sign_in_names
52 changes: 52 additions & 0 deletions azure-graphrbac/azure/graphrbac/models/user_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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 UserBase(Model):
"""UserBase.
:param immutable_id: This must be specified if you are using a federated
domain for the user's userPrincipalName (UPN) property when creating a new
user account. It is used to associate an on-premises Active Directory user
account with their Azure AD user object.
:type immutable_id: str
:param 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".
:type usage_location: str
:param given_name: The given name for the user.
:type given_name: str
:param surname: The user's surname (family name or last name).
:type surname: str
:param user_type: A string value that can be used to classify user types
in your directory, such as 'Member' and 'Guest'. Possible values include:
'Member', 'Guest'
:type user_type: str or :class:`UserType
<azure.graphrbac.models.UserType>`
"""

_attribute_map = {
'immutable_id': {'key': 'immutableId', 'type': 'str'},
'usage_location': {'key': 'usageLocation', 'type': 'str'},
'given_name': {'key': 'givenName', 'type': 'str'},
'surname': {'key': 'surname', 'type': 'str'},
'user_type': {'key': 'userType', 'type': 'str'},
}

def __init__(self, immutable_id=None, usage_location=None, given_name=None, surname=None, user_type=None):
self.immutable_id = immutable_id
self.usage_location = usage_location
self.given_name = given_name
self.surname = surname
self.user_type = user_type
Loading

0 comments on commit 5777be0

Please sign in to comment.