Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3789 from Azure/restapi_auto_graphrbac/data-plane
Browse files Browse the repository at this point in the history
[AutoPR] graphrbac/data-plane
  • Loading branch information
Dan Schulte authored Oct 11, 2018
2 parents f7d2859 + d3f99b3 commit 17f3a0d
Show file tree
Hide file tree
Showing 26 changed files with 5,103 additions and 603 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ export default class GraphRbacManagementClient extends AzureServiceClient {
generateClientRequestId: boolean;

// Operation groups
objects: operations.Objects;
signedInUser: operations.SignedInUser;
applications: operations.Applications;
deletedApplications: operations.DeletedApplications;
groups: operations.Groups;
servicePrincipals: operations.ServicePrincipals;
users: operations.Users;
objects: operations.Objects;
domains: operations.Domains;
oAuth2: operations.OAuth2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ class GraphRbacManagementClient extends ServiceClient {
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.objects = new operations.Objects(this);
this.signedInUser = new operations.SignedInUser(this);
this.applications = new operations.Applications(this);
this.deletedApplications = new operations.DeletedApplications(this);
this.groups = new operations.Groups(this);
this.servicePrincipals = new operations.ServicePrincipals(this);
this.users = new operations.Users(this);
this.objects = new operations.Objects(this);
this.domains = new operations.Domains(this);
this.oAuth2 = new operations.OAuth2(this);
this.models = models;
Expand Down
18 changes: 18 additions & 0 deletions lib/services/graphManagement/lib/models/aDGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class ADGroup extends models['DirectoryObject'] {
/**
* Create a ADGroup.
* @member {string} [displayName] The display name of the group.
* @member {boolean} [mailEnabled] Whether the group is mail-enabled. Must be
* false. This is because only pure security groups can be created using the
* Graph API.
* @member {string} [mailNickname] The mail alias for the group.
* @member {boolean} [securityEnabled] Whether the group is security-enable.
* @member {string} [mail] The primary email address of the group.
*/
Expand Down Expand Up @@ -78,6 +82,20 @@ class ADGroup extends models['DirectoryObject'] {
name: 'String'
}
},
mailEnabled: {
required: false,
serializedName: 'mailEnabled',
type: {
name: 'Boolean'
}
},
mailNickname: {
required: false,
serializedName: 'mailNickname',
type: {
name: 'String'
}
},
securityEnabled: {
required: false,
serializedName: 'securityEnabled',
Expand Down
68 changes: 68 additions & 0 deletions lib/services/graphManagement/lib/models/addOwnerParameters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* 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.
*/

'use strict';

/**
* Request parameters for adding a owner to an application.
*
*/
class AddOwnerParameters {
/**
* Create a AddOwnerParameters.
* @member {string} 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.
*/
constructor() {
}

/**
* Defines the metadata of AddOwnerParameters
*
* @returns {object} metadata of AddOwnerParameters
*
*/
mapper() {
return {
required: false,
serializedName: 'AddOwnerParameters',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'AddOwnerParameters',
modelProperties: {
url: {
required: true,
serializedName: 'url',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AddOwnerParameters;
108 changes: 108 additions & 0 deletions lib/services/graphManagement/lib/models/appRole.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* 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.
*/

'use strict';

/**
* Class representing a AppRole.
*/
class AppRole {
/**
* Create a AppRole.
* @member {string} [id] Unique role identifier inside the appRoles
* collection.
* @member {array} [allowedMemberTypes] Specifies whether this app role
* definition can be assigned to users and groups by setting to 'User', or to
* other applications (that are accessing this application in daemon service
* scenarios) by setting to 'Application', or to both.
* @member {string} [description] Permission help text that appears in the
* admin app assignment and consent experiences.
* @member {string} [displayName] Display name for the permission that
* appears in the admin consent and app assignment experiences.
* @member {boolean} [isEnabled] 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. At that point, in a subsequent call, this role
* may be removed.
* @member {string} [value] Specifies the value of the roles claim that the
* application should expect in the authentication and access tokens.
*/
constructor() {
}

/**
* Defines the metadata of AppRole
*
* @returns {object} metadata of AppRole
*
*/
mapper() {
return {
required: false,
serializedName: 'AppRole',
type: {
name: 'Composite',
className: 'AppRole',
modelProperties: {
id: {
required: false,
serializedName: 'id',
type: {
name: 'String'
}
},
allowedMemberTypes: {
required: false,
serializedName: 'allowedMemberTypes',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
description: {
required: false,
serializedName: 'description',
type: {
name: 'String'
}
},
displayName: {
required: false,
serializedName: 'displayName',
type: {
name: 'String'
}
},
isEnabled: {
required: false,
serializedName: 'isEnabled',
type: {
name: 'Boolean'
}
},
value: {
required: false,
serializedName: 'value',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = AppRole;
18 changes: 18 additions & 0 deletions lib/services/graphManagement/lib/models/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class Application extends models['DirectoryObject'] {
/**
* Create a Application.
* @member {string} [appId] The application ID.
* @member {array} [appRoles] The collection of application roles that an
* application may declare. These roles can be assigned to users, groups or
* service principals.
* @member {array} [appPermissions] The application permissions.
* @member {boolean} [availableToOtherTenants] Whether the application is be
* available to other tenants.
Expand Down Expand Up @@ -86,6 +89,21 @@ class Application extends models['DirectoryObject'] {
name: 'String'
}
},
appRoles: {
required: false,
serializedName: 'appRoles',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AppRoleElementType',
type: {
name: 'Composite',
className: 'AppRole'
}
}
}
},
appPermissions: {
required: false,
serializedName: 'appPermissions',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,18 @@

'use strict';

const models = require('./index');

/**
* Request parameters for adding a owner to an application.
*
* Class representing a ApplicationAddOwnerParameters.
* @extends models['AddOwnerParameters']
*/
class ApplicationAddOwnerParameters {
class ApplicationAddOwnerParameters extends models['AddOwnerParameters'] {
/**
* Create a ApplicationAddOwnerParameters.
* @member {string} 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.
*/
constructor() {
super();
}

/**
Expand All @@ -38,18 +36,6 @@ class ApplicationAddOwnerParameters {
serializedName: 'ApplicationAddOwnerParameters',
type: {
name: 'Composite',
additionalProperties: {
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'ObjectElementType',
type: {
name: 'Object'
}
}
}
},
className: 'ApplicationAddOwnerParameters',
modelProperties: {
url: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
class ApplicationCreateParameters {
/**
* Create a ApplicationCreateParameters.
* @member {array} [appRoles] The collection of application roles that an
* application may declare. These roles can be assigned to users, groups or
* service principals.
* @member {boolean} availableToOtherTenants Whether the application is
* available to other tenants.
* @member {string} displayName The display name of the application.
Expand Down Expand Up @@ -64,6 +67,21 @@ class ApplicationCreateParameters {
},
className: 'ApplicationCreateParameters',
modelProperties: {
appRoles: {
required: false,
serializedName: 'appRoles',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AppRoleElementType',
type: {
name: 'Composite',
className: 'AppRole'
}
}
}
},
availableToOtherTenants: {
required: true,
serializedName: 'availableToOtherTenants',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
class ApplicationUpdateParameters {
/**
* Create a ApplicationUpdateParameters.
* @member {array} [appRoles] The collection of application roles that an
* application may declare. These roles can be assigned to users, groups or
* service principals.
* @member {boolean} [availableToOtherTenants] Whether the application is
* available to other tenants
* @member {string} [displayName] The display name of the application.
Expand Down Expand Up @@ -64,6 +67,21 @@ class ApplicationUpdateParameters {
},
className: 'ApplicationUpdateParameters',
modelProperties: {
appRoles: {
required: false,
serializedName: 'appRoles',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AppRoleElementType',
type: {
name: 'Composite',
className: 'AppRole'
}
}
}
},
availableToOtherTenants: {
required: false,
serializedName: 'availableToOtherTenants',
Expand Down
Loading

0 comments on commit 17f3a0d

Please sign in to comment.