@azure/arm-relay 0.1.0 → 3.0.0

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