/
assessmentOptions.ts
83 lines (78 loc) · 2.83 KB
/
assessmentOptions.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
/*
* 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/assessmentOptionsMappers";
import * as Parameters from "../models/parameters";
import { AzureMigrateContext } from "../azureMigrateContext";
/** Class representing a AssessmentOptions. */
export class AssessmentOptions {
private readonly client: AzureMigrateContext;
/**
* Create a AssessmentOptions.
* @param {AzureMigrateContext} client Reference to the service client.
*/
constructor(client: AzureMigrateContext) {
this.client = client;
}
/**
* Get the available options for the properties of an assessment.
* @summary Get the assessment options.
* @param locationName Azure region in which the project is created.
* @param [options] The optional parameters
* @returns Promise<Models.AssessmentOptionsGetResponse>
*/
get(locationName: string, options?: msRest.RequestOptionsBase): Promise<Models.AssessmentOptionsGetResponse>;
/**
* @param locationName Azure region in which the project is created.
* @param callback The callback
*/
get(locationName: string, callback: msRest.ServiceCallback<Models.AssessmentOptionsResultList>): void;
/**
* @param locationName Azure region in which the project is created.
* @param options The optional parameters
* @param callback The callback
*/
get(locationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AssessmentOptionsResultList>): void;
get(locationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AssessmentOptionsResultList>, callback?: msRest.ServiceCallback<Models.AssessmentOptionsResultList>): Promise<Models.AssessmentOptionsGetResponse> {
return this.client.sendOperationRequest(
{
locationName,
options
},
getOperationSpec,
callback) as Promise<Models.AssessmentOptionsGetResponse>;
}
}
// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const getOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.Migrate/locations/{locationName}/assessmentOptions",
urlParameters: [
Parameters.subscriptionId,
Parameters.locationName
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {
bodyMapper: Mappers.AssessmentOptionsResultList
},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};