@azure/arm-orbital 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +98 -0
- package/dist/index.js +2783 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/azureOrbital.d.ts +19 -0
- package/dist-esm/src/azureOrbital.d.ts.map +1 -0
- package/dist-esm/src/azureOrbital.js +26 -0
- package/dist-esm/src/azureOrbital.js.map +1 -0
- package/dist-esm/src/azureOrbitalContext.d.ts +16 -0
- package/dist-esm/src/azureOrbitalContext.d.ts.map +1 -0
- package/dist-esm/src/azureOrbitalContext.js +49 -0
- package/dist-esm/src/azureOrbitalContext.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +757 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +61 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +30 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +1041 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +33 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +218 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/availableGroundStations.d.ts +41 -0
- package/dist-esm/src/operations/availableGroundStations.d.ts.map +1 -0
- package/dist-esm/src/operations/availableGroundStations.js +155 -0
- package/dist-esm/src/operations/availableGroundStations.js.map +1 -0
- package/dist-esm/src/operations/contactProfiles.d.ts +86 -0
- package/dist-esm/src/operations/contactProfiles.d.ts.map +1 -0
- package/dist-esm/src/operations/contactProfiles.js +392 -0
- package/dist-esm/src/operations/contactProfiles.js.map +1 -0
- package/dist-esm/src/operations/contacts.d.ts +73 -0
- package/dist-esm/src/operations/contacts.d.ts.map +1 -0
- package/dist-esm/src/operations/contacts.js +295 -0
- package/dist-esm/src/operations/contacts.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +6 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +13 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +26 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +90 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/spacecrafts.d.ts +108 -0
- package/dist-esm/src/operations/spacecrafts.d.ts.map +1 -0
- package/dist-esm/src/operations/spacecrafts.js +499 -0
- package/dist-esm/src/operations/spacecrafts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/availableGroundStations.d.ts +18 -0
- package/dist-esm/src/operationsInterfaces/availableGroundStations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/availableGroundStations.js +9 -0
- package/dist-esm/src/operationsInterfaces/availableGroundStations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/contactProfiles.d.ts +63 -0
- package/dist-esm/src/operationsInterfaces/contactProfiles.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/contactProfiles.js +9 -0
- package/dist-esm/src/operationsInterfaces/contactProfiles.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/contacts.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/contacts.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/contacts.js +9 -0
- package/dist-esm/src/operationsInterfaces/contacts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/spacecrafts.d.ts +85 -0
- package/dist-esm/src/operationsInterfaces/spacecrafts.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/spacecrafts.js +9 -0
- package/dist-esm/src/operationsInterfaces/spacecrafts.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +92 -0
- package/review/arm-orbital.api.md +600 -0
- package/rollup.config.js +188 -0
- package/src/azureOrbital.ts +52 -0
- package/src/azureOrbitalContext.ts +70 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +853 -0
- package/src/models/mappers.ts +1111 -0
- package/src/models/parameters.ts +260 -0
- package/src/operations/availableGroundStations.ts +199 -0
- package/src/operations/contactProfiles.ts +510 -0
- package/src/operations/contacts.ts +412 -0
- package/src/operations/index.ts +13 -0
- package/src/operations/operations.ts +98 -0
- package/src/operations/spacecrafts.ts +669 -0
- package/src/operationsInterfaces/availableGroundStations.ts +39 -0
- package/src/operationsInterfaces/contactProfiles.ts +121 -0
- package/src/operationsInterfaces/contacts.ts +109 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/spacecrafts.ts +167 -0
- package/tsconfig.json +19 -0
- package/types/arm-orbital.d.ts +1097 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { ContactProfiles } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { AzureOrbitalContext } from "../azureOrbitalContext";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
ContactProfile,
|
|
19
|
+
ContactProfilesListBySubscriptionOptionalParams,
|
|
20
|
+
ContactProfilesListOptionalParams,
|
|
21
|
+
ContactProfilesGetOptionalParams,
|
|
22
|
+
ContactProfilesGetResponse,
|
|
23
|
+
ContactProfilesCreateOrUpdateOptionalParams,
|
|
24
|
+
ContactProfilesCreateOrUpdateResponse,
|
|
25
|
+
ContactProfilesDeleteOptionalParams,
|
|
26
|
+
TagsObject,
|
|
27
|
+
ContactProfilesUpdateTagsOptionalParams,
|
|
28
|
+
ContactProfilesUpdateTagsResponse,
|
|
29
|
+
ContactProfilesListBySubscriptionResponse,
|
|
30
|
+
ContactProfilesListResponse
|
|
31
|
+
} from "../models";
|
|
32
|
+
|
|
33
|
+
/// <reference lib="esnext.asynciterable" />
|
|
34
|
+
/** Class containing ContactProfiles operations. */
|
|
35
|
+
export class ContactProfilesImpl implements ContactProfiles {
|
|
36
|
+
private readonly client: AzureOrbitalContext;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Initialize a new instance of the class ContactProfiles class.
|
|
40
|
+
* @param client Reference to the service client
|
|
41
|
+
*/
|
|
42
|
+
constructor(client: AzureOrbitalContext) {
|
|
43
|
+
this.client = client;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Returns list of contact profiles
|
|
48
|
+
* @param options The options parameters.
|
|
49
|
+
*/
|
|
50
|
+
public listBySubscription(
|
|
51
|
+
options?: ContactProfilesListBySubscriptionOptionalParams
|
|
52
|
+
): PagedAsyncIterableIterator<ContactProfile> {
|
|
53
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
|
54
|
+
return {
|
|
55
|
+
next() {
|
|
56
|
+
return iter.next();
|
|
57
|
+
},
|
|
58
|
+
[Symbol.asyncIterator]() {
|
|
59
|
+
return this;
|
|
60
|
+
},
|
|
61
|
+
byPage: () => {
|
|
62
|
+
return this.listBySubscriptionPagingPage(options);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
private async *listBySubscriptionPagingPage(
|
|
68
|
+
options?: ContactProfilesListBySubscriptionOptionalParams
|
|
69
|
+
): AsyncIterableIterator<ContactProfile[]> {
|
|
70
|
+
let result = await this._listBySubscription(options);
|
|
71
|
+
yield result.value || [];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
private async *listBySubscriptionPagingAll(
|
|
75
|
+
options?: ContactProfilesListBySubscriptionOptionalParams
|
|
76
|
+
): AsyncIterableIterator<ContactProfile> {
|
|
77
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
78
|
+
yield* page;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Returns list of contact profiles
|
|
84
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
85
|
+
* @param options The options parameters.
|
|
86
|
+
*/
|
|
87
|
+
public list(
|
|
88
|
+
resourceGroupName: string,
|
|
89
|
+
options?: ContactProfilesListOptionalParams
|
|
90
|
+
): PagedAsyncIterableIterator<ContactProfile> {
|
|
91
|
+
const iter = this.listPagingAll(resourceGroupName, options);
|
|
92
|
+
return {
|
|
93
|
+
next() {
|
|
94
|
+
return iter.next();
|
|
95
|
+
},
|
|
96
|
+
[Symbol.asyncIterator]() {
|
|
97
|
+
return this;
|
|
98
|
+
},
|
|
99
|
+
byPage: () => {
|
|
100
|
+
return this.listPagingPage(resourceGroupName, options);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private async *listPagingPage(
|
|
106
|
+
resourceGroupName: string,
|
|
107
|
+
options?: ContactProfilesListOptionalParams
|
|
108
|
+
): AsyncIterableIterator<ContactProfile[]> {
|
|
109
|
+
let result = await this._list(resourceGroupName, options);
|
|
110
|
+
yield result.value || [];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
private async *listPagingAll(
|
|
114
|
+
resourceGroupName: string,
|
|
115
|
+
options?: ContactProfilesListOptionalParams
|
|
116
|
+
): AsyncIterableIterator<ContactProfile> {
|
|
117
|
+
for await (const page of this.listPagingPage(resourceGroupName, options)) {
|
|
118
|
+
yield* page;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Gets the specified contact Profile in a specified resource group
|
|
124
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
125
|
+
* @param contactProfileName Contact Profile Name
|
|
126
|
+
* @param options The options parameters.
|
|
127
|
+
*/
|
|
128
|
+
get(
|
|
129
|
+
resourceGroupName: string,
|
|
130
|
+
contactProfileName: string,
|
|
131
|
+
options?: ContactProfilesGetOptionalParams
|
|
132
|
+
): Promise<ContactProfilesGetResponse> {
|
|
133
|
+
return this.client.sendOperationRequest(
|
|
134
|
+
{ resourceGroupName, contactProfileName, options },
|
|
135
|
+
getOperationSpec
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Creates or updates a contact profile
|
|
141
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
142
|
+
* @param contactProfileName Contact Profile Name
|
|
143
|
+
* @param location The geo-location where the resource lives
|
|
144
|
+
* @param options The options parameters.
|
|
145
|
+
*/
|
|
146
|
+
async beginCreateOrUpdate(
|
|
147
|
+
resourceGroupName: string,
|
|
148
|
+
contactProfileName: string,
|
|
149
|
+
location: string,
|
|
150
|
+
options?: ContactProfilesCreateOrUpdateOptionalParams
|
|
151
|
+
): Promise<
|
|
152
|
+
PollerLike<
|
|
153
|
+
PollOperationState<ContactProfilesCreateOrUpdateResponse>,
|
|
154
|
+
ContactProfilesCreateOrUpdateResponse
|
|
155
|
+
>
|
|
156
|
+
> {
|
|
157
|
+
const directSendOperation = async (
|
|
158
|
+
args: coreClient.OperationArguments,
|
|
159
|
+
spec: coreClient.OperationSpec
|
|
160
|
+
): Promise<ContactProfilesCreateOrUpdateResponse> => {
|
|
161
|
+
return this.client.sendOperationRequest(args, spec);
|
|
162
|
+
};
|
|
163
|
+
const sendOperation = async (
|
|
164
|
+
args: coreClient.OperationArguments,
|
|
165
|
+
spec: coreClient.OperationSpec
|
|
166
|
+
) => {
|
|
167
|
+
let currentRawResponse:
|
|
168
|
+
| coreClient.FullOperationResponse
|
|
169
|
+
| undefined = undefined;
|
|
170
|
+
const providedCallback = args.options?.onResponse;
|
|
171
|
+
const callback: coreClient.RawResponseCallback = (
|
|
172
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
173
|
+
flatResponse: unknown
|
|
174
|
+
) => {
|
|
175
|
+
currentRawResponse = rawResponse;
|
|
176
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
177
|
+
};
|
|
178
|
+
const updatedArgs = {
|
|
179
|
+
...args,
|
|
180
|
+
options: {
|
|
181
|
+
...args.options,
|
|
182
|
+
onResponse: callback
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
186
|
+
return {
|
|
187
|
+
flatResponse,
|
|
188
|
+
rawResponse: {
|
|
189
|
+
statusCode: currentRawResponse!.status,
|
|
190
|
+
body: currentRawResponse!.parsedBody,
|
|
191
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const lro = new LroImpl(
|
|
197
|
+
sendOperation,
|
|
198
|
+
{ resourceGroupName, contactProfileName, location, options },
|
|
199
|
+
createOrUpdateOperationSpec
|
|
200
|
+
);
|
|
201
|
+
return new LroEngine(lro, {
|
|
202
|
+
resumeFrom: options?.resumeFrom,
|
|
203
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
204
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Creates or updates a contact profile
|
|
210
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
211
|
+
* @param contactProfileName Contact Profile Name
|
|
212
|
+
* @param location The geo-location where the resource lives
|
|
213
|
+
* @param options The options parameters.
|
|
214
|
+
*/
|
|
215
|
+
async beginCreateOrUpdateAndWait(
|
|
216
|
+
resourceGroupName: string,
|
|
217
|
+
contactProfileName: string,
|
|
218
|
+
location: string,
|
|
219
|
+
options?: ContactProfilesCreateOrUpdateOptionalParams
|
|
220
|
+
): Promise<ContactProfilesCreateOrUpdateResponse> {
|
|
221
|
+
const poller = await this.beginCreateOrUpdate(
|
|
222
|
+
resourceGroupName,
|
|
223
|
+
contactProfileName,
|
|
224
|
+
location,
|
|
225
|
+
options
|
|
226
|
+
);
|
|
227
|
+
return poller.pollUntilDone();
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Deletes a specified contact profile resource.
|
|
232
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
233
|
+
* @param contactProfileName Contact Profile Name
|
|
234
|
+
* @param options The options parameters.
|
|
235
|
+
*/
|
|
236
|
+
async beginDelete(
|
|
237
|
+
resourceGroupName: string,
|
|
238
|
+
contactProfileName: string,
|
|
239
|
+
options?: ContactProfilesDeleteOptionalParams
|
|
240
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
241
|
+
const directSendOperation = async (
|
|
242
|
+
args: coreClient.OperationArguments,
|
|
243
|
+
spec: coreClient.OperationSpec
|
|
244
|
+
): Promise<void> => {
|
|
245
|
+
return this.client.sendOperationRequest(args, spec);
|
|
246
|
+
};
|
|
247
|
+
const sendOperation = async (
|
|
248
|
+
args: coreClient.OperationArguments,
|
|
249
|
+
spec: coreClient.OperationSpec
|
|
250
|
+
) => {
|
|
251
|
+
let currentRawResponse:
|
|
252
|
+
| coreClient.FullOperationResponse
|
|
253
|
+
| undefined = undefined;
|
|
254
|
+
const providedCallback = args.options?.onResponse;
|
|
255
|
+
const callback: coreClient.RawResponseCallback = (
|
|
256
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
257
|
+
flatResponse: unknown
|
|
258
|
+
) => {
|
|
259
|
+
currentRawResponse = rawResponse;
|
|
260
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
261
|
+
};
|
|
262
|
+
const updatedArgs = {
|
|
263
|
+
...args,
|
|
264
|
+
options: {
|
|
265
|
+
...args.options,
|
|
266
|
+
onResponse: callback
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
270
|
+
return {
|
|
271
|
+
flatResponse,
|
|
272
|
+
rawResponse: {
|
|
273
|
+
statusCode: currentRawResponse!.status,
|
|
274
|
+
body: currentRawResponse!.parsedBody,
|
|
275
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
const lro = new LroImpl(
|
|
281
|
+
sendOperation,
|
|
282
|
+
{ resourceGroupName, contactProfileName, options },
|
|
283
|
+
deleteOperationSpec
|
|
284
|
+
);
|
|
285
|
+
return new LroEngine(lro, {
|
|
286
|
+
resumeFrom: options?.resumeFrom,
|
|
287
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
288
|
+
lroResourceLocationConfig: "location"
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Deletes a specified contact profile resource.
|
|
294
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
295
|
+
* @param contactProfileName Contact Profile Name
|
|
296
|
+
* @param options The options parameters.
|
|
297
|
+
*/
|
|
298
|
+
async beginDeleteAndWait(
|
|
299
|
+
resourceGroupName: string,
|
|
300
|
+
contactProfileName: string,
|
|
301
|
+
options?: ContactProfilesDeleteOptionalParams
|
|
302
|
+
): Promise<void> {
|
|
303
|
+
const poller = await this.beginDelete(
|
|
304
|
+
resourceGroupName,
|
|
305
|
+
contactProfileName,
|
|
306
|
+
options
|
|
307
|
+
);
|
|
308
|
+
return poller.pollUntilDone();
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Updates the specified contact profile tags.
|
|
313
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
314
|
+
* @param contactProfileName Contact Profile Name
|
|
315
|
+
* @param parameters Parameters supplied to update contact profile tags.
|
|
316
|
+
* @param options The options parameters.
|
|
317
|
+
*/
|
|
318
|
+
updateTags(
|
|
319
|
+
resourceGroupName: string,
|
|
320
|
+
contactProfileName: string,
|
|
321
|
+
parameters: TagsObject,
|
|
322
|
+
options?: ContactProfilesUpdateTagsOptionalParams
|
|
323
|
+
): Promise<ContactProfilesUpdateTagsResponse> {
|
|
324
|
+
return this.client.sendOperationRequest(
|
|
325
|
+
{ resourceGroupName, contactProfileName, parameters, options },
|
|
326
|
+
updateTagsOperationSpec
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Returns list of contact profiles
|
|
332
|
+
* @param options The options parameters.
|
|
333
|
+
*/
|
|
334
|
+
private _listBySubscription(
|
|
335
|
+
options?: ContactProfilesListBySubscriptionOptionalParams
|
|
336
|
+
): Promise<ContactProfilesListBySubscriptionResponse> {
|
|
337
|
+
return this.client.sendOperationRequest(
|
|
338
|
+
{ options },
|
|
339
|
+
listBySubscriptionOperationSpec
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Returns list of contact profiles
|
|
345
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
346
|
+
* @param options The options parameters.
|
|
347
|
+
*/
|
|
348
|
+
private _list(
|
|
349
|
+
resourceGroupName: string,
|
|
350
|
+
options?: ContactProfilesListOptionalParams
|
|
351
|
+
): Promise<ContactProfilesListResponse> {
|
|
352
|
+
return this.client.sendOperationRequest(
|
|
353
|
+
{ resourceGroupName, options },
|
|
354
|
+
listOperationSpec
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
// Operation Specifications
|
|
359
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
360
|
+
|
|
361
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
362
|
+
path:
|
|
363
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}",
|
|
364
|
+
httpMethod: "GET",
|
|
365
|
+
responses: {
|
|
366
|
+
200: {
|
|
367
|
+
bodyMapper: Mappers.ContactProfile
|
|
368
|
+
},
|
|
369
|
+
default: {
|
|
370
|
+
bodyMapper: Mappers.CloudError
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
queryParameters: [Parameters.apiVersion],
|
|
374
|
+
urlParameters: [
|
|
375
|
+
Parameters.$host,
|
|
376
|
+
Parameters.subscriptionId,
|
|
377
|
+
Parameters.resourceGroupName,
|
|
378
|
+
Parameters.contactProfileName
|
|
379
|
+
],
|
|
380
|
+
headerParameters: [Parameters.accept],
|
|
381
|
+
serializer
|
|
382
|
+
};
|
|
383
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
384
|
+
path:
|
|
385
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}",
|
|
386
|
+
httpMethod: "PUT",
|
|
387
|
+
responses: {
|
|
388
|
+
200: {
|
|
389
|
+
bodyMapper: Mappers.ContactProfile
|
|
390
|
+
},
|
|
391
|
+
201: {
|
|
392
|
+
bodyMapper: Mappers.ContactProfile
|
|
393
|
+
},
|
|
394
|
+
202: {
|
|
395
|
+
bodyMapper: Mappers.ContactProfile
|
|
396
|
+
},
|
|
397
|
+
204: {
|
|
398
|
+
bodyMapper: Mappers.ContactProfile
|
|
399
|
+
},
|
|
400
|
+
default: {
|
|
401
|
+
bodyMapper: Mappers.CloudError
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
requestBody: {
|
|
405
|
+
parameterPath: {
|
|
406
|
+
tags: ["options", "tags"],
|
|
407
|
+
location: ["location"],
|
|
408
|
+
minimumViableContactDuration: ["options", "minimumViableContactDuration"],
|
|
409
|
+
minimumElevationDegrees: ["options", "minimumElevationDegrees"],
|
|
410
|
+
autoTrackingConfiguration: ["options", "autoTrackingConfiguration"],
|
|
411
|
+
links: ["options", "links"]
|
|
412
|
+
},
|
|
413
|
+
mapper: { ...Mappers.ContactProfile, required: true }
|
|
414
|
+
},
|
|
415
|
+
queryParameters: [Parameters.apiVersion],
|
|
416
|
+
urlParameters: [
|
|
417
|
+
Parameters.$host,
|
|
418
|
+
Parameters.subscriptionId,
|
|
419
|
+
Parameters.resourceGroupName,
|
|
420
|
+
Parameters.contactProfileName
|
|
421
|
+
],
|
|
422
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
423
|
+
mediaType: "json",
|
|
424
|
+
serializer
|
|
425
|
+
};
|
|
426
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
427
|
+
path:
|
|
428
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}",
|
|
429
|
+
httpMethod: "DELETE",
|
|
430
|
+
responses: {
|
|
431
|
+
200: {},
|
|
432
|
+
201: {},
|
|
433
|
+
202: {},
|
|
434
|
+
204: {},
|
|
435
|
+
default: {
|
|
436
|
+
bodyMapper: Mappers.CloudError
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
queryParameters: [Parameters.apiVersion],
|
|
440
|
+
urlParameters: [
|
|
441
|
+
Parameters.$host,
|
|
442
|
+
Parameters.subscriptionId,
|
|
443
|
+
Parameters.resourceGroupName,
|
|
444
|
+
Parameters.contactProfileName
|
|
445
|
+
],
|
|
446
|
+
headerParameters: [Parameters.accept],
|
|
447
|
+
serializer
|
|
448
|
+
};
|
|
449
|
+
const updateTagsOperationSpec: coreClient.OperationSpec = {
|
|
450
|
+
path:
|
|
451
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles/{contactProfileName}",
|
|
452
|
+
httpMethod: "PATCH",
|
|
453
|
+
responses: {
|
|
454
|
+
200: {
|
|
455
|
+
bodyMapper: Mappers.ContactProfile
|
|
456
|
+
},
|
|
457
|
+
default: {
|
|
458
|
+
bodyMapper: Mappers.CloudError
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
requestBody: Parameters.parameters1,
|
|
462
|
+
queryParameters: [Parameters.apiVersion],
|
|
463
|
+
urlParameters: [
|
|
464
|
+
Parameters.$host,
|
|
465
|
+
Parameters.subscriptionId,
|
|
466
|
+
Parameters.resourceGroupName,
|
|
467
|
+
Parameters.contactProfileName
|
|
468
|
+
],
|
|
469
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
470
|
+
mediaType: "json",
|
|
471
|
+
serializer
|
|
472
|
+
};
|
|
473
|
+
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
474
|
+
path:
|
|
475
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.Orbital/contactProfiles",
|
|
476
|
+
httpMethod: "GET",
|
|
477
|
+
responses: {
|
|
478
|
+
200: {
|
|
479
|
+
bodyMapper: Mappers.ContactProfileListResult
|
|
480
|
+
},
|
|
481
|
+
default: {
|
|
482
|
+
bodyMapper: Mappers.CloudError
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
queryParameters: [Parameters.apiVersion],
|
|
486
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
487
|
+
headerParameters: [Parameters.accept],
|
|
488
|
+
serializer
|
|
489
|
+
};
|
|
490
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
491
|
+
path:
|
|
492
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Orbital/contactProfiles",
|
|
493
|
+
httpMethod: "GET",
|
|
494
|
+
responses: {
|
|
495
|
+
200: {
|
|
496
|
+
bodyMapper: Mappers.ContactProfileListResult
|
|
497
|
+
},
|
|
498
|
+
default: {
|
|
499
|
+
bodyMapper: Mappers.CloudError
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
queryParameters: [Parameters.apiVersion],
|
|
503
|
+
urlParameters: [
|
|
504
|
+
Parameters.$host,
|
|
505
|
+
Parameters.subscriptionId,
|
|
506
|
+
Parameters.resourceGroupName
|
|
507
|
+
],
|
|
508
|
+
headerParameters: [Parameters.accept],
|
|
509
|
+
serializer
|
|
510
|
+
};
|