@azure/arm-domainservices 0.1.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/LICENSE.txt +21 -21
  4. package/README.md +98 -96
  5. package/dist/index.js +2502 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.min.js +1 -0
  8. package/dist/index.min.js.map +1 -0
  9. package/dist-esm/src/domainServicesResourceProvider.d.ts +22 -0
  10. package/dist-esm/src/domainServicesResourceProvider.d.ts.map +1 -0
  11. package/dist-esm/src/domainServicesResourceProvider.js +55 -0
  12. package/dist-esm/src/domainServicesResourceProvider.js.map +1 -0
  13. package/dist-esm/src/index.d.ts +5 -0
  14. package/dist-esm/src/index.d.ts.map +1 -0
  15. package/dist-esm/src/index.js +12 -0
  16. package/dist-esm/src/index.js.map +1 -0
  17. package/dist-esm/src/lroImpl.d.ts +16 -0
  18. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  19. package/dist-esm/src/lroImpl.js +29 -0
  20. package/dist-esm/src/lroImpl.js.map +1 -0
  21. package/dist-esm/src/models/index.d.ts +768 -0
  22. package/dist-esm/src/models/index.d.ts.map +1 -0
  23. package/dist-esm/src/models/index.js +98 -0
  24. package/dist-esm/src/models/index.js.map +1 -0
  25. package/dist-esm/src/models/mappers.d.ts +27 -0
  26. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  27. package/dist-esm/src/models/mappers.js +1015 -0
  28. package/dist-esm/src/models/mappers.js.map +1 -0
  29. package/dist-esm/src/models/parameters.d.ts +13 -0
  30. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  31. package/dist-esm/src/models/parameters.js +117 -0
  32. package/dist-esm/src/models/parameters.js.map +1 -0
  33. package/dist-esm/src/operations/domainServiceOperations.d.ts +32 -0
  34. package/dist-esm/src/operations/domainServiceOperations.d.ts.map +1 -0
  35. package/dist-esm/src/operations/domainServiceOperations.js +120 -0
  36. package/dist-esm/src/operations/domainServiceOperations.js.map +1 -0
  37. package/dist-esm/src/operations/domainServices.d.ts +127 -0
  38. package/dist-esm/src/operations/domainServices.d.ts.map +1 -0
  39. package/dist-esm/src/operations/domainServices.js +520 -0
  40. package/dist-esm/src/operations/domainServices.js.map +1 -0
  41. package/dist-esm/src/operations/index.d.ts +5 -0
  42. package/dist-esm/src/operations/index.d.ts.map +1 -0
  43. package/dist-esm/src/operations/index.js +12 -0
  44. package/dist-esm/src/operations/index.js.map +1 -0
  45. package/dist-esm/src/operations/ouContainerOperationGrp.d.ts +111 -0
  46. package/dist-esm/src/operations/ouContainerOperationGrp.d.ts.map +1 -0
  47. package/dist-esm/src/operations/ouContainerOperationGrp.js +441 -0
  48. package/dist-esm/src/operations/ouContainerOperationGrp.js.map +1 -0
  49. package/dist-esm/src/operations/ouContainerOperations.d.ts +32 -0
  50. package/dist-esm/src/operations/ouContainerOperations.d.ts.map +1 -0
  51. package/dist-esm/src/operations/ouContainerOperations.js +120 -0
  52. package/dist-esm/src/operations/ouContainerOperations.js.map +1 -0
  53. package/dist-esm/src/operationsInterfaces/domainServiceOperations.d.ts +11 -0
  54. package/dist-esm/src/operationsInterfaces/domainServiceOperations.d.ts.map +1 -0
  55. package/dist-esm/src/operationsInterfaces/domainServiceOperations.js +9 -0
  56. package/dist-esm/src/operationsInterfaces/domainServiceOperations.js.map +1 -0
  57. package/dist-esm/src/operationsInterfaces/domainServices.d.ts +87 -0
  58. package/dist-esm/src/operationsInterfaces/domainServices.d.ts.map +1 -0
  59. package/dist-esm/src/operationsInterfaces/domainServices.js +9 -0
  60. package/dist-esm/src/operationsInterfaces/domainServices.js.map +1 -0
  61. package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
  62. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  63. package/dist-esm/src/operationsInterfaces/index.js +12 -0
  64. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  65. package/dist-esm/src/operationsInterfaces/ouContainerOperationGrp.d.ts +84 -0
  66. package/dist-esm/src/operationsInterfaces/ouContainerOperationGrp.d.ts.map +1 -0
  67. package/dist-esm/src/operationsInterfaces/ouContainerOperationGrp.js +9 -0
  68. package/dist-esm/src/operationsInterfaces/ouContainerOperationGrp.js.map +1 -0
  69. package/dist-esm/src/operationsInterfaces/ouContainerOperations.d.ts +11 -0
  70. package/dist-esm/src/operationsInterfaces/ouContainerOperations.d.ts.map +1 -0
  71. package/dist-esm/src/operationsInterfaces/ouContainerOperations.js +9 -0
  72. package/dist-esm/src/operationsInterfaces/ouContainerOperations.js.map +1 -0
  73. package/dist-esm/test/sampleTest.d.ts +2 -0
  74. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  75. package/dist-esm/test/sampleTest.js +40 -0
  76. package/dist-esm/test/sampleTest.js.map +1 -0
  77. package/package.json +71 -34
  78. package/review/arm-domainservices.api.md +591 -0
  79. package/rollup.config.js +184 -27
  80. package/src/domainServicesResourceProvider.ts +92 -0
  81. package/src/index.ts +12 -0
  82. package/src/lroImpl.ts +34 -0
  83. package/src/models/index.ts +868 -0
  84. package/src/models/mappers.ts +1069 -0
  85. package/src/models/parameters.ts +136 -0
  86. package/src/operations/domainServiceOperations.ts +137 -0
  87. package/src/operations/domainServices.ts +690 -0
  88. package/{lib → src}/operations/index.ts +5 -5
  89. package/src/operations/ouContainerOperationGrp.ts +632 -0
  90. package/src/operations/ouContainerOperations.ts +137 -0
  91. package/src/operationsInterfaces/domainServiceOperations.ts +25 -0
  92. package/src/operationsInterfaces/domainServices.ts +154 -0
  93. package/src/operationsInterfaces/index.ts +12 -0
  94. package/src/operationsInterfaces/ouContainerOperationGrp.ts +157 -0
  95. package/src/operationsInterfaces/ouContainerOperations.ts +25 -0
  96. package/tsconfig.json +4 -4
  97. package/types/arm-domainservices.d.ts +1062 -0
  98. package/types/tsdoc-metadata.json +11 -0
  99. package/dist/arm-domainservices.js +0 -1223
  100. package/dist/arm-domainservices.js.map +0 -1
  101. package/dist/arm-domainservices.min.js +0 -1
  102. package/dist/arm-domainservices.min.js.map +0 -1
  103. package/esm/domainservicesManagementClient.d.ts +0 -20
  104. package/esm/domainservicesManagementClient.d.ts.map +0 -1
  105. package/esm/domainservicesManagementClient.js +0 -35
  106. package/esm/domainservicesManagementClient.js.map +0 -1
  107. package/esm/domainservicesManagementClientContext.d.ts +0 -17
  108. package/esm/domainservicesManagementClientContext.d.ts.map +0 -1
  109. package/esm/domainservicesManagementClientContext.js +0 -57
  110. package/esm/domainservicesManagementClientContext.js.map +0 -1
  111. package/esm/models/domainServiceOperationsMappers.d.ts +0 -2
  112. package/esm/models/domainServiceOperationsMappers.d.ts.map +0 -1
  113. package/esm/models/domainServiceOperationsMappers.js +0 -11
  114. package/esm/models/domainServiceOperationsMappers.js.map +0 -1
  115. package/esm/models/domainServicesMappers.d.ts +0 -2
  116. package/esm/models/domainServicesMappers.d.ts.map +0 -1
  117. package/esm/models/domainServicesMappers.js +0 -11
  118. package/esm/models/domainServicesMappers.js.map +0 -1
  119. package/esm/models/index.d.ts +0 -693
  120. package/esm/models/index.d.ts.map +0 -1
  121. package/esm/models/index.js +0 -10
  122. package/esm/models/index.js.map +0 -1
  123. package/esm/models/mappers.d.ts +0 -15
  124. package/esm/models/mappers.d.ts.map +0 -1
  125. package/esm/models/mappers.js +0 -498
  126. package/esm/models/mappers.js.map +0 -1
  127. package/esm/models/parameters.d.ts +0 -8
  128. package/esm/models/parameters.d.ts.map +0 -1
  129. package/esm/models/parameters.js +0 -76
  130. package/esm/models/parameters.js.map +0 -1
  131. package/esm/operations/domainServiceOperations.d.ts +0 -46
  132. package/esm/operations/domainServiceOperations.d.ts.map +0 -1
  133. package/esm/operations/domainServiceOperations.js +0 -77
  134. package/esm/operations/domainServiceOperations.js.map +0 -1
  135. package/esm/operations/domainServices.d.ts +0 -189
  136. package/esm/operations/domainServices.d.ts.map +0 -1
  137. package/esm/operations/domainServices.js +0 -356
  138. package/esm/operations/domainServices.js.map +0 -1
  139. package/esm/operations/index.d.ts +0 -3
  140. package/esm/operations/index.d.ts.map +0 -1
  141. package/esm/operations/index.js +0 -12
  142. package/esm/operations/index.js.map +0 -1
  143. package/lib/domainservicesManagementClient.ts +0 -45
  144. package/lib/domainservicesManagementClientContext.ts +0 -63
  145. package/lib/models/domainServiceOperationsMappers.ts +0 -17
  146. package/lib/models/domainServicesMappers.ts +0 -23
  147. package/lib/models/index.ts +0 -736
  148. package/lib/models/mappers.ts +0 -526
  149. package/lib/models/parameters.ts +0 -78
  150. package/lib/operations/domainServiceOperations.ts +0 -123
  151. package/lib/operations/domainServices.ts +0 -513
