Referencing latest Graph.RBAC spec (1983050)

This commit is contained in:
Hovsep 2014-07-25 14:06:12 -07:00
Родитель 96b8d38972
Коммит 08b75b3c8e
2 изменённых файлов: 146 добавлений и 2 удалений

Просмотреть файл

@ -237,7 +237,7 @@ var GroupOperations = ( /** @lends GroupOperations */ function() {
// Tracing
// Construct URL
var url2 = '/' + this.client.tenantID.trim() + '/groups/' + objectId.trim() + '/$links/members?';
var url2 = '/' + this.client.tenantID.trim() + '/groups/' + objectId.trim() + '/members?';
url2 = url2 + 'api-version=1.42-previewInternal';
var baseUrl = this.client.baseUri;
// Trim '/' character from the end of baseUrl and beginning of url.
@ -332,6 +332,144 @@ var GroupOperations = ( /** @lends GroupOperations */ function() {
}
}
}
var odatanextLinkValue = responseDoc['odata.nextLink'];
if (odatanextLinkValue) {
var odatanextLinkInstance = odatanextLinkValue;
result.nextLink = odatanextLinkInstance;
}
}
result.statusCode = statusCode;
result.requestId = response.headers['x-ms-request-id'];
return callback(null, result);
});
};
/**
* Gets next set of members of a group.
*
* @param {string} nextLink NextLink from the previous successful call to
* GetGroupMembers or GetGroupMembersNext.
*
* @param {function} callback
*
* @returns {Stream} The response stream.
*/
GroupOperations.prototype.getGroupMembersNext = function(nextLink, callback) {
if (callback === null || callback === undefined) {
throw new Error('callback cannot be null.');
}
// Validate
if (nextLink === null || nextLink === undefined) {
return callback(new Error('nextLink cannot be null.'));
}
// Tracing
// Construct URL
var url2 = '/' + this.client.tenantID.trim() + '/' + nextLink.trim();
url2 = url2 + '&api-version=1.42-previewInternal';
var baseUrl = this.client.baseUri;
// Trim '/' character from the end of baseUrl and beginning of url.
if (baseUrl[baseUrl.length - 1] === '/') {
baseUrl = baseUrl.substring(0, (baseUrl.length - 1) + 0);
}
if (url2[0] === '/') {
url2 = url2.substring(1);
}
url2 = baseUrl + '/' + url2;
url2 = url2.replace(' ', '%20');
// Create HTTP transport objects
var httpRequest = new WebResource();
httpRequest.method = 'GET';
httpRequest.headers = {};
httpRequest.url = url2;
// Set Headers
httpRequest.headers['Content-Type'] = 'application/json';
// Send Request
return this.client.pipeline(httpRequest, function (err, response, body) {
if (err) {
return callback(err);
}
var statusCode = response.statusCode;
if (statusCode !== 200) {
var error = new Error(body);
error.statusCode = response.statusCode;
return callback(error);
}
// Create Result
var result = null;
// Deserialize Response
var responseContent = body;
result = { aADObject: [] };
var responseDoc = null;
if (responseContent) {
responseDoc = JSON.parse(responseContent);
}
if (responseDoc) {
var valueArray = responseDoc['value'];
if (valueArray) {
for (var loweredIndex1 = 0; loweredIndex1 < valueArray.length; loweredIndex1 = loweredIndex1 + 1) {
var valueValue = valueArray[loweredIndex1];
var aADObjectInstance = {};
result.aADObject.push(aADObjectInstance);
var objectIdValue = valueValue['objectId'];
if (objectIdValue) {
var objectIdInstance = objectIdValue;
aADObjectInstance.objectId = objectIdInstance;
}
var objectTypeValue = valueValue['objectType'];
if (objectTypeValue) {
var objectTypeInstance = objectTypeValue;
aADObjectInstance.objectType = objectTypeInstance;
}
var displayNameValue = valueValue['displayName'];
if (displayNameValue) {
var displayNameInstance = displayNameValue;
aADObjectInstance.displayName = displayNameInstance;
}
var userPrincipalNameValue = valueValue['userPrincipalName'];
if (userPrincipalNameValue) {
var userPrincipalNameInstance = userPrincipalNameValue;
aADObjectInstance.userPrincipalName = userPrincipalNameInstance;
}
var mailValue = valueValue['mail'];
if (mailValue) {
var mailInstance = mailValue;
aADObjectInstance.mail = mailInstance;
}
var mailEnabledValue = valueValue['mailEnabled'];
if (mailEnabledValue) {
var mailEnabledInstance = mailEnabledValue;
aADObjectInstance.mailEnabled = mailEnabledInstance;
}
var securityEnabledValue = valueValue['securityEnabled'];
if (securityEnabledValue) {
var securityEnabledInstance = securityEnabledValue;
aADObjectInstance.securityEnabled = securityEnabledInstance;
}
}
}
var odatanextLinkValue = responseDoc['odata.nextLink'];
if (odatanextLinkValue) {
var odatanextLinkInstance = odatanextLinkValue;
result.nextLink = odatanextLinkInstance;
}
}
result.statusCode = statusCode;
@ -839,6 +977,12 @@ var ObjectOperations = ( /** @lends ObjectOperations */ function() {
}
}
}
var odatanextLinkValue = responseDoc['odata.nextLink'];
if (odatanextLinkValue) {
var odatanextLinkInstance = odatanextLinkValue;
result.nextLink = odatanextLinkInstance;
}
}
result.statusCode = statusCode;

Просмотреть файл

@ -17,5 +17,5 @@
<package id="Microsoft.WindowsAzure.Management.Monitoring2.Specification" version="1.0.5275.27153-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
<package id="Microsoft.Azure.Management.WebSites.Specification" version="2.0.5282.18047-prerelease" targetFramework="portable-net45+sl50+wp80+win" />
<package id="Microsoft.Azure.Management.Authorization.Specification" version="1.0.5317.20881-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
<package id="Microsoft.Azure.Graph.RBAC.Specification" version="1.0.5317.20759-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
<package id="Microsoft.Azure.Graph.RBAC.Specification" version="1.0.5319.23231-prerelease" targetFramework="portable-net45+sl50+win+wp80" />
</packages>