/
operations.ts
72 lines (67 loc) · 2.25 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
/*
* 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 { AzureMigrateContext } from "../azureMigrateContext";
/** Class representing a Operations. */
export class Operations {
private readonly client: AzureMigrateContext;
/**
* Create a Operations.
* @param {AzureMigrateContext} client Reference to the service client.
*/
constructor(client: AzureMigrateContext) {
this.client = client;
}
/**
* Get a list of REST API supported by Microsoft.Migrate provider.
* @summary Get list of operations supported in the API.
* @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.OperationResultList>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationResultList>): void;
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationResultList>, callback?: msRest.ServiceCallback<Models.OperationResultList>): 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.Migrate/operations",
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.OperationResultList
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};