@azure/arm-notificationhubs 3.0.0-alpha.20250217.1 → 3.0.0-alpha.20250218.2

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