-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
operations.ts
74 lines (69 loc) · 2.31 KB
/
operations.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* 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/operationsMappers";
import * as Parameters from "../models/parameters";
import { SearchManagementClientContext } from "../searchManagementClientContext";
/** Class representing a Operations. */
export class Operations {
private readonly client: SearchManagementClientContext;
/**
* Create a Operations.
* @param {SearchManagementClientContext} client Reference to the service client.
*/
constructor(client: SearchManagementClientContext) {
this.client = client;
}
/**
* Lists all of the available REST API operations of the Microsoft.Search provider.
* @param [options] The optional parameters
* @returns Promise<Models.OperationsListResponse>
*/
list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
/**
* @param callback The callback
*/
list(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
return this.client.sendOperationRequest(
{
options
},
listOperationSpec,
callback) as Promise<Models.OperationsListResponse>;
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "providers/Microsoft.Search/operations",
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.OperationListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};