@azure/arm-domainservices 3.2.1 → 4.0.1-alpha.20220119.1

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