/* * 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 };