@azure/arm-managedapplications 1.0.2 → 2.0.0-alpha.20211011.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.
Files changed (160) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +66 -72
  4. package/dist/index.js +2896 -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/esm/applicationClient.d.ts +50 -0
  9. package/esm/applicationClient.d.ts.map +1 -0
  10. package/esm/applicationClient.js +190 -0
  11. package/esm/applicationClient.js.map +1 -0
  12. package/esm/applicationClientContext.d.ts +16 -0
  13. package/esm/applicationClientContext.d.ts.map +1 -0
  14. package/esm/applicationClientContext.js +49 -0
  15. package/esm/applicationClientContext.js.map +1 -0
  16. package/esm/coreClientLro.d.ts +26 -0
  17. package/esm/coreClientLro.d.ts.map +1 -0
  18. package/esm/coreClientLro.js +186 -0
  19. package/esm/coreClientLro.js.map +1 -0
  20. package/esm/index.d.ts +770 -0
  21. package/esm/index.d.ts.map +1 -0
  22. package/esm/index.js +13 -0
  23. package/esm/index.js.map +1 -0
  24. package/esm/lro/azureAsyncPolling.d.ts +3 -0
  25. package/esm/lro/azureAsyncPolling.d.ts.map +1 -0
  26. package/esm/lro/azureAsyncPolling.js +67 -0
  27. package/esm/lro/azureAsyncPolling.js.map +1 -0
  28. package/esm/lro/bodyPolling.d.ts +8 -0
  29. package/esm/lro/bodyPolling.d.ts.map +1 -0
  30. package/esm/lro/bodyPolling.js +37 -0
  31. package/esm/lro/bodyPolling.js.map +1 -0
  32. package/esm/lro/index.d.ts +4 -0
  33. package/esm/lro/index.d.ts.map +1 -0
  34. package/esm/lro/index.js +12 -0
  35. package/esm/lro/index.js.map +1 -0
  36. package/esm/lro/locationPolling.d.ts +3 -0
  37. package/esm/lro/locationPolling.d.ts.map +1 -0
  38. package/esm/lro/locationPolling.js +19 -0
  39. package/esm/lro/locationPolling.js.map +1 -0
  40. package/esm/lro/lroEngine.d.ts +14 -0
  41. package/esm/lro/lroEngine.d.ts.map +1 -0
  42. package/esm/lro/lroEngine.js +41 -0
  43. package/esm/lro/lroEngine.js.map +1 -0
  44. package/esm/lro/models.d.ts +138 -0
  45. package/esm/lro/models.d.ts.map +1 -0
  46. package/esm/lro/models.js +14 -0
  47. package/esm/lro/models.js.map +1 -0
  48. package/esm/lro/operation.d.ts +36 -0
  49. package/esm/lro/operation.d.ts.map +1 -0
  50. package/esm/lro/operation.js +82 -0
  51. package/esm/lro/operation.js.map +1 -0
  52. package/esm/lro/passthrough.d.ts +3 -0
  53. package/esm/lro/passthrough.d.ts.map +1 -0
  54. package/esm/lro/passthrough.js +15 -0
  55. package/esm/lro/passthrough.js.map +1 -0
  56. package/esm/lro/requestUtils.d.ts +16 -0
  57. package/esm/lro/requestUtils.d.ts.map +1 -0
  58. package/esm/lro/requestUtils.js +73 -0
  59. package/esm/lro/requestUtils.js.map +1 -0
  60. package/esm/lro/stateMachine.d.ts +18 -0
  61. package/esm/lro/stateMachine.d.ts.map +1 -0
  62. package/esm/lro/stateMachine.js +84 -0
  63. package/esm/lro/stateMachine.js.map +1 -0
  64. package/esm/models/index.d.ts +360 -762
  65. package/esm/models/index.d.ts.map +1 -1
  66. package/esm/models/index.js +17 -2
  67. package/esm/models/index.js.map +1 -1
  68. package/esm/models/mappers.d.ts +18 -20
  69. package/esm/models/mappers.d.ts.map +1 -1
  70. package/esm/models/mappers.js +296 -318
  71. package/esm/models/mappers.js.map +1 -1
  72. package/esm/models/parameters.d.ts +15 -10
  73. package/esm/models/parameters.d.ts.map +1 -1
  74. package/esm/models/parameters.js +77 -49
  75. package/esm/models/parameters.js.map +1 -1
  76. package/esm/operations/applicationDefinitions.d.ts +128 -0
  77. package/esm/operations/applicationDefinitions.d.ts.map +1 -0
  78. package/esm/operations/applicationDefinitions.js +574 -0
  79. package/esm/operations/applicationDefinitions.js.map +1 -0
  80. package/esm/operations/applications.d.ts +182 -0
  81. package/esm/operations/applications.d.ts.map +1 -0
  82. package/esm/operations/applications.js +802 -0
  83. package/esm/operations/applications.js.map +1 -0
  84. package/esm/operations/index.d.ts +2 -2
  85. package/esm/operations/index.d.ts.map +1 -1
  86. package/esm/operations/index.js +5 -7
  87. package/esm/operations/index.js.map +1 -1
  88. package/esm/operationsInterfaces/applicationDefinitions.d.ts +95 -0
  89. package/esm/operationsInterfaces/applicationDefinitions.d.ts.map +1 -0
  90. package/esm/operationsInterfaces/applicationDefinitions.js +9 -0
  91. package/esm/operationsInterfaces/applicationDefinitions.js.map +1 -0
  92. package/esm/operationsInterfaces/applications.d.ts +128 -0
  93. package/esm/operationsInterfaces/applications.d.ts.map +1 -0
  94. package/esm/operationsInterfaces/applications.js +9 -0
  95. package/esm/operationsInterfaces/applications.js.map +1 -0
  96. package/esm/operationsInterfaces/index.d.ts +3 -0
  97. package/esm/operationsInterfaces/index.d.ts.map +1 -0
  98. package/esm/operationsInterfaces/index.js +10 -0
  99. package/esm/operationsInterfaces/index.js.map +1 -0
  100. package/package.json +56 -16
  101. package/review/arm-managedapplications.api.md +443 -0
  102. package/rollup.config.js +181 -30
  103. package/src/applicationClient.ts +222 -0
  104. package/src/applicationClientContext.ts +70 -0
  105. package/src/coreClientLro.ts +323 -0
  106. package/src/index.ts +13 -0
  107. package/src/lro/azureAsyncPolling.ts +96 -0
  108. package/src/lro/bodyPolling.ts +54 -0
  109. package/src/lro/index.ts +26 -0
  110. package/src/lro/locationPolling.ts +30 -0
  111. package/src/lro/lroEngine.ts +61 -0
  112. package/src/lro/models.ts +173 -0
  113. package/src/lro/operation.ts +120 -0
  114. package/src/lro/passthrough.ts +23 -0
  115. package/src/lro/requestUtils.ts +105 -0
  116. package/src/lro/stateMachine.ts +138 -0
  117. package/src/models/index.ts +402 -794
  118. package/src/models/mappers.ts +290 -311
  119. package/src/models/parameters.ts +99 -50
  120. package/src/operations/applicationDefinitions.ts +810 -0
  121. package/src/operations/applications.ts +1069 -0
  122. package/src/operations/index.ts +5 -7
  123. package/src/operationsInterfaces/applicationDefinitions.ts +179 -0
  124. package/src/operationsInterfaces/applications.ts +225 -0
  125. package/src/operationsInterfaces/index.ts +10 -0
  126. package/tsconfig.json +3 -2
  127. package/dist/arm-managedapplications.js +0 -1855
  128. package/dist/arm-managedapplications.js.map +0 -1
  129. package/dist/arm-managedapplications.min.js +0 -1
  130. package/dist/arm-managedapplications.min.js.map +0 -1
  131. package/esm/managedApplicationClient.d.ts +0 -52
  132. package/esm/managedApplicationClient.d.ts.map +0 -1
  133. package/esm/managedApplicationClient.js +0 -87
  134. package/esm/managedApplicationClient.js.map +0 -1
  135. package/esm/managedApplicationClientContext.d.ts +0 -16
  136. package/esm/managedApplicationClientContext.d.ts.map +0 -1
  137. package/esm/managedApplicationClientContext.js +0 -56
  138. package/esm/managedApplicationClientContext.js.map +0 -1
  139. package/esm/models/applianceDefinitionsMappers.d.ts +0 -2
  140. package/esm/models/applianceDefinitionsMappers.d.ts.map +0 -1
  141. package/esm/models/applianceDefinitionsMappers.js +0 -9
  142. package/esm/models/applianceDefinitionsMappers.js.map +0 -1
  143. package/esm/models/appliancesMappers.d.ts +0 -2
  144. package/esm/models/appliancesMappers.d.ts.map +0 -1
  145. package/esm/models/appliancesMappers.js +0 -9
  146. package/esm/models/appliancesMappers.js.map +0 -1
  147. package/esm/operations/applianceDefinitions.d.ts +0 -167
  148. package/esm/operations/applianceDefinitions.d.ts.map +0 -1
  149. package/esm/operations/applianceDefinitions.js +0 -358
  150. package/esm/operations/applianceDefinitions.js.map +0 -1
  151. package/esm/operations/appliances.d.ts +0 -247
  152. package/esm/operations/appliances.d.ts.map +0 -1
  153. package/esm/operations/appliances.js +0 -482
  154. package/esm/operations/appliances.js.map +0 -1
  155. package/src/managedApplicationClient.ts +0 -138
  156. package/src/managedApplicationClientContext.ts +0 -62
  157. package/src/models/applianceDefinitionsMappers.ts +0 -24
  158. package/src/models/appliancesMappers.ts +0 -24
  159. package/src/operations/applianceDefinitions.ts +0 -492
  160. package/src/operations/appliances.ts +0 -716
