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 #3395 from Azure/restapi_auto_graphrbac/data-plane
Browse files Browse the repository at this point in the history
[AutoPR] graphrbac/data-plane
Dan Schulte authored Aug 27, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 0a6aef0 + 6fde877 commit f8b925b
Showing 20 changed files with 1,663 additions and 156 deletions.
42 changes: 21 additions & 21 deletions lib/services/graphManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MIT License (MIT)
Copyright (c) 2018 Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Original file line number Diff line number Diff line change
@@ -34,11 +34,11 @@ export default class GraphRbacManagementClient extends AzureServiceClient {
*
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
*
* @param {string} [options.acceptLanguage] - Gets or sets the preferred language for the response.
* @param {string} [options.acceptLanguage] - 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.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
*
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*
*/
constructor(credentials: ServiceClientCredentials, tenantID: string, baseUri?: string, options?: AzureServiceClientOptions);
@@ -62,6 +62,7 @@ export default class GraphRbacManagementClient extends AzureServiceClient {
servicePrincipals: operations.ServicePrincipals;
users: operations.Users;
domains: operations.Domains;
oAuth2: operations.OAuth2;
}

export { GraphRbacManagementClient, models as GraphRbacManagementModels };
7 changes: 4 additions & 3 deletions lib/services/graphManagement/lib/graphRbacManagementClient.js
Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@ class GraphRbacManagementClient extends ServiceClient {
* @param {object} [options.requestOptions] - Options for the underlying request object
* {@link https://github.com/request/request#requestoptions-callback Options doc}
* @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy
* @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.
* @param {boolean} [options.generateClientRequestId] - When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
* @param {string} [options.acceptLanguage] - The preferred language for the response.
* @param {number} [options.longRunningOperationRetryTimeout] - The retry timeout in seconds for Long Running Operations. Default value is 30.
* @param {boolean} [options.generateClientRequestId] - Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
*/
constructor(credentials, tenantID, baseUri, options) {
if (credentials === null || credentials === undefined) {
@@ -78,6 +78,7 @@ class GraphRbacManagementClient extends ServiceClient {
this.servicePrincipals = new operations.ServicePrincipals(this);
this.users = new operations.Users(this);
this.domains = new operations.Domains(this);
this.oAuth2 = new operations.OAuth2(this);
this.models = models;
msRest.addSerializationMixin(this);
}
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@

'use strict';

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

/**
* Request parameters for creating a new application.
*
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@

'use strict';

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

/**
* Request parameters for updating an existing application.
*
27 changes: 27 additions & 0 deletions lib/services/graphManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
@@ -748,6 +748,33 @@ export interface Domain {
[property: string]: any;
}

/**
* @class
* Initializes a new instance of the Permissions class.
* @constructor
* @member {string} [odatatype]
* Microsoft.DirectoryServices.OAuth2PermissionGrant
* @member {string} [clientId] The objectId of the Service Principal associated
* with the app
* @member {string} [consentType] Typically set to AllPrincipals
* @member {object} [principalId] Set to null if AllPrincipals is set
* @member {string} [resourceId] Service Principal Id of the resource you want
* to grant
* @member {string} [scope] Typically set to user_impersonation
* @member {string} [startTime] Start time for TTL
* @member {string} [expiryTime] Expiry time for TTL
*/
export interface Permissions {
odatatype?: string;
clientId?: string;
consentType?: string;
principalId?: any;
resourceId?: string;
scope?: string;
startTime?: string;
expiryTime?: string;
}


/**
* @class
1 change: 1 addition & 0 deletions lib/services/graphManagement/lib/models/index.js
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ exports.User = require('./user');
exports.UserGetMemberGroupsParameters = require('./userGetMemberGroupsParameters');
exports.GetObjectsParameters = require('./getObjectsParameters');
exports.Domain = require('./domain');
exports.Permissions = require('./permissions');
exports.GetObjectsResult = require('./getObjectsResult');
exports.ApplicationListResult = require('./applicationListResult');
exports.DirectoryObjectListResult = require('./directoryObjectListResult');
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@

'use strict';

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

/**
* Request parameters for a KeyCredentials update operation
*
110 changes: 110 additions & 0 deletions lib/services/graphManagement/lib/models/oAuth2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/*
* 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 OAuth2.
*/
class OAuth2 {
/**
* Create a OAuth2.
* @member {string} [odatatype]
* Microsoft.DirectoryServices.OAuth2PermissionGrant
* @member {string} [clientId] The objectId of the Service Principal
* associated with the app
* @member {string} [consentType] Typically set to AllPrincipals
* @member {object} [principalId] Set to null if AllPrincipals is set
* @member {string} [resourceId] Service Principal Id of the resource you
* want to grant
* @member {string} [scope] Typically set to user_impersonation
* @member {string} [startTime] Start time for TTL
* @member {string} [expiryTime] Expiry time for TTL
*/
constructor() {
}

/**
* Defines the metadata of OAuth2
*
* @returns {object} metadata of OAuth2
*
*/
mapper() {
return {
required: false,
serializedName: 'OAuth2',
type: {
name: 'Composite',
className: 'OAuth2',
modelProperties: {
odatatype: {
required: false,
serializedName: 'odata\\.type',
type: {
name: 'String'
}
},
clientId: {
required: false,
serializedName: 'clientId',
type: {
name: 'String'
}
},
consentType: {
required: false,
serializedName: 'consentType',
type: {
name: 'String'
}
},
principalId: {
required: false,
serializedName: 'principalId',
type: {
name: 'Object'
}
},
resourceId: {
required: false,
serializedName: 'resourceId',
type: {
name: 'String'
}
},
scope: {
required: false,
serializedName: 'scope',
type: {
name: 'String'
}
},
startTime: {
required: false,
serializedName: 'startTime',
type: {
name: 'String'
}
},
expiryTime: {
required: false,
serializedName: 'expiryTime',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = OAuth2;
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@

'use strict';

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

/**
* Request parameters for a PasswordCredentials update operation.
*
110 changes: 110 additions & 0 deletions lib/services/graphManagement/lib/models/permissions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/*
* 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 Permissions.
*/
class Permissions {
/**
* Create a Permissions.
* @member {string} [odatatype]
* Microsoft.DirectoryServices.OAuth2PermissionGrant
* @member {string} [clientId] The objectId of the Service Principal
* associated with the app
* @member {string} [consentType] Typically set to AllPrincipals
* @member {object} [principalId] Set to null if AllPrincipals is set
* @member {string} [resourceId] Service Principal Id of the resource you
* want to grant
* @member {string} [scope] Typically set to user_impersonation
* @member {string} [startTime] Start time for TTL
* @member {string} [expiryTime] Expiry time for TTL
*/
constructor() {
}

/**
* Defines the metadata of Permissions
*
* @returns {object} metadata of Permissions
*
*/
mapper() {
return {
required: false,
serializedName: 'Permissions',
type: {
name: 'Composite',
className: 'Permissions',
modelProperties: {
odatatype: {
required: false,
serializedName: 'odata\\.type',
type: {
name: 'String'
}
},
clientId: {
required: false,
serializedName: 'clientId',
type: {
name: 'String'
}
},
consentType: {
required: false,
serializedName: 'consentType',
type: {
name: 'String'
}
},
principalId: {
required: false,
serializedName: 'principalId',
type: {
name: 'Object'
}
},
resourceId: {
required: false,
serializedName: 'resourceId',
type: {
name: 'String'
}
},
scope: {
required: false,
serializedName: 'scope',
type: {
name: 'String'
}
},
startTime: {
required: false,
serializedName: 'startTime',
type: {
name: 'String'
}
},
expiryTime: {
required: false,
serializedName: 'expiryTime',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = Permissions;
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@

'use strict';

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

/**
* Specifies the set of OAuth 2.0 permission scopes and app roles under the
* specified resource that an application requires access to. The specified
Loading

0 comments on commit f8b925b

Please sign in to comment.