@@ -0,0 +1,690 @@
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 { DomainServices } 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 { DomainServicesResourceProvider } from "../domainServicesResourceProvider";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ DomainService,
19
+ DomainServicesListNextOptionalParams,
20
+ DomainServicesListOptionalParams,
21
+ DomainServicesListByResourceGroupNextOptionalParams,
22
+ DomainServicesListByResourceGroupOptionalParams,
23
+ DomainServicesListResponse,
24
+ DomainServicesListByResourceGroupResponse,
25
+ DomainServicesCreateOrUpdateOptionalParams,
26
+ DomainServicesCreateOrUpdateResponse,
27
+ DomainServicesGetOptionalParams,
28
+ DomainServicesGetResponse,
29
+ DomainServicesDeleteOptionalParams,
30
+ DomainServicesUpdateOptionalParams,
31
+ DomainServicesUpdateResponse,
32
+ DomainServicesListNextResponse,
33
+ DomainServicesListByResourceGroupNextResponse
34
+ } from "../models";
35
+
36
+ /// <reference lib="esnext.asynciterable" />
37
+ /** Class containing DomainServices operations. */
38
+ export class DomainServicesImpl implements DomainServices {
39
+ private readonly client: DomainServicesResourceProvider;
40
+
41
+ /**
42
+ * Initialize a new instance of the class DomainServices class.
43
+ * @param client Reference to the service client
44
+ */
45
+ constructor(client: DomainServicesResourceProvider) {
46
+ this.client = client;
47
+ }
48
+
49
+ /**
50
+ * The List Domain Services in Subscription operation lists all the domain services available under the
51
+ * given subscription (and across all resource groups within that subscription).
52
+ * @param options The options parameters.
53
+ */
54
+ public list(
55
+ options?: DomainServicesListOptionalParams
56
+ ): PagedAsyncIterableIterator<DomainService> {
57
+ const iter = this.listPagingAll(options);
58
+ return {
59
+ next() {
60
+ return iter.next();
61
+ },
62
+ [Symbol.asyncIterator]() {
63
+ return this;
64
+ },
65
+ byPage: () => {
66
+ return this.listPagingPage(options);
67
+ }
68
+ };
69
+ }
70
+
71
+ private async *listPagingPage(
72
+ options?: DomainServicesListOptionalParams
73
+ ): AsyncIterableIterator<DomainService[]> {
74
+ let result = await this._list(options);
75
+ yield result.value || [];
76
+ let continuationToken = result.nextLink;
77
+ while (continuationToken) {
78
+ result = await this._listNext(continuationToken, options);
79
+ continuationToken = result.nextLink;
80
+ yield result.value || [];
81
+ }
82
+ }
83
+
84
+ private async *listPagingAll(
85
+ options?: DomainServicesListOptionalParams
86
+ ): AsyncIterableIterator<DomainService> {
87
+ for await (const page of this.listPagingPage(options)) {
88
+ yield* page;
89
+ }
90
+ }
91
+
92
+ /**
93
+ * The List Domain Services in Resource Group operation lists all the domain services available under
94
+ * the given resource group.
95
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
96
+ * case insensitive.
97
+ * @param options The options parameters.
98
+ */
99
+ public listByResourceGroup(
100
+ resourceGroupName: string,
101
+ options?: DomainServicesListByResourceGroupOptionalParams
102
+ ): PagedAsyncIterableIterator<DomainService> {
103
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
104
+ return {
105
+ next() {
106
+ return iter.next();
107
+ },
108
+ [Symbol.asyncIterator]() {
109
+ return this;
110
+ },
111
+ byPage: () => {
112
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
113
+ }
114
+ };
115
+ }
116
+
117
+ private async *listByResourceGroupPagingPage(
118
+ resourceGroupName: string,
119
+ options?: DomainServicesListByResourceGroupOptionalParams
120
+ ): AsyncIterableIterator<DomainService[]> {
121
+ let result = await this._listByResourceGroup(resourceGroupName, options);
122
+ yield result.value || [];
123
+ let continuationToken = result.nextLink;
124
+ while (continuationToken) {
125
+ result = await this._listByResourceGroupNext(
126
+ resourceGroupName,
127
+ continuationToken,
128
+ options
129
+ );
130
+ continuationToken = result.nextLink;
131
+ yield result.value || [];
132
+ }
133
+ }
134
+
135
+ private async *listByResourceGroupPagingAll(
136
+ resourceGroupName: string,
137
+ options?: DomainServicesListByResourceGroupOptionalParams
138
+ ): AsyncIterableIterator<DomainService> {
139
+ for await (const page of this.listByResourceGroupPagingPage(
140
+ resourceGroupName,
141
+ options
142
+ )) {
143
+ yield* page;
144
+ }
145
+ }
146
+
147
+ /**
148
+ * The List Domain Services in Subscription operation lists all the domain services available under the
149
+ * given subscription (and across all resource groups within that subscription).
150
+ * @param options The options parameters.
151
+ */
152
+ private _list(
153
+ options?: DomainServicesListOptionalParams
154
+ ): Promise<DomainServicesListResponse> {
155
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
156
+ }
157
+
158
+ /**
159
+ * The List Domain Services in Resource Group operation lists all the domain services available under
160
+ * the given resource group.
161
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
162
+ * case insensitive.
163
+ * @param options The options parameters.
164
+ */
165
+ private _listByResourceGroup(
166
+ resourceGroupName: string,
167
+ options?: DomainServicesListByResourceGroupOptionalParams
168
+ ): Promise<DomainServicesListByResourceGroupResponse> {
169
+ return this.client.sendOperationRequest(
170
+ { resourceGroupName, options },
171
+ listByResourceGroupOperationSpec
172
+ );
173
+ }
174
+
175
+ /**
176
+ * The Create Domain Service operation creates a new domain service with the specified parameters. If
177
+ * the specific service already exists, then any patchable properties will be updated and any immutable
178
+ * properties will remain unchanged.
179
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
180
+ * case insensitive.
181
+ * @param domainServiceName The name of the domain service.
182
+ * @param domainService Properties supplied to the Create or Update a Domain Service operation.
183
+ * @param options The options parameters.
184
+ */
185
+ async beginCreateOrUpdate(
186
+ resourceGroupName: string,
187
+ domainServiceName: string,
188
+ domainService: DomainService,
189
+ options?: DomainServicesCreateOrUpdateOptionalParams
190
+ ): Promise<
191
+ PollerLike<
192
+ PollOperationState<DomainServicesCreateOrUpdateResponse>,
193
+ DomainServicesCreateOrUpdateResponse
194
+ >
195
+ > {
196
+ const directSendOperation = async (
197
+ args: coreClient.OperationArguments,
198
+ spec: coreClient.OperationSpec
199
+ ): Promise<DomainServicesCreateOrUpdateResponse> => {
200
+ return this.client.sendOperationRequest(args, spec);
201
+ };
202
+ const sendOperation = async (
203
+ args: coreClient.OperationArguments,
204
+ spec: coreClient.OperationSpec
205
+ ) => {
206
+ let currentRawResponse:
207
+ | coreClient.FullOperationResponse
208
+ | undefined = undefined;
209
+ const providedCallback = args.options?.onResponse;
210
+ const callback: coreClient.RawResponseCallback = (
211
+ rawResponse: coreClient.FullOperationResponse,
212
+ flatResponse: unknown
213
+ ) => {
214
+ currentRawResponse = rawResponse;
215
+ providedCallback?.(rawResponse, flatResponse);
216
+ };
217
+ const updatedArgs = {
218
+ ...args,
219
+ options: {
220
+ ...args.options,
221
+ onResponse: callback
222
+ }
223
+ };
224
+ const flatResponse = await directSendOperation(updatedArgs, spec);
225
+ return {
226
+ flatResponse,
227
+ rawResponse: {
228
+ statusCode: currentRawResponse!.status,
229
+ body: currentRawResponse!.parsedBody,
230
+ headers: currentRawResponse!.headers.toJSON()
231
+ }
232
+ };
233
+ };
234
+
235
+ const lro = new LroImpl(
236
+ sendOperation,
237
+ { resourceGroupName, domainServiceName, domainService, options },
238
+ createOrUpdateOperationSpec
239
+ );
240
+ return new LroEngine(lro, {
241
+ resumeFrom: options?.resumeFrom,
242
+ intervalInMs: options?.updateIntervalInMs
243
+ });
244
+ }
245
+
246
+ /**
247
+ * The Create Domain Service operation creates a new domain service with the specified parameters. If
248
+ * the specific service already exists, then any patchable properties will be updated and any immutable
249
+ * properties will remain unchanged.
250
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
251
+ * case insensitive.
252
+ * @param domainServiceName The name of the domain service.
253
+ * @param domainService Properties supplied to the Create or Update a Domain Service operation.
254
+ * @param options The options parameters.
255
+ */
256
+ async beginCreateOrUpdateAndWait(
257
+ resourceGroupName: string,
258
+ domainServiceName: string,
259
+ domainService: DomainService,
260
+ options?: DomainServicesCreateOrUpdateOptionalParams
261
+ ): Promise<DomainServicesCreateOrUpdateResponse> {
262
+ const poller = await this.beginCreateOrUpdate(
263
+ resourceGroupName,
264
+ domainServiceName,
265
+ domainService,
266
+ options
267
+ );
268
+ return poller.pollUntilDone();
269
+ }
270
+
271
+ /**
272
+ * The Get Domain Service operation retrieves a json representation of the Domain Service.
273
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
274
+ * case insensitive.
275
+ * @param domainServiceName The name of the domain service.
276
+ * @param options The options parameters.
277
+ */
278
+ get(
279
+ resourceGroupName: string,
280
+ domainServiceName: string,
281
+ options?: DomainServicesGetOptionalParams
282
+ ): Promise<DomainServicesGetResponse> {
283
+ return this.client.sendOperationRequest(
284
+ { resourceGroupName, domainServiceName, options },
285
+ getOperationSpec
286
+ );
287
+ }
288
+
289
+ /**
290
+ * The Delete Domain Service operation deletes an existing Domain Service.
291
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
292
+ * case insensitive.
293
+ * @param domainServiceName The name of the domain service.
294
+ * @param options The options parameters.
295
+ */
296
+ async beginDelete(
297
+ resourceGroupName: string,
298
+ domainServiceName: string,
299
+ options?: DomainServicesDeleteOptionalParams
300
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
301
+ const directSendOperation = async (
302
+ args: coreClient.OperationArguments,
303
+ spec: coreClient.OperationSpec
304
+ ): Promise<void> => {
305
+ return this.client.sendOperationRequest(args, spec);
306
+ };
307
+ const sendOperation = async (
308
+ args: coreClient.OperationArguments,
309
+ spec: coreClient.OperationSpec
310
+ ) => {
311
+ let currentRawResponse:
312
+ | coreClient.FullOperationResponse
313
+ | undefined = undefined;
314
+ const providedCallback = args.options?.onResponse;
315
+ const callback: coreClient.RawResponseCallback = (
316
+ rawResponse: coreClient.FullOperationResponse,
317
+ flatResponse: unknown
318
+ ) => {
319
+ currentRawResponse = rawResponse;
320
+ providedCallback?.(rawResponse, flatResponse);
321
+ };
322
+ const updatedArgs = {
323
+ ...args,
324
+ options: {
325
+ ...args.options,
326
+ onResponse: callback
327
+ }
328
+ };
329
+ const flatResponse = await directSendOperation(updatedArgs, spec);
330
+ return {
331
+ flatResponse,
332
+ rawResponse: {
333
+ statusCode: currentRawResponse!.status,
334
+ body: currentRawResponse!.parsedBody,
335
+ headers: currentRawResponse!.headers.toJSON()
336
+ }
337
+ };
338
+ };
339
+
340
+ const lro = new LroImpl(
341
+ sendOperation,
342
+ { resourceGroupName, domainServiceName, options },
343
+ deleteOperationSpec
344
+ );
345
+ return new LroEngine(lro, {
346
+ resumeFrom: options?.resumeFrom,
347
+ intervalInMs: options?.updateIntervalInMs
348
+ });
349
+ }
350
+
351
+ /**
352
+ * The Delete Domain Service operation deletes an existing Domain Service.
353
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
354
+ * case insensitive.
355
+ * @param domainServiceName The name of the domain service.
356
+ * @param options The options parameters.
357
+ */
358
+ async beginDeleteAndWait(
359
+ resourceGroupName: string,
360
+ domainServiceName: string,
361
+ options?: DomainServicesDeleteOptionalParams
362
+ ): Promise<void> {
363
+ const poller = await this.beginDelete(
364
+ resourceGroupName,
365
+ domainServiceName,
366
+ options
367
+ );
368
+ return poller.pollUntilDone();
369
+ }
370
+
371
+ /**
372
+ * The Update Domain Service operation can be used to update the existing deployment. The update call
373
+ * only supports the properties listed in the PATCH body.
374
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
375
+ * case insensitive.
376
+ * @param domainServiceName The name of the domain service.
377
+ * @param domainService Properties supplied to the Update a Domain Service operation.
378
+ * @param options The options parameters.
379
+ */
380
+ async beginUpdate(
381
+ resourceGroupName: string,
382
+ domainServiceName: string,
383
+ domainService: DomainService,
384
+ options?: DomainServicesUpdateOptionalParams
385
+ ): Promise<
386
+ PollerLike<
387
+ PollOperationState<DomainServicesUpdateResponse>,
388
+ DomainServicesUpdateResponse
389
+ >
390
+ > {
391
+ const directSendOperation = async (
392
+ args: coreClient.OperationArguments,
393
+ spec: coreClient.OperationSpec
394
+ ): Promise<DomainServicesUpdateResponse> => {
395
+ return this.client.sendOperationRequest(args, spec);
396
+ };
397
+ const sendOperation = async (
398
+ args: coreClient.OperationArguments,
399
+ spec: coreClient.OperationSpec
400
+ ) => {
401
+ let currentRawResponse:
402
+ | coreClient.FullOperationResponse
403
+ | undefined = undefined;
404
+ const providedCallback = args.options?.onResponse;
405
+ const callback: coreClient.RawResponseCallback = (
406
+ rawResponse: coreClient.FullOperationResponse,
407
+ flatResponse: unknown
408
+ ) => {
409
+ currentRawResponse = rawResponse;
410
+ providedCallback?.(rawResponse, flatResponse);
411
+ };
412
+ const updatedArgs = {
413
+ ...args,
414
+ options: {
415
+ ...args.options,
416
+ onResponse: callback
417
+ }
418
+ };
419
+ const flatResponse = await directSendOperation(updatedArgs, spec);
420
+ return {
421
+ flatResponse,
422
+ rawResponse: {
423
+ statusCode: currentRawResponse!.status,
424
+ body: currentRawResponse!.parsedBody,
425
+ headers: currentRawResponse!.headers.toJSON()
426
+ }
427
+ };
428
+ };
429
+
430
+ const lro = new LroImpl(
431
+ sendOperation,
432
+ { resourceGroupName, domainServiceName, domainService, options },
433
+ updateOperationSpec
434
+ );
435
+ return new LroEngine(lro, {
436
+ resumeFrom: options?.resumeFrom,
437
+ intervalInMs: options?.updateIntervalInMs
438
+ });
439
+ }
440
+
441
+ /**
442
+ * The Update Domain Service operation can be used to update the existing deployment. The update call
443
+ * only supports the properties listed in the PATCH body.
444
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
445
+ * case insensitive.
446
+ * @param domainServiceName The name of the domain service.
447
+ * @param domainService Properties supplied to the Update a Domain Service operation.
448
+ * @param options The options parameters.
449
+ */
450
+ async beginUpdateAndWait(
451
+ resourceGroupName: string,
452
+ domainServiceName: string,
453
+ domainService: DomainService,
454
+ options?: DomainServicesUpdateOptionalParams
455
+ ): Promise<DomainServicesUpdateResponse> {
456
+ const poller = await this.beginUpdate(
457
+ resourceGroupName,
458
+ domainServiceName,
459
+ domainService,
460
+ options
461
+ );
462
+ return poller.pollUntilDone();
463
+ }
464
+
465
+ /**
466
+ * ListNext
467
+ * @param nextLink The nextLink from the previous successful call to the List method.
468
+ * @param options The options parameters.
469
+ */
470
+ private _listNext(
471
+ nextLink: string,
472
+ options?: DomainServicesListNextOptionalParams
473
+ ): Promise<DomainServicesListNextResponse> {
474
+ return this.client.sendOperationRequest(
475
+ { nextLink, options },
476
+ listNextOperationSpec
477
+ );
478
+ }
479
+
480
+ /**
481
+ * ListByResourceGroupNext
482
+ * @param resourceGroupName The name of the resource group within the user's subscription. The name is
483
+ * case insensitive.
484
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
485
+ * @param options The options parameters.
486
+ */
487
+ private _listByResourceGroupNext(
488
+ resourceGroupName: string,
489
+ nextLink: string,
490
+ options?: DomainServicesListByResourceGroupNextOptionalParams
491
+ ): Promise<DomainServicesListByResourceGroupNextResponse> {
492
+ return this.client.sendOperationRequest(
493
+ { resourceGroupName, nextLink, options },
494
+ listByResourceGroupNextOperationSpec
495
+ );
496
+ }
497
+ }
498
+ // Operation Specifications
499
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
500
+
501
+ const listOperationSpec: coreClient.OperationSpec = {
502
+ path:
503
+ "/subscriptions/{subscriptionId}/providers/Microsoft.AAD/domainServices",
504
+ httpMethod: "GET",
505
+ responses: {
506
+ 200: {
507
+ bodyMapper: Mappers.DomainServiceListResult
508
+ },
509
+ default: {
510
+ bodyMapper: Mappers.CloudError
511
+ }
512
+ },
513
+ queryParameters: [Parameters.apiVersion],
514
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
515
+ headerParameters: [Parameters.accept],
516
+ serializer
517
+ };
518
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
519
+ path:
520
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices",
521
+ httpMethod: "GET",
522
+ responses: {
523
+ 200: {
524
+ bodyMapper: Mappers.DomainServiceListResult
525
+ },
526
+ default: {
527
+ bodyMapper: Mappers.CloudError
528
+ }
529
+ },
530
+ queryParameters: [Parameters.apiVersion],
531
+ urlParameters: [
532
+ Parameters.$host,
533
+ Parameters.subscriptionId,
534
+ Parameters.resourceGroupName
535
+ ],
536
+ headerParameters: [Parameters.accept],
537
+ serializer
538
+ };
539
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
540
+ path:
541
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}",
542
+ httpMethod: "PUT",
543
+ responses: {
544
+ 200: {
545
+ bodyMapper: Mappers.DomainService
546
+ },
547
+ 201: {
548
+ bodyMapper: Mappers.DomainService
549
+ },
550
+ 202: {
551
+ bodyMapper: Mappers.DomainService
552
+ },
553
+ 204: {
554
+ bodyMapper: Mappers.DomainService
555
+ },
556
+ default: {
557
+ bodyMapper: Mappers.CloudError
558
+ }
559
+ },
560
+ requestBody: Parameters.domainService,
561
+ queryParameters: [Parameters.apiVersion],
562
+ urlParameters: [
563
+ Parameters.$host,
564
+ Parameters.subscriptionId,
565
+ Parameters.resourceGroupName,
566
+ Parameters.domainServiceName
567
+ ],
568
+ headerParameters: [Parameters.accept, Parameters.contentType],
569
+ mediaType: "json",
570
+ serializer
571
+ };
572
+ const getOperationSpec: coreClient.OperationSpec = {
573
+ path:
574
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}",
575
+ httpMethod: "GET",
576
+ responses: {
577
+ 200: {
578
+ bodyMapper: Mappers.DomainService
579
+ },
580
+ default: {
581
+ bodyMapper: Mappers.CloudError
582
+ }
583
+ },
584
+ queryParameters: [Parameters.apiVersion],
585
+ urlParameters: [
586
+ Parameters.$host,
587
+ Parameters.subscriptionId,
588
+ Parameters.resourceGroupName,
589
+ Parameters.domainServiceName
590
+ ],
591
+ headerParameters: [Parameters.accept],
592
+ serializer
593
+ };
594
+ const deleteOperationSpec: coreClient.OperationSpec = {
595
+ path:
596
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}",
597
+ httpMethod: "DELETE",
598
+ responses: {
599
+ 200: {},
600
+ 201: {},
601
+ 202: {},
602
+ 204: {},
603
+ default: {
604
+ bodyMapper: Mappers.CloudError
605
+ }
606
+ },
607
+ queryParameters: [Parameters.apiVersion],
608
+ urlParameters: [
609
+ Parameters.$host,
610
+ Parameters.subscriptionId,
611
+ Parameters.resourceGroupName,
612
+ Parameters.domainServiceName
613
+ ],
614
+ headerParameters: [Parameters.accept],
615
+ serializer
616
+ };
617
+ const updateOperationSpec: coreClient.OperationSpec = {
618
+ path:
619
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}",
620
+ httpMethod: "PATCH",
621
+ responses: {
622
+ 200: {
623
+ bodyMapper: Mappers.DomainService
624
+ },
625
+ 201: {
626
+ bodyMapper: Mappers.DomainService
627
+ },
628
+ 202: {
629
+ bodyMapper: Mappers.DomainService
630
+ },
631
+ 204: {
632
+ bodyMapper: Mappers.DomainService
633
+ },
634
+ default: {
635
+ bodyMapper: Mappers.CloudError
636
+ }
637
+ },
638
+ requestBody: Parameters.domainService,
639
+ queryParameters: [Parameters.apiVersion],
640
+ urlParameters: [
641
+ Parameters.$host,
642
+ Parameters.subscriptionId,
643
+ Parameters.resourceGroupName,
644
+ Parameters.domainServiceName
645
+ ],
646
+ headerParameters: [Parameters.accept, Parameters.contentType],
647
+ mediaType: "json",
648
+ serializer
649
+ };
650
+ const listNextOperationSpec: coreClient.OperationSpec = {
651
+ path: "{nextLink}",
652
+ httpMethod: "GET",
653
+ responses: {
654
+ 200: {
655
+ bodyMapper: Mappers.DomainServiceListResult
656
+ },
657
+ default: {
658
+ bodyMapper: Mappers.CloudError
659
+ }
660
+ },
661
+ queryParameters: [Parameters.apiVersion],
662
+ urlParameters: [
663
+ Parameters.$host,
664
+ Parameters.nextLink,
665
+ Parameters.subscriptionId
666
+ ],
667
+ headerParameters: [Parameters.accept],
668
+ serializer
669
+ };
670
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
671
+ path: "{nextLink}",
672
+ httpMethod: "GET",
673
+ responses: {
674
+ 200: {
675
+ bodyMapper: Mappers.DomainServiceListResult
676
+ },
677
+ default: {
678
+ bodyMapper: Mappers.CloudError
679
+ }
680
+ },
681
+ queryParameters: [Parameters.apiVersion],
682
+ urlParameters: [
683
+ Parameters.$host,
684
+ Parameters.nextLink,
685
+ Parameters.subscriptionId,
686
+ Parameters.resourceGroupName
687
+ ],
688
+ headerParameters: [Parameters.accept],
689
+ serializer
690
+ };
@@ -1,12 +1,12 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
9
  export * from "./domainServiceOperations";
12
10
  export * from "./domainServices";
11
+ export * from "./ouContainerOperations";
12
+ export * from "./ouContainerOperationGrp";