@@ -0,0 +1,802 @@
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
+ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter } from "tslib";
9
+ import "@azure/core-paging";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { LroEngine } from "../lro";
14
+ import { CoreClientLro } from "../coreClientLro";
15
+ /// <reference lib="esnext.asynciterable" />
16
+ /** Class representing a Applications. */
17
+ export class ApplicationsImpl {
18
+ /**
19
+ * Initialize a new instance of the class Applications class.
20
+ * @param client Reference to the service client
21
+ */
22
+ constructor(client) {
23
+ this.client = client;
24
+ }
25
+ /**
26
+ * Gets all the applications within a resource group.
27
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
28
+ * @param options The options parameters.
29
+ */
30
+ listByResourceGroup(resourceGroupName, options) {
31
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
32
+ return {
33
+ next() {
34
+ return iter.next();
35
+ },
36
+ [Symbol.asyncIterator]() {
37
+ return this;
38
+ },
39
+ byPage: () => {
40
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
41
+ }
42
+ };
43
+ }
44
+ listByResourceGroupPagingPage(resourceGroupName, options) {
45
+ return __asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
46
+ let result = yield __await(this._listByResourceGroup(resourceGroupName, options));
47
+ yield yield __await(result.value || []);
48
+ let continuationToken = result.nextLink;
49
+ while (continuationToken) {
50
+ result = yield __await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
51
+ continuationToken = result.nextLink;
52
+ yield yield __await(result.value || []);
53
+ }
54
+ });
55
+ }
56
+ listByResourceGroupPagingAll(resourceGroupName, options) {
57
+ return __asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
58
+ var e_1, _a;
59
+ try {
60
+ for (var _b = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
61
+ const page = _c.value;
62
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
63
+ }
64
+ }
65
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
66
+ finally {
67
+ try {
68
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
69
+ }
70
+ finally { if (e_1) throw e_1.error; }
71
+ }
72
+ });
73
+ }
74
+ /**
75
+ * Gets all the applications within a subscription.
76
+ * @param options The options parameters.
77
+ */
78
+ listBySubscription(options) {
79
+ const iter = this.listBySubscriptionPagingAll(options);
80
+ return {
81
+ next() {
82
+ return iter.next();
83
+ },
84
+ [Symbol.asyncIterator]() {
85
+ return this;
86
+ },
87
+ byPage: () => {
88
+ return this.listBySubscriptionPagingPage(options);
89
+ }
90
+ };
91
+ }
92
+ listBySubscriptionPagingPage(options) {
93
+ return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
94
+ let result = yield __await(this._listBySubscription(options));
95
+ yield yield __await(result.value || []);
96
+ let continuationToken = result.nextLink;
97
+ while (continuationToken) {
98
+ result = yield __await(this._listBySubscriptionNext(continuationToken, options));
99
+ continuationToken = result.nextLink;
100
+ yield yield __await(result.value || []);
101
+ }
102
+ });
103
+ }
104
+ listBySubscriptionPagingAll(options) {
105
+ return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
106
+ var e_2, _a;
107
+ try {
108
+ for (var _b = __asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
109
+ const page = _c.value;
110
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
111
+ }
112
+ }
113
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
114
+ finally {
115
+ try {
116
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
117
+ }
118
+ finally { if (e_2) throw e_2.error; }
119
+ }
120
+ });
121
+ }
122
+ /**
123
+ * ListByResourceGroupNext
124
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
125
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
126
+ * @param options The options parameters.
127
+ */
128
+ listByResourceGroupNext(resourceGroupName, nextLink, options) {
129
+ const iter = this.listByResourceGroupNextPagingAll(resourceGroupName, nextLink, options);
130
+ return {
131
+ next() {
132
+ return iter.next();
133
+ },
134
+ [Symbol.asyncIterator]() {
135
+ return this;
136
+ },
137
+ byPage: () => {
138
+ return this.listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options);
139
+ }
140
+ };
141
+ }
142
+ listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options) {
143
+ return __asyncGenerator(this, arguments, function* listByResourceGroupNextPagingPage_1() {
144
+ let result = yield __await(this._listByResourceGroupNext(resourceGroupName, nextLink, options));
145
+ yield yield __await(result.value || []);
146
+ let continuationToken = result.nextLink;
147
+ while (continuationToken) {
148
+ result = yield __await(this._listByResourceGroupNextNext(resourceGroupName, continuationToken, options));
149
+ continuationToken = result.nextLink;
150
+ yield yield __await(result.value || []);
151
+ }
152
+ });
153
+ }
154
+ listByResourceGroupNextPagingAll(resourceGroupName, nextLink, options) {
155
+ return __asyncGenerator(this, arguments, function* listByResourceGroupNextPagingAll_1() {
156
+ var e_3, _a;
157
+ try {
158
+ for (var _b = __asyncValues(this.listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
159
+ const page = _c.value;
160
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
161
+ }
162
+ }
163
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
164
+ finally {
165
+ try {
166
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
167
+ }
168
+ finally { if (e_3) throw e_3.error; }
169
+ }
170
+ });
171
+ }
172
+ /**
173
+ * ListBySubscriptionNext
174
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
175
+ * @param options The options parameters.
176
+ */
177
+ listBySubscriptionNext(nextLink, options) {
178
+ const iter = this.listBySubscriptionNextPagingAll(nextLink, options);
179
+ return {
180
+ next() {
181
+ return iter.next();
182
+ },
183
+ [Symbol.asyncIterator]() {
184
+ return this;
185
+ },
186
+ byPage: () => {
187
+ return this.listBySubscriptionNextPagingPage(nextLink, options);
188
+ }
189
+ };
190
+ }
191
+ listBySubscriptionNextPagingPage(nextLink, options) {
192
+ return __asyncGenerator(this, arguments, function* listBySubscriptionNextPagingPage_1() {
193
+ let result = yield __await(this._listBySubscriptionNext(nextLink, options));
194
+ yield yield __await(result.value || []);
195
+ let continuationToken = result.nextLink;
196
+ while (continuationToken) {
197
+ result = yield __await(this._listBySubscriptionNextNext(continuationToken, options));
198
+ continuationToken = result.nextLink;
199
+ yield yield __await(result.value || []);
200
+ }
201
+ });
202
+ }
203
+ listBySubscriptionNextPagingAll(nextLink, options) {
204
+ return __asyncGenerator(this, arguments, function* listBySubscriptionNextPagingAll_1() {
205
+ var e_4, _a;
206
+ try {
207
+ for (var _b = __asyncValues(this.listBySubscriptionNextPagingPage(nextLink, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
208
+ const page = _c.value;
209
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
210
+ }
211
+ }
212
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
213
+ finally {
214
+ try {
215
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
216
+ }
217
+ finally { if (e_4) throw e_4.error; }
218
+ }
219
+ });
220
+ }
221
+ /**
222
+ * Gets the managed application.
223
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
224
+ * @param applicationName The name of the managed application.
225
+ * @param options The options parameters.
226
+ */
227
+ get(resourceGroupName, applicationName, options) {
228
+ return this.client.sendOperationRequest({ resourceGroupName, applicationName, options }, getOperationSpec);
229
+ }
230
+ /**
231
+ * Deletes the managed application.
232
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
233
+ * @param applicationName The name of the managed application.
234
+ * @param options The options parameters.
235
+ */
236
+ beginDelete(resourceGroupName, applicationName, options) {
237
+ return __awaiter(this, void 0, void 0, function* () {
238
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
239
+ return this.client.sendOperationRequest(args, spec);
240
+ });
241
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
242
+ var _a;
243
+ let currentRawResponse = undefined;
244
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
245
+ const callback = (rawResponse, flatResponse) => {
246
+ currentRawResponse = rawResponse;
247
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
248
+ };
249
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
250
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
251
+ return {
252
+ flatResponse,
253
+ rawResponse: {
254
+ statusCode: currentRawResponse.status,
255
+ body: currentRawResponse.parsedBody,
256
+ headers: currentRawResponse.headers.toJSON()
257
+ }
258
+ };
259
+ });
260
+ const lro = new CoreClientLro(sendOperation, { resourceGroupName, applicationName, options }, deleteOperationSpec);
261
+ return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
262
+ });
263
+ }
264
+ /**
265
+ * Deletes the managed application.
266
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
267
+ * @param applicationName The name of the managed application.
268
+ * @param options The options parameters.
269
+ */
270
+ beginDeleteAndWait(resourceGroupName, applicationName, options) {
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ const poller = yield this.beginDelete(resourceGroupName, applicationName, options);
273
+ return poller.pollUntilDone();
274
+ });
275
+ }
276
+ /**
277
+ * Creates a new managed application.
278
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
279
+ * @param applicationName The name of the managed application.
280
+ * @param parameters Parameters supplied to the create or update a managed application.
281
+ * @param options The options parameters.
282
+ */
283
+ beginCreateOrUpdate(resourceGroupName, applicationName, parameters, options) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
286
+ return this.client.sendOperationRequest(args, spec);
287
+ });
288
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
289
+ var _a;
290
+ let currentRawResponse = undefined;
291
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
292
+ const callback = (rawResponse, flatResponse) => {
293
+ currentRawResponse = rawResponse;
294
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
295
+ };
296
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
297
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
298
+ return {
299
+ flatResponse,
300
+ rawResponse: {
301
+ statusCode: currentRawResponse.status,
302
+ body: currentRawResponse.parsedBody,
303
+ headers: currentRawResponse.headers.toJSON()
304
+ }
305
+ };
306
+ });
307
+ const lro = new CoreClientLro(sendOperation, { resourceGroupName, applicationName, parameters, options }, createOrUpdateOperationSpec);
308
+ return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
309
+ });
310
+ }
311
+ /**
312
+ * Creates a new managed application.
313
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
314
+ * @param applicationName The name of the managed application.
315
+ * @param parameters Parameters supplied to the create or update a managed application.
316
+ * @param options The options parameters.
317
+ */
318
+ beginCreateOrUpdateAndWait(resourceGroupName, applicationName, parameters, options) {
319
+ return __awaiter(this, void 0, void 0, function* () {
320
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, applicationName, parameters, options);
321
+ return poller.pollUntilDone();
322
+ });
323
+ }
324
+ /**
325
+ * Updates an existing managed application. The only value that can be updated via PATCH currently is
326
+ * the tags.
327
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
328
+ * @param applicationName The name of the managed application.
329
+ * @param options The options parameters.
330
+ */
331
+ update(resourceGroupName, applicationName, options) {
332
+ return this.client.sendOperationRequest({ resourceGroupName, applicationName, options }, updateOperationSpec);
333
+ }
334
+ /**
335
+ * Gets all the applications within a resource group.
336
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
337
+ * @param options The options parameters.
338
+ */
339
+ _listByResourceGroup(resourceGroupName, options) {
340
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
341
+ }
342
+ /**
343
+ * Gets all the applications within a subscription.
344
+ * @param options The options parameters.
345
+ */
346
+ _listBySubscription(options) {
347
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
348
+ }
349
+ /**
350
+ * Gets the managed application.
351
+ * @param applicationId The fully qualified ID of the managed application, including the managed
352
+ * application name and the managed application resource type. Use the format,
353
+ * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
354
+ * @param options The options parameters.
355
+ */
356
+ getById(applicationId, options) {
357
+ return this.client.sendOperationRequest({ applicationId, options }, getByIdOperationSpec);
358
+ }
359
+ /**
360
+ * Deletes the managed application.
361
+ * @param applicationId The fully qualified ID of the managed application, including the managed
362
+ * application name and the managed application resource type. Use the format,
363
+ * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
364
+ * @param options The options parameters.
365
+ */
366
+ beginDeleteById(applicationId, options) {
367
+ return __awaiter(this, void 0, void 0, function* () {
368
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
369
+ return this.client.sendOperationRequest(args, spec);
370
+ });
371
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
372
+ var _a;
373
+ let currentRawResponse = undefined;
374
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
375
+ const callback = (rawResponse, flatResponse) => {
376
+ currentRawResponse = rawResponse;
377
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
378
+ };
379
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
380
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
381
+ return {
382
+ flatResponse,
383
+ rawResponse: {
384
+ statusCode: currentRawResponse.status,
385
+ body: currentRawResponse.parsedBody,
386
+ headers: currentRawResponse.headers.toJSON()
387
+ }
388
+ };
389
+ });
390
+ const lro = new CoreClientLro(sendOperation, { applicationId, options }, deleteByIdOperationSpec);
391
+ return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
392
+ });
393
+ }
394
+ /**
395
+ * Deletes the managed application.
396
+ * @param applicationId The fully qualified ID of the managed application, including the managed
397
+ * application name and the managed application resource type. Use the format,
398
+ * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
399
+ * @param options The options parameters.
400
+ */
401
+ beginDeleteByIdAndWait(applicationId, options) {
402
+ return __awaiter(this, void 0, void 0, function* () {
403
+ const poller = yield this.beginDeleteById(applicationId, options);
404
+ return poller.pollUntilDone();
405
+ });
406
+ }
407
+ /**
408
+ * Creates a new managed application.
409
+ * @param applicationId The fully qualified ID of the managed application, including the managed
410
+ * application name and the managed application resource type. Use the format,
411
+ * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
412
+ * @param parameters Parameters supplied to the create or update a managed application.
413
+ * @param options The options parameters.
414
+ */
415
+ beginCreateOrUpdateById(applicationId, parameters, options) {
416
+ return __awaiter(this, void 0, void 0, function* () {
417
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
418
+ return this.client.sendOperationRequest(args, spec);
419
+ });
420
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
421
+ var _a;
422
+ let currentRawResponse = undefined;
423
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
424
+ const callback = (rawResponse, flatResponse) => {
425
+ currentRawResponse = rawResponse;
426
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
427
+ };
428
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
429
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
430
+ return {
431
+ flatResponse,
432
+ rawResponse: {
433
+ statusCode: currentRawResponse.status,
434
+ body: currentRawResponse.parsedBody,
435
+ headers: currentRawResponse.headers.toJSON()
436
+ }
437
+ };
438
+ });
439
+ const lro = new CoreClientLro(sendOperation, { applicationId, parameters, options }, createOrUpdateByIdOperationSpec);
440
+ return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
441
+ });
442
+ }
443
+ /**
444
+ * Creates a new managed application.
445
+ * @param applicationId The fully qualified ID of the managed application, including the managed
446
+ * application name and the managed application resource type. Use the format,
447
+ * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
448
+ * @param parameters Parameters supplied to the create or update a managed application.
449
+ * @param options The options parameters.
450
+ */
451
+ beginCreateOrUpdateByIdAndWait(applicationId, parameters, options) {
452
+ return __awaiter(this, void 0, void 0, function* () {
453
+ const poller = yield this.beginCreateOrUpdateById(applicationId, parameters, options);
454
+ return poller.pollUntilDone();
455
+ });
456
+ }
457
+ /**
458
+ * Updates an existing managed application. The only value that can be updated via PATCH currently is
459
+ * the tags.
460
+ * @param applicationId The fully qualified ID of the managed application, including the managed
461
+ * application name and the managed application resource type. Use the format,
462
+ * /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
463
+ * @param options The options parameters.
464
+ */
465
+ updateById(applicationId, options) {
466
+ return this.client.sendOperationRequest({ applicationId, options }, updateByIdOperationSpec);
467
+ }
468
+ /**
469
+ * ListByResourceGroupNext
470
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
471
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
472
+ * @param options The options parameters.
473
+ */
474
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
475
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
476
+ }
477
+ /**
478
+ * ListBySubscriptionNext
479
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
480
+ * @param options The options parameters.
481
+ */
482
+ _listBySubscriptionNext(nextLink, options) {
483
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
484
+ }
485
+ /**
486
+ * ListByResourceGroupNextNext
487
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
488
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroupNext
489
+ * method.
490
+ * @param options The options parameters.
491
+ */
492
+ _listByResourceGroupNextNext(resourceGroupName, nextLink, options) {
493
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextNextOperationSpec);
494
+ }
495
+ /**
496
+ * ListBySubscriptionNextNext
497
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscriptionNext method.
498
+ * @param options The options parameters.
499
+ */
500
+ _listBySubscriptionNextNext(nextLink, options) {
501
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextNextOperationSpec);
502
+ }
503
+ }
504
+ // Operation Specifications
505
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
506
+ const getOperationSpec = {
507
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}",
508
+ httpMethod: "GET",
509
+ responses: {
510
+ 200: {
511
+ bodyMapper: Mappers.Application
512
+ },
513
+ 404: {},
514
+ default: {
515
+ bodyMapper: Mappers.ErrorResponse
516
+ }
517
+ },
518
+ queryParameters: [Parameters.apiVersion],
519
+ urlParameters: [
520
+ Parameters.$host,
521
+ Parameters.resourceGroupName,
522
+ Parameters.applicationName,
523
+ Parameters.subscriptionId
524
+ ],
525
+ headerParameters: [Parameters.accept],
526
+ serializer
527
+ };
528
+ const deleteOperationSpec = {
529
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}",
530
+ httpMethod: "DELETE",
531
+ responses: {
532
+ 200: {},
533
+ 201: {},
534
+ 202: {},
535
+ 204: {},
536
+ default: {
537
+ bodyMapper: Mappers.ErrorResponse
538
+ }
539
+ },
540
+ queryParameters: [Parameters.apiVersion],
541
+ urlParameters: [
542
+ Parameters.$host,
543
+ Parameters.resourceGroupName,
544
+ Parameters.applicationName,
545
+ Parameters.subscriptionId
546
+ ],
547
+ headerParameters: [Parameters.accept],
548
+ serializer
549
+ };
550
+ const createOrUpdateOperationSpec = {
551
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}",
552
+ httpMethod: "PUT",
553
+ responses: {
554
+ 200: {
555
+ bodyMapper: Mappers.Application
556
+ },
557
+ 201: {
558
+ bodyMapper: Mappers.Application
559
+ },
560
+ 202: {
561
+ bodyMapper: Mappers.Application
562
+ },
563
+ 204: {
564
+ bodyMapper: Mappers.Application
565
+ },
566
+ default: {
567
+ bodyMapper: Mappers.ErrorResponse
568
+ }
569
+ },
570
+ requestBody: Parameters.parameters,
571
+ queryParameters: [Parameters.apiVersion],
572
+ urlParameters: [
573
+ Parameters.$host,
574
+ Parameters.resourceGroupName,
575
+ Parameters.applicationName,
576
+ Parameters.subscriptionId
577
+ ],
578
+ headerParameters: [Parameters.accept, Parameters.contentType],
579
+ mediaType: "json",
580
+ serializer
581
+ };
582
+ const updateOperationSpec = {
583
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}",
584
+ httpMethod: "PATCH",
585
+ responses: {
586
+ 200: {
587
+ bodyMapper: Mappers.Application
588
+ },
589
+ default: {
590
+ bodyMapper: Mappers.ErrorResponse
591
+ }
592
+ },
593
+ requestBody: Parameters.parameters1,
594
+ queryParameters: [Parameters.apiVersion],
595
+ urlParameters: [
596
+ Parameters.$host,
597
+ Parameters.resourceGroupName,
598
+ Parameters.applicationName,
599
+ Parameters.subscriptionId
600
+ ],
601
+ headerParameters: [Parameters.accept, Parameters.contentType],
602
+ mediaType: "json",
603
+ serializer
604
+ };
605
+ const listByResourceGroupOperationSpec = {
606
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications",
607
+ httpMethod: "GET",
608
+ responses: {
609
+ 200: {
610
+ bodyMapper: Mappers.ApplicationListResult
611
+ },
612
+ default: {
613
+ bodyMapper: Mappers.ErrorResponse
614
+ }
615
+ },
616
+ queryParameters: [Parameters.apiVersion],
617
+ urlParameters: [
618
+ Parameters.$host,
619
+ Parameters.resourceGroupName,
620
+ Parameters.subscriptionId
621
+ ],
622
+ headerParameters: [Parameters.accept],
623
+ serializer
624
+ };
625
+ const listBySubscriptionOperationSpec = {
626
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applications",
627
+ httpMethod: "GET",
628
+ responses: {
629
+ 200: {
630
+ bodyMapper: Mappers.ApplicationListResult
631
+ },
632
+ default: {
633
+ bodyMapper: Mappers.ErrorResponse
634
+ }
635
+ },
636
+ queryParameters: [Parameters.apiVersion],
637
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
638
+ headerParameters: [Parameters.accept],
639
+ serializer
640
+ };
641
+ const getByIdOperationSpec = {
642
+ path: "/{applicationId}",
643
+ httpMethod: "GET",
644
+ responses: {
645
+ 200: {
646
+ bodyMapper: Mappers.Application
647
+ },
648
+ 404: {},
649
+ default: {
650
+ bodyMapper: Mappers.ErrorResponse
651
+ }
652
+ },
653
+ queryParameters: [Parameters.apiVersion],
654
+ urlParameters: [Parameters.$host, Parameters.applicationId],
655
+ headerParameters: [Parameters.accept],
656
+ serializer
657
+ };
658
+ const deleteByIdOperationSpec = {
659
+ path: "/{applicationId}",
660
+ httpMethod: "DELETE",
661
+ responses: {
662
+ 200: {},
663
+ 201: {},
664
+ 202: {},
665
+ 204: {},
666
+ default: {
667
+ bodyMapper: Mappers.ErrorResponse
668
+ }
669
+ },
670
+ queryParameters: [Parameters.apiVersion],
671
+ urlParameters: [Parameters.$host, Parameters.applicationId],
672
+ headerParameters: [Parameters.accept],
673
+ serializer
674
+ };
675
+ const createOrUpdateByIdOperationSpec = {
676
+ path: "/{applicationId}",
677
+ httpMethod: "PUT",
678
+ responses: {
679
+ 200: {
680
+ bodyMapper: Mappers.Application
681
+ },
682
+ 201: {
683
+ bodyMapper: Mappers.Application
684
+ },
685
+ 202: {
686
+ bodyMapper: Mappers.Application
687
+ },
688
+ 204: {
689
+ bodyMapper: Mappers.Application
690
+ },
691
+ default: {
692
+ bodyMapper: Mappers.ErrorResponse
693
+ }
694
+ },
695
+ requestBody: Parameters.parameters,
696
+ queryParameters: [Parameters.apiVersion],
697
+ urlParameters: [Parameters.$host, Parameters.applicationId],
698
+ headerParameters: [Parameters.accept, Parameters.contentType],
699
+ mediaType: "json",
700
+ serializer
701
+ };
702
+ const updateByIdOperationSpec = {
703
+ path: "/{applicationId}",
704
+ httpMethod: "PATCH",
705
+ responses: {
706
+ 200: {
707
+ bodyMapper: Mappers.Application
708
+ },
709
+ default: {
710
+ bodyMapper: Mappers.ErrorResponse
711
+ }
712
+ },
713
+ requestBody: Parameters.parameters2,
714
+ queryParameters: [Parameters.apiVersion],
715
+ urlParameters: [Parameters.$host, Parameters.applicationId],
716
+ headerParameters: [Parameters.accept, Parameters.contentType],
717
+ mediaType: "json",
718
+ serializer
719
+ };
720
+ const listByResourceGroupNextOperationSpec = {
721
+ path: "{nextLink}",
722
+ httpMethod: "GET",
723
+ responses: {
724
+ 200: {
725
+ bodyMapper: Mappers.ApplicationListResult
726
+ },
727
+ default: {
728
+ bodyMapper: Mappers.ErrorResponse
729
+ }
730
+ },
731
+ queryParameters: [Parameters.apiVersion],
732
+ urlParameters: [
733
+ Parameters.$host,
734
+ Parameters.nextLink,
735
+ Parameters.resourceGroupName,
736
+ Parameters.subscriptionId
737
+ ],
738
+ headerParameters: [Parameters.accept],
739
+ serializer
740
+ };
741
+ const listBySubscriptionNextOperationSpec = {
742
+ path: "{nextLink}",
743
+ httpMethod: "GET",
744
+ responses: {
745
+ 200: {
746
+ bodyMapper: Mappers.ApplicationListResult
747
+ },
748
+ default: {
749
+ bodyMapper: Mappers.ErrorResponse
750
+ }
751
+ },
752
+ queryParameters: [Parameters.apiVersion],
753
+ urlParameters: [
754
+ Parameters.$host,
755
+ Parameters.nextLink,
756
+ Parameters.subscriptionId
757
+ ],
758
+ headerParameters: [Parameters.accept],
759
+ serializer
760
+ };
761
+ const listByResourceGroupNextNextOperationSpec = {
762
+ path: "{nextLink}",
763
+ httpMethod: "GET",
764
+ responses: {
765
+ 200: {
766
+ bodyMapper: Mappers.ApplicationListResult
767
+ },
768
+ default: {
769
+ bodyMapper: Mappers.ErrorResponse
770
+ }
771
+ },
772
+ queryParameters: [Parameters.apiVersion],
773
+ urlParameters: [
774
+ Parameters.$host,
775
+ Parameters.nextLink,
776
+ Parameters.resourceGroupName,
777
+ Parameters.subscriptionId
778
+ ],
779
+ headerParameters: [Parameters.accept],
780
+ serializer
781
+ };
782
+ const listBySubscriptionNextNextOperationSpec = {
783
+ path: "{nextLink}",
784
+ httpMethod: "GET",
785
+ responses: {
786
+ 200: {
787
+ bodyMapper: Mappers.ApplicationListResult
788
+ },
789
+ default: {
790
+ bodyMapper: Mappers.ErrorResponse
791
+ }
792
+ },
793
+ queryParameters: [Parameters.apiVersion],
794
+ urlParameters: [
795
+ Parameters.$host,
796
+ Parameters.nextLink,
797
+ Parameters.subscriptionId
798
+ ],
799
+ headerParameters: [Parameters.accept],
800
+ serializer
801
+ };
802
+ //# sourceMappingURL=applications.js.map