From a767ab70e626cbfbe9f46dbc9406657fa852d83d Mon Sep 17 00:00:00 2001 From: Jeff Fisher Date: Tue, 27 Jun 2023 16:08:46 +0000 Subject: [PATCH] Remove deprecated track1 package --- sdk/graphrbac/graph/LICENSE.txt | 21 - sdk/graphrbac/graph/README.md | 120 - sdk/graphrbac/graph/package.json | 58 - sdk/graphrbac/graph/rollup.config.js | 31 - .../graph/src/graphRbacManagementClient.ts | 58 - .../src/graphRbacManagementClientContext.ts | 69 - .../graph/src/models/applicationsMappers.ts | 41 - .../src/models/deletedApplicationsMappers.ts | 31 - .../graph/src/models/domainsMappers.ts | 14 - .../graph/src/models/groupsMappers.ts | 39 - sdk/graphrbac/graph/src/models/index.ts | 2443 ---------------- sdk/graphrbac/graph/src/models/mappers.ts | 2517 ----------------- .../oAuth2PermissionGrantOperationsMappers.ts | 15 - .../graph/src/models/objectsMappers.ts | 32 - sdk/graphrbac/graph/src/models/parameters.ts | 156 - .../src/models/servicePrincipalsMappers.ts | 39 - .../graph/src/models/signedInUserMappers.ts | 31 - .../graph/src/models/usersMappers.ts | 37 - .../graph/src/operations/applications.ts | 855 ------ .../src/operations/deletedApplications.ts | 232 -- sdk/graphrbac/graph/src/operations/domains.ts | 130 - sdk/graphrbac/graph/src/operations/groups.ts | 857 ------ sdk/graphrbac/graph/src/operations/index.ts | 19 - .../oAuth2PermissionGrantOperations.ts | 234 -- sdk/graphrbac/graph/src/operations/objects.ts | 142 - .../graph/src/operations/servicePrincipals.ts | 685 ----- .../graph/src/operations/signedInUser.ts | 176 -- sdk/graphrbac/graph/src/operations/users.ts | 414 --- sdk/graphrbac/graph/tsconfig.json | 26 - 29 files changed, 9522 deletions(-) delete mode 100644 sdk/graphrbac/graph/LICENSE.txt delete mode 100644 sdk/graphrbac/graph/README.md delete mode 100644 sdk/graphrbac/graph/package.json delete mode 100644 sdk/graphrbac/graph/rollup.config.js delete mode 100644 sdk/graphrbac/graph/src/graphRbacManagementClient.ts delete mode 100644 sdk/graphrbac/graph/src/graphRbacManagementClientContext.ts delete mode 100644 sdk/graphrbac/graph/src/models/applicationsMappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/deletedApplicationsMappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/domainsMappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/groupsMappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/index.ts delete mode 100644 sdk/graphrbac/graph/src/models/mappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/oAuth2PermissionGrantOperationsMappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/objectsMappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/parameters.ts delete mode 100644 sdk/graphrbac/graph/src/models/servicePrincipalsMappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/signedInUserMappers.ts delete mode 100644 sdk/graphrbac/graph/src/models/usersMappers.ts delete mode 100644 sdk/graphrbac/graph/src/operations/applications.ts delete mode 100644 sdk/graphrbac/graph/src/operations/deletedApplications.ts delete mode 100644 sdk/graphrbac/graph/src/operations/domains.ts delete mode 100644 sdk/graphrbac/graph/src/operations/groups.ts delete mode 100644 sdk/graphrbac/graph/src/operations/index.ts delete mode 100644 sdk/graphrbac/graph/src/operations/oAuth2PermissionGrantOperations.ts delete mode 100644 sdk/graphrbac/graph/src/operations/objects.ts delete mode 100644 sdk/graphrbac/graph/src/operations/servicePrincipals.ts delete mode 100644 sdk/graphrbac/graph/src/operations/signedInUser.ts delete mode 100644 sdk/graphrbac/graph/src/operations/users.ts delete mode 100644 sdk/graphrbac/graph/tsconfig.json diff --git a/sdk/graphrbac/graph/LICENSE.txt b/sdk/graphrbac/graph/LICENSE.txt deleted file mode 100644 index b73b4a1293c3..000000000000 --- a/sdk/graphrbac/graph/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019 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. diff --git a/sdk/graphrbac/graph/README.md b/sdk/graphrbac/graph/README.md deleted file mode 100644 index 527e24320b74..000000000000 --- a/sdk/graphrbac/graph/README.md +++ /dev/null @@ -1,120 +0,0 @@ -## Azure GraphRbacManagementClient SDK for JavaScript - -> **Warning**: This package is used to work with the Azure Active Directory Graph API which is deprecated and has been replaced by the [Microsoft Graph API](https://developer.microsoft.com/graph). Beginning on June 30th, 2022, apps using Azure AD Graph will no longer receive responses from the Azure Active Directory Graph endpoint. - -Helpful links: - -- [Update your applications to use Microsoft Authentication Library and Microsoft Graph API](https://techcommunity.microsoft.com/t5/azure-active-directory-identity/update-your-applications-to-use-microsoft-authentication-library/ba-p/1257363) -- [App migration checklist](https://docs.microsoft.com/graph/migrate-azure-ad-graph-planning-checklist) -- [@microsoft/microsoft-graph-client package](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) for the newer Microsoft Graph API - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge, and Firefox. - -### How to Install - -``` -npm install @azure/graph -``` - -### How to use - -#### nodejs - Authentication, client creation and get signedInUser as an example written in TypeScript. - -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` - -##### Sample code - -```ts -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { - GraphRbacManagementClient, - GraphRbacManagementModels, - GraphRbacManagementMappers -} from "@azure/graph"; -const tenantId = ""; - -msRestNodeAuth - .interactiveLogin({ - tokenAudience: "https://graph.windows.net", - domain: tenantId - }) - .then((creds) => { - const client = new GraphRbacManagementClient(creds, tenantId, { - baseUri: "https://graph.windows.net" - }); - client.signedInUser.get().then((result) => { - console.log("The result is:"); - console.log(result); - }); - }) - .catch((err) => { - console.error(err); - }); -``` - -#### browser - Authentication, client creation and get signedInUser as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html - -```html - - - - @azure/graph sample - - - - - - - - -``` - -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fgraphrbac%2Fgraph%2FREADME.png) diff --git a/sdk/graphrbac/graph/package.json b/sdk/graphrbac/graph/package.json deleted file mode 100644 index f5a877ed549c..000000000000 --- a/sdk/graphrbac/graph/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@azure/graph", - "author": "Microsoft Corporation", - "description": "GraphRbacManagementClient Library with typescript type definitions for node.js and browser.", - "version": "5.0.3", - "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.0", - "@azure/ms-rest-js": "^2.0.3", - "tslib": "^1.10.0" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "license": "MIT", - "main": "./dist/graph.js", - "module": "./esm/graphRbacManagementClient.js", - "types": "./esm/graphRbacManagementClient.d.ts", - "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/graphrbac/graph", - "repository": { - "type": "git", - "url": "https://github.com/Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "esm/**/*.js", - "esm/**/*.js.map", - "esm/**/*.d.ts", - "esm/**/*.d.ts.map", - "src/**/*.ts", - "README.md", - "rollup.config.js", - "tsconfig.json" - ], - "scripts": { - "build": "tsc && rollup -c rollup.config.js && npm run minify", - "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/graph.js.map'\" -o ./dist/graph.min.js ./dist/graph.js", - "prepack": "npm install && npm run build" - }, - "sideEffects": false, - "autoPublish": true -} diff --git a/sdk/graphrbac/graph/rollup.config.js b/sdk/graphrbac/graph/rollup.config.js deleted file mode 100644 index ce8ffd7b2db8..000000000000 --- a/sdk/graphrbac/graph/rollup.config.js +++ /dev/null @@ -1,31 +0,0 @@ -import nodeResolve from "rollup-plugin-node-resolve"; -/** - * @type {import('rollup').RollupFileOptions} - */ -const config = { - input: './esm/graphRbacManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], - output: { - file: "./dist/graph.js", - format: "umd", - name: "Azure.Graph", - sourcemap: true, - globals: { - "@azure/ms-rest-js": "msRest", - "@azure/ms-rest-azure-js": "msRestAzure" - }, - banner: `/* - * 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. - */` - }, - plugins: [ - nodeResolve({ module: true }) - ] -}; -export default config; diff --git a/sdk/graphrbac/graph/src/graphRbacManagementClient.ts b/sdk/graphrbac/graph/src/graphRbacManagementClient.ts deleted file mode 100644 index 824208582344..000000000000 --- a/sdk/graphrbac/graph/src/graphRbacManagementClient.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; -import * as operations from "./operations"; -import { GraphRbacManagementClientContext } from "./graphRbacManagementClientContext"; - - -class GraphRbacManagementClient extends GraphRbacManagementClientContext { - // Operation groups - signedInUser: operations.SignedInUser; - applications: operations.Applications; - deletedApplications: operations.DeletedApplications; - groups: operations.Groups; - servicePrincipals: operations.ServicePrincipals; - users: operations.Users; - objects: operations.Objects; - domains: operations.Domains; - oAuth2PermissionGrant: operations.OAuth2PermissionGrantOperations; - - /** - * Initializes a new instance of the GraphRbacManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. - * @param tenantID The tenant ID. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, tenantID: string, options?: Models.GraphRbacManagementClientOptions) { - super(credentials, tenantID, options); - 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.oAuth2PermissionGrant = new operations.OAuth2PermissionGrantOperations(this); - } -} - -// Operation Specifications - -export { - GraphRbacManagementClient, - GraphRbacManagementClientContext, - Models as GraphRbacManagementModels, - Mappers as GraphRbacManagementMappers -}; -export * from "./operations"; diff --git a/sdk/graphrbac/graph/src/graphRbacManagementClientContext.ts b/sdk/graphrbac/graph/src/graphRbacManagementClientContext.ts deleted file mode 100644 index c4ffda5830ca..000000000000 --- a/sdk/graphrbac/graph/src/graphRbacManagementClientContext.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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. - */ - -import * as Models from "./models"; -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; - -const packageName = "@azure/graph"; -const packageVersion = "5.0.3"; - -export class GraphRbacManagementClientContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; - apiVersion?: string; - tenantID: string; - - /** - * Initializes a new instance of the GraphRbacManagementClient class. - * @param credentials Credentials needed for the client to connect to Azure. - * @param tenantID The tenant ID. - * @param [options] The parameter options - */ - constructor(credentials: msRest.ServiceClientCredentials, tenantID: string, options?: Models.GraphRbacManagementClientOptions) { - if (credentials == undefined) { - throw new Error('\'credentials\' cannot be null.'); - } - if (tenantID == undefined) { - throw new Error('\'tenantID\' cannot be null.'); - } - - if (!options) { - options = {}; - } - if (!options.userAgent) { - const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(credentials, options); - - this.apiVersion = '1.6'; - this.acceptLanguage = 'en-US'; - this.longRunningOperationRetryTimeout = 30; - - // This is a manual patch to mitigate a bug in autorest.typescript - // https://github.com/Azure/autorest.typescript/issues/545 - // - // If you are regenerating this package, and you have seen a diff that removes - // this comment or changes the following line. Please check to see if the bug - // above has been fixed. If not, please keep this change. - this.baseUri = options.baseUri || "https://graph.windows.net"; - this.requestContentType = "application/json; charset=utf-8"; - this.credentials = credentials; - this.tenantID = tenantID; - - if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { - this.acceptLanguage = options.acceptLanguage; - } - if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { - this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; - } - } -} diff --git a/sdk/graphrbac/graph/src/models/applicationsMappers.ts b/sdk/graphrbac/graph/src/models/applicationsMappers.ts deleted file mode 100644 index c548367ec3a7..000000000000 --- a/sdk/graphrbac/graph/src/models/applicationsMappers.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - AddOwnerParameters, - ADGroup, - Application, - ApplicationBase, - ApplicationCreateParameters, - ApplicationListResult, - ApplicationUpdateParameters, - AppRole, - DirectoryObject, - DirectoryObjectListResult, - GraphError, - InformationalUrl, - KeyCredential, - KeyCredentialListResult, - KeyCredentialsUpdateParameters, - OAuth2Permission, - OptionalClaim, - OptionalClaims, - PasswordCredential, - PasswordCredentialListResult, - PasswordCredentialsUpdateParameters, - PreAuthorizedApplication, - PreAuthorizedApplicationExtension, - PreAuthorizedApplicationPermission, - RequiredResourceAccess, - ResourceAccess, - ServicePrincipal, - ServicePrincipalObjectResult, - SignInName, - User -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/deletedApplicationsMappers.ts b/sdk/graphrbac/graph/src/models/deletedApplicationsMappers.ts deleted file mode 100644 index fcaf5ced8dc2..000000000000 --- a/sdk/graphrbac/graph/src/models/deletedApplicationsMappers.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - ADGroup, - Application, - ApplicationListResult, - AppRole, - DirectoryObject, - GraphError, - InformationalUrl, - KeyCredential, - OAuth2Permission, - OptionalClaim, - OptionalClaims, - PasswordCredential, - PreAuthorizedApplication, - PreAuthorizedApplicationExtension, - PreAuthorizedApplicationPermission, - RequiredResourceAccess, - ResourceAccess, - ServicePrincipal, - SignInName, - User -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/domainsMappers.ts b/sdk/graphrbac/graph/src/models/domainsMappers.ts deleted file mode 100644 index b4f829df9f03..000000000000 --- a/sdk/graphrbac/graph/src/models/domainsMappers.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - CloudError, - Domain, - DomainListResult -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/groupsMappers.ts b/sdk/graphrbac/graph/src/models/groupsMappers.ts deleted file mode 100644 index 7e592f071e8e..000000000000 --- a/sdk/graphrbac/graph/src/models/groupsMappers.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - AddOwnerParameters, - ADGroup, - Application, - AppRole, - CheckGroupMembershipParameters, - CheckGroupMembershipResult, - DirectoryObject, - DirectoryObjectListResult, - GraphError, - GroupAddMemberParameters, - GroupCreateParameters, - GroupGetMemberGroupsParameters, - GroupGetMemberGroupsResult, - GroupListResult, - InformationalUrl, - KeyCredential, - OAuth2Permission, - OptionalClaim, - OptionalClaims, - PasswordCredential, - PreAuthorizedApplication, - PreAuthorizedApplicationExtension, - PreAuthorizedApplicationPermission, - RequiredResourceAccess, - ResourceAccess, - ServicePrincipal, - SignInName, - User -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/index.ts b/sdk/graphrbac/graph/src/models/index.ts deleted file mode 100644 index 96232ea07694..000000000000 --- a/sdk/graphrbac/graph/src/models/index.ts +++ /dev/null @@ -1,2443 +0,0 @@ -/* - * 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. - */ - -import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; - -export { BaseResource, CloudError }; - -/** - * Represents a group of URIs that provide terms of service, marketing, support and privacy policy - * information about an application. The default value for each string is null. - */ -export interface InformationalUrl { - /** - * The terms of service URI - */ - termsOfService?: string; - /** - * The marketing URI - */ - marketing?: string; - /** - * The privacy policy URI - */ - privacy?: string; - /** - * The support URI - */ - support?: string; -} - -/** - * Represents an OAuth 2.0 delegated permission scope. The specified OAuth 2.0 delegated permission - * scopes may be requested by client applications (through the requiredResourceAccess collection on - * the Application object) when calling a resource application. The oauth2Permissions property of - * the ServicePrincipal entity and of the Application entity is a collection of OAuth2Permission. - */ -export interface OAuth2Permission { - /** - * Permission help text that appears in the admin consent and app assignment experiences. - */ - adminConsentDescription?: string; - /** - * Display name for the permission that appears in the admin consent and app assignment - * experiences. - */ - adminConsentDisplayName?: string; - /** - * Unique scope permission identifier inside the oauth2Permissions collection. - */ - id?: string; - /** - * When creating or updating a permission, this property must be set to true (which is the - * default). To delete a permission, this property must first be set to false. At that point, in - * a subsequent call, the permission may be removed. - */ - isEnabled?: boolean; - /** - * Specifies whether this scope permission can be consented to by an end user, or whether it is a - * tenant-wide permission that must be consented to by a Company Administrator. Possible values - * are "User" or "Admin". - */ - type?: string; - /** - * Permission help text that appears in the end user consent experience. - */ - userConsentDescription?: string; - /** - * Display name for the permission that appears in the end user consent experience. - */ - userConsentDisplayName?: string; - /** - * The value of the scope claim that the resource application should expect in the OAuth 2.0 - * access token. - */ - value?: string; -} - -/** - * Specifying the claims to be included in a token. - */ -export interface OptionalClaim { - /** - * Claim name. - */ - name?: string; - /** - * Claim source. - */ - source?: string; - /** - * Is this a required claim. - */ - essential?: boolean; - additionalProperties?: any; -} - -/** - * Specifying the claims to be included in the token. - */ -export interface OptionalClaims { - /** - * Optional claims requested to be included in the id token. - */ - idToken?: OptionalClaim[]; - /** - * Optional claims requested to be included in the access token. - */ - accessToken?: OptionalClaim[]; - /** - * Optional claims requested to be included in the saml token. - */ - samlToken?: OptionalClaim[]; -} - -/** - * Contains information about the pre-authorized permissions. - */ -export interface PreAuthorizedApplicationPermission { - /** - * Indicates whether the permission set is DirectAccess or impersonation. - */ - directAccessGrant?: boolean; - /** - * The list of permissions. - */ - accessGrants?: string[]; -} - -/** - * Representation of an app PreAuthorizedApplicationExtension required by a pre authorized client - * app. - */ -export interface PreAuthorizedApplicationExtension { - /** - * The extension's conditions. - */ - conditions?: string[]; -} - -/** - * Contains information about pre authorized client application. - */ -export interface PreAuthorizedApplication { - /** - * Represents the application id. - */ - appId?: string; - /** - * Collection of required app permissions/entitlements from the resource application. - */ - permissions?: PreAuthorizedApplicationPermission[]; - /** - * Collection of extensions from the resource application. - */ - extensions?: PreAuthorizedApplicationExtension[]; -} - -/** - * Active Directory error information. - */ -export interface GraphError { - /** - * Error code. - */ - code?: string; - /** - * Error message value. - */ - message?: string; -} - -/** - * Contains the possible cases for DirectoryObject. - */ -export type DirectoryObjectUnion = DirectoryObject | Application | ADGroup | ServicePrincipal | User; - -/** - * Represents an Azure Active Directory object. - */ -export interface DirectoryObject { - /** - * Polymorphic Discriminator - */ - objectType: "DirectoryObject"; - /** - * The object ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly objectId?: string; - /** - * The time at which the directory object was deleted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletionTimestamp?: Date; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Active Directory Key Credential information. - */ -export interface KeyCredential { - /** - * Start date. - */ - startDate?: Date; - /** - * End date. - */ - endDate?: Date; - /** - * Key value. - */ - value?: string; - /** - * Key ID. - */ - keyId?: string; - /** - * Usage. Acceptable values are 'Verify' and 'Sign'. - */ - usage?: string; - /** - * Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'. - */ - type?: string; - /** - * Custom Key Identifier - */ - customKeyIdentifier?: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Active Directory Password Credential information. - */ -export interface PasswordCredential { - /** - * Start date. - */ - startDate?: Date; - /** - * End date. - */ - endDate?: Date; - /** - * Key ID. - */ - keyId?: string; - /** - * Key value. - */ - value?: string; - /** - * Custom Key Identifier - */ - customKeyIdentifier?: Uint8Array; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Specifies an OAuth 2.0 permission scope or an app role that an application requires. The - * resourceAccess property of the RequiredResourceAccess type is a collection of ResourceAccess. - */ -export interface ResourceAccess { - /** - * The unique identifier for one of the OAuth2Permission or AppRole instances that the resource - * application exposes. - */ - id: string; - /** - * Specifies whether the id property references an OAuth2Permission or an AppRole. Possible - * values are "scope" or "role". - */ - type?: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Specifies the set of OAuth 2.0 permission scopes and app roles under the specified resource that - * an application requires access to. The specified OAuth 2.0 permission scopes may be requested by - * client applications (through the requiredResourceAccess collection) when calling a resource - * application. The requiredResourceAccess property of the Application entity is a collection of - * RequiredResourceAccess. - */ -export interface RequiredResourceAccess { - /** - * The list of OAuth2.0 permission scopes and app roles that the application requires from the - * specified resource. - */ - resourceAccess: ResourceAccess[]; - /** - * The unique identifier for the resource that the application requires access to. This should be - * equal to the appId declared on the target resource application. - */ - resourceAppId?: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * An interface representing AppRole. - */ -export interface AppRole { - /** - * Unique role identifier inside the appRoles collection. - */ - id?: string; - /** - * 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. - */ - allowedMemberTypes?: string[]; - /** - * Permission help text that appears in the admin app assignment and consent experiences. - */ - description?: string; - /** - * Display name for the permission that appears in the admin consent and app assignment - * experiences. - */ - displayName?: string; - /** - * 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. - */ - isEnabled?: boolean; - /** - * Specifies the value of the roles claim that the application should expect in the - * authentication and access tokens. - */ - value?: string; -} - -/** - * Active Directive Application common properties shared among GET, POST and PATCH - */ -export interface ApplicationBase { - /** - * A property on the application to indicate if the application accepts other IDPs or not or - * partially accepts. - */ - allowGuestsSignIn?: boolean; - /** - * Indicates that the application supports pass through users who have no presence in the - * resource tenant. - */ - allowPassthroughUsers?: boolean; - /** - * The url for the application logo image stored in a CDN. - */ - appLogoUrl?: string; - /** - * The collection of application roles that an application may declare. These roles can be - * assigned to users, groups or service principals. - */ - appRoles?: AppRole[]; - /** - * The application permissions. - */ - appPermissions?: string[]; - /** - * Whether the application is available to other tenants. - */ - availableToOtherTenants?: boolean; - /** - * A URL provided by the author of the application to report errors when using the application. - */ - errorUrl?: string; - /** - * Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects. - */ - groupMembershipClaims?: any; - /** - * The home page of the application. - */ - homepage?: string; - /** - * URLs with more information about the application. - */ - informationalUrls?: InformationalUrl; - /** - * Specifies whether this application supports device authentication without a user. The default - * is false. - */ - isDeviceOnlyAuthSupported?: boolean; - /** - * A collection of KeyCredential objects. - */ - keyCredentials?: KeyCredential[]; - /** - * Client applications that are tied to this resource application. Consent to any of the known - * client applications will result in implicit consent to the resource application through a - * combined consent dialog (showing the OAuth permission scopes required by the client and the - * resource). - */ - knownClientApplications?: string[]; - /** - * the url of the logout page - */ - logoutUrl?: string; - /** - * Whether to allow implicit grant flow for OAuth2 - */ - oauth2AllowImplicitFlow?: boolean; - /** - * Specifies whether during a token Request Azure AD will allow path matching of the redirect URI - * against the applications collection of replyURLs. The default is false. - */ - oauth2AllowUrlPathMatching?: boolean; - /** - * The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes - * to client applications. These permission scopes may be granted to client applications during - * consent. - */ - oauth2Permissions?: OAuth2Permission[]; - /** - * Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as - * opposed to GET requests. The default is false, which specifies that only GET requests will be - * allowed. - */ - oauth2RequirePostResponse?: boolean; - /** - * A list of tenants allowed to access application. - */ - orgRestrictions?: string[]; - optionalClaims?: OptionalClaims; - /** - * A collection of PasswordCredential objects - */ - passwordCredentials?: PasswordCredential[]; - /** - * list of pre-authorized applications. - */ - preAuthorizedApplications?: PreAuthorizedApplication[]; - /** - * Specifies whether this application is a public client (such as an installed application - * running on a mobile device). Default is false. - */ - publicClient?: boolean; - /** - * Reliable domain which can be used to identify an application. - */ - publisherDomain?: string; - /** - * A collection of reply URLs for the application. - */ - replyUrls?: string[]; - /** - * Specifies resources that this application requires access to and the set of OAuth permission - * scopes and application roles that it needs under each of those resources. This - * pre-configuration of required resource access drives the consent experience. - */ - requiredResourceAccess?: RequiredResourceAccess[]; - /** - * The URL to the SAML metadata for the application. - */ - samlMetadataUrl?: string; - /** - * Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, - * AzureADAndMicrosoftAccounts). - */ - signInAudience?: string; - /** - * The primary Web page. - */ - wwwHomepage?: string; -} - -/** - * Request parameters for creating a new application. - */ -export interface ApplicationCreateParameters extends ApplicationBase { - /** - * The display name of the application. - */ - displayName: string; - /** - * A collection of URIs for the application. - */ - identifierUris?: string[]; -} - -/** - * Request parameters for updating a new application. - */ -export interface ApplicationUpdateParameters extends ApplicationBase { - /** - * The display name of the application. - */ - displayName?: string; - /** - * A collection of URIs for the application. - */ - identifierUris?: string[]; -} - -/** - * Active Directory application information. - */ -export interface Application { - /** - * Polymorphic Discriminator - */ - objectType: "Application"; - /** - * The object ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly objectId?: string; - /** - * The time at which the directory object was deleted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletionTimestamp?: Date; - /** - * The application ID. - */ - appId?: string; - /** - * A property on the application to indicate if the application accepts other IDPs or not or - * partially accepts. - */ - allowGuestsSignIn?: boolean; - /** - * Indicates that the application supports pass through users who have no presence in the - * resource tenant. - */ - allowPassthroughUsers?: boolean; - /** - * The url for the application logo image stored in a CDN. - */ - appLogoUrl?: string; - /** - * The collection of application roles that an application may declare. These roles can be - * assigned to users, groups or service principals. - */ - appRoles?: AppRole[]; - /** - * The application permissions. - */ - appPermissions?: string[]; - /** - * Whether the application is available to other tenants. - */ - availableToOtherTenants?: boolean; - /** - * The display name of the application. - */ - displayName?: string; - /** - * A URL provided by the author of the application to report errors when using the application. - */ - errorUrl?: string; - /** - * Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects. - */ - groupMembershipClaims?: any; - /** - * The home page of the application. - */ - homepage?: string; - /** - * A collection of URIs for the application. - */ - identifierUris?: string[]; - /** - * URLs with more information about the application. - */ - informationalUrls?: InformationalUrl; - /** - * Specifies whether this application supports device authentication without a user. The default - * is false. - */ - isDeviceOnlyAuthSupported?: boolean; - /** - * A collection of KeyCredential objects. - */ - keyCredentials?: KeyCredential[]; - /** - * Client applications that are tied to this resource application. Consent to any of the known - * client applications will result in implicit consent to the resource application through a - * combined consent dialog (showing the OAuth permission scopes required by the client and the - * resource). - */ - knownClientApplications?: string[]; - /** - * the url of the logout page - */ - logoutUrl?: string; - /** - * Whether to allow implicit grant flow for OAuth2 - */ - oauth2AllowImplicitFlow?: boolean; - /** - * Specifies whether during a token Request Azure AD will allow path matching of the redirect URI - * against the applications collection of replyURLs. The default is false. - */ - oauth2AllowUrlPathMatching?: boolean; - /** - * The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes - * to client applications. These permission scopes may be granted to client applications during - * consent. - */ - oauth2Permissions?: OAuth2Permission[]; - /** - * Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as - * opposed to GET requests. The default is false, which specifies that only GET requests will be - * allowed. - */ - oauth2RequirePostResponse?: boolean; - /** - * A list of tenants allowed to access application. - */ - orgRestrictions?: string[]; - optionalClaims?: OptionalClaims; - /** - * A collection of PasswordCredential objects - */ - passwordCredentials?: PasswordCredential[]; - /** - * list of pre-authorized applications. - */ - preAuthorizedApplications?: PreAuthorizedApplication[]; - /** - * Specifies whether this application is a public client (such as an installed application - * running on a mobile device). Default is false. - */ - publicClient?: boolean; - /** - * Reliable domain which can be used to identify an application. - */ - publisherDomain?: string; - /** - * A collection of reply URLs for the application. - */ - replyUrls?: string[]; - /** - * Specifies resources that this application requires access to and the set of OAuth permission - * scopes and application roles that it needs under each of those resources. This - * pre-configuration of required resource access drives the consent experience. - */ - requiredResourceAccess?: RequiredResourceAccess[]; - /** - * The URL to the SAML metadata for the application. - */ - samlMetadataUrl?: string; - /** - * Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, - * AzureADAndMicrosoftAccounts). - */ - signInAudience?: string; - /** - * The primary Web page. - */ - wwwHomepage?: string; -} - -/** - * Service Principal Object Result. - */ -export interface ServicePrincipalObjectResult { - /** - * The Object ID of the service principal with the specified application ID. - */ - value?: string; - /** - * The URL representing edm equivalent. - */ - odatametadata?: string; -} - -/** - * Request parameters for adding a owner to an application. - */ -export interface AddOwnerParameters { - /** - * 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. - */ - url: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Request parameters for a KeyCredentials update operation - */ -export interface KeyCredentialsUpdateParameters { - /** - * A collection of KeyCredentials. - */ - value: KeyCredential[]; -} - -/** - * Request parameters for a PasswordCredentials update operation. - */ -export interface PasswordCredentialsUpdateParameters { - /** - * A collection of PasswordCredentials. - */ - value: PasswordCredential[]; -} - -/** - * Request parameters for adding a member to a group. - */ -export interface GroupAddMemberParameters { - /** - * A member 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 member (user, application, - * servicePrincipal, group) to be added. - */ - url: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Request parameters for creating a new group. - */ -export interface GroupCreateParameters { - /** - * Group display name - */ - displayName: string; - /** - * Mail nickname - */ - mailNickname: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Active Directory group information. - */ -export interface ADGroup { - /** - * Polymorphic Discriminator - */ - objectType: "Group"; - /** - * The object ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly objectId?: string; - /** - * The time at which the directory object was deleted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletionTimestamp?: Date; - /** - * The display name of the group. - */ - displayName?: string; - /** - * Whether the group is mail-enabled. Must be false. This is because only pure security groups - * can be created using the Graph API. - */ - mailEnabled?: boolean; - /** - * The mail alias for the group. - */ - mailNickname?: string; - /** - * Whether the group is security-enable. - */ - securityEnabled?: boolean; - /** - * The primary email address of the group. - */ - mail?: string; -} - -/** - * Request parameters for GetMemberGroups API call. - */ -export interface GroupGetMemberGroupsParameters { - /** - * If true, only membership in security-enabled groups should be checked. Otherwise, membership - * in all groups should be checked. - */ - securityEnabledOnly: boolean; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Request parameters for IsMemberOf API call. - */ -export interface CheckGroupMembershipParameters { - /** - * The object ID of the group to check. - */ - groupId: string; - /** - * The object ID of the contact, group, user, or service principal to check for membership in the - * specified group. - */ - memberId: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Server response for IsMemberOf API call - */ -export interface CheckGroupMembershipResult { - /** - * True if the specified user, group, contact, or service principal has either direct or - * transitive membership in the specified group; otherwise, false. - */ - value?: boolean; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Active Directory service principal common properties shared among GET, POST and PATCH - */ -export interface ServicePrincipalBase { - /** - * whether or not the service principal account is enabled - */ - accountEnabled?: boolean; - /** - * Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will - * issue a user or access token to the application. - */ - appRoleAssignmentRequired?: boolean; - /** - * The collection of key credentials associated with the service principal. - */ - keyCredentials?: KeyCredential[]; - /** - * The collection of password credentials associated with the service principal. - */ - passwordCredentials?: PasswordCredential[]; - /** - * the type of the service principal - */ - servicePrincipalType?: string; - /** - * Optional list of tags that you can apply to your service principals. Not nullable. - */ - tags?: string[]; -} - -/** - * Request parameters for creating a new service principal. - */ -export interface ServicePrincipalCreateParameters extends ServicePrincipalBase { - /** - * The application ID. - */ - appId: string; -} - -/** - * Request parameters for update an existing service principal. - */ -export interface ServicePrincipalUpdateParameters extends ServicePrincipalBase { -} - -/** - * Active Directory service principal information. - */ -export interface ServicePrincipal { - /** - * Polymorphic Discriminator - */ - objectType: "ServicePrincipal"; - /** - * The object ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly objectId?: string; - /** - * The time at which the directory object was deleted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletionTimestamp?: Date; - /** - * whether or not the service principal account is enabled - */ - accountEnabled?: boolean; - /** - * alternative names - */ - alternativeNames?: string[]; - /** - * The display name exposed by the associated application. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly appDisplayName?: string; - /** - * The application ID. - */ - appId?: string; - /** - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly appOwnerTenantId?: string; - /** - * Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will - * issue a user or access token to the application. - */ - appRoleAssignmentRequired?: boolean; - /** - * The collection of application roles that an application may declare. These roles can be - * assigned to users, groups or service principals. - */ - appRoles?: AppRole[]; - /** - * The display name of the service principal. - */ - displayName?: string; - /** - * A URL provided by the author of the associated application to report errors when using the - * application. - */ - errorUrl?: string; - /** - * The URL to the homepage of the associated application. - */ - homepage?: string; - /** - * The collection of key credentials associated with the service principal. - */ - keyCredentials?: KeyCredential[]; - /** - * A URL provided by the author of the associated application to logout - */ - logoutUrl?: string; - /** - * The OAuth 2.0 permissions exposed by the associated application. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly oauth2Permissions?: OAuth2Permission[]; - /** - * The collection of password credentials associated with the service principal. - */ - passwordCredentials?: PasswordCredential[]; - /** - * The thumbprint of preferred certificate to sign the token - */ - preferredTokenSigningKeyThumbprint?: string; - /** - * The publisher's name of the associated application - */ - publisherName?: string; - /** - * The URLs that user tokens are sent to for sign in with the associated application. The - * redirect URIs that the oAuth 2.0 authorization code and access tokens are sent to for the - * associated application. - */ - replyUrls?: string[]; - /** - * The URL to the SAML metadata of the associated application - */ - samlMetadataUrl?: string; - /** - * A collection of service principal names. - */ - servicePrincipalNames?: string[]; - /** - * the type of the service principal - */ - servicePrincipalType?: string; - /** - * Optional list of tags that you can apply to your service principals. Not nullable. - */ - tags?: string[]; -} - -/** - * The password profile associated with a user. - */ -export interface PasswordProfile { - /** - * Password - */ - password: string; - /** - * Whether to force a password change on next login. - */ - forceChangePasswordNextLogin?: boolean; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * An interface representing UserBase. - */ -export interface UserBase { - /** - * This must be specified if you are using a federated domain for the user's userPrincipalName - * (UPN) property when creating a new user account. It is used to associate an on-premises Active - * Directory user account with their Azure AD user object. - */ - immutableId?: string; - /** - * A two letter country code (ISO standard 3166). Required for users that will be assigned - * licenses due to legal requirement to check for availability of services in countries. Examples - * include: "US", "JP", and "GB". - */ - usageLocation?: string; - /** - * The given name for the user. - */ - givenName?: string; - /** - * The user's surname (family name or last name). - */ - surname?: string; - /** - * A string value that can be used to classify user types in your directory, such as 'Member' and - * 'Guest'. Possible values include: 'Member', 'Guest' - */ - userType?: UserType; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Request parameters for creating a new work or school account user. - */ -export interface UserCreateParameters extends UserBase { - /** - * Whether the account is enabled. - */ - accountEnabled: boolean; - /** - * The display name of the user. - */ - displayName: string; - /** - * Password Profile - */ - passwordProfile: PasswordProfile; - /** - * The user principal name (someuser@contoso.com). It must contain one of the verified domains - * for the tenant. - */ - userPrincipalName: string; - /** - * The mail alias for the user. - */ - mailNickname: string; - /** - * The primary email address of the user. - */ - mail?: string; -} - -/** - * Request parameters for updating an existing work or school account user. - */ -export interface UserUpdateParameters extends UserBase { - /** - * Whether the account is enabled. - */ - accountEnabled?: boolean; - /** - * The display name of the user. - */ - displayName?: string; - /** - * The password profile of the user. - */ - passwordProfile?: PasswordProfile; - /** - * The user principal name (someuser@contoso.com). It must contain one of the verified domains - * for the tenant. - */ - userPrincipalName?: string; - /** - * The mail alias for the user. - */ - mailNickname?: string; -} - -/** - * Contains information about a sign-in name of a local account user in an Azure Active Directory - * B2C tenant. - */ -export interface SignInName { - /** - * A string value that can be used to classify user sign-in types in your directory, such as - * 'emailAddress' or 'userName'. - */ - type?: string; - /** - * The sign-in used by the local account. Must be unique across the company/tenant. For example, - * 'johnc@example.com'. - */ - value?: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Active Directory user information. - */ -export interface User { - /** - * Polymorphic Discriminator - */ - objectType: "User"; - /** - * The object ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly objectId?: string; - /** - * The time at which the directory object was deleted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly deletionTimestamp?: Date; - /** - * This must be specified if you are using a federated domain for the user's userPrincipalName - * (UPN) property when creating a new user account. It is used to associate an on-premises Active - * Directory user account with their Azure AD user object. - */ - immutableId?: string; - /** - * A two letter country code (ISO standard 3166). Required for users that will be assigned - * licenses due to legal requirement to check for availability of services in countries. Examples - * include: "US", "JP", and "GB". - */ - usageLocation?: string; - /** - * The given name for the user. - */ - givenName?: string; - /** - * The user's surname (family name or last name). - */ - surname?: string; - /** - * A string value that can be used to classify user types in your directory, such as 'Member' and - * 'Guest'. Possible values include: 'Member', 'Guest' - */ - userType?: UserType; - /** - * Whether the account is enabled. - */ - accountEnabled?: boolean; - /** - * The display name of the user. - */ - displayName?: string; - /** - * The principal name of the user. - */ - userPrincipalName?: string; - /** - * The mail alias for the user. - */ - mailNickname?: string; - /** - * The primary email address of the user. - */ - mail?: string; - /** - * The sign-in names of the user. - */ - signInNames?: SignInName[]; -} - -/** - * Request parameters for GetMemberGroups API call. - */ -export interface UserGetMemberGroupsParameters { - /** - * If true, only membership in security-enabled groups should be checked. Otherwise, membership - * in all groups should be checked. - */ - securityEnabledOnly: boolean; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Request parameters for the GetObjectsByObjectIds API. - */ -export interface GetObjectsParameters { - /** - * The requested object IDs. - */ - objectIds?: string[]; - /** - * The requested object types. - */ - types?: string[]; - /** - * If true, also searches for object IDs in the partner tenant. - */ - includeDirectoryObjectReferences?: boolean; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * Active Directory Domain information. - */ -export interface Domain { - /** - * the type of the authentication into the domain. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly authenticationType?: string; - /** - * if this is the default domain in the tenant. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isDefault?: boolean; - /** - * if this domain's ownership is verified. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly isVerified?: boolean; - /** - * the domain name. - */ - name: string; - /** - * Describes unknown properties. The value of an unknown property can be of "any" type. - */ - [property: string]: any; -} - -/** - * An interface representing OAuth2PermissionGrant. - */ -export interface OAuth2PermissionGrant { - /** - * Microsoft.DirectoryServices.OAuth2PermissionGrant - */ - odatatype?: string; - /** - * The id of the resource's service principal granted consent to impersonate the user when - * accessing the resource (represented by the resourceId property). - */ - clientId?: string; - /** - * The id of the permission grant - */ - objectId?: string; - /** - * Indicates if consent was provided by the administrator (on behalf of the organization) or by - * an individual. Possible values include: 'AllPrincipals', 'Principal' - */ - consentType?: ConsentType; - /** - * When consent type is Principal, this property specifies the id of the user that granted - * consent and applies only for that user. - */ - principalId?: string; - /** - * Object Id of the resource you want to grant - */ - resourceId?: string; - /** - * Specifies the value of the scope claim that the resource application should expect in the - * OAuth 2.0 access token. For example, User.Read - */ - scope?: string; - /** - * Start time for TTL - */ - startTime?: string; - /** - * Expiry time for TTL - */ - expiryTime?: string; -} - -/** - * Optional Parameters. - */ -export interface ApplicationsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The filters to apply to the operation. - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface DeletedApplicationsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply to the operation. - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface GroupsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply to the operation. - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface ServicePrincipalsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply to the operation. - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface UsersListOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply to the operation. - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface DomainsListOptionalParams extends msRest.RequestOptionsBase { - /** - * The filter to apply to the operation. - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface OAuth2PermissionGrantListOptionalParams extends msRest.RequestOptionsBase { - /** - * This is the Service Principal ObjectId associated with the app - */ - filter?: string; -} - -/** - * Optional Parameters. - */ -export interface OAuth2PermissionGrantCreateOptionalParams extends msRest.RequestOptionsBase { - /** - * The relevant app Service Principal Object Id and the Service Principal Object Id you want to - * grant. - */ - body?: OAuth2PermissionGrant; -} - -/** - * An interface representing GraphRbacManagementClientOptions. - */ -export interface GraphRbacManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; -} - -/** - * @interface - * DirectoryObject list operation result. - * @extends Array - */ -export interface DirectoryObjectListResult extends Array { - /** - * The URL to get the next set of results. - */ - odatanextLink?: string; -} - -/** - * @interface - * Application list operation result. - * @extends Array - */ -export interface ApplicationListResult extends Array { - /** - * The URL to get the next set of results. - */ - odatanextLink?: string; -} - -/** - * @interface - * KeyCredential list operation result. - * @extends Array - */ -export interface KeyCredentialListResult extends Array { -} - -/** - * @interface - * PasswordCredential list operation result. - * @extends Array - */ -export interface PasswordCredentialListResult extends Array { -} - -/** - * @interface - * Server response for Get tenant groups API call - * @extends Array - */ -export interface GroupListResult extends Array { - /** - * The URL to get the next set of results. - */ - odatanextLink?: string; -} - -/** - * @interface - * Server response for GetMemberGroups API call. - * @extends Array - */ -export interface GroupGetMemberGroupsResult extends Array { -} - -/** - * @interface - * Server response for get tenant service principals API call. - * @extends Array - */ -export interface ServicePrincipalListResult extends Array { - /** - * the URL to get the next set of results. - */ - odatanextLink?: string; -} - -/** - * @interface - * Server response for Get tenant users API call. - * @extends Array - */ -export interface UserListResult extends Array { - /** - * The URL to get the next set of results. - */ - odatanextLink?: string; -} - -/** - * @interface - * Server response for GetMemberGroups API call. - * @extends Array - */ -export interface UserGetMemberGroupsResult extends Array { -} - -/** - * @interface - * Server response for Get tenant domains API call. - * @extends Array - */ -export interface DomainListResult extends Array { -} - -/** - * @interface - * Server response for get oauth2 permissions grants - * @extends Array - */ -export interface OAuth2PermissionGrantListResult extends Array { - /** - * the URL to get the next set of results. - */ - odatanextLink?: string; -} - -/** - * Defines values for UserType. - * Possible values include: 'Member', 'Guest' - * @readonly - * @enum {string} - */ -export type UserType = 'Member' | 'Guest'; - -/** - * Defines values for ConsentType. - * Possible values include: 'AllPrincipals', 'Principal' - * @readonly - * @enum {string} - */ -export type ConsentType = 'AllPrincipals' | 'Principal'; - -/** - * Contains response data for the get operation. - */ -export type SignedInUserGetResponse = User & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: User; - }; -}; - -/** - * Contains response data for the listOwnedObjects operation. - */ -export type SignedInUserListOwnedObjectsResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the listOwnedObjectsNext operation. - */ -export type SignedInUserListOwnedObjectsNextResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type ApplicationsCreateResponse = Application & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Application; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type ApplicationsListResponse = ApplicationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type ApplicationsGetResponse = Application & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Application; - }; -}; - -/** - * Contains response data for the listOwners operation. - */ -export type ApplicationsListOwnersResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the listKeyCredentials operation. - */ -export type ApplicationsListKeyCredentialsResponse = KeyCredentialListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyCredentialListResult; - }; -}; - -/** - * Contains response data for the listPasswordCredentials operation. - */ -export type ApplicationsListPasswordCredentialsResponse = PasswordCredentialListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PasswordCredentialListResult; - }; -}; - -/** - * Contains response data for the getServicePrincipalsIdByAppId operation. - */ -export type ApplicationsGetServicePrincipalsIdByAppIdResponse = ServicePrincipalObjectResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ServicePrincipalObjectResult; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type ApplicationsListNextResponse = ApplicationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationListResult; - }; -}; - -/** - * Contains response data for the listOwnersNext operation. - */ -export type ApplicationsListOwnersNextResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the restore operation. - */ -export type DeletedApplicationsRestoreResponse = Application & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Application; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type DeletedApplicationsListResponse = ApplicationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationListResult; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type DeletedApplicationsListNextResponse = ApplicationListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ApplicationListResult; - }; -}; - -/** - * Contains response data for the isMemberOf operation. - */ -export type GroupsIsMemberOfResponse = CheckGroupMembershipResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CheckGroupMembershipResult; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type GroupsCreateResponse = ADGroup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ADGroup; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type GroupsListResponse = GroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: GroupListResult; - }; -}; - -/** - * Contains response data for the getGroupMembers operation. - */ -export type GroupsGetGroupMembersResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type GroupsGetResponse = ADGroup & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ADGroup; - }; -}; - -/** - * Contains response data for the getMemberGroups operation. - */ -export type GroupsGetMemberGroupsResponse = GroupGetMemberGroupsResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: GroupGetMemberGroupsResult; - }; -}; - -/** - * Contains response data for the listOwners operation. - */ -export type GroupsListOwnersResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type GroupsListNextResponse = GroupListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: GroupListResult; - }; -}; - -/** - * Contains response data for the getGroupMembersNext operation. - */ -export type GroupsGetGroupMembersNextResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the listOwnersNext operation. - */ -export type GroupsListOwnersNextResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type ServicePrincipalsCreateResponse = ServicePrincipal & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ServicePrincipal; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type ServicePrincipalsListResponse = ServicePrincipalListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ServicePrincipalListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type ServicePrincipalsGetResponse = ServicePrincipal & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ServicePrincipal; - }; -}; - -/** - * Contains response data for the listOwners operation. - */ -export type ServicePrincipalsListOwnersResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the listKeyCredentials operation. - */ -export type ServicePrincipalsListKeyCredentialsResponse = KeyCredentialListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: KeyCredentialListResult; - }; -}; - -/** - * Contains response data for the listPasswordCredentials operation. - */ -export type ServicePrincipalsListPasswordCredentialsResponse = PasswordCredentialListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: PasswordCredentialListResult; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type ServicePrincipalsListNextResponse = ServicePrincipalListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ServicePrincipalListResult; - }; -}; - -/** - * Contains response data for the listOwnersNext operation. - */ -export type ServicePrincipalsListOwnersNextResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type UsersCreateResponse = User & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: User; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type UsersListResponse = UserListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: UserListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type UsersGetResponse = User & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: User; - }; -}; - -/** - * Contains response data for the getMemberGroups operation. - */ -export type UsersGetMemberGroupsResponse = UserGetMemberGroupsResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: UserGetMemberGroupsResult; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type UsersListNextResponse = UserListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: UserListResult; - }; -}; - -/** - * Contains response data for the getObjectsByObjectIds operation. - */ -export type ObjectsGetObjectsByObjectIdsResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the getObjectsByObjectIdsNext operation. - */ -export type ObjectsGetObjectsByObjectIdsNextResponse = DirectoryObjectListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DirectoryObjectListResult; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type DomainsListResponse = DomainListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: DomainListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type DomainsGetResponse = Domain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Domain; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type OAuth2PermissionGrantListResponse = OAuth2PermissionGrantListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OAuth2PermissionGrantListResult; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type OAuth2PermissionGrantCreateResponse = OAuth2PermissionGrant & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OAuth2PermissionGrant; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type OAuth2PermissionGrantListNextResponse = OAuth2PermissionGrantListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OAuth2PermissionGrantListResult; - }; -}; diff --git a/sdk/graphrbac/graph/src/models/mappers.ts b/sdk/graphrbac/graph/src/models/mappers.ts deleted file mode 100644 index 1eda38d650ec..000000000000 --- a/sdk/graphrbac/graph/src/models/mappers.ts +++ /dev/null @@ -1,2517 +0,0 @@ -/* - * 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. - */ - -import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; -import * as msRest from "@azure/ms-rest-js"; - -export const CloudError = CloudErrorMapper; -export const BaseResource = BaseResourceMapper; - -export const InformationalUrl: msRest.CompositeMapper = { - serializedName: "InformationalUrl", - type: { - name: "Composite", - className: "InformationalUrl", - modelProperties: { - termsOfService: { - serializedName: "termsOfService", - type: { - name: "String" - } - }, - marketing: { - serializedName: "marketing", - type: { - name: "String" - } - }, - privacy: { - serializedName: "privacy", - type: { - name: "String" - } - }, - support: { - serializedName: "support", - type: { - name: "String" - } - } - } - } -}; - -export const OAuth2Permission: msRest.CompositeMapper = { - serializedName: "OAuth2Permission", - type: { - name: "Composite", - className: "OAuth2Permission", - modelProperties: { - adminConsentDescription: { - serializedName: "adminConsentDescription", - type: { - name: "String" - } - }, - adminConsentDisplayName: { - serializedName: "adminConsentDisplayName", - type: { - name: "String" - } - }, - id: { - serializedName: "id", - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "isEnabled", - type: { - name: "Boolean" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - userConsentDescription: { - serializedName: "userConsentDescription", - type: { - name: "String" - } - }, - userConsentDisplayName: { - serializedName: "userConsentDisplayName", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - -export const OptionalClaim: msRest.CompositeMapper = { - serializedName: "OptionalClaim", - type: { - name: "Composite", - className: "OptionalClaim", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - source: { - serializedName: "source", - type: { - name: "String" - } - }, - essential: { - serializedName: "essential", - type: { - name: "Boolean" - } - }, - additionalProperties: { - serializedName: "additionalProperties", - type: { - name: "Object" - } - } - } - } -}; - -export const OptionalClaims: msRest.CompositeMapper = { - serializedName: "OptionalClaims", - type: { - name: "Composite", - className: "OptionalClaims", - modelProperties: { - idToken: { - serializedName: "idToken", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OptionalClaim" - } - } - } - }, - accessToken: { - serializedName: "accessToken", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OptionalClaim" - } - } - } - }, - samlToken: { - serializedName: "samlToken", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OptionalClaim" - } - } - } - } - } - } -}; - -export const PreAuthorizedApplicationPermission: msRest.CompositeMapper = { - serializedName: "PreAuthorizedApplicationPermission", - type: { - name: "Composite", - className: "PreAuthorizedApplicationPermission", - modelProperties: { - directAccessGrant: { - serializedName: "directAccessGrant", - type: { - name: "Boolean" - } - }, - accessGrants: { - serializedName: "accessGrants", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PreAuthorizedApplicationExtension: msRest.CompositeMapper = { - serializedName: "PreAuthorizedApplicationExtension", - type: { - name: "Composite", - className: "PreAuthorizedApplicationExtension", - modelProperties: { - conditions: { - serializedName: "conditions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const PreAuthorizedApplication: msRest.CompositeMapper = { - serializedName: "PreAuthorizedApplication", - type: { - name: "Composite", - className: "PreAuthorizedApplication", - modelProperties: { - appId: { - serializedName: "appId", - type: { - name: "String" - } - }, - permissions: { - serializedName: "permissions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PreAuthorizedApplicationPermission" - } - } - } - }, - extensions: { - serializedName: "extensions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PreAuthorizedApplicationExtension" - } - } - } - } - } - } -}; - -export const GraphError: msRest.CompositeMapper = { - serializedName: "GraphError", - type: { - name: "Composite", - className: "GraphError", - modelProperties: { - code: { - serializedName: "odata\\.error.code", - type: { - name: "String" - } - }, - message: { - serializedName: "odata\\.error.message.value", - type: { - name: "String" - } - } - } - } -}; - -export const DirectoryObject: msRest.CompositeMapper = { - serializedName: "DirectoryObject", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "objectType", - clientName: "objectType" - }, - uberParent: "DirectoryObject", - className: "DirectoryObject", - modelProperties: { - objectId: { - readOnly: true, - serializedName: "objectId", - type: { - name: "String" - } - }, - deletionTimestamp: { - readOnly: true, - serializedName: "deletionTimestamp", - type: { - name: "DateTime" - } - }, - objectType: { - required: true, - serializedName: "objectType", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const KeyCredential: msRest.CompositeMapper = { - serializedName: "KeyCredential", - type: { - name: "Composite", - className: "KeyCredential", - modelProperties: { - startDate: { - serializedName: "startDate", - type: { - name: "DateTime" - } - }, - endDate: { - serializedName: "endDate", - type: { - name: "DateTime" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - }, - keyId: { - serializedName: "keyId", - type: { - name: "String" - } - }, - usage: { - serializedName: "usage", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - customKeyIdentifier: { - serializedName: "customKeyIdentifier", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const PasswordCredential: msRest.CompositeMapper = { - serializedName: "PasswordCredential", - type: { - name: "Composite", - className: "PasswordCredential", - modelProperties: { - startDate: { - serializedName: "startDate", - type: { - name: "DateTime" - } - }, - endDate: { - serializedName: "endDate", - type: { - name: "DateTime" - } - }, - keyId: { - serializedName: "keyId", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - }, - customKeyIdentifier: { - serializedName: "customKeyIdentifier", - type: { - name: "ByteArray" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const ResourceAccess: msRest.CompositeMapper = { - serializedName: "ResourceAccess", - type: { - name: "Composite", - className: "ResourceAccess", - modelProperties: { - id: { - required: true, - serializedName: "id", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const RequiredResourceAccess: msRest.CompositeMapper = { - serializedName: "RequiredResourceAccess", - type: { - name: "Composite", - className: "RequiredResourceAccess", - modelProperties: { - resourceAccess: { - required: true, - serializedName: "resourceAccess", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ResourceAccess", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - resourceAppId: { - serializedName: "resourceAppId", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const AppRole: msRest.CompositeMapper = { - serializedName: "AppRole", - type: { - name: "Composite", - className: "AppRole", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, - allowedMemberTypes: { - serializedName: "allowedMemberTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - isEnabled: { - serializedName: "isEnabled", - type: { - name: "Boolean" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationBase: msRest.CompositeMapper = { - serializedName: "ApplicationBase", - type: { - name: "Composite", - className: "ApplicationBase", - modelProperties: { - allowGuestsSignIn: { - serializedName: "allowGuestsSignIn", - type: { - name: "Boolean" - } - }, - allowPassthroughUsers: { - serializedName: "allowPassthroughUsers", - type: { - name: "Boolean" - } - }, - appLogoUrl: { - serializedName: "appLogoUrl", - type: { - name: "String" - } - }, - appRoles: { - serializedName: "appRoles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AppRole" - } - } - } - }, - appPermissions: { - serializedName: "appPermissions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - availableToOtherTenants: { - serializedName: "availableToOtherTenants", - type: { - name: "Boolean" - } - }, - errorUrl: { - serializedName: "errorUrl", - type: { - name: "String" - } - }, - groupMembershipClaims: { - serializedName: "groupMembershipClaims", - type: { - name: "Object" - } - }, - homepage: { - serializedName: "homepage", - type: { - name: "String" - } - }, - informationalUrls: { - serializedName: "informationalUrls", - type: { - name: "Composite", - className: "InformationalUrl" - } - }, - isDeviceOnlyAuthSupported: { - serializedName: "isDeviceOnlyAuthSupported", - type: { - name: "Boolean" - } - }, - keyCredentials: { - serializedName: "keyCredentials", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - knownClientApplications: { - serializedName: "knownClientApplications", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - logoutUrl: { - serializedName: "logoutUrl", - type: { - name: "String" - } - }, - oauth2AllowImplicitFlow: { - serializedName: "oauth2AllowImplicitFlow", - type: { - name: "Boolean" - } - }, - oauth2AllowUrlPathMatching: { - serializedName: "oauth2AllowUrlPathMatching", - type: { - name: "Boolean" - } - }, - oauth2Permissions: { - serializedName: "oauth2Permissions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OAuth2Permission" - } - } - } - }, - oauth2RequirePostResponse: { - serializedName: "oauth2RequirePostResponse", - type: { - name: "Boolean" - } - }, - orgRestrictions: { - serializedName: "orgRestrictions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - optionalClaims: { - serializedName: "optionalClaims", - type: { - name: "Composite", - className: "OptionalClaims" - } - }, - passwordCredentials: { - serializedName: "passwordCredentials", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PasswordCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - preAuthorizedApplications: { - serializedName: "preAuthorizedApplications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PreAuthorizedApplication" - } - } - } - }, - publicClient: { - serializedName: "publicClient", - type: { - name: "Boolean" - } - }, - publisherDomain: { - serializedName: "publisherDomain", - type: { - name: "String" - } - }, - replyUrls: { - serializedName: "replyUrls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredResourceAccess: { - serializedName: "requiredResourceAccess", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RequiredResourceAccess", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - samlMetadataUrl: { - serializedName: "samlMetadataUrl", - type: { - name: "String" - } - }, - signInAudience: { - serializedName: "signInAudience", - type: { - name: "String" - } - }, - wwwHomepage: { - serializedName: "wwwHomepage", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationCreateParameters: msRest.CompositeMapper = { - serializedName: "ApplicationCreateParameters", - type: { - name: "Composite", - className: "ApplicationCreateParameters", - modelProperties: { - ...ApplicationBase.type.modelProperties, - displayName: { - required: true, - serializedName: "displayName", - type: { - name: "String" - } - }, - identifierUris: { - serializedName: "identifierUris", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ApplicationUpdateParameters: msRest.CompositeMapper = { - serializedName: "ApplicationUpdateParameters", - type: { - name: "Composite", - className: "ApplicationUpdateParameters", - modelProperties: { - ...ApplicationBase.type.modelProperties, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - identifierUris: { - serializedName: "identifierUris", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const Application: msRest.CompositeMapper = { - serializedName: "Application", - type: { - name: "Composite", - polymorphicDiscriminator: DirectoryObject.type.polymorphicDiscriminator, - uberParent: "DirectoryObject", - className: "Application", - modelProperties: { - ...DirectoryObject.type.modelProperties, - appId: { - serializedName: "appId", - type: { - name: "String" - } - }, - allowGuestsSignIn: { - serializedName: "allowGuestsSignIn", - type: { - name: "Boolean" - } - }, - allowPassthroughUsers: { - serializedName: "allowPassthroughUsers", - type: { - name: "Boolean" - } - }, - appLogoUrl: { - serializedName: "appLogoUrl", - type: { - name: "String" - } - }, - appRoles: { - serializedName: "appRoles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AppRole" - } - } - } - }, - appPermissions: { - serializedName: "appPermissions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - availableToOtherTenants: { - serializedName: "availableToOtherTenants", - type: { - name: "Boolean" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - errorUrl: { - serializedName: "errorUrl", - type: { - name: "String" - } - }, - groupMembershipClaims: { - serializedName: "groupMembershipClaims", - type: { - name: "Object" - } - }, - homepage: { - serializedName: "homepage", - type: { - name: "String" - } - }, - identifierUris: { - serializedName: "identifierUris", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - informationalUrls: { - serializedName: "informationalUrls", - type: { - name: "Composite", - className: "InformationalUrl" - } - }, - isDeviceOnlyAuthSupported: { - serializedName: "isDeviceOnlyAuthSupported", - type: { - name: "Boolean" - } - }, - keyCredentials: { - serializedName: "keyCredentials", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - knownClientApplications: { - serializedName: "knownClientApplications", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - logoutUrl: { - serializedName: "logoutUrl", - type: { - name: "String" - } - }, - oauth2AllowImplicitFlow: { - serializedName: "oauth2AllowImplicitFlow", - type: { - name: "Boolean" - } - }, - oauth2AllowUrlPathMatching: { - serializedName: "oauth2AllowUrlPathMatching", - type: { - name: "Boolean" - } - }, - oauth2Permissions: { - serializedName: "oauth2Permissions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OAuth2Permission" - } - } - } - }, - oauth2RequirePostResponse: { - serializedName: "oauth2RequirePostResponse", - type: { - name: "Boolean" - } - }, - orgRestrictions: { - serializedName: "orgRestrictions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - optionalClaims: { - serializedName: "optionalClaims", - type: { - name: "Composite", - className: "OptionalClaims" - } - }, - passwordCredentials: { - serializedName: "passwordCredentials", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PasswordCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - preAuthorizedApplications: { - serializedName: "preAuthorizedApplications", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PreAuthorizedApplication" - } - } - } - }, - publicClient: { - serializedName: "publicClient", - type: { - name: "Boolean" - } - }, - publisherDomain: { - serializedName: "publisherDomain", - type: { - name: "String" - } - }, - replyUrls: { - serializedName: "replyUrls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredResourceAccess: { - serializedName: "requiredResourceAccess", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RequiredResourceAccess", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - samlMetadataUrl: { - serializedName: "samlMetadataUrl", - type: { - name: "String" - } - }, - signInAudience: { - serializedName: "signInAudience", - type: { - name: "String" - } - }, - wwwHomepage: { - serializedName: "wwwHomepage", - type: { - name: "String" - } - } - }, - additionalProperties: DirectoryObject.type.additionalProperties - } -}; - -export const ServicePrincipalObjectResult: msRest.CompositeMapper = { - serializedName: "ServicePrincipalObjectResult", - type: { - name: "Composite", - className: "ServicePrincipalObjectResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "String" - } - }, - odatametadata: { - serializedName: "odata\\.metadata", - type: { - name: "String" - } - } - } - } -}; - -export const AddOwnerParameters: msRest.CompositeMapper = { - serializedName: "AddOwnerParameters", - type: { - name: "Composite", - className: "AddOwnerParameters", - modelProperties: { - url: { - required: true, - serializedName: "url", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const KeyCredentialsUpdateParameters: msRest.CompositeMapper = { - serializedName: "KeyCredentialsUpdateParameters", - type: { - name: "Composite", - className: "KeyCredentialsUpdateParameters", - modelProperties: { - value: { - required: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - } - } - } -}; - -export const PasswordCredentialsUpdateParameters: msRest.CompositeMapper = { - serializedName: "PasswordCredentialsUpdateParameters", - type: { - name: "Composite", - className: "PasswordCredentialsUpdateParameters", - modelProperties: { - value: { - required: true, - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PasswordCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - } - } - } -}; - -export const GroupAddMemberParameters: msRest.CompositeMapper = { - serializedName: "GroupAddMemberParameters", - type: { - name: "Composite", - className: "GroupAddMemberParameters", - modelProperties: { - url: { - required: true, - serializedName: "url", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const GroupCreateParameters: msRest.CompositeMapper = { - serializedName: "GroupCreateParameters", - type: { - name: "Composite", - className: "GroupCreateParameters", - modelProperties: { - displayName: { - required: true, - serializedName: "displayName", - type: { - name: "String" - } - }, - mailEnabled: { - required: true, - isConstant: true, - serializedName: "mailEnabled", - defaultValue: false, - type: { - name: "Boolean" - } - }, - mailNickname: { - required: true, - serializedName: "mailNickname", - type: { - name: "String" - } - }, - securityEnabled: { - required: true, - isConstant: true, - serializedName: "securityEnabled", - defaultValue: true, - type: { - name: "Boolean" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const ADGroup: msRest.CompositeMapper = { - serializedName: "Group", - type: { - name: "Composite", - polymorphicDiscriminator: DirectoryObject.type.polymorphicDiscriminator, - uberParent: "DirectoryObject", - className: "ADGroup", - modelProperties: { - ...DirectoryObject.type.modelProperties, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - mailEnabled: { - serializedName: "mailEnabled", - type: { - name: "Boolean" - } - }, - mailNickname: { - serializedName: "mailNickname", - type: { - name: "String" - } - }, - securityEnabled: { - serializedName: "securityEnabled", - type: { - name: "Boolean" - } - }, - mail: { - serializedName: "mail", - type: { - name: "String" - } - } - }, - additionalProperties: DirectoryObject.type.additionalProperties - } -}; - -export const GroupGetMemberGroupsParameters: msRest.CompositeMapper = { - serializedName: "GroupGetMemberGroupsParameters", - type: { - name: "Composite", - className: "GroupGetMemberGroupsParameters", - modelProperties: { - securityEnabledOnly: { - required: true, - serializedName: "securityEnabledOnly", - type: { - name: "Boolean" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const CheckGroupMembershipParameters: msRest.CompositeMapper = { - serializedName: "CheckGroupMembershipParameters", - type: { - name: "Composite", - className: "CheckGroupMembershipParameters", - modelProperties: { - groupId: { - required: true, - serializedName: "groupId", - type: { - name: "String" - } - }, - memberId: { - required: true, - serializedName: "memberId", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const CheckGroupMembershipResult: msRest.CompositeMapper = { - serializedName: "CheckGroupMembershipResult", - type: { - name: "Composite", - className: "CheckGroupMembershipResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Boolean" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const ServicePrincipalBase: msRest.CompositeMapper = { - serializedName: "ServicePrincipalBase", - type: { - name: "Composite", - className: "ServicePrincipalBase", - modelProperties: { - accountEnabled: { - serializedName: "accountEnabled", - type: { - name: "Boolean" - } - }, - appRoleAssignmentRequired: { - serializedName: "appRoleAssignmentRequired", - type: { - name: "Boolean" - } - }, - keyCredentials: { - serializedName: "keyCredentials", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - passwordCredentials: { - serializedName: "passwordCredentials", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PasswordCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - servicePrincipalType: { - serializedName: "servicePrincipalType", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ServicePrincipalCreateParameters: msRest.CompositeMapper = { - serializedName: "ServicePrincipalCreateParameters", - type: { - name: "Composite", - className: "ServicePrincipalCreateParameters", - modelProperties: { - ...ServicePrincipalBase.type.modelProperties, - appId: { - required: true, - serializedName: "appId", - type: { - name: "String" - } - } - } - } -}; - -export const ServicePrincipalUpdateParameters: msRest.CompositeMapper = { - serializedName: "ServicePrincipalUpdateParameters", - type: { - name: "Composite", - className: "ServicePrincipalUpdateParameters", - modelProperties: { - ...ServicePrincipalBase.type.modelProperties - } - } -}; - -export const ServicePrincipal: msRest.CompositeMapper = { - serializedName: "ServicePrincipal", - type: { - name: "Composite", - polymorphicDiscriminator: DirectoryObject.type.polymorphicDiscriminator, - uberParent: "DirectoryObject", - className: "ServicePrincipal", - modelProperties: { - ...DirectoryObject.type.modelProperties, - accountEnabled: { - serializedName: "accountEnabled", - type: { - name: "Boolean" - } - }, - alternativeNames: { - serializedName: "alternativeNames", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - appDisplayName: { - readOnly: true, - serializedName: "appDisplayName", - type: { - name: "String" - } - }, - appId: { - serializedName: "appId", - type: { - name: "String" - } - }, - appOwnerTenantId: { - readOnly: true, - serializedName: "appOwnerTenantId", - type: { - name: "String" - } - }, - appRoleAssignmentRequired: { - serializedName: "appRoleAssignmentRequired", - type: { - name: "Boolean" - } - }, - appRoles: { - serializedName: "appRoles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AppRole" - } - } - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - errorUrl: { - serializedName: "errorUrl", - type: { - name: "String" - } - }, - homepage: { - serializedName: "homepage", - type: { - name: "String" - } - }, - keyCredentials: { - serializedName: "keyCredentials", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - logoutUrl: { - serializedName: "logoutUrl", - type: { - name: "String" - } - }, - oauth2Permissions: { - readOnly: true, - serializedName: "oauth2Permissions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OAuth2Permission" - } - } - } - }, - passwordCredentials: { - serializedName: "passwordCredentials", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PasswordCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - preferredTokenSigningKeyThumbprint: { - serializedName: "preferredTokenSigningKeyThumbprint", - type: { - name: "String" - } - }, - publisherName: { - serializedName: "publisherName", - type: { - name: "String" - } - }, - replyUrls: { - serializedName: "replyUrls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - samlMetadataUrl: { - serializedName: "samlMetadataUrl", - type: { - name: "String" - } - }, - servicePrincipalNames: { - serializedName: "servicePrincipalNames", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - servicePrincipalType: { - serializedName: "servicePrincipalType", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - }, - additionalProperties: DirectoryObject.type.additionalProperties - } -}; - -export const PasswordProfile: msRest.CompositeMapper = { - serializedName: "PasswordProfile", - type: { - name: "Composite", - className: "PasswordProfile", - modelProperties: { - password: { - required: true, - serializedName: "password", - type: { - name: "String" - } - }, - forceChangePasswordNextLogin: { - serializedName: "forceChangePasswordNextLogin", - type: { - name: "Boolean" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const UserBase: msRest.CompositeMapper = { - serializedName: "UserBase", - type: { - name: "Composite", - className: "UserBase", - modelProperties: { - immutableId: { - serializedName: "immutableId", - type: { - name: "String" - } - }, - usageLocation: { - serializedName: "usageLocation", - type: { - name: "String" - } - }, - givenName: { - serializedName: "givenName", - type: { - name: "String" - } - }, - surname: { - serializedName: "surname", - type: { - name: "String" - } - }, - userType: { - serializedName: "userType", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const UserCreateParameters: msRest.CompositeMapper = { - serializedName: "UserCreateParameters", - type: { - name: "Composite", - className: "UserCreateParameters", - modelProperties: { - ...UserBase.type.modelProperties, - accountEnabled: { - required: true, - serializedName: "accountEnabled", - type: { - name: "Boolean" - } - }, - displayName: { - required: true, - serializedName: "displayName", - type: { - name: "String" - } - }, - passwordProfile: { - required: true, - serializedName: "passwordProfile", - type: { - name: "Composite", - className: "PasswordProfile", - additionalProperties: { - type: { - name: "Object" - } - } - } - }, - userPrincipalName: { - required: true, - serializedName: "userPrincipalName", - type: { - name: "String" - } - }, - mailNickname: { - required: true, - serializedName: "mailNickname", - type: { - name: "String" - } - }, - mail: { - serializedName: "mail", - type: { - name: "String" - } - } - }, - additionalProperties: UserBase.type.additionalProperties - } -}; - -export const UserUpdateParameters: msRest.CompositeMapper = { - serializedName: "UserUpdateParameters", - type: { - name: "Composite", - className: "UserUpdateParameters", - modelProperties: { - ...UserBase.type.modelProperties, - accountEnabled: { - serializedName: "accountEnabled", - type: { - name: "Boolean" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - passwordProfile: { - serializedName: "passwordProfile", - type: { - name: "Composite", - className: "PasswordProfile", - additionalProperties: { - type: { - name: "Object" - } - } - } - }, - userPrincipalName: { - serializedName: "userPrincipalName", - type: { - name: "String" - } - }, - mailNickname: { - serializedName: "mailNickname", - type: { - name: "String" - } - } - }, - additionalProperties: UserBase.type.additionalProperties - } -}; - -export const SignInName: msRest.CompositeMapper = { - serializedName: "SignInName", - type: { - name: "Composite", - className: "SignInName", - modelProperties: { - type: { - serializedName: "type", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const User: msRest.CompositeMapper = { - serializedName: "User", - type: { - name: "Composite", - polymorphicDiscriminator: DirectoryObject.type.polymorphicDiscriminator, - uberParent: "DirectoryObject", - className: "User", - modelProperties: { - ...DirectoryObject.type.modelProperties, - immutableId: { - serializedName: "immutableId", - type: { - name: "String" - } - }, - usageLocation: { - serializedName: "usageLocation", - type: { - name: "String" - } - }, - givenName: { - serializedName: "givenName", - type: { - name: "String" - } - }, - surname: { - serializedName: "surname", - type: { - name: "String" - } - }, - userType: { - serializedName: "userType", - type: { - name: "String" - } - }, - accountEnabled: { - serializedName: "accountEnabled", - type: { - name: "Boolean" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - userPrincipalName: { - serializedName: "userPrincipalName", - type: { - name: "String" - } - }, - mailNickname: { - serializedName: "mailNickname", - type: { - name: "String" - } - }, - mail: { - serializedName: "mail", - type: { - name: "String" - } - }, - signInNames: { - serializedName: "signInNames", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SignInName", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - } - }, - additionalProperties: DirectoryObject.type.additionalProperties - } -}; - -export const UserGetMemberGroupsParameters: msRest.CompositeMapper = { - serializedName: "UserGetMemberGroupsParameters", - type: { - name: "Composite", - className: "UserGetMemberGroupsParameters", - modelProperties: { - securityEnabledOnly: { - required: true, - serializedName: "securityEnabledOnly", - type: { - name: "Boolean" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const GetObjectsParameters: msRest.CompositeMapper = { - serializedName: "GetObjectsParameters", - type: { - name: "Composite", - className: "GetObjectsParameters", - modelProperties: { - objectIds: { - serializedName: "objectIds", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - types: { - serializedName: "types", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - includeDirectoryObjectReferences: { - serializedName: "includeDirectoryObjectReferences", - type: { - name: "Boolean" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const Domain: msRest.CompositeMapper = { - serializedName: "Domain", - type: { - name: "Composite", - className: "Domain", - modelProperties: { - authenticationType: { - readOnly: true, - serializedName: "authenticationType", - type: { - name: "String" - } - }, - isDefault: { - readOnly: true, - serializedName: "isDefault", - type: { - name: "Boolean" - } - }, - isVerified: { - readOnly: true, - serializedName: "isVerified", - type: { - name: "Boolean" - } - }, - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const OAuth2PermissionGrant: msRest.CompositeMapper = { - serializedName: "OAuth2PermissionGrant", - type: { - name: "Composite", - className: "OAuth2PermissionGrant", - modelProperties: { - odatatype: { - serializedName: "odata\\.type", - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - type: { - name: "String" - } - }, - objectId: { - serializedName: "objectId", - type: { - name: "String" - } - }, - consentType: { - serializedName: "consentType", - type: { - name: "String" - } - }, - principalId: { - serializedName: "principalId", - type: { - name: "String" - } - }, - resourceId: { - serializedName: "resourceId", - type: { - name: "String" - } - }, - scope: { - serializedName: "scope", - type: { - name: "String" - } - }, - startTime: { - serializedName: "startTime", - type: { - name: "String" - } - }, - expiryTime: { - serializedName: "expiryTime", - type: { - name: "String" - } - } - } - } -}; - -export const DirectoryObjectListResult: msRest.CompositeMapper = { - serializedName: "DirectoryObjectListResult", - type: { - name: "Composite", - className: "DirectoryObjectListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DirectoryObject", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - }, - odatanextLink: { - serializedName: "odata\\.nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const ApplicationListResult: msRest.CompositeMapper = { - serializedName: "ApplicationListResult", - type: { - name: "Composite", - className: "ApplicationListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Application", - additionalProperties: DirectoryObject.type.additionalProperties - } - } - } - }, - odatanextLink: { - serializedName: "odata\\.nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const KeyCredentialListResult: msRest.CompositeMapper = { - serializedName: "KeyCredentialListResult", - type: { - name: "Composite", - className: "KeyCredentialListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "KeyCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - } - } - } -}; - -export const PasswordCredentialListResult: msRest.CompositeMapper = { - serializedName: "PasswordCredentialListResult", - type: { - name: "Composite", - className: "PasswordCredentialListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PasswordCredential", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - } - } - } -}; - -export const GroupListResult: msRest.CompositeMapper = { - serializedName: "GroupListResult", - type: { - name: "Composite", - className: "GroupListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ADGroup", - additionalProperties: DirectoryObject.type.additionalProperties - } - } - } - }, - odatanextLink: { - serializedName: "odata\\.nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const GroupGetMemberGroupsResult: msRest.CompositeMapper = { - serializedName: "GroupGetMemberGroupsResult", - type: { - name: "Composite", - className: "GroupGetMemberGroupsResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const ServicePrincipalListResult: msRest.CompositeMapper = { - serializedName: "ServicePrincipalListResult", - type: { - name: "Composite", - className: "ServicePrincipalListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServicePrincipal", - additionalProperties: DirectoryObject.type.additionalProperties - } - } - } - }, - odatanextLink: { - serializedName: "odata\\.nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const UserListResult: msRest.CompositeMapper = { - serializedName: "UserListResult", - type: { - name: "Composite", - className: "UserListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "User", - additionalProperties: DirectoryObject.type.additionalProperties - } - } - } - }, - odatanextLink: { - serializedName: "odata\\.nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const UserGetMemberGroupsResult: msRest.CompositeMapper = { - serializedName: "UserGetMemberGroupsResult", - type: { - name: "Composite", - className: "UserGetMemberGroupsResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DomainListResult: msRest.CompositeMapper = { - serializedName: "DomainListResult", - type: { - name: "Composite", - className: "DomainListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Domain", - additionalProperties: { - type: { - name: "Object" - } - } - } - } - } - } - } - } -}; - -export const OAuth2PermissionGrantListResult: msRest.CompositeMapper = { - serializedName: "OAuth2PermissionGrantListResult", - type: { - name: "Composite", - className: "OAuth2PermissionGrantListResult", - modelProperties: { - value: { - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OAuth2PermissionGrant" - } - } - } - }, - odatanextLink: { - serializedName: "odata\\.nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const discriminators = { - 'DirectoryObject' : DirectoryObject, - 'DirectoryObject.Application' : Application, - 'DirectoryObject.Group' : ADGroup, - 'DirectoryObject.ServicePrincipal' : ServicePrincipal, - 'DirectoryObject.User' : User - -}; diff --git a/sdk/graphrbac/graph/src/models/oAuth2PermissionGrantOperationsMappers.ts b/sdk/graphrbac/graph/src/models/oAuth2PermissionGrantOperationsMappers.ts deleted file mode 100644 index 5561dd9807c8..000000000000 --- a/sdk/graphrbac/graph/src/models/oAuth2PermissionGrantOperationsMappers.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - CloudError, - GraphError, - OAuth2PermissionGrant, - OAuth2PermissionGrantListResult -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/objectsMappers.ts b/sdk/graphrbac/graph/src/models/objectsMappers.ts deleted file mode 100644 index 4519f8519587..000000000000 --- a/sdk/graphrbac/graph/src/models/objectsMappers.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - ADGroup, - Application, - AppRole, - CloudError, - DirectoryObject, - DirectoryObjectListResult, - GetObjectsParameters, - InformationalUrl, - KeyCredential, - OAuth2Permission, - OptionalClaim, - OptionalClaims, - PasswordCredential, - PreAuthorizedApplication, - PreAuthorizedApplicationExtension, - PreAuthorizedApplicationPermission, - RequiredResourceAccess, - ResourceAccess, - ServicePrincipal, - SignInName, - User -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/parameters.ts b/sdk/graphrbac/graph/src/models/parameters.ts deleted file mode 100644 index b770a204656e..000000000000 --- a/sdk/graphrbac/graph/src/models/parameters.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; - -export const acceptLanguage: msRest.OperationParameter = { - parameterPath: "acceptLanguage", - mapper: { - serializedName: "accept-language", - defaultValue: 'en-US', - type: { - name: "String" - } - } -}; -export const apiVersion: msRest.OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - required: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; -export const applicationID: msRest.OperationURLParameter = { - parameterPath: "applicationID", - mapper: { - required: true, - serializedName: "applicationID", - type: { - name: "String" - } - } -}; -export const applicationObjectId: msRest.OperationURLParameter = { - parameterPath: "applicationObjectId", - mapper: { - required: true, - serializedName: "applicationObjectId", - type: { - name: "String" - } - } -}; -export const domainName: msRest.OperationURLParameter = { - parameterPath: "domainName", - mapper: { - required: true, - serializedName: "domainName", - type: { - name: "String" - } - } -}; -export const filter: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "filter" - ], - mapper: { - serializedName: "$filter", - type: { - name: "String" - } - } -}; -export const groupObjectId: msRest.OperationURLParameter = { - parameterPath: "groupObjectId", - mapper: { - required: true, - serializedName: "groupObjectId", - type: { - name: "String" - } - } -}; -export const memberObjectId: msRest.OperationURLParameter = { - parameterPath: "memberObjectId", - mapper: { - required: true, - serializedName: "memberObjectId", - type: { - name: "String" - } - } -}; -export const nextLink: msRest.OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - required: true, - serializedName: "nextLink", - type: { - name: "String" - } - }, - skipEncoding: true -}; -export const nextPageLink: msRest.OperationURLParameter = { - parameterPath: "nextPageLink", - mapper: { - required: true, - serializedName: "nextLink", - type: { - name: "String" - } - }, - skipEncoding: true -}; -export const objectId: msRest.OperationURLParameter = { - parameterPath: "objectId", - mapper: { - required: true, - serializedName: "objectId", - type: { - name: "String" - } - } -}; -export const ownerObjectId: msRest.OperationURLParameter = { - parameterPath: "ownerObjectId", - mapper: { - required: true, - serializedName: "ownerObjectId", - type: { - name: "String" - } - } -}; -export const tenantID: msRest.OperationURLParameter = { - parameterPath: "tenantID", - mapper: { - required: true, - serializedName: "tenantID", - type: { - name: "String" - } - } -}; -export const upnOrObjectId: msRest.OperationURLParameter = { - parameterPath: "upnOrObjectId", - mapper: { - required: true, - serializedName: "upnOrObjectId", - type: { - name: "String" - } - } -}; diff --git a/sdk/graphrbac/graph/src/models/servicePrincipalsMappers.ts b/sdk/graphrbac/graph/src/models/servicePrincipalsMappers.ts deleted file mode 100644 index a271c68a12cd..000000000000 --- a/sdk/graphrbac/graph/src/models/servicePrincipalsMappers.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - ADGroup, - Application, - AppRole, - DirectoryObject, - DirectoryObjectListResult, - GraphError, - InformationalUrl, - KeyCredential, - KeyCredentialListResult, - KeyCredentialsUpdateParameters, - OAuth2Permission, - OptionalClaim, - OptionalClaims, - PasswordCredential, - PasswordCredentialListResult, - PasswordCredentialsUpdateParameters, - PreAuthorizedApplication, - PreAuthorizedApplicationExtension, - PreAuthorizedApplicationPermission, - RequiredResourceAccess, - ResourceAccess, - ServicePrincipal, - ServicePrincipalBase, - ServicePrincipalCreateParameters, - ServicePrincipalListResult, - ServicePrincipalUpdateParameters, - SignInName, - User -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/signedInUserMappers.ts b/sdk/graphrbac/graph/src/models/signedInUserMappers.ts deleted file mode 100644 index 37f16626e22d..000000000000 --- a/sdk/graphrbac/graph/src/models/signedInUserMappers.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - ADGroup, - Application, - AppRole, - DirectoryObject, - DirectoryObjectListResult, - GraphError, - InformationalUrl, - KeyCredential, - OAuth2Permission, - OptionalClaim, - OptionalClaims, - PasswordCredential, - PreAuthorizedApplication, - PreAuthorizedApplicationExtension, - PreAuthorizedApplicationPermission, - RequiredResourceAccess, - ResourceAccess, - ServicePrincipal, - SignInName, - User -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/usersMappers.ts b/sdk/graphrbac/graph/src/models/usersMappers.ts deleted file mode 100644 index bc1577f6adcf..000000000000 --- a/sdk/graphrbac/graph/src/models/usersMappers.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ - -export { - discriminators, - ADGroup, - Application, - AppRole, - DirectoryObject, - GraphError, - InformationalUrl, - KeyCredential, - OAuth2Permission, - OptionalClaim, - OptionalClaims, - PasswordCredential, - PasswordProfile, - PreAuthorizedApplication, - PreAuthorizedApplicationExtension, - PreAuthorizedApplicationPermission, - RequiredResourceAccess, - ResourceAccess, - ServicePrincipal, - SignInName, - User, - UserBase, - UserCreateParameters, - UserGetMemberGroupsParameters, - UserGetMemberGroupsResult, - UserListResult, - UserUpdateParameters -} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/operations/applications.ts b/sdk/graphrbac/graph/src/operations/applications.ts deleted file mode 100644 index 164dc84f32c0..000000000000 --- a/sdk/graphrbac/graph/src/operations/applications.ts +++ /dev/null @@ -1,855 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/applicationsMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a Applications. */ -export class Applications { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a Applications. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Create a new application. - * @param parameters The parameters for creating an application. - * @param [options] The optional parameters - * @returns Promise - */ - create(parameters: Models.ApplicationCreateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters The parameters for creating an application. - * @param callback The callback - */ - create(parameters: Models.ApplicationCreateParameters, callback: msRest.ServiceCallback): void; - /** - * @param parameters The parameters for creating an application. - * @param options The optional parameters - * @param callback The callback - */ - create(parameters: Models.ApplicationCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(parameters: Models.ApplicationCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options - }, - createOperationSpec, - callback) as Promise; - } - - /** - * Lists applications by filter parameters. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.ApplicationsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.ApplicationsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.ApplicationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Delete an application. - * @param applicationObjectId Application object ID. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(applicationObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId Application object ID. - * @param callback The callback - */ - deleteMethod(applicationObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId Application object ID. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(applicationObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(applicationObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Get an application by object ID. - * @param applicationObjectId Application object ID. - * @param [options] The optional parameters - * @returns Promise - */ - get(applicationObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId Application object ID. - * @param callback The callback - */ - get(applicationObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId Application object ID. - * @param options The optional parameters - * @param callback The callback - */ - get(applicationObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(applicationObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Update an existing application. - * @param applicationObjectId Application object ID. - * @param parameters Parameters to update an existing application. - * @param [options] The optional parameters - * @returns Promise - */ - patch(applicationObjectId: string, parameters: Models.ApplicationUpdateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId Application object ID. - * @param parameters Parameters to update an existing application. - * @param callback The callback - */ - patch(applicationObjectId: string, parameters: Models.ApplicationUpdateParameters, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId Application object ID. - * @param parameters Parameters to update an existing application. - * @param options The optional parameters - * @param callback The callback - */ - patch(applicationObjectId: string, parameters: Models.ApplicationUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - patch(applicationObjectId: string, parameters: Models.ApplicationUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - parameters, - options - }, - patchOperationSpec, - callback); - } - - /** - * The owners are a set of non-admin users who are allowed to modify this object. - * @summary Directory objects that are owners of the application. - * @param applicationObjectId The object ID of the application for which to get owners. - * @param [options] The optional parameters - * @returns Promise - */ - listOwners(applicationObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId The object ID of the application for which to get owners. - * @param callback The callback - */ - listOwners(applicationObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId The object ID of the application for which to get owners. - * @param options The optional parameters - * @param callback The callback - */ - listOwners(applicationObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOwners(applicationObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - options - }, - listOwnersOperationSpec, - callback) as Promise; - } - - /** - * Add an owner to an application. - * @param applicationObjectId The object ID of the application to which to add the owner. - * @param parameters The URL of the owner object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param [options] The optional parameters - * @returns Promise - */ - addOwner(applicationObjectId: string, parameters: Models.AddOwnerParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId The object ID of the application to which to add the owner. - * @param parameters The URL of the owner object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param callback The callback - */ - addOwner(applicationObjectId: string, parameters: Models.AddOwnerParameters, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId The object ID of the application to which to add the owner. - * @param parameters The URL of the owner object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param options The optional parameters - * @param callback The callback - */ - addOwner(applicationObjectId: string, parameters: Models.AddOwnerParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addOwner(applicationObjectId: string, parameters: Models.AddOwnerParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - parameters, - options - }, - addOwnerOperationSpec, - callback); - } - - /** - * Remove a member from owners. - * @param applicationObjectId The object ID of the application from which to remove the owner. - * @param ownerObjectId Owner object id - * @param [options] The optional parameters - * @returns Promise - */ - removeOwner(applicationObjectId: string, ownerObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId The object ID of the application from which to remove the owner. - * @param ownerObjectId Owner object id - * @param callback The callback - */ - removeOwner(applicationObjectId: string, ownerObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId The object ID of the application from which to remove the owner. - * @param ownerObjectId Owner object id - * @param options The optional parameters - * @param callback The callback - */ - removeOwner(applicationObjectId: string, ownerObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - removeOwner(applicationObjectId: string, ownerObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - ownerObjectId, - options - }, - removeOwnerOperationSpec, - callback); - } - - /** - * Get the keyCredentials associated with an application. - * @param applicationObjectId Application object ID. - * @param [options] The optional parameters - * @returns Promise - */ - listKeyCredentials(applicationObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId Application object ID. - * @param callback The callback - */ - listKeyCredentials(applicationObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId Application object ID. - * @param options The optional parameters - * @param callback The callback - */ - listKeyCredentials(applicationObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listKeyCredentials(applicationObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - options - }, - listKeyCredentialsOperationSpec, - callback) as Promise; - } - - /** - * Update the keyCredentials associated with an application. - * @param applicationObjectId Application object ID. - * @param value A collection of KeyCredentials. - * @param [options] The optional parameters - * @returns Promise - */ - updateKeyCredentials(applicationObjectId: string, value: Models.KeyCredential[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId Application object ID. - * @param value A collection of KeyCredentials. - * @param callback The callback - */ - updateKeyCredentials(applicationObjectId: string, value: Models.KeyCredential[], callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId Application object ID. - * @param value A collection of KeyCredentials. - * @param options The optional parameters - * @param callback The callback - */ - updateKeyCredentials(applicationObjectId: string, value: Models.KeyCredential[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateKeyCredentials(applicationObjectId: string, value: Models.KeyCredential[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - value, - options - }, - updateKeyCredentialsOperationSpec, - callback); - } - - /** - * Get the passwordCredentials associated with an application. - * @param applicationObjectId Application object ID. - * @param [options] The optional parameters - * @returns Promise - */ - listPasswordCredentials(applicationObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId Application object ID. - * @param callback The callback - */ - listPasswordCredentials(applicationObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId Application object ID. - * @param options The optional parameters - * @param callback The callback - */ - listPasswordCredentials(applicationObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listPasswordCredentials(applicationObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - options - }, - listPasswordCredentialsOperationSpec, - callback) as Promise; - } - - /** - * Update passwordCredentials associated with an application. - * @param applicationObjectId Application object ID. - * @param value A collection of PasswordCredentials. - * @param [options] The optional parameters - * @returns Promise - */ - updatePasswordCredentials(applicationObjectId: string, value: Models.PasswordCredential[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId Application object ID. - * @param value A collection of PasswordCredentials. - * @param callback The callback - */ - updatePasswordCredentials(applicationObjectId: string, value: Models.PasswordCredential[], callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId Application object ID. - * @param value A collection of PasswordCredentials. - * @param options The optional parameters - * @param callback The callback - */ - updatePasswordCredentials(applicationObjectId: string, value: Models.PasswordCredential[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updatePasswordCredentials(applicationObjectId: string, value: Models.PasswordCredential[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - value, - options - }, - updatePasswordCredentialsOperationSpec, - callback); - } - - /** - * Gets an object id for a given application id from the current tenant. - * @param applicationID The application ID. - * @param [options] The optional parameters - * @returns Promise - */ - getServicePrincipalsIdByAppId(applicationID: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationID The application ID. - * @param callback The callback - */ - getServicePrincipalsIdByAppId(applicationID: string, callback: msRest.ServiceCallback): void; - /** - * @param applicationID The application ID. - * @param options The optional parameters - * @param callback The callback - */ - getServicePrincipalsIdByAppId(applicationID: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getServicePrincipalsIdByAppId(applicationID: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationID, - options - }, - getServicePrincipalsIdByAppIdOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of applications from the current tenant. - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - listNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } - - /** - * The owners are a set of non-admin users who are allowed to modify this object. - * @summary Directory objects that are owners of the application. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listOwnersNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listOwnersNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listOwnersNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOwnersNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listOwnersNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/applications", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ApplicationCreateParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.Application - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/applications", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.filter, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplicationListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/applications/{applicationObjectId}", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/applications/{applicationObjectId}", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Application - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const patchOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "{tenantID}/applications/{applicationObjectId}", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ApplicationUpdateParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOwnersOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/applications/{applicationObjectId}/owners", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const addOwnerOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/applications/{applicationObjectId}/$links/owners", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.AddOwnerParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const removeOwnerOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/applications/{applicationObjectId}/$links/owners/{ownerObjectId}", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.ownerObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listKeyCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/applications/{applicationObjectId}/keyCredentials", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.KeyCredentialListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const updateKeyCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "{tenantID}/applications/{applicationObjectId}/keyCredentials", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - value: "value" - }, - mapper: { - ...Mappers.KeyCredentialsUpdateParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listPasswordCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/applications/{applicationObjectId}/passwordCredentials", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PasswordCredentialListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const updatePasswordCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "{tenantID}/applications/{applicationObjectId}/passwordCredentials", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - value: "value" - }, - mapper: { - ...Mappers.PasswordCredentialsUpdateParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getServicePrincipalsIdByAppIdOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/servicePrincipalsByAppId/{applicationID}/objectId", - urlParameters: [ - Parameters.tenantID, - Parameters.applicationID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServicePrincipalObjectResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplicationListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOwnersNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://graph.windows.net", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/src/operations/deletedApplications.ts b/sdk/graphrbac/graph/src/operations/deletedApplications.ts deleted file mode 100644 index 27a02f296c4c..000000000000 --- a/sdk/graphrbac/graph/src/operations/deletedApplications.ts +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/deletedApplicationsMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a DeletedApplications. */ -export class DeletedApplications { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a DeletedApplications. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Restores the deleted application in the directory. - * @param objectId Application object ID. - * @param [options] The optional parameters - * @returns Promise - */ - restore(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId Application object ID. - * @param callback The callback - */ - restore(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId Application object ID. - * @param options The optional parameters - * @param callback The callback - */ - restore(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - restore(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - restoreOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of deleted applications in the directory. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.DeletedApplicationsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.DeletedApplicationsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.DeletedApplicationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Hard-delete an application. - * @param applicationObjectId Application object ID. - * @param [options] The optional parameters - * @returns Promise - */ - hardDelete(applicationObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param applicationObjectId Application object ID. - * @param callback The callback - */ - hardDelete(applicationObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param applicationObjectId Application object ID. - * @param options The optional parameters - * @param callback The callback - */ - hardDelete(applicationObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - hardDelete(applicationObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - applicationObjectId, - options - }, - hardDeleteOperationSpec, - callback); - } - - /** - * Gets a list of deleted applications in the directory. - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - listNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const restoreOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/deletedApplications/{objectId}/restore", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Application - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/deletedApplications", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.filter, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplicationListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const hardDeleteOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/deletedApplications/{applicationObjectId}", - urlParameters: [ - Parameters.applicationObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ApplicationListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/src/operations/domains.ts b/sdk/graphrbac/graph/src/operations/domains.ts deleted file mode 100644 index 5a7c6dca619e..000000000000 --- a/sdk/graphrbac/graph/src/operations/domains.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/domainsMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a Domains. */ -export class Domains { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a Domains. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Gets a list of domains for the current tenant. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.DomainsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.DomainsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.DomainsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets a specific domain in the current tenant. - * @param domainName name of the domain. - * @param [options] The optional parameters - * @returns Promise - */ - get(domainName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param domainName name of the domain. - * @param callback The callback - */ - get(domainName: string, callback: msRest.ServiceCallback): void; - /** - * @param domainName name of the domain. - * @param options The optional parameters - * @param callback The callback - */ - get(domainName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(domainName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - domainName, - options - }, - getOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/domains", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.filter, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DomainListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/domains/{domainName}", - urlParameters: [ - Parameters.domainName, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Domain - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/src/operations/groups.ts b/sdk/graphrbac/graph/src/operations/groups.ts deleted file mode 100644 index bbbb65ef2645..000000000000 --- a/sdk/graphrbac/graph/src/operations/groups.ts +++ /dev/null @@ -1,857 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/groupsMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a Groups. */ -export class Groups { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a Groups. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Checks whether the specified user, group, contact, or service principal is a direct or - * transitive member of the specified group. - * @param parameters The check group membership parameters. - * @param [options] The optional parameters - * @returns Promise - */ - isMemberOf(parameters: Models.CheckGroupMembershipParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters The check group membership parameters. - * @param callback The callback - */ - isMemberOf(parameters: Models.CheckGroupMembershipParameters, callback: msRest.ServiceCallback): void; - /** - * @param parameters The check group membership parameters. - * @param options The optional parameters - * @param callback The callback - */ - isMemberOf(parameters: Models.CheckGroupMembershipParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - isMemberOf(parameters: Models.CheckGroupMembershipParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options - }, - isMemberOfOperationSpec, - callback) as Promise; - } - - /** - * Remove a member from a group. - * @param groupObjectId The object ID of the group from which to remove the member. - * @param memberObjectId Member object id - * @param [options] The optional parameters - * @returns Promise - */ - removeMember(groupObjectId: string, memberObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param groupObjectId The object ID of the group from which to remove the member. - * @param memberObjectId Member object id - * @param callback The callback - */ - removeMember(groupObjectId: string, memberObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param groupObjectId The object ID of the group from which to remove the member. - * @param memberObjectId Member object id - * @param options The optional parameters - * @param callback The callback - */ - removeMember(groupObjectId: string, memberObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - removeMember(groupObjectId: string, memberObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - groupObjectId, - memberObjectId, - options - }, - removeMemberOperationSpec, - callback); - } - - /** - * Add a member to a group. - * @param groupObjectId The object ID of the group to which to add the member. - * @param parameters The URL of the member object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param [options] The optional parameters - * @returns Promise - */ - addMember(groupObjectId: string, parameters: Models.GroupAddMemberParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param groupObjectId The object ID of the group to which to add the member. - * @param parameters The URL of the member object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param callback The callback - */ - addMember(groupObjectId: string, parameters: Models.GroupAddMemberParameters, callback: msRest.ServiceCallback): void; - /** - * @param groupObjectId The object ID of the group to which to add the member. - * @param parameters The URL of the member object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param options The optional parameters - * @param callback The callback - */ - addMember(groupObjectId: string, parameters: Models.GroupAddMemberParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addMember(groupObjectId: string, parameters: Models.GroupAddMemberParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - groupObjectId, - parameters, - options - }, - addMemberOperationSpec, - callback); - } - - /** - * Create a group in the directory. - * @param parameters The parameters for the group to create. - * @param [options] The optional parameters - * @returns Promise - */ - create(parameters: Models.GroupCreateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters The parameters for the group to create. - * @param callback The callback - */ - create(parameters: Models.GroupCreateParameters, callback: msRest.ServiceCallback): void; - /** - * @param parameters The parameters for the group to create. - * @param options The optional parameters - * @param callback The callback - */ - create(parameters: Models.GroupCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(parameters: Models.GroupCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options - }, - createOperationSpec, - callback) as Promise; - } - - /** - * Gets list of groups for the current tenant. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.GroupsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.GroupsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.GroupsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets the members of a group. - * @param objectId The object ID of the group whose members should be retrieved. - * @param [options] The optional parameters - * @returns Promise - */ - getGroupMembers(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the group whose members should be retrieved. - * @param callback The callback - */ - getGroupMembers(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the group whose members should be retrieved. - * @param options The optional parameters - * @param callback The callback - */ - getGroupMembers(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getGroupMembers(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - getGroupMembersOperationSpec, - callback) as Promise; - } - - /** - * Gets group information from the directory. - * @param objectId The object ID of the user for which to get group information. - * @param [options] The optional parameters - * @returns Promise - */ - get(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the user for which to get group information. - * @param callback The callback - */ - get(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the user for which to get group information. - * @param options The optional parameters - * @param callback The callback - */ - get(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Delete a group from the directory. - * @param objectId The object ID of the group to delete. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the group to delete. - * @param callback The callback - */ - deleteMethod(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the group to delete. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Gets a collection of object IDs of groups of which the specified group is a member. - * @param objectId The object ID of the group for which to get group membership. - * @param parameters Group filtering parameters. - * @param [options] The optional parameters - * @returns Promise - */ - getMemberGroups(objectId: string, parameters: Models.GroupGetMemberGroupsParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the group for which to get group membership. - * @param parameters Group filtering parameters. - * @param callback The callback - */ - getMemberGroups(objectId: string, parameters: Models.GroupGetMemberGroupsParameters, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the group for which to get group membership. - * @param parameters Group filtering parameters. - * @param options The optional parameters - * @param callback The callback - */ - getMemberGroups(objectId: string, parameters: Models.GroupGetMemberGroupsParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getMemberGroups(objectId: string, parameters: Models.GroupGetMemberGroupsParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - parameters, - options - }, - getMemberGroupsOperationSpec, - callback) as Promise; - } - - /** - * The owners are a set of non-admin users who are allowed to modify this object. - * @summary Directory objects that are owners of the group. - * @param objectId The object ID of the group for which to get owners. - * @param [options] The optional parameters - * @returns Promise - */ - listOwners(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the group for which to get owners. - * @param callback The callback - */ - listOwners(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the group for which to get owners. - * @param options The optional parameters - * @param callback The callback - */ - listOwners(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOwners(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - listOwnersOperationSpec, - callback) as Promise; - } - - /** - * Add an owner to a group. - * @param objectId The object ID of the application to which to add the owner. - * @param parameters The URL of the owner object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param [options] The optional parameters - * @returns Promise - */ - addOwner(objectId: string, parameters: Models.AddOwnerParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the application to which to add the owner. - * @param parameters The URL of the owner object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param callback The callback - */ - addOwner(objectId: string, parameters: Models.AddOwnerParameters, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the application to which to add the owner. - * @param parameters The URL of the owner object, such as - * https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. - * @param options The optional parameters - * @param callback The callback - */ - addOwner(objectId: string, parameters: Models.AddOwnerParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - addOwner(objectId: string, parameters: Models.AddOwnerParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - parameters, - options - }, - addOwnerOperationSpec, - callback); - } - - /** - * Remove a member from owners. - * @param objectId The object ID of the group from which to remove the owner. - * @param ownerObjectId Owner object id - * @param [options] The optional parameters - * @returns Promise - */ - removeOwner(objectId: string, ownerObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the group from which to remove the owner. - * @param ownerObjectId Owner object id - * @param callback The callback - */ - removeOwner(objectId: string, ownerObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the group from which to remove the owner. - * @param ownerObjectId Owner object id - * @param options The optional parameters - * @param callback The callback - */ - removeOwner(objectId: string, ownerObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - removeOwner(objectId: string, ownerObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - ownerObjectId, - options - }, - removeOwnerOperationSpec, - callback); - } - - /** - * Gets a list of groups for the current tenant. - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - listNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } - - /** - * Gets the members of a group. - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - getGroupMembersNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - getGroupMembersNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - getGroupMembersNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getGroupMembersNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - getGroupMembersNextOperationSpec, - callback) as Promise; - } - - /** - * The owners are a set of non-admin users who are allowed to modify this object. - * @summary Directory objects that are owners of the group. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listOwnersNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listOwnersNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listOwnersNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOwnersNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listOwnersNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const isMemberOfOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/isMemberOf", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.CheckGroupMembershipParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CheckGroupMembershipResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const removeMemberOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/groups/{groupObjectId}/$links/members/{memberObjectId}", - urlParameters: [ - Parameters.groupObjectId, - Parameters.memberObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const addMemberOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/groups/{groupObjectId}/$links/members", - urlParameters: [ - Parameters.groupObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.GroupAddMemberParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/groups", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.GroupCreateParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.ADGroup - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/groups", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.filter, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.GroupListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getGroupMembersOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/groups/{objectId}/members", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/groups/{objectId}", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ADGroup - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/groups/{objectId}", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getMemberGroupsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/groups/{objectId}/getMemberGroups", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.GroupGetMemberGroupsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.GroupGetMemberGroupsResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOwnersOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/groups/{objectId}/owners", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const addOwnerOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/groups/{objectId}/$links/owners", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.AddOwnerParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const removeOwnerOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/groups/{objectId}/$links/owners/{ownerObjectId}", - urlParameters: [ - Parameters.objectId, - Parameters.ownerObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.GroupListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getGroupMembersNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOwnersNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://graph.windows.net", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/src/operations/index.ts b/sdk/graphrbac/graph/src/operations/index.ts deleted file mode 100644 index b53368ac7e91..000000000000 --- a/sdk/graphrbac/graph/src/operations/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * 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. - */ - -export * from "./signedInUser"; -export * from "./applications"; -export * from "./deletedApplications"; -export * from "./groups"; -export * from "./servicePrincipals"; -export * from "./users"; -export * from "./objects"; -export * from "./domains"; -export * from "./oAuth2PermissionGrantOperations"; diff --git a/sdk/graphrbac/graph/src/operations/oAuth2PermissionGrantOperations.ts b/sdk/graphrbac/graph/src/operations/oAuth2PermissionGrantOperations.ts deleted file mode 100644 index 7bddae67b60e..000000000000 --- a/sdk/graphrbac/graph/src/operations/oAuth2PermissionGrantOperations.ts +++ /dev/null @@ -1,234 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/oAuth2PermissionGrantOperationsMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a OAuth2PermissionGrantOperations. */ -export class OAuth2PermissionGrantOperations { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a OAuth2PermissionGrantOperations. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.OAuth2PermissionGrantListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.OAuth2PermissionGrantListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.OAuth2PermissionGrantListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Grants OAuth2 permissions for the relevant resource Ids of an app. - * @param [options] The optional parameters - * @returns Promise - */ - create(options?: Models.OAuth2PermissionGrantCreateOptionalParams): Promise; - /** - * @param callback The callback - */ - create(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - create(options: Models.OAuth2PermissionGrantCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(options?: Models.OAuth2PermissionGrantCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - createOperationSpec, - callback) as Promise; - } - - /** - * Delete a OAuth2 permission grant for the relevant resource Ids of an app. - * @param objectId The object ID of a permission grant. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of a permission grant. - * @param callback The callback - */ - deleteMethod(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of a permission grant. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Gets the next page of OAuth2 permission grants - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - listNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/oauth2PermissionGrants", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.filter, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OAuth2PermissionGrantListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/oauth2PermissionGrants", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: [ - "options", - "body" - ], - mapper: Mappers.OAuth2PermissionGrant - }, - responses: { - 201: { - bodyMapper: Mappers.OAuth2PermissionGrant - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/oauth2PermissionGrants/{objectId}", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OAuth2PermissionGrantListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/src/operations/objects.ts b/sdk/graphrbac/graph/src/operations/objects.ts deleted file mode 100644 index 477daeb10505..000000000000 --- a/sdk/graphrbac/graph/src/operations/objects.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/objectsMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a Objects. */ -export class Objects { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a Objects. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Gets the directory objects specified in a list of object IDs. You can also specify which - * resource collections (users, groups, etc.) should be searched by specifying the optional types - * parameter. - * @param parameters Objects filtering parameters. - * @param [options] The optional parameters - * @returns Promise - */ - getObjectsByObjectIds(parameters: Models.GetObjectsParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters Objects filtering parameters. - * @param callback The callback - */ - getObjectsByObjectIds(parameters: Models.GetObjectsParameters, callback: msRest.ServiceCallback): void; - /** - * @param parameters Objects filtering parameters. - * @param options The optional parameters - * @param callback The callback - */ - getObjectsByObjectIds(parameters: Models.GetObjectsParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getObjectsByObjectIds(parameters: Models.GetObjectsParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options - }, - getObjectsByObjectIdsOperationSpec, - callback) as Promise; - } - - /** - * Gets AD group membership for the specified AD object IDs. - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - getObjectsByObjectIdsNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - getObjectsByObjectIdsNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - getObjectsByObjectIdsNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getObjectsByObjectIdsNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - getObjectsByObjectIdsNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getObjectsByObjectIdsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/getObjectsByObjectIds", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.GetObjectsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getObjectsByObjectIdsNextOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/src/operations/servicePrincipals.ts b/sdk/graphrbac/graph/src/operations/servicePrincipals.ts deleted file mode 100644 index 0c5b9e517092..000000000000 --- a/sdk/graphrbac/graph/src/operations/servicePrincipals.ts +++ /dev/null @@ -1,685 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/servicePrincipalsMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a ServicePrincipals. */ -export class ServicePrincipals { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a ServicePrincipals. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Creates a service principal in the directory. - * @param parameters Parameters to create a service principal. - * @param [options] The optional parameters - * @returns Promise - */ - create(parameters: Models.ServicePrincipalCreateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters Parameters to create a service principal. - * @param callback The callback - */ - create(parameters: Models.ServicePrincipalCreateParameters, callback: msRest.ServiceCallback): void; - /** - * @param parameters Parameters to create a service principal. - * @param options The optional parameters - * @param callback The callback - */ - create(parameters: Models.ServicePrincipalCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(parameters: Models.ServicePrincipalCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options - }, - createOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of service principals from the current tenant. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.ServicePrincipalsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.ServicePrincipalsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.ServicePrincipalsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Updates a service principal in the directory. - * @param objectId The object ID of the service principal to delete. - * @param parameters Parameters to update a service principal. - * @param [options] The optional parameters - * @returns Promise - */ - update(objectId: string, parameters: Models.ServicePrincipalUpdateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the service principal to delete. - * @param parameters Parameters to update a service principal. - * @param callback The callback - */ - update(objectId: string, parameters: Models.ServicePrincipalUpdateParameters, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the service principal to delete. - * @param parameters Parameters to update a service principal. - * @param options The optional parameters - * @param callback The callback - */ - update(objectId: string, parameters: Models.ServicePrincipalUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(objectId: string, parameters: Models.ServicePrincipalUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - parameters, - options - }, - updateOperationSpec, - callback); - } - - /** - * Deletes a service principal from the directory. - * @param objectId The object ID of the service principal to delete. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the service principal to delete. - * @param callback The callback - */ - deleteMethod(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the service principal to delete. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Gets service principal information from the directory. Query by objectId or pass a filter to - * query by appId - * @param objectId The object ID of the service principal to get. - * @param [options] The optional parameters - * @returns Promise - */ - get(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the service principal to get. - * @param callback The callback - */ - get(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the service principal to get. - * @param options The optional parameters - * @param callback The callback - */ - get(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * The owners are a set of non-admin users who are allowed to modify this object. - * @summary Directory objects that are owners of this service principal. - * @param objectId The object ID of the service principal for which to get owners. - * @param [options] The optional parameters - * @returns Promise - */ - listOwners(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the service principal for which to get owners. - * @param callback The callback - */ - listOwners(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the service principal for which to get owners. - * @param options The optional parameters - * @param callback The callback - */ - listOwners(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOwners(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - listOwnersOperationSpec, - callback) as Promise; - } - - /** - * Get the keyCredentials associated with the specified service principal. - * @param objectId The object ID of the service principal for which to get keyCredentials. - * @param [options] The optional parameters - * @returns Promise - */ - listKeyCredentials(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the service principal for which to get keyCredentials. - * @param callback The callback - */ - listKeyCredentials(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the service principal for which to get keyCredentials. - * @param options The optional parameters - * @param callback The callback - */ - listKeyCredentials(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listKeyCredentials(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - listKeyCredentialsOperationSpec, - callback) as Promise; - } - - /** - * Update the keyCredentials associated with a service principal. - * @param objectId The object ID for which to get service principal information. - * @param value A collection of KeyCredentials. - * @param [options] The optional parameters - * @returns Promise - */ - updateKeyCredentials(objectId: string, value: Models.KeyCredential[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID for which to get service principal information. - * @param value A collection of KeyCredentials. - * @param callback The callback - */ - updateKeyCredentials(objectId: string, value: Models.KeyCredential[], callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID for which to get service principal information. - * @param value A collection of KeyCredentials. - * @param options The optional parameters - * @param callback The callback - */ - updateKeyCredentials(objectId: string, value: Models.KeyCredential[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updateKeyCredentials(objectId: string, value: Models.KeyCredential[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - value, - options - }, - updateKeyCredentialsOperationSpec, - callback); - } - - /** - * Gets the passwordCredentials associated with a service principal. - * @param objectId The object ID of the service principal. - * @param [options] The optional parameters - * @returns Promise - */ - listPasswordCredentials(objectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the service principal. - * @param callback The callback - */ - listPasswordCredentials(objectId: string, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the service principal. - * @param options The optional parameters - * @param callback The callback - */ - listPasswordCredentials(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listPasswordCredentials(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - options - }, - listPasswordCredentialsOperationSpec, - callback) as Promise; - } - - /** - * Updates the passwordCredentials associated with a service principal. - * @param objectId The object ID of the service principal. - * @param value A collection of PasswordCredentials. - * @param [options] The optional parameters - * @returns Promise - */ - updatePasswordCredentials(objectId: string, value: Models.PasswordCredential[], options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the service principal. - * @param value A collection of PasswordCredentials. - * @param callback The callback - */ - updatePasswordCredentials(objectId: string, value: Models.PasswordCredential[], callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the service principal. - * @param value A collection of PasswordCredentials. - * @param options The optional parameters - * @param callback The callback - */ - updatePasswordCredentials(objectId: string, value: Models.PasswordCredential[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - updatePasswordCredentials(objectId: string, value: Models.PasswordCredential[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - value, - options - }, - updatePasswordCredentialsOperationSpec, - callback); - } - - /** - * Gets a list of service principals from the current tenant. - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - listNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } - - /** - * The owners are a set of non-admin users who are allowed to modify this object. - * @summary Directory objects that are owners of this service principal. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listOwnersNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listOwnersNext(nextPageLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param options The optional parameters - * @param callback The callback - */ - listOwnersNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOwnersNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listOwnersNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/servicePrincipals", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ServicePrincipalCreateParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.ServicePrincipal - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/servicePrincipals", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.filter, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServicePrincipalListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "{tenantID}/servicePrincipals/{objectId}", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.ServicePrincipalUpdateParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/servicePrincipals/{objectId}", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/servicePrincipals/{objectId}", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServicePrincipal - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOwnersOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/servicePrincipals/{objectId}/owners", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listKeyCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/servicePrincipals/{objectId}/keyCredentials", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.KeyCredentialListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const updateKeyCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "{tenantID}/servicePrincipals/{objectId}/keyCredentials", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - value: "value" - }, - mapper: { - ...Mappers.KeyCredentialsUpdateParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listPasswordCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/servicePrincipals/{objectId}/passwordCredentials", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PasswordCredentialListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const updatePasswordCredentialsOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "{tenantID}/servicePrincipals/{objectId}/passwordCredentials", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: { - value: "value" - }, - mapper: { - ...Mappers.PasswordCredentialsUpdateParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ServicePrincipalListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOwnersNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://graph.windows.net", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/src/operations/signedInUser.ts b/sdk/graphrbac/graph/src/operations/signedInUser.ts deleted file mode 100644 index d10d7f2c4bfd..000000000000 --- a/sdk/graphrbac/graph/src/operations/signedInUser.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/signedInUserMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a SignedInUser. */ -export class SignedInUser { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a SignedInUser. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Gets the details for the currently logged-in user. - * @param [options] The optional parameters - * @returns Promise - */ - get(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - get(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - get(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Get the list of directory objects that are owned by the user. - * @param [options] The optional parameters - * @returns Promise - */ - listOwnedObjects(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - listOwnedObjects(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - listOwnedObjects(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOwnedObjects(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOwnedObjectsOperationSpec, - callback) as Promise; - } - - /** - * Get the list of directory objects that are owned by the user. - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - listOwnedObjectsNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - listOwnedObjectsNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - listOwnedObjectsNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listOwnedObjectsNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - listOwnedObjectsNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/me", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.User - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOwnedObjectsOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/me/ownedObjects", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOwnedObjectsNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.DirectoryObjectListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/src/operations/users.ts b/sdk/graphrbac/graph/src/operations/users.ts deleted file mode 100644 index 3da2a311bd1a..000000000000 --- a/sdk/graphrbac/graph/src/operations/users.ts +++ /dev/null @@ -1,414 +0,0 @@ -/* - * 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. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/usersMappers"; -import * as Parameters from "../models/parameters"; -import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; - -/** Class representing a Users. */ -export class Users { - private readonly client: GraphRbacManagementClientContext; - - /** - * Create a Users. - * @param {GraphRbacManagementClientContext} client Reference to the service client. - */ - constructor(client: GraphRbacManagementClientContext) { - this.client = client; - } - - /** - * Create a new user. - * @param parameters Parameters to create a user. - * @param [options] The optional parameters - * @returns Promise - */ - create(parameters: Models.UserCreateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param parameters Parameters to create a user. - * @param callback The callback - */ - create(parameters: Models.UserCreateParameters, callback: msRest.ServiceCallback): void; - /** - * @param parameters Parameters to create a user. - * @param options The optional parameters - * @param callback The callback - */ - create(parameters: Models.UserCreateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - create(parameters: Models.UserCreateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - parameters, - options - }, - createOperationSpec, - callback) as Promise; - } - - /** - * Gets list of users for the current tenant. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.UsersListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.UsersListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.UsersListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - - /** - * Gets user information from the directory. - * @param upnOrObjectId The object ID or principal name of the user for which to get information. - * @param [options] The optional parameters - * @returns Promise - */ - get(upnOrObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param upnOrObjectId The object ID or principal name of the user for which to get information. - * @param callback The callback - */ - get(upnOrObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param upnOrObjectId The object ID or principal name of the user for which to get information. - * @param options The optional parameters - * @param callback The callback - */ - get(upnOrObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(upnOrObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - upnOrObjectId, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Updates a user. - * @param upnOrObjectId The object ID or principal name of the user to update. - * @param parameters Parameters to update an existing user. - * @param [options] The optional parameters - * @returns Promise - */ - update(upnOrObjectId: string, parameters: Models.UserUpdateParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param upnOrObjectId The object ID or principal name of the user to update. - * @param parameters Parameters to update an existing user. - * @param callback The callback - */ - update(upnOrObjectId: string, parameters: Models.UserUpdateParameters, callback: msRest.ServiceCallback): void; - /** - * @param upnOrObjectId The object ID or principal name of the user to update. - * @param parameters Parameters to update an existing user. - * @param options The optional parameters - * @param callback The callback - */ - update(upnOrObjectId: string, parameters: Models.UserUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(upnOrObjectId: string, parameters: Models.UserUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - upnOrObjectId, - parameters, - options - }, - updateOperationSpec, - callback); - } - - /** - * Delete a user. - * @param upnOrObjectId The object ID or principal name of the user to delete. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(upnOrObjectId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param upnOrObjectId The object ID or principal name of the user to delete. - * @param callback The callback - */ - deleteMethod(upnOrObjectId: string, callback: msRest.ServiceCallback): void; - /** - * @param upnOrObjectId The object ID or principal name of the user to delete. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(upnOrObjectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(upnOrObjectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - upnOrObjectId, - options - }, - deleteMethodOperationSpec, - callback); - } - - /** - * Gets a collection that contains the object IDs of the groups of which the user is a member. - * @param objectId The object ID of the user for which to get group membership. - * @param parameters User filtering parameters. - * @param [options] The optional parameters - * @returns Promise - */ - getMemberGroups(objectId: string, parameters: Models.UserGetMemberGroupsParameters, options?: msRest.RequestOptionsBase): Promise; - /** - * @param objectId The object ID of the user for which to get group membership. - * @param parameters User filtering parameters. - * @param callback The callback - */ - getMemberGroups(objectId: string, parameters: Models.UserGetMemberGroupsParameters, callback: msRest.ServiceCallback): void; - /** - * @param objectId The object ID of the user for which to get group membership. - * @param parameters User filtering parameters. - * @param options The optional parameters - * @param callback The callback - */ - getMemberGroups(objectId: string, parameters: Models.UserGetMemberGroupsParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getMemberGroups(objectId: string, parameters: Models.UserGetMemberGroupsParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - objectId, - parameters, - options - }, - getMemberGroupsOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of users for the current tenant. - * @param nextLink Next link for the list operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextLink Next link for the list operation. - * @param callback The callback - */ - listNext(nextLink: string, callback: msRest.ServiceCallback): void; - /** - * @param nextLink Next link for the list operation. - * @param options The optional parameters - * @param callback The callback - */ - listNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const createOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/users", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.UserCreateParameters, - required: true - } - }, - responses: { - 201: { - bodyMapper: Mappers.User - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/users", - urlParameters: [ - Parameters.tenantID - ], - queryParameters: [ - Parameters.filter, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UserListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/users/{upnOrObjectId}", - urlParameters: [ - Parameters.upnOrObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.User - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "{tenantID}/users/{upnOrObjectId}", - urlParameters: [ - Parameters.upnOrObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.UserUpdateParameters, - required: true - } - }, - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "{tenantID}/users/{upnOrObjectId}", - urlParameters: [ - Parameters.upnOrObjectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 204: {}, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const getMemberGroupsOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "{tenantID}/users/{objectId}/getMemberGroups", - urlParameters: [ - Parameters.objectId, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.UserGetMemberGroupsParameters, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.UserGetMemberGroupsResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "{tenantID}/{nextLink}", - urlParameters: [ - Parameters.nextLink, - Parameters.tenantID - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UserListResult - }, - default: { - bodyMapper: Mappers.GraphError - } - }, - serializer -}; diff --git a/sdk/graphrbac/graph/tsconfig.json b/sdk/graphrbac/graph/tsconfig.json deleted file mode 100644 index 04f518cfd155..000000000000 --- a/sdk/graphrbac/graph/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "module": "es6", - "moduleResolution": "node", - "strict": true, - "target": "es5", - "sourceMap": true, - "declarationMap": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es6", - "dom" - ], - "declaration": true, - "outDir": "./esm", - "importHelpers": true - }, - "include": [ - "./src/**/*.ts" - ], - "exclude": [ - "node_modules" - ] -}