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

Commit

Permalink
regenerated graph rbac with latest spec changes and new version of co…
Browse files Browse the repository at this point in the history
…degen
  • Loading branch information
amarzavery committed Jun 17, 2016
1 parent b31f0fb commit 4b2a2cd
Show file tree
Hide file tree
Showing 43 changed files with 1,010 additions and 686 deletions.
7 changes: 4 additions & 3 deletions gulpfile.js
Expand Up @@ -59,8 +59,9 @@ var mappings = {
},
'graph': {
'dir': 'graphManagement/lib',
'source': 'arm-graphrbac/1.6-internal/swagger/graphrbac.json',
'ft': 1
'source': 'arm-graphrbac/compositeGraphRbacManagementClient.json',
'ft': 1,
'modeler': 'CompositeSwagger'
},
'intune': {
'dir': 'intune/lib',
Expand Down Expand Up @@ -130,7 +131,7 @@ var mappings = {
}
};

var defaultAutoRestVersion = '0.17.0-Nightly20160606';
var defaultAutoRestVersion = '0.17.0-Nightly20160613';
var usingAutoRestVersion;
var specRoot = args['spec-root'] || "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master";
var project = args['project'];
Expand Down
29 changes: 24 additions & 5 deletions lib/services/graphManagement/README.md
Expand Up @@ -20,12 +20,31 @@ npm install azure-graph
// Interactive Login
// It provides a url and code that needs to be copied and pasted in a browser and authenticated over there. If successful,
// the user will get a DeviceTokenCredentials object.
msRestAzure.interactiveLogin(function(err, credentials) {
msRestAzure.interactiveLogin(function(err, credentials, subscriptions) {
var client = new graphRbacManagementClient(credentials, 'your-tenant-id');
client.userOperations.list(function(err, result, request, response) {
if (err) console.log(err);
console.log(result);
});
var userParams = {
accountEnabled: true,
userPrincipalName: OfficialStark@GOT.com,
displayName: 'Jon Snow',
mailNickname: 'OfficialStark',
passwordProfile: {
password: 'WinterisComing!',
forceChangePasswordNextLogin: false
}
};
client.users.create(userParams, function (err, user, request, response) {
if (err) return console.log(err);
console.log(user);
var userObjectId = user.objectId;
client.users.list(function(err, result, request, response) {
if (err) return console.log(err);
console.log(result);
});
client.users.delete(userObjectId, function (err, result, request, response) {
if (err) return console.log(err);
console.log(result);
});
})
});
```

Expand Down
16 changes: 6 additions & 10 deletions lib/services/graphManagement/lib/graphRbacManagementClient.d.ts
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down Expand Up @@ -32,8 +32,6 @@ declare class GraphRbacManagementClient {
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
Expand All @@ -45,8 +43,6 @@ declare class GraphRbacManagementClient {

credentials: ServiceClientCredentials;

apiVersion: string;

tenantID: string;

acceptLanguage: string;
Expand All @@ -56,11 +52,11 @@ declare class GraphRbacManagementClient {
generateClientRequestId: boolean;

// Operation groups
applicationOperations: operations.ApplicationOperations;
objectOperations: operations.ObjectOperations;
groupOperations: operations.GroupOperations;
servicePrincipalOperations: operations.ServicePrincipalOperations;
userOperations: operations.UserOperations;
applications: operations.Applications;
groups: operations.Groups;
servicePrincipals: operations.ServicePrincipals;
users: operations.Users;
objects: operations.Objects;
}

export = GraphRbacManagementClient;
18 changes: 6 additions & 12 deletions lib/services/graphManagement/lib/graphRbacManagementClient.js
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down Expand Up @@ -42,8 +42,6 @@ var operations = require('./operations');
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.apiVersion] - Client Api Version.
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
*
* @param {number} [options.longRunningOperationRetryTimeout] - Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
Expand All @@ -52,7 +50,6 @@ var operations = require('./operations');
*
*/
function GraphRbacManagementClient(credentials, tenantID, baseUri, options) {
this.apiVersion = '1.6-internal';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand All @@ -73,9 +70,6 @@ function GraphRbacManagementClient(credentials, tenantID, baseUri, options) {
this.credentials = credentials;
this.tenantID = tenantID;

if(options.apiVersion !== null && options.apiVersion !== undefined) {
this.apiVersion = options.apiVersion;
}
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
Expand All @@ -85,11 +79,11 @@ function GraphRbacManagementClient(credentials, tenantID, baseUri, options) {
if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) {
this.generateClientRequestId = options.generateClientRequestId;
}
this.applicationOperations = new operations.ApplicationOperations(this);
this.objectOperations = new operations.ObjectOperations(this);
this.groupOperations = new operations.GroupOperations(this);
this.servicePrincipalOperations = new operations.ServicePrincipalOperations(this);
this.userOperations = new operations.UserOperations(this);
this.applications = new operations.Applications(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.models = models;
msRest.addSerializationMixin(this);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/services/graphManagement/lib/models/aADObject.js
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/services/graphManagement/lib/models/aDGroup.js
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down
11 changes: 10 additions & 1 deletion lib/services/graphManagement/lib/models/application.js
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down Expand Up @@ -35,6 +35,8 @@ var util = require('util');
*
* @member {array} [replyUrls] Gets or sets the application reply Urls
*
* @member {string} [homepage] Application homepage
*
*/
function Application() {
}
Expand Down Expand Up @@ -129,6 +131,13 @@ Application.prototype.mapper = function () {
}
}
}
},
homepage: {
required: false,
serializedName: 'homepage',
type: {
name: 'String'
}
}
}
}
Expand Down
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down
131 changes: 131 additions & 0 deletions lib/services/graphManagement/lib/models/applicationUpdateParameters.js
@@ -0,0 +1,131 @@
/*
* 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';

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

var util = require('util');

/**
* @class
* Initializes a new instance of the ApplicationUpdateParameters class.
* @constructor
* Request parameters for updating an existing application
* @member {string} [displayName] Application display name
*
* @member {string} [homepage] Application homepage
*
* @member {array} [identifierUris] Application Uris
*
* @member {array} [replyUrls] Application reply Urls
*
* @member {array} [keyCredentials] Gets or sets the list of KeyCredential
* objects
*
* @member {array} [passwordCredentials] Gets or sets the list of
* PasswordCredential objects
*
*/
function ApplicationUpdateParameters() {
}

/**
* Defines the metadata of ApplicationUpdateParameters
*
* @returns {object} metadata of ApplicationUpdateParameters
*
*/
ApplicationUpdateParameters.prototype.mapper = function () {
return {
required: false,
serializedName: 'ApplicationUpdateParameters',
type: {
name: 'Composite',
className: 'ApplicationUpdateParameters',
modelProperties: {
displayName: {
required: false,
serializedName: 'displayName',
type: {
name: 'String'
}
},
homepage: {
required: false,
serializedName: 'homepage',
type: {
name: 'String'
}
},
identifierUris: {
required: false,
serializedName: 'identifierUris',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
replyUrls: {
required: false,
serializedName: 'replyUrls',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
},
keyCredentials: {
required: false,
serializedName: 'keyCredentials',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'KeyCredentialElementType',
type: {
name: 'Composite',
className: 'KeyCredential'
}
}
}
},
passwordCredentials: {
required: false,
serializedName: 'passwordCredentials',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'PasswordCredentialElementType',
type: {
name: 'Composite',
className: 'PasswordCredential'
}
}
}
}
}
}
};
};

module.exports = ApplicationUpdateParameters;
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.15.0.0
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
Expand Down

0 comments on commit 4b2a2cd

Please sign in to comment.