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
2 changes: 2 additions & 0 deletions azure-graphrbac/azure/graphrbac/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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
Expand Down Expand Up @@ -60,6 +61,7 @@
'PasswordCredential',
'ResourceAccess',
'RequiredResourceAccess',
'AppRole',
'ApplicationCreateParameters',
'ApplicationUpdateParameters',
'Application',
Expand Down
67 changes: 67 additions & 0 deletions azure-graphrbac/azure/graphrbac/models/app_role.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# 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 AppRole(Model):
"""Represents an application role that may be requested by a client
application calling another application or that may be used to assign an
application to users or groups in a specified application role. The
appRoles property of the servicePrincipal entity and of the application
entity is a collection of appRole.

:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param allowed_member_types: Specifies whether this app role definition
can be assigned to users and groups by setting to "User", or to other
applications by setting to "Application", or to both.
:type allowed_member_types: list[str]
:param description: Permission help text that appears in the admin app
assignment and consent experiences.
:type description: str
:param display_name: Display name for the permission that appears in the
admin consent and app assignment experiences. For example, "Read Only" or
"Admin".
:type display_name: str
:param id: Unique role identifier inside the appRoles collection, such as
"c20e145e-5459-4a6c-a074-b942bbd4cfe1".
:type id: str
:param is_enabled: When creating or updating a role definition, this must
be set to true (which is the default). To delete a role, this must first
be set to false.
:type is_enabled: bool
:param value: Specifies the value of the roles claim that the application
should expect in the authentication and access tokens, such as "ReadOnly"
or "Admin".
:type value: str
"""

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'allowed_member_types': {'key': 'allowedMemberTypes', 'type': '[str]'},
'description': {'key': 'description', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, additional_properties=None, allowed_member_types=None, description=None, display_name=None, id=None, is_enabled=None, value=None):
super(AppRole, self).__init__()
self.additional_properties = additional_properties
self.allowed_member_types = allowed_member_types
self.description = description
self.display_name = display_name
self.id = id
self.is_enabled = is_enabled
self.value = value
7 changes: 6 additions & 1 deletion azure-graphrbac/azure/graphrbac/models/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class Application(DirectoryObject):
:type app_id: str
:param app_permissions: The application permissions.
:type app_permissions: list[str]
:param app_roles: The collection of application roles that an application
may declare.
:type app_roles: list[~azure.graphrbac.models.AppRole]
:param available_to_other_tenants: Whether the application is be available
to other tenants.
:type available_to_other_tenants: bool
Expand Down Expand Up @@ -61,6 +64,7 @@ class Application(DirectoryObject):
'object_type': {'key': 'objectType', 'type': 'str'},
'app_id': {'key': 'appId', 'type': 'str'},
'app_permissions': {'key': 'appPermissions', 'type': '[str]'},
'app_roles': {'key': 'appRoles', 'type': '[AppRole]'},
'available_to_other_tenants': {'key': 'availableToOtherTenants', 'type': 'bool'},
'display_name': {'key': 'displayName', 'type': 'str'},
'identifier_uris': {'key': 'identifierUris', 'type': '[str]'},
Expand All @@ -69,10 +73,11 @@ class Application(DirectoryObject):
'oauth2_allow_implicit_flow': {'key': 'oauth2AllowImplicitFlow', 'type': 'bool'},
}

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):
def __init__(self, additional_properties=None, app_id=None, app_permissions=None, app_roles=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.app_roles = app_roles
self.available_to_other_tenants = available_to_other_tenants
self.display_name = display_name
self.identifier_uris = identifier_uris
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class ApplicationCreateParameters(Model):
:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param app_roles: The collection of application roles that an application
may declare.
:type app_roles: list[~azure.graphrbac.models.AppRole]
:param available_to_other_tenants: Whether the application is available to
other tenants.
:type available_to_other_tenants: bool
Expand Down Expand Up @@ -53,6 +56,7 @@ class ApplicationCreateParameters(Model):

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

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):
def __init__(self, available_to_other_tenants, display_name, identifier_uris, additional_properties=None, app_roles=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.app_roles = app_roles
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 @@ -18,6 +18,9 @@ class ApplicationUpdateParameters(Model):
:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param app_roles: The collection of application roles that an application
may declare.
:type app_roles: list[~azure.graphrbac.models.AppRole]
:param available_to_other_tenants: Whether the application is available to
other tenants
:type available_to_other_tenants: bool
Expand Down Expand Up @@ -47,6 +50,7 @@ class ApplicationUpdateParameters(Model):

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

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):
def __init__(self, additional_properties=None, app_roles=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.app_roles = app_roles
self.available_to_other_tenants = available_to_other_tenants
self.display_name = display_name
self.homepage = homepage
Expand Down