/
searchServiceClient.ts
94 lines (88 loc) · 3.11 KB
/
searchServiceClient.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
* 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 coreHttp from "@azure/core-http";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as Parameters from "./models/parameters";
import * as operations from "./operations";
import { SearchServiceClientContext } from "./searchServiceClientContext";
class SearchServiceClient extends SearchServiceClientContext {
// Operation groups
dataSources: operations.DataSources;
indexers: operations.Indexers;
skillsets: operations.Skillsets;
synonymMaps: operations.SynonymMaps;
indexes: operations.Indexes;
/**
* Initializes a new instance of the SearchServiceClient class.
* @param apiVersion Client Api Version.
* @param endpoint The endpoint URL of the search service.
* @param [options] The parameter options
*/
constructor(apiVersion: string, endpoint: string, options?: coreHttp.ServiceClientOptions) {
super(apiVersion, endpoint, options);
this.dataSources = new operations.DataSources(this);
this.indexers = new operations.Indexers(this);
this.skillsets = new operations.Skillsets(this);
this.synonymMaps = new operations.SynonymMaps(this);
this.indexes = new operations.Indexes(this);
}
/**
* Gets service level statistics for a search service.
* @param [options] The optional parameters
* @returns Promise<Models.GetServiceStatisticsResponse>
*/
getServiceStatistics(options?: coreHttp.RequestOptionsBase): Promise<Models.GetServiceStatisticsResponse>;
/**
* @param callback The callback
*/
getServiceStatistics(callback: coreHttp.ServiceCallback<Models.ServiceStatistics>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
getServiceStatistics(options: coreHttp.RequestOptionsBase, callback: coreHttp.ServiceCallback<Models.ServiceStatistics>): void;
getServiceStatistics(options?: coreHttp.RequestOptionsBase | coreHttp.ServiceCallback<Models.ServiceStatistics>, callback?: coreHttp.ServiceCallback<Models.ServiceStatistics>): Promise<Models.GetServiceStatisticsResponse> {
return this.sendOperationRequest(
{
options
},
getServiceStatisticsOperationSpec,
callback) as Promise<Models.GetServiceStatisticsResponse>;
}
}
// Operation Specifications
const serializer = new coreHttp.Serializer(Mappers);
const getServiceStatisticsOperationSpec: coreHttp.OperationSpec = {
httpMethod: "GET",
path: "servicestats",
urlParameters: [
Parameters.endpoint
],
queryParameters: [
Parameters.apiVersion
],
responses: {
200: {
bodyMapper: Mappers.ServiceStatistics
},
default: {
bodyMapper: Mappers.SearchError
}
},
serializer
};
export {
SearchServiceClient,
SearchServiceClientContext,
Models as SearchServiceModels,
Mappers as SearchServiceMappers
};
export * from "./operations";