Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(

super(GraphRbacManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('graphrbacmanagementclient/{}'.format(VERSION))
self.add_user_agent('azure-graphrbac/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
Expand Down
6 changes: 6 additions & 0 deletions azure-graphrbac/azure/graphrbac/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
# --------------------------------------------------------------------------

from .graph_error import GraphError, GraphErrorException
from .directory_object import DirectoryObject
from .key_credential import KeyCredential
from .password_credential import PasswordCredential
from .resource_access import ResourceAccess
from .required_resource_access import RequiredResourceAccess
from .application_create_parameters import ApplicationCreateParameters
from .application_update_parameters import ApplicationUpdateParameters
from .application import Application
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
Expand All @@ -39,6 +41,7 @@
from .domain import Domain
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 @@ -52,13 +55,15 @@

__all__ = [
'GraphError', 'GraphErrorException',
'DirectoryObject',
'KeyCredential',
'PasswordCredential',
'ResourceAccess',
'RequiredResourceAccess',
'ApplicationCreateParameters',
'ApplicationUpdateParameters',
'Application',
'ApplicationAddOwnerParameters',
'KeyCredentialsUpdateParameters',
'PasswordCredentialsUpdateParameters',
'AADObject',
Expand All @@ -81,6 +86,7 @@
'Domain',
'AADObjectPaged',
'ApplicationPaged',
'DirectoryObjectPaged',
'KeyCredentialPaged',
'PasswordCredentialPaged',
'ADGroupPaged',
Expand Down
8 changes: 7 additions & 1 deletion azure-graphrbac/azure/graphrbac/models/aad_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class AADObject(Model):
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.
Expand Down Expand Up @@ -73,6 +76,7 @@ class AADObject(Model):
}

_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'},
Expand All @@ -93,7 +97,9 @@ class AADObject(Model):
'homepage': {'key': 'homepage', 'type': 'str'},
}

def __init__(self, object_id=None, object_type=None, display_name=None, user_principal_name=None, mail=None, mail_enabled=None, security_enabled=None, sign_in_name=None, service_principal_names=None, user_type=None):
def __init__(self, additional_properties=None, object_id=None, object_type=None, display_name=None, user_principal_name=None, mail=None, mail_enabled=None, security_enabled=None, sign_in_name=None, service_principal_names=None, user_type=None):
super(AADObject, self).__init__()
self.additional_properties = additional_properties
self.object_id = object_id
self.object_type = object_type
self.display_name = display_name
Expand Down
33 changes: 25 additions & 8 deletions azure-graphrbac/azure/graphrbac/models/ad_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,24 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .directory_object import DirectoryObject


class ADGroup(Model):
class ADGroup(DirectoryObject):
"""Active Directory group information.

:param object_id: The object ID.
:type object_id: str
:param object_type: The object type.
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]
:ivar object_id: The object ID.
:vartype object_id: str
:ivar deletion_timestamp: The time at which the directory object was
deleted.
:vartype deletion_timestamp: datetime
:param object_type: Constant filled by server.
:type object_type: str
:param display_name: The display name of the group.
:type display_name: str
Expand All @@ -27,17 +36,25 @@ class ADGroup(Model):
:type mail: str
"""

_validation = {
'object_id': {'readonly': True},
'deletion_timestamp': {'readonly': True},
'object_type': {'required': True},
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'object_id': {'key': 'objectId', 'type': 'str'},
'deletion_timestamp': {'key': 'deletionTimestamp', 'type': 'iso-8601'},
'object_type': {'key': 'objectType', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'security_enabled': {'key': 'securityEnabled', 'type': 'bool'},
'mail': {'key': 'mail', 'type': 'str'},
}

def __init__(self, object_id=None, object_type=None, display_name=None, security_enabled=None, mail=None):
self.object_id = object_id
self.object_type = object_type
def __init__(self, additional_properties=None, display_name=None, security_enabled=None, mail=None):
super(ADGroup, self).__init__(additional_properties=additional_properties)
self.display_name = display_name
self.security_enabled = security_enabled
self.mail = mail
self.object_type = 'Group'
33 changes: 25 additions & 8 deletions azure-graphrbac/azure/graphrbac/models/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,24 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .directory_object import DirectoryObject


class Application(Model):
class Application(DirectoryObject):
"""Active Directory application information.

:param object_id: The object ID.
:type object_id: str
:param object_type: The object type.
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]
:ivar object_id: The object ID.
:vartype object_id: str
:ivar deletion_timestamp: The time at which the directory object was
deleted.
:vartype deletion_timestamp: datetime
:param object_type: Constant filled by server.
:type object_type: str
:param app_id: The application ID.
:type app_id: str
Expand All @@ -39,8 +48,16 @@ class Application(Model):
:type oauth2_allow_implicit_flow: bool
"""

_validation = {
'object_id': {'readonly': True},
'deletion_timestamp': {'readonly': True},
'object_type': {'required': True},
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'object_id': {'key': 'objectId', 'type': 'str'},
'deletion_timestamp': {'key': 'deletionTimestamp', 'type': 'iso-8601'},
'object_type': {'key': 'objectType', 'type': 'str'},
'app_id': {'key': 'appId', 'type': 'str'},
'app_permissions': {'key': 'appPermissions', 'type': '[str]'},
Expand All @@ -52,9 +69,8 @@ class Application(Model):
'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, oauth2_allow_implicit_flow=None):
self.object_id = object_id
self.object_type = object_type
def __init__(self, additional_properties=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):
super(Application, self).__init__(additional_properties=additional_properties)
self.app_id = app_id
self.app_permissions = app_permissions
self.available_to_other_tenants = available_to_other_tenants
Expand All @@ -63,3 +79,4 @@ def __init__(self, object_id=None, object_type=None, app_id=None, app_permission
self.reply_urls = reply_urls
self.homepage = homepage
self.oauth2_allow_implicit_flow = oauth2_allow_implicit_flow
self.object_type = 'Application'
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 ApplicationAddOwnerParameters(Model):
"""Request parameters for adding a owner to an application.

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param url: A owner object URL, such as
"https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd",
where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and
"f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user,
application, servicePrincipal, group) to be added.
:type url: str
"""

_validation = {
'url': {'required': True},
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'url': {'key': 'url', 'type': 'str'},
}

def __init__(self, url, additional_properties=None):
super(ApplicationAddOwnerParameters, self).__init__()
self.additional_properties = additional_properties
self.url = url
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
class ApplicationCreateParameters(Model):
"""Request parameters for creating a new application.

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param available_to_other_tenants: Whether the application is available to
other tenants.
:type available_to_other_tenants: bool
Expand Down Expand Up @@ -49,6 +52,7 @@ class ApplicationCreateParameters(Model):
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'available_to_other_tenants': {'key': 'availableToOtherTenants', 'type': 'bool'},
'display_name': {'key': 'displayName', 'type': 'str'},
'homepage': {'key': 'homepage', 'type': 'str'},
Expand All @@ -60,7 +64,9 @@ class ApplicationCreateParameters(Model):
'required_resource_access': {'key': 'requiredResourceAccess', 'type': '[RequiredResourceAccess]'},
}

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, required_resource_access=None):
def __init__(self, available_to_other_tenants, display_name, identifier_uris, additional_properties=None, homepage=None, reply_urls=None, key_credentials=None, password_credentials=None, oauth2_allow_implicit_flow=None, required_resource_access=None):
super(ApplicationCreateParameters, self).__init__()
self.additional_properties = additional_properties
self.available_to_other_tenants = available_to_other_tenants
self.display_name = display_name
self.homepage = homepage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
class ApplicationUpdateParameters(Model):
"""Request parameters for updating an existing application.

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param available_to_other_tenants: Whether the application is available to
other tenants
:type available_to_other_tenants: bool
Expand Down Expand Up @@ -43,6 +46,7 @@ class ApplicationUpdateParameters(Model):
"""

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'available_to_other_tenants': {'key': 'availableToOtherTenants', 'type': 'bool'},
'display_name': {'key': 'displayName', 'type': 'str'},
'homepage': {'key': 'homepage', 'type': 'str'},
Expand All @@ -54,7 +58,9 @@ class ApplicationUpdateParameters(Model):
'required_resource_access': {'key': 'requiredResourceAccess', 'type': '[RequiredResourceAccess]'},
}

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, required_resource_access=None):
def __init__(self, additional_properties=None, 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, required_resource_access=None):
super(ApplicationUpdateParameters, self).__init__()
self.additional_properties = additional_properties
self.available_to_other_tenants = available_to_other_tenants
self.display_name = display_name
self.homepage = homepage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
class CheckGroupMembershipParameters(Model):
"""Request parameters for IsMemberOf API call.

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param group_id: The object ID of the group to check.
:type group_id: str
:param member_id: The object ID of the contact, group, user, or service
Expand All @@ -28,10 +31,13 @@ class CheckGroupMembershipParameters(Model):
}

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'group_id': {'key': 'groupId', 'type': 'str'},
'member_id': {'key': 'memberId', 'type': 'str'},
}

def __init__(self, group_id, member_id):
def __init__(self, group_id, member_id, additional_properties=None):
super(CheckGroupMembershipParameters, self).__init__()
self.additional_properties = additional_properties
self.group_id = group_id
self.member_id = member_id
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@
class CheckGroupMembershipResult(Model):
"""Server response for IsMemberOf API call.

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param value: True if the specified user, group, contact, or service
principal has either direct or transitive membership in the specified
group; otherwise, false.
:type value: bool
"""

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'value': {'key': 'value', 'type': 'bool'},
}

def __init__(self, value=None):
def __init__(self, additional_properties=None, value=None):
super(CheckGroupMembershipResult, self).__init__()
self.additional_properties = additional_properties
self.value = value
Loading