@azure/arm-notificationhubs 2.1.1-alpha.20240312.1 → 3.0.0-beta.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 (179) hide show
  1. package/CHANGELOG.md +170 -9
  2. package/LICENSE +1 -1
  3. package/README.md +2 -2
  4. package/dist/index.js +3826 -1755
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/namespacesCheckAvailabilitySample.js +14 -6
  9. package/dist-esm/samples-dev/namespacesCheckAvailabilitySample.js.map +1 -1
  10. package/dist-esm/samples-dev/namespacesCreateOrUpdateAuthorizationRuleSample.js +15 -7
  11. package/dist-esm/samples-dev/namespacesCreateOrUpdateAuthorizationRuleSample.js.map +1 -1
  12. package/dist-esm/samples-dev/namespacesCreateOrUpdateSample.js +25 -10
  13. package/dist-esm/samples-dev/namespacesCreateOrUpdateSample.js.map +1 -1
  14. package/dist-esm/samples-dev/namespacesDeleteAuthorizationRuleSample.js +13 -5
  15. package/dist-esm/samples-dev/namespacesDeleteAuthorizationRuleSample.js.map +1 -1
  16. package/dist-esm/samples-dev/namespacesDeleteSample.js +14 -6
  17. package/dist-esm/samples-dev/namespacesDeleteSample.js.map +1 -1
  18. package/dist-esm/samples-dev/namespacesGetAuthorizationRuleSample.js +13 -5
  19. package/dist-esm/samples-dev/namespacesGetAuthorizationRuleSample.js.map +1 -1
  20. package/dist-esm/samples-dev/namespacesGetPnsCredentialsSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/namespacesGetPnsCredentialsSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/namespacesGetPnsCredentialsSample.js +39 -0
  23. package/dist-esm/samples-dev/namespacesGetPnsCredentialsSample.js.map +1 -0
  24. package/dist-esm/samples-dev/namespacesGetSample.js +15 -7
  25. package/dist-esm/samples-dev/namespacesGetSample.js.map +1 -1
  26. package/dist-esm/samples-dev/namespacesListAllSample.js +14 -6
  27. package/dist-esm/samples-dev/namespacesListAllSample.js.map +1 -1
  28. package/dist-esm/samples-dev/namespacesListAuthorizationRulesSample.js +13 -5
  29. package/dist-esm/samples-dev/namespacesListAuthorizationRulesSample.js.map +1 -1
  30. package/dist-esm/samples-dev/namespacesListKeysSample.js +15 -7
  31. package/dist-esm/samples-dev/namespacesListKeysSample.js.map +1 -1
  32. package/dist-esm/samples-dev/namespacesListSample.js +15 -7
  33. package/dist-esm/samples-dev/namespacesListSample.js.map +1 -1
  34. package/dist-esm/samples-dev/namespacesRegenerateKeysSample.js +14 -6
  35. package/dist-esm/samples-dev/namespacesRegenerateKeysSample.js.map +1 -1
  36. package/dist-esm/samples-dev/namespacesUpdateSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/namespacesUpdateSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/namespacesUpdateSample.js +51 -0
  39. package/dist-esm/samples-dev/namespacesUpdateSample.js.map +1 -0
  40. package/dist-esm/samples-dev/notificationHubsCheckNotificationHubAvailabilitySample.js +15 -7
  41. package/dist-esm/samples-dev/notificationHubsCheckNotificationHubAvailabilitySample.js.map +1 -1
  42. package/dist-esm/samples-dev/notificationHubsCreateOrUpdateAuthorizationRuleSample.js +16 -8
  43. package/dist-esm/samples-dev/notificationHubsCreateOrUpdateAuthorizationRuleSample.js.map +1 -1
  44. package/dist-esm/samples-dev/notificationHubsCreateOrUpdateSample.js +15 -9
  45. package/dist-esm/samples-dev/notificationHubsCreateOrUpdateSample.js.map +1 -1
  46. package/dist-esm/samples-dev/notificationHubsDebugSendSample.js +16 -10
  47. package/dist-esm/samples-dev/notificationHubsDebugSendSample.js.map +1 -1
  48. package/dist-esm/samples-dev/notificationHubsDeleteAuthorizationRuleSample.js +13 -5
  49. package/dist-esm/samples-dev/notificationHubsDeleteAuthorizationRuleSample.js.map +1 -1
  50. package/dist-esm/samples-dev/notificationHubsDeleteSample.js +13 -5
  51. package/dist-esm/samples-dev/notificationHubsDeleteSample.js.map +1 -1
  52. package/dist-esm/samples-dev/notificationHubsGetAuthorizationRuleSample.js +13 -5
  53. package/dist-esm/samples-dev/notificationHubsGetAuthorizationRuleSample.js.map +1 -1
  54. package/dist-esm/samples-dev/notificationHubsGetPnsCredentialsSample.js +15 -7
  55. package/dist-esm/samples-dev/notificationHubsGetPnsCredentialsSample.js.map +1 -1
  56. package/dist-esm/samples-dev/notificationHubsGetSample.js +15 -7
  57. package/dist-esm/samples-dev/notificationHubsGetSample.js.map +1 -1
  58. package/dist-esm/samples-dev/notificationHubsListAuthorizationRulesSample.js +13 -5
  59. package/dist-esm/samples-dev/notificationHubsListAuthorizationRulesSample.js.map +1 -1
  60. package/dist-esm/samples-dev/notificationHubsListKeysSample.js +13 -5
  61. package/dist-esm/samples-dev/notificationHubsListKeysSample.js.map +1 -1
  62. package/dist-esm/samples-dev/notificationHubsListSample.js +13 -5
  63. package/dist-esm/samples-dev/notificationHubsListSample.js.map +1 -1
  64. package/dist-esm/samples-dev/notificationHubsRegenerateKeysSample.js +14 -6
  65. package/dist-esm/samples-dev/notificationHubsRegenerateKeysSample.js.map +1 -1
  66. package/dist-esm/samples-dev/notificationHubsUpdateSample.d.ts +2 -0
  67. package/dist-esm/samples-dev/notificationHubsUpdateSample.d.ts.map +1 -0
  68. package/dist-esm/samples-dev/notificationHubsUpdateSample.js +47 -0
  69. package/dist-esm/samples-dev/notificationHubsUpdateSample.js.map +1 -0
  70. package/dist-esm/samples-dev/operationsListSample.js +13 -5
  71. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  72. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +42 -0
  75. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
  76. package/dist-esm/samples-dev/privateEndpointConnectionsGetGroupIdSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/privateEndpointConnectionsGetGroupIdSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/privateEndpointConnectionsGetGroupIdSample.js +42 -0
  79. package/dist-esm/samples-dev/privateEndpointConnectionsGetGroupIdSample.js.map +1 -0
  80. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +42 -0
  83. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  84. package/dist-esm/samples-dev/privateEndpointConnectionsListGroupIdsSample.d.ts +2 -0
  85. package/dist-esm/samples-dev/privateEndpointConnectionsListGroupIdsSample.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/privateEndpointConnectionsListGroupIdsSample.js +57 -0
  87. package/dist-esm/samples-dev/privateEndpointConnectionsListGroupIdsSample.js.map +1 -0
  88. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +57 -0
  91. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -0
  92. package/dist-esm/samples-dev/privateEndpointConnectionsUpdateSample.d.ts +2 -0
  93. package/dist-esm/samples-dev/privateEndpointConnectionsUpdateSample.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/privateEndpointConnectionsUpdateSample.js +48 -0
  95. package/dist-esm/samples-dev/privateEndpointConnectionsUpdateSample.js.map +1 -0
  96. package/dist-esm/src/lroImpl.d.ts +6 -11
  97. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  98. package/dist-esm/src/lroImpl.js +12 -20
  99. package/dist-esm/src/lroImpl.js.map +1 -1
  100. package/dist-esm/src/models/index.d.ts +1377 -455
  101. package/dist-esm/src/models/index.d.ts.map +1 -1
  102. package/dist-esm/src/models/index.js +136 -0
  103. package/dist-esm/src/models/index.js.map +1 -1
  104. package/dist-esm/src/models/mappers.d.ts +44 -17
  105. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  106. package/dist-esm/src/models/mappers.js +1972 -738
  107. package/dist-esm/src/models/mappers.js.map +1 -1
  108. package/dist-esm/src/models/parameters.d.ts +10 -6
  109. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  110. package/dist-esm/src/models/parameters.js +140 -80
  111. package/dist-esm/src/models/parameters.js.map +1 -1
  112. package/dist-esm/src/notificationHubsManagementClient.d.ts +6 -6
  113. package/dist-esm/src/notificationHubsManagementClient.d.ts.map +1 -1
  114. package/dist-esm/src/notificationHubsManagementClient.js +13 -13
  115. package/dist-esm/src/notificationHubsManagementClient.js.map +1 -1
  116. package/dist-esm/src/operations/index.d.ts +3 -2
  117. package/dist-esm/src/operations/index.d.ts.map +1 -1
  118. package/dist-esm/src/operations/index.js +3 -2
  119. package/dist-esm/src/operations/index.js.map +1 -1
  120. package/dist-esm/src/operations/namespaces.d.ts +82 -81
  121. package/dist-esm/src/operations/namespaces.d.ts.map +1 -1
  122. package/dist-esm/src/operations/namespaces.js +323 -224
  123. package/dist-esm/src/operations/namespaces.js.map +1 -1
  124. package/dist-esm/src/operations/notificationHubs.d.ts +73 -74
  125. package/dist-esm/src/operations/notificationHubs.d.ts.map +1 -1
  126. package/dist-esm/src/operations/notificationHubs.js +249 -185
  127. package/dist-esm/src/operations/notificationHubs.js.map +1 -1
  128. package/dist-esm/src/operations/operations.d.ts +2 -2
  129. package/dist-esm/src/operations/operations.js +11 -12
  130. package/dist-esm/src/operations/operations.js.map +1 -1
  131. package/dist-esm/src/operations/privateEndpointConnections.d.ts +114 -0
  132. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  133. package/dist-esm/src/operations/privateEndpointConnections.js +466 -0
  134. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  135. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -2
  136. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  137. package/dist-esm/src/operationsInterfaces/index.js +3 -2
  138. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  139. package/dist-esm/src/operationsInterfaces/namespaces.d.ts +61 -58
  140. package/dist-esm/src/operationsInterfaces/namespaces.d.ts.map +1 -1
  141. package/dist-esm/src/operationsInterfaces/notificationHubs.d.ts +62 -63
  142. package/dist-esm/src/operationsInterfaces/notificationHubs.d.ts.map +1 -1
  143. package/dist-esm/src/operationsInterfaces/operations.d.ts +1 -1
  144. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +84 -0
  145. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  146. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  147. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  148. package/dist-esm/src/pagingHelper.d.ts +4 -4
  149. package/dist-esm/src/pagingHelper.js +4 -4
  150. package/dist-esm/test/notificationhubs_examples.js +16 -4
  151. package/dist-esm/test/notificationhubs_examples.js.map +1 -1
  152. package/package.json +14 -13
  153. package/review/arm-notificationhubs.api.md +548 -121
  154. package/src/lroImpl.ts +31 -23
  155. package/src/models/index.ts +1458 -467
  156. package/src/models/mappers.ts +2054 -789
  157. package/src/models/parameters.ts +152 -87
  158. package/src/notificationHubsManagementClient.ts +30 -26
  159. package/src/operations/index.ts +3 -2
  160. package/src/operations/namespaces.ts +444 -341
  161. package/src/operations/notificationHubs.ts +326 -275
  162. package/src/operations/operations.ts +18 -19
  163. package/src/operations/privateEndpointConnections.ts +629 -0
  164. package/src/operationsInterfaces/index.ts +3 -2
  165. package/src/operationsInterfaces/namespaces.ts +101 -88
  166. package/src/operationsInterfaces/notificationHubs.ts +88 -89
  167. package/src/operationsInterfaces/operations.ts +2 -2
  168. package/src/operationsInterfaces/privateEndpointConnections.ts +156 -0
  169. package/src/pagingHelper.ts +5 -5
  170. package/types/arm-notificationhubs.d.ts +1615 -549
  171. package/types/tsdoc-metadata.json +1 -1
  172. package/dist-esm/samples-dev/namespacesPatchSample.d.ts +0 -2
  173. package/dist-esm/samples-dev/namespacesPatchSample.d.ts.map +0 -1
  174. package/dist-esm/samples-dev/namespacesPatchSample.js +0 -35
  175. package/dist-esm/samples-dev/namespacesPatchSample.js.map +0 -1
  176. package/dist-esm/samples-dev/notificationHubsPatchSample.d.ts +0 -2
  177. package/dist-esm/samples-dev/notificationHubsPatchSample.d.ts.map +0 -1
  178. package/dist-esm/samples-dev/notificationHubsPatchSample.js +0 -34
  179. package/dist-esm/samples-dev/notificationHubsPatchSample.js.map +0 -1
@@ -13,16 +13,20 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { NotificationHubsManagementClient } from "../notificationHubsManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller,
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  NamespaceResource,
20
- NamespacesListNextOptionalParams,
21
- NamespacesListOptionalParams,
22
- NamespacesListResponse,
23
24
  NamespacesListAllNextOptionalParams,
24
25
  NamespacesListAllOptionalParams,
25
26
  NamespacesListAllResponse,
27
+ NamespacesListNextOptionalParams,
28
+ NamespacesListOptionalParams,
29
+ NamespacesListResponse,
26
30
  SharedAccessAuthorizationRuleResource,
27
31
  NamespacesListAuthorizationRulesNextOptionalParams,
28
32
  NamespacesListAuthorizationRulesOptionalParams,
@@ -30,16 +34,14 @@ import {
30
34
  CheckAvailabilityParameters,
31
35
  NamespacesCheckAvailabilityOptionalParams,
32
36
  NamespacesCheckAvailabilityResponse,
33
- NamespaceCreateOrUpdateParameters,
37
+ NamespacesGetOptionalParams,
38
+ NamespacesGetResponse,
34
39
  NamespacesCreateOrUpdateOptionalParams,
35
40
  NamespacesCreateOrUpdateResponse,
36
41
  NamespacePatchParameters,
37
- NamespacesPatchOptionalParams,
38
- NamespacesPatchResponse,
42
+ NamespacesUpdateOptionalParams,
43
+ NamespacesUpdateResponse,
39
44
  NamespacesDeleteOptionalParams,
40
- NamespacesGetOptionalParams,
41
- NamespacesGetResponse,
42
- SharedAccessAuthorizationRuleCreateOrUpdateParameters,
43
45
  NamespacesCreateOrUpdateAuthorizationRuleOptionalParams,
44
46
  NamespacesCreateOrUpdateAuthorizationRuleResponse,
45
47
  NamespacesDeleteAuthorizationRuleOptionalParams,
@@ -47,12 +49,14 @@ import {
47
49
  NamespacesGetAuthorizationRuleResponse,
48
50
  NamespacesListKeysOptionalParams,
49
51
  NamespacesListKeysResponse,
50
- PolicykeyResource,
52
+ PolicyKeyResource,
51
53
  NamespacesRegenerateKeysOptionalParams,
52
54
  NamespacesRegenerateKeysResponse,
53
- NamespacesListNextResponse,
55
+ NamespacesGetPnsCredentialsOptionalParams,
56
+ NamespacesGetPnsCredentialsResponse,
54
57
  NamespacesListAllNextResponse,
55
- NamespacesListAuthorizationRulesNextResponse
58
+ NamespacesListNextResponse,
59
+ NamespacesListAuthorizationRulesNextResponse,
56
60
  } from "../models";
57
61
 
58
62
  /// <reference lib="esnext.asynciterable" />
@@ -69,16 +73,13 @@ export class NamespacesImpl implements Namespaces {
69
73
  }
70
74
 
71
75
  /**
72
- * Lists the available namespaces within a resourceGroup.
73
- * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the
74
- * method lists all the namespaces within subscription
76
+ * Lists all the available namespaces within the subscription.
75
77
  * @param options The options parameters.
76
78
  */
77
- public list(
78
- resourceGroupName: string,
79
- options?: NamespacesListOptionalParams
79
+ public listAll(
80
+ options?: NamespacesListAllOptionalParams,
80
81
  ): PagedAsyncIterableIterator<NamespaceResource> {
81
- const iter = this.listPagingAll(resourceGroupName, options);
82
+ const iter = this.listAllPagingAll(options);
82
83
  return {
83
84
  next() {
84
85
  return iter.next();
@@ -90,31 +91,26 @@ export class NamespacesImpl implements Namespaces {
90
91
  if (settings?.maxPageSize) {
91
92
  throw new Error("maxPageSize is not supported by this operation.");
92
93
  }
93
- return this.listPagingPage(resourceGroupName, options, settings);
94
- }
94
+ return this.listAllPagingPage(options, settings);
95
+ },
95
96
  };
96
97
  }
97
98
 
98
- private async *listPagingPage(
99
- resourceGroupName: string,
100
- options?: NamespacesListOptionalParams,
101
- settings?: PageSettings
99
+ private async *listAllPagingPage(
100
+ options?: NamespacesListAllOptionalParams,
101
+ settings?: PageSettings,
102
102
  ): AsyncIterableIterator<NamespaceResource[]> {
103
- let result: NamespacesListResponse;
103
+ let result: NamespacesListAllResponse;
104
104
  let continuationToken = settings?.continuationToken;
105
105
  if (!continuationToken) {
106
- result = await this._list(resourceGroupName, options);
106
+ result = await this._listAll(options);
107
107
  let page = result.value || [];
108
108
  continuationToken = result.nextLink;
109
109
  setContinuationToken(page, continuationToken);
110
110
  yield page;
111
111
  }
112
112
  while (continuationToken) {
113
- result = await this._listNext(
114
- resourceGroupName,
115
- continuationToken,
116
- options
117
- );
113
+ result = await this._listAllNext(continuationToken, options);
118
114
  continuationToken = result.nextLink;
119
115
  let page = result.value || [];
120
116
  setContinuationToken(page, continuationToken);
@@ -122,23 +118,24 @@ export class NamespacesImpl implements Namespaces {
122
118
  }
123
119
  }
124
120
 
125
- private async *listPagingAll(
126
- resourceGroupName: string,
127
- options?: NamespacesListOptionalParams
121
+ private async *listAllPagingAll(
122
+ options?: NamespacesListAllOptionalParams,
128
123
  ): AsyncIterableIterator<NamespaceResource> {
129
- for await (const page of this.listPagingPage(resourceGroupName, options)) {
124
+ for await (const page of this.listAllPagingPage(options)) {
130
125
  yield* page;
131
126
  }
132
127
  }
133
128
 
134
129
  /**
135
- * Lists all the available namespaces within the subscription irrespective of the resourceGroups.
130
+ * Lists the available namespaces within a resource group.
131
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
136
132
  * @param options The options parameters.
137
133
  */
138
- public listAll(
139
- options?: NamespacesListAllOptionalParams
134
+ public list(
135
+ resourceGroupName: string,
136
+ options?: NamespacesListOptionalParams,
140
137
  ): PagedAsyncIterableIterator<NamespaceResource> {
141
- const iter = this.listAllPagingAll(options);
138
+ const iter = this.listPagingAll(resourceGroupName, options);
142
139
  return {
143
140
  next() {
144
141
  return iter.next();
@@ -150,26 +147,31 @@ export class NamespacesImpl implements Namespaces {
150
147
  if (settings?.maxPageSize) {
151
148
  throw new Error("maxPageSize is not supported by this operation.");
152
149
  }
153
- return this.listAllPagingPage(options, settings);
154
- }
150
+ return this.listPagingPage(resourceGroupName, options, settings);
151
+ },
155
152
  };
156
153
  }
157
154
 
158
- private async *listAllPagingPage(
159
- options?: NamespacesListAllOptionalParams,
160
- settings?: PageSettings
155
+ private async *listPagingPage(
156
+ resourceGroupName: string,
157
+ options?: NamespacesListOptionalParams,
158
+ settings?: PageSettings,
161
159
  ): AsyncIterableIterator<NamespaceResource[]> {
162
- let result: NamespacesListAllResponse;
160
+ let result: NamespacesListResponse;
163
161
  let continuationToken = settings?.continuationToken;
164
162
  if (!continuationToken) {
165
- result = await this._listAll(options);
163
+ result = await this._list(resourceGroupName, options);
166
164
  let page = result.value || [];
167
165
  continuationToken = result.nextLink;
168
166
  setContinuationToken(page, continuationToken);
169
167
  yield page;
170
168
  }
171
169
  while (continuationToken) {
172
- result = await this._listAllNext(continuationToken, options);
170
+ result = await this._listNext(
171
+ resourceGroupName,
172
+ continuationToken,
173
+ options,
174
+ );
173
175
  continuationToken = result.nextLink;
174
176
  let page = result.value || [];
175
177
  setContinuationToken(page, continuationToken);
@@ -177,29 +179,30 @@ export class NamespacesImpl implements Namespaces {
177
179
  }
178
180
  }
179
181
 
180
- private async *listAllPagingAll(
181
- options?: NamespacesListAllOptionalParams
182
+ private async *listPagingAll(
183
+ resourceGroupName: string,
184
+ options?: NamespacesListOptionalParams,
182
185
  ): AsyncIterableIterator<NamespaceResource> {
183
- for await (const page of this.listAllPagingPage(options)) {
186
+ for await (const page of this.listPagingPage(resourceGroupName, options)) {
184
187
  yield* page;
185
188
  }
186
189
  }
187
190
 
188
191
  /**
189
192
  * Gets the authorization rules for a namespace.
190
- * @param resourceGroupName The name of the resource group.
191
- * @param namespaceName The namespace name
193
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
194
+ * @param namespaceName Namespace name
192
195
  * @param options The options parameters.
193
196
  */
194
197
  public listAuthorizationRules(
195
198
  resourceGroupName: string,
196
199
  namespaceName: string,
197
- options?: NamespacesListAuthorizationRulesOptionalParams
200
+ options?: NamespacesListAuthorizationRulesOptionalParams,
198
201
  ): PagedAsyncIterableIterator<SharedAccessAuthorizationRuleResource> {
199
202
  const iter = this.listAuthorizationRulesPagingAll(
200
203
  resourceGroupName,
201
204
  namespaceName,
202
- options
205
+ options,
203
206
  );
204
207
  return {
205
208
  next() {
@@ -216,9 +219,9 @@ export class NamespacesImpl implements Namespaces {
216
219
  resourceGroupName,
217
220
  namespaceName,
218
221
  options,
219
- settings
222
+ settings,
220
223
  );
221
- }
224
+ },
222
225
  };
223
226
  }
224
227
 
@@ -226,7 +229,7 @@ export class NamespacesImpl implements Namespaces {
226
229
  resourceGroupName: string,
227
230
  namespaceName: string,
228
231
  options?: NamespacesListAuthorizationRulesOptionalParams,
229
- settings?: PageSettings
232
+ settings?: PageSettings,
230
233
  ): AsyncIterableIterator<SharedAccessAuthorizationRuleResource[]> {
231
234
  let result: NamespacesListAuthorizationRulesResponse;
232
235
  let continuationToken = settings?.continuationToken;
@@ -234,7 +237,7 @@ export class NamespacesImpl implements Namespaces {
234
237
  result = await this._listAuthorizationRules(
235
238
  resourceGroupName,
236
239
  namespaceName,
237
- options
240
+ options,
238
241
  );
239
242
  let page = result.value || [];
240
243
  continuationToken = result.nextLink;
@@ -246,7 +249,7 @@ export class NamespacesImpl implements Namespaces {
246
249
  resourceGroupName,
247
250
  namespaceName,
248
251
  continuationToken,
249
- options
252
+ options,
250
253
  );
251
254
  continuationToken = result.nextLink;
252
255
  let page = result.value || [];
@@ -258,12 +261,12 @@ export class NamespacesImpl implements Namespaces {
258
261
  private async *listAuthorizationRulesPagingAll(
259
262
  resourceGroupName: string,
260
263
  namespaceName: string,
261
- options?: NamespacesListAuthorizationRulesOptionalParams
264
+ options?: NamespacesListAuthorizationRulesOptionalParams,
262
265
  ): AsyncIterableIterator<SharedAccessAuthorizationRuleResource> {
263
266
  for await (const page of this.listAuthorizationRulesPagingPage(
264
267
  resourceGroupName,
265
268
  namespaceName,
266
- options
269
+ options,
267
270
  )) {
268
271
  yield* page;
269
272
  }
@@ -272,87 +275,70 @@ export class NamespacesImpl implements Namespaces {
272
275
  /**
273
276
  * Checks the availability of the given service namespace across all Azure subscriptions. This is
274
277
  * useful because the domain name is created based on the service namespace name.
275
- * @param parameters The namespace name.
278
+ * @param parameters Request content.
276
279
  * @param options The options parameters.
277
280
  */
278
281
  checkAvailability(
279
282
  parameters: CheckAvailabilityParameters,
280
- options?: NamespacesCheckAvailabilityOptionalParams
283
+ options?: NamespacesCheckAvailabilityOptionalParams,
281
284
  ): Promise<NamespacesCheckAvailabilityResponse> {
282
285
  return this.client.sendOperationRequest(
283
286
  { parameters, options },
284
- checkAvailabilityOperationSpec
285
- );
286
- }
287
-
288
- /**
289
- * Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable.
290
- * This operation is idempotent.
291
- * @param resourceGroupName The name of the resource group.
292
- * @param namespaceName The namespace name.
293
- * @param parameters Parameters supplied to create a Namespace Resource.
294
- * @param options The options parameters.
295
- */
296
- createOrUpdate(
297
- resourceGroupName: string,
298
- namespaceName: string,
299
- parameters: NamespaceCreateOrUpdateParameters,
300
- options?: NamespacesCreateOrUpdateOptionalParams
301
- ): Promise<NamespacesCreateOrUpdateResponse> {
302
- return this.client.sendOperationRequest(
303
- { resourceGroupName, namespaceName, parameters, options },
304
- createOrUpdateOperationSpec
287
+ checkAvailabilityOperationSpec,
305
288
  );
306
289
  }
307
290
 
308
291
  /**
309
- * Patches the existing namespace
310
- * @param resourceGroupName The name of the resource group.
311
- * @param namespaceName The namespace name.
312
- * @param parameters Parameters supplied to patch a Namespace Resource.
292
+ * Returns the given namespace.
293
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
294
+ * @param namespaceName Namespace name
313
295
  * @param options The options parameters.
314
296
  */
315
- patch(
297
+ get(
316
298
  resourceGroupName: string,
317
299
  namespaceName: string,
318
- parameters: NamespacePatchParameters,
319
- options?: NamespacesPatchOptionalParams
320
- ): Promise<NamespacesPatchResponse> {
300
+ options?: NamespacesGetOptionalParams,
301
+ ): Promise<NamespacesGetResponse> {
321
302
  return this.client.sendOperationRequest(
322
- { resourceGroupName, namespaceName, parameters, options },
323
- patchOperationSpec
303
+ { resourceGroupName, namespaceName, options },
304
+ getOperationSpec,
324
305
  );
325
306
  }
326
307
 
327
308
  /**
328
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the
329
- * namespace.
330
- * @param resourceGroupName The name of the resource group.
331
- * @param namespaceName The namespace name.
309
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
310
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
311
+ * @param namespaceName Namespace name
312
+ * @param parameters Request content.
332
313
  * @param options The options parameters.
333
314
  */
334
- async beginDelete(
315
+ async beginCreateOrUpdate(
335
316
  resourceGroupName: string,
336
317
  namespaceName: string,
337
- options?: NamespacesDeleteOptionalParams
338
- ): Promise<PollerLike<PollOperationState<void>, void>> {
318
+ parameters: NamespaceResource,
319
+ options?: NamespacesCreateOrUpdateOptionalParams,
320
+ ): Promise<
321
+ SimplePollerLike<
322
+ OperationState<NamespacesCreateOrUpdateResponse>,
323
+ NamespacesCreateOrUpdateResponse
324
+ >
325
+ > {
339
326
  const directSendOperation = async (
340
327
  args: coreClient.OperationArguments,
341
- spec: coreClient.OperationSpec
342
- ): Promise<void> => {
328
+ spec: coreClient.OperationSpec,
329
+ ): Promise<NamespacesCreateOrUpdateResponse> => {
343
330
  return this.client.sendOperationRequest(args, spec);
344
331
  };
345
- const sendOperation = async (
332
+ const sendOperationFn = async (
346
333
  args: coreClient.OperationArguments,
347
- spec: coreClient.OperationSpec
334
+ spec: coreClient.OperationSpec,
348
335
  ) => {
349
- let currentRawResponse:
350
- | coreClient.FullOperationResponse
351
- | undefined = undefined;
336
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
337
+ undefined;
352
338
  const providedCallback = args.options?.onResponse;
353
339
  const callback: coreClient.RawResponseCallback = (
354
340
  rawResponse: coreClient.FullOperationResponse,
355
- flatResponse: unknown
341
+ flatResponse: unknown,
356
342
  ) => {
357
343
  currentRawResponse = rawResponse;
358
344
  providedCallback?.(rawResponse, flatResponse);
@@ -361,8 +347,8 @@ export class NamespacesImpl implements Namespaces {
361
347
  ...args,
362
348
  options: {
363
349
  ...args.options,
364
- onResponse: callback
365
- }
350
+ onResponse: callback,
351
+ },
366
352
  };
367
353
  const flatResponse = await directSendOperation(updatedArgs, spec);
368
354
  return {
@@ -370,75 +356,126 @@ export class NamespacesImpl implements Namespaces {
370
356
  rawResponse: {
371
357
  statusCode: currentRawResponse!.status,
372
358
  body: currentRawResponse!.parsedBody,
373
- headers: currentRawResponse!.headers.toJSON()
374
- }
359
+ headers: currentRawResponse!.headers.toJSON(),
360
+ },
375
361
  };
376
362
  };
377
363
 
378
- const lro = new LroImpl(
379
- sendOperation,
380
- { resourceGroupName, namespaceName, options },
381
- deleteOperationSpec
382
- );
383
- const poller = new LroEngine(lro, {
384
- resumeFrom: options?.resumeFrom,
385
- intervalInMs: options?.updateIntervalInMs
364
+ const lro = createLroSpec({
365
+ sendOperationFn,
366
+ args: { resourceGroupName, namespaceName, parameters, options },
367
+ spec: createOrUpdateOperationSpec,
368
+ });
369
+ const poller = await createHttpPoller<
370
+ NamespacesCreateOrUpdateResponse,
371
+ OperationState<NamespacesCreateOrUpdateResponse>
372
+ >(lro, {
373
+ restoreFrom: options?.resumeFrom,
374
+ intervalInMs: options?.updateIntervalInMs,
375
+ resourceLocationConfig: "azure-async-operation",
386
376
  });
387
377
  await poller.poll();
388
378
  return poller;
389
379
  }
390
380
 
391
381
  /**
392
- * Deletes an existing namespace. This operation also removes all associated notificationHubs under the
393
- * namespace.
394
- * @param resourceGroupName The name of the resource group.
395
- * @param namespaceName The namespace name.
382
+ * Creates / Updates a Notification Hub namespace. This operation is idempotent.
383
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
384
+ * @param namespaceName Namespace name
385
+ * @param parameters Request content.
396
386
  * @param options The options parameters.
397
387
  */
398
- async beginDeleteAndWait(
388
+ async beginCreateOrUpdateAndWait(
399
389
  resourceGroupName: string,
400
390
  namespaceName: string,
401
- options?: NamespacesDeleteOptionalParams
402
- ): Promise<void> {
403
- const poller = await this.beginDelete(
391
+ parameters: NamespaceResource,
392
+ options?: NamespacesCreateOrUpdateOptionalParams,
393
+ ): Promise<NamespacesCreateOrUpdateResponse> {
394
+ const poller = await this.beginCreateOrUpdate(
404
395
  resourceGroupName,
405
396
  namespaceName,
406
- options
397
+ parameters,
398
+ options,
407
399
  );
408
400
  return poller.pollUntilDone();
409
401
  }
410
402
 
411
403
  /**
412
- * Returns the description for the specified namespace.
413
- * @param resourceGroupName The name of the resource group.
414
- * @param namespaceName The namespace name.
404
+ * Patches the existing namespace.
405
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
406
+ * @param namespaceName Namespace name
407
+ * @param parameters Request content.
415
408
  * @param options The options parameters.
416
409
  */
417
- get(
410
+ update(
418
411
  resourceGroupName: string,
419
412
  namespaceName: string,
420
- options?: NamespacesGetOptionalParams
421
- ): Promise<NamespacesGetResponse> {
413
+ parameters: NamespacePatchParameters,
414
+ options?: NamespacesUpdateOptionalParams,
415
+ ): Promise<NamespacesUpdateResponse> {
416
+ return this.client.sendOperationRequest(
417
+ { resourceGroupName, namespaceName, parameters, options },
418
+ updateOperationSpec,
419
+ );
420
+ }
421
+
422
+ /**
423
+ * Deletes an existing namespace. This operation also removes all associated notificationHubs under the
424
+ * namespace.
425
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
426
+ * @param namespaceName Namespace name
427
+ * @param options The options parameters.
428
+ */
429
+ delete(
430
+ resourceGroupName: string,
431
+ namespaceName: string,
432
+ options?: NamespacesDeleteOptionalParams,
433
+ ): Promise<void> {
422
434
  return this.client.sendOperationRequest(
423
435
  { resourceGroupName, namespaceName, options },
424
- getOperationSpec
436
+ deleteOperationSpec,
437
+ );
438
+ }
439
+
440
+ /**
441
+ * Lists all the available namespaces within the subscription.
442
+ * @param options The options parameters.
443
+ */
444
+ private _listAll(
445
+ options?: NamespacesListAllOptionalParams,
446
+ ): Promise<NamespacesListAllResponse> {
447
+ return this.client.sendOperationRequest({ options }, listAllOperationSpec);
448
+ }
449
+
450
+ /**
451
+ * Lists the available namespaces within a resource group.
452
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
453
+ * @param options The options parameters.
454
+ */
455
+ private _list(
456
+ resourceGroupName: string,
457
+ options?: NamespacesListOptionalParams,
458
+ ): Promise<NamespacesListResponse> {
459
+ return this.client.sendOperationRequest(
460
+ { resourceGroupName, options },
461
+ listOperationSpec,
425
462
  );
426
463
  }
427
464
 
428
465
  /**
429
466
  * Creates an authorization rule for a namespace
430
- * @param resourceGroupName The name of the resource group.
431
- * @param namespaceName The namespace name.
432
- * @param authorizationRuleName Authorization Rule Name.
433
- * @param parameters The shared access authorization rule.
467
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
468
+ * @param namespaceName Namespace name
469
+ * @param authorizationRuleName Authorization Rule Name
470
+ * @param parameters Request content.
434
471
  * @param options The options parameters.
435
472
  */
436
473
  createOrUpdateAuthorizationRule(
437
474
  resourceGroupName: string,
438
475
  namespaceName: string,
439
476
  authorizationRuleName: string,
440
- parameters: SharedAccessAuthorizationRuleCreateOrUpdateParameters,
441
- options?: NamespacesCreateOrUpdateAuthorizationRuleOptionalParams
477
+ parameters: SharedAccessAuthorizationRuleResource,
478
+ options?: NamespacesCreateOrUpdateAuthorizationRuleOptionalParams,
442
479
  ): Promise<NamespacesCreateOrUpdateAuthorizationRuleResponse> {
443
480
  return this.client.sendOperationRequest(
444
481
  {
@@ -446,128 +483,100 @@ export class NamespacesImpl implements Namespaces {
446
483
  namespaceName,
447
484
  authorizationRuleName,
448
485
  parameters,
449
- options
486
+ options,
450
487
  },
451
- createOrUpdateAuthorizationRuleOperationSpec
488
+ createOrUpdateAuthorizationRuleOperationSpec,
452
489
  );
453
490
  }
454
491
 
455
492
  /**
456
493
  * Deletes a namespace authorization rule
457
- * @param resourceGroupName The name of the resource group.
458
- * @param namespaceName The namespace name.
459
- * @param authorizationRuleName Authorization Rule Name.
494
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
495
+ * @param namespaceName Namespace name
496
+ * @param authorizationRuleName Authorization Rule Name
460
497
  * @param options The options parameters.
461
498
  */
462
499
  deleteAuthorizationRule(
463
500
  resourceGroupName: string,
464
501
  namespaceName: string,
465
502
  authorizationRuleName: string,
466
- options?: NamespacesDeleteAuthorizationRuleOptionalParams
503
+ options?: NamespacesDeleteAuthorizationRuleOptionalParams,
467
504
  ): Promise<void> {
468
505
  return this.client.sendOperationRequest(
469
506
  { resourceGroupName, namespaceName, authorizationRuleName, options },
470
- deleteAuthorizationRuleOperationSpec
507
+ deleteAuthorizationRuleOperationSpec,
471
508
  );
472
509
  }
473
510
 
474
511
  /**
475
512
  * Gets an authorization rule for a namespace by name.
476
- * @param resourceGroupName The name of the resource group.
477
- * @param namespaceName The namespace name
478
- * @param authorizationRuleName Authorization rule name.
513
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
514
+ * @param namespaceName Namespace name
515
+ * @param authorizationRuleName Authorization Rule Name
479
516
  * @param options The options parameters.
480
517
  */
481
518
  getAuthorizationRule(
482
519
  resourceGroupName: string,
483
520
  namespaceName: string,
484
521
  authorizationRuleName: string,
485
- options?: NamespacesGetAuthorizationRuleOptionalParams
522
+ options?: NamespacesGetAuthorizationRuleOptionalParams,
486
523
  ): Promise<NamespacesGetAuthorizationRuleResponse> {
487
524
  return this.client.sendOperationRequest(
488
525
  { resourceGroupName, namespaceName, authorizationRuleName, options },
489
- getAuthorizationRuleOperationSpec
526
+ getAuthorizationRuleOperationSpec,
490
527
  );
491
528
  }
492
529
 
493
- /**
494
- * Lists the available namespaces within a resourceGroup.
495
- * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the
496
- * method lists all the namespaces within subscription
497
- * @param options The options parameters.
498
- */
499
- private _list(
500
- resourceGroupName: string,
501
- options?: NamespacesListOptionalParams
502
- ): Promise<NamespacesListResponse> {
503
- return this.client.sendOperationRequest(
504
- { resourceGroupName, options },
505
- listOperationSpec
506
- );
507
- }
508
-
509
- /**
510
- * Lists all the available namespaces within the subscription irrespective of the resourceGroups.
511
- * @param options The options parameters.
512
- */
513
- private _listAll(
514
- options?: NamespacesListAllOptionalParams
515
- ): Promise<NamespacesListAllResponse> {
516
- return this.client.sendOperationRequest({ options }, listAllOperationSpec);
517
- }
518
-
519
530
  /**
520
531
  * Gets the authorization rules for a namespace.
521
- * @param resourceGroupName The name of the resource group.
522
- * @param namespaceName The namespace name
532
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
533
+ * @param namespaceName Namespace name
523
534
  * @param options The options parameters.
524
535
  */
525
536
  private _listAuthorizationRules(
526
537
  resourceGroupName: string,
527
538
  namespaceName: string,
528
- options?: NamespacesListAuthorizationRulesOptionalParams
539
+ options?: NamespacesListAuthorizationRulesOptionalParams,
529
540
  ): Promise<NamespacesListAuthorizationRulesResponse> {
530
541
  return this.client.sendOperationRequest(
531
542
  { resourceGroupName, namespaceName, options },
532
- listAuthorizationRulesOperationSpec
543
+ listAuthorizationRulesOperationSpec,
533
544
  );
534
545
  }
535
546
 
536
547
  /**
537
- * Gets the Primary and Secondary ConnectionStrings to the namespace
538
- * @param resourceGroupName The name of the resource group.
539
- * @param namespaceName The namespace name.
540
- * @param authorizationRuleName The connection string of the namespace for the specified
541
- * authorizationRule.
548
+ * Gets the Primary and Secondary ConnectionStrings to the namespace.
549
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
550
+ * @param namespaceName Namespace name
551
+ * @param authorizationRuleName Authorization Rule Name
542
552
  * @param options The options parameters.
543
553
  */
544
554
  listKeys(
545
555
  resourceGroupName: string,
546
556
  namespaceName: string,
547
557
  authorizationRuleName: string,
548
- options?: NamespacesListKeysOptionalParams
558
+ options?: NamespacesListKeysOptionalParams,
549
559
  ): Promise<NamespacesListKeysResponse> {
550
560
  return this.client.sendOperationRequest(
551
561
  { resourceGroupName, namespaceName, authorizationRuleName, options },
552
- listKeysOperationSpec
562
+ listKeysOperationSpec,
553
563
  );
554
564
  }
555
565
 
556
566
  /**
557
567
  * Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule
558
- * @param resourceGroupName The name of the resource group.
559
- * @param namespaceName The namespace name.
560
- * @param authorizationRuleName The connection string of the namespace for the specified
561
- * authorizationRule.
562
- * @param parameters Parameters supplied to regenerate the Namespace Authorization Rule Key.
568
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
569
+ * @param namespaceName Namespace name
570
+ * @param authorizationRuleName Authorization Rule Name
571
+ * @param parameters Request content.
563
572
  * @param options The options parameters.
564
573
  */
565
574
  regenerateKeys(
566
575
  resourceGroupName: string,
567
576
  namespaceName: string,
568
577
  authorizationRuleName: string,
569
- parameters: PolicykeyResource,
570
- options?: NamespacesRegenerateKeysOptionalParams
578
+ parameters: PolicyKeyResource,
579
+ options?: NamespacesRegenerateKeysOptionalParams,
571
580
  ): Promise<NamespacesRegenerateKeysResponse> {
572
581
  return this.client.sendOperationRequest(
573
582
  {
@@ -575,27 +584,26 @@ export class NamespacesImpl implements Namespaces {
575
584
  namespaceName,
576
585
  authorizationRuleName,
577
586
  parameters,
578
- options
587
+ options,
579
588
  },
580
- regenerateKeysOperationSpec
589
+ regenerateKeysOperationSpec,
581
590
  );
582
591
  }
583
592
 
584
593
  /**
585
- * ListNext
586
- * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the
587
- * method lists all the namespaces within subscription
588
- * @param nextLink The nextLink from the previous successful call to the List method.
594
+ * Lists the PNS credentials associated with a namespace.
595
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
596
+ * @param namespaceName Namespace name
589
597
  * @param options The options parameters.
590
598
  */
591
- private _listNext(
599
+ getPnsCredentials(
592
600
  resourceGroupName: string,
593
- nextLink: string,
594
- options?: NamespacesListNextOptionalParams
595
- ): Promise<NamespacesListNextResponse> {
601
+ namespaceName: string,
602
+ options?: NamespacesGetPnsCredentialsOptionalParams,
603
+ ): Promise<NamespacesGetPnsCredentialsResponse> {
596
604
  return this.client.sendOperationRequest(
597
- { resourceGroupName, nextLink, options },
598
- listNextOperationSpec
605
+ { resourceGroupName, namespaceName, options },
606
+ getPnsCredentialsOperationSpec,
599
607
  );
600
608
  }
601
609
 
@@ -606,18 +614,35 @@ export class NamespacesImpl implements Namespaces {
606
614
  */
607
615
  private _listAllNext(
608
616
  nextLink: string,
609
- options?: NamespacesListAllNextOptionalParams
617
+ options?: NamespacesListAllNextOptionalParams,
610
618
  ): Promise<NamespacesListAllNextResponse> {
611
619
  return this.client.sendOperationRequest(
612
620
  { nextLink, options },
613
- listAllNextOperationSpec
621
+ listAllNextOperationSpec,
622
+ );
623
+ }
624
+
625
+ /**
626
+ * ListNext
627
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
628
+ * @param nextLink The nextLink from the previous successful call to the List method.
629
+ * @param options The options parameters.
630
+ */
631
+ private _listNext(
632
+ resourceGroupName: string,
633
+ nextLink: string,
634
+ options?: NamespacesListNextOptionalParams,
635
+ ): Promise<NamespacesListNextResponse> {
636
+ return this.client.sendOperationRequest(
637
+ { resourceGroupName, nextLink, options },
638
+ listNextOperationSpec,
614
639
  );
615
640
  }
616
641
 
617
642
  /**
618
643
  * ListAuthorizationRulesNext
619
- * @param resourceGroupName The name of the resource group.
620
- * @param namespaceName The namespace name
644
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
645
+ * @param namespaceName Namespace name
621
646
  * @param nextLink The nextLink from the previous successful call to the ListAuthorizationRules method.
622
647
  * @param options The options parameters.
623
648
  */
@@ -625,11 +650,11 @@ export class NamespacesImpl implements Namespaces {
625
650
  resourceGroupName: string,
626
651
  namespaceName: string,
627
652
  nextLink: string,
628
- options?: NamespacesListAuthorizationRulesNextOptionalParams
653
+ options?: NamespacesListAuthorizationRulesNextOptionalParams,
629
654
  ): Promise<NamespacesListAuthorizationRulesNextResponse> {
630
655
  return this.client.sendOperationRequest(
631
656
  { resourceGroupName, namespaceName, nextLink, options },
632
- listAuthorizationRulesNextOperationSpec
657
+ listAuthorizationRulesNextOperationSpec,
633
658
  );
634
659
  }
635
660
  }
@@ -637,107 +662,176 @@ export class NamespacesImpl implements Namespaces {
637
662
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
638
663
 
639
664
  const checkAvailabilityOperationSpec: coreClient.OperationSpec = {
640
- path:
641
- "/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability",
665
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability",
642
666
  httpMethod: "POST",
643
667
  responses: {
644
668
  200: {
645
- bodyMapper: Mappers.CheckAvailabilityResult
646
- }
669
+ bodyMapper: Mappers.CheckAvailabilityResult,
670
+ },
671
+ default: {
672
+ bodyMapper: Mappers.ErrorResponse,
673
+ },
647
674
  },
648
675
  requestBody: Parameters.parameters,
649
676
  queryParameters: [Parameters.apiVersion],
650
677
  urlParameters: [Parameters.$host, Parameters.subscriptionId],
651
- headerParameters: [Parameters.accept, Parameters.contentType],
678
+ headerParameters: [Parameters.contentType, Parameters.accept],
652
679
  mediaType: "json",
653
- serializer
680
+ serializer,
681
+ };
682
+ const getOperationSpec: coreClient.OperationSpec = {
683
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
684
+ httpMethod: "GET",
685
+ responses: {
686
+ 200: {
687
+ bodyMapper: Mappers.NamespaceResource,
688
+ },
689
+ default: {
690
+ bodyMapper: Mappers.ErrorResponse,
691
+ },
692
+ },
693
+ queryParameters: [Parameters.apiVersion],
694
+ urlParameters: [
695
+ Parameters.$host,
696
+ Parameters.subscriptionId,
697
+ Parameters.resourceGroupName,
698
+ Parameters.namespaceName,
699
+ ],
700
+ headerParameters: [Parameters.accept],
701
+ serializer,
654
702
  };
655
703
  const createOrUpdateOperationSpec: coreClient.OperationSpec = {
656
- path:
657
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
704
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
658
705
  httpMethod: "PUT",
659
706
  responses: {
660
707
  200: {
661
- bodyMapper: Mappers.NamespaceResource
708
+ bodyMapper: Mappers.NamespaceResource,
662
709
  },
663
710
  201: {
664
- bodyMapper: Mappers.NamespaceResource
665
- }
711
+ bodyMapper: Mappers.NamespaceResource,
712
+ },
713
+ 202: {
714
+ bodyMapper: Mappers.NamespaceResource,
715
+ },
716
+ 204: {
717
+ bodyMapper: Mappers.NamespaceResource,
718
+ },
719
+ default: {
720
+ bodyMapper: Mappers.ErrorResponse,
721
+ },
666
722
  },
667
- requestBody: Parameters.parameters1,
723
+ requestBody: Parameters.parameters5,
668
724
  queryParameters: [Parameters.apiVersion],
669
725
  urlParameters: [
670
726
  Parameters.$host,
671
727
  Parameters.subscriptionId,
672
728
  Parameters.resourceGroupName,
673
- Parameters.namespaceName
729
+ Parameters.namespaceName,
674
730
  ],
675
- headerParameters: [Parameters.accept, Parameters.contentType],
731
+ headerParameters: [Parameters.contentType, Parameters.accept],
676
732
  mediaType: "json",
677
- serializer
733
+ serializer,
678
734
  };
679
- const patchOperationSpec: coreClient.OperationSpec = {
680
- path:
681
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
735
+ const updateOperationSpec: coreClient.OperationSpec = {
736
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
682
737
  httpMethod: "PATCH",
683
738
  responses: {
684
739
  200: {
685
- bodyMapper: Mappers.NamespaceResource
686
- }
740
+ bodyMapper: Mappers.NamespaceResource,
741
+ },
742
+ default: {
743
+ bodyMapper: Mappers.ErrorResponse,
744
+ },
687
745
  },
688
- requestBody: Parameters.parameters2,
746
+ requestBody: Parameters.parameters6,
689
747
  queryParameters: [Parameters.apiVersion],
690
748
  urlParameters: [
691
749
  Parameters.$host,
692
750
  Parameters.subscriptionId,
693
751
  Parameters.resourceGroupName,
694
- Parameters.namespaceName
752
+ Parameters.namespaceName,
695
753
  ],
696
- headerParameters: [Parameters.accept, Parameters.contentType],
754
+ headerParameters: [Parameters.contentType, Parameters.accept],
697
755
  mediaType: "json",
698
- serializer
756
+ serializer,
699
757
  };
700
758
  const deleteOperationSpec: coreClient.OperationSpec = {
701
- path:
702
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
759
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
703
760
  httpMethod: "DELETE",
704
- responses: { 200: {}, 201: {}, 202: {}, 204: {} },
761
+ responses: {
762
+ 200: {},
763
+ 204: {},
764
+ default: {
765
+ bodyMapper: Mappers.ErrorResponse,
766
+ },
767
+ },
705
768
  queryParameters: [Parameters.apiVersion],
706
769
  urlParameters: [
707
770
  Parameters.$host,
708
771
  Parameters.subscriptionId,
709
772
  Parameters.resourceGroupName,
710
- Parameters.namespaceName
773
+ Parameters.namespaceName,
711
774
  ],
712
- serializer
775
+ headerParameters: [Parameters.accept],
776
+ serializer,
713
777
  };
714
- const getOperationSpec: coreClient.OperationSpec = {
715
- path:
716
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
778
+ const listAllOperationSpec: coreClient.OperationSpec = {
779
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces",
717
780
  httpMethod: "GET",
718
781
  responses: {
719
782
  200: {
720
- bodyMapper: Mappers.NamespaceResource
721
- }
783
+ bodyMapper: Mappers.NamespaceListResult,
784
+ },
785
+ default: {
786
+ bodyMapper: Mappers.ErrorResponse,
787
+ },
722
788
  },
723
- queryParameters: [Parameters.apiVersion],
789
+ queryParameters: [
790
+ Parameters.apiVersion,
791
+ Parameters.skipToken,
792
+ Parameters.top,
793
+ ],
794
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
795
+ headerParameters: [Parameters.accept],
796
+ serializer,
797
+ };
798
+ const listOperationSpec: coreClient.OperationSpec = {
799
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces",
800
+ httpMethod: "GET",
801
+ responses: {
802
+ 200: {
803
+ bodyMapper: Mappers.NamespaceListResult,
804
+ },
805
+ default: {
806
+ bodyMapper: Mappers.ErrorResponse,
807
+ },
808
+ },
809
+ queryParameters: [
810
+ Parameters.apiVersion,
811
+ Parameters.skipToken,
812
+ Parameters.top,
813
+ ],
724
814
  urlParameters: [
725
815
  Parameters.$host,
726
816
  Parameters.subscriptionId,
727
817
  Parameters.resourceGroupName,
728
- Parameters.namespaceName
729
818
  ],
730
819
  headerParameters: [Parameters.accept],
731
- serializer
820
+ serializer,
732
821
  };
733
822
  const createOrUpdateAuthorizationRuleOperationSpec: coreClient.OperationSpec = {
734
- path:
735
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}",
823
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}",
736
824
  httpMethod: "PUT",
737
825
  responses: {
738
826
  200: {
739
- bodyMapper: Mappers.SharedAccessAuthorizationRuleResource
740
- }
827
+ bodyMapper: Mappers.SharedAccessAuthorizationRuleResource,
828
+ },
829
+ 201: {
830
+ bodyMapper: Mappers.SharedAccessAuthorizationRuleResource,
831
+ },
832
+ default: {
833
+ bodyMapper: Mappers.ErrorResponse,
834
+ },
741
835
  },
742
836
  requestBody: Parameters.parameters3,
743
837
  queryParameters: [Parameters.apiVersion],
@@ -746,35 +840,43 @@ const createOrUpdateAuthorizationRuleOperationSpec: coreClient.OperationSpec = {
746
840
  Parameters.subscriptionId,
747
841
  Parameters.resourceGroupName,
748
842
  Parameters.namespaceName,
749
- Parameters.authorizationRuleName
843
+ Parameters.authorizationRuleName,
750
844
  ],
751
- headerParameters: [Parameters.accept, Parameters.contentType],
845
+ headerParameters: [Parameters.contentType, Parameters.accept],
752
846
  mediaType: "json",
753
- serializer
847
+ serializer,
754
848
  };
755
849
  const deleteAuthorizationRuleOperationSpec: coreClient.OperationSpec = {
756
- path:
757
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}",
850
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}",
758
851
  httpMethod: "DELETE",
759
- responses: { 200: {}, 204: {} },
852
+ responses: {
853
+ 200: {},
854
+ 204: {},
855
+ default: {
856
+ bodyMapper: Mappers.ErrorResponse,
857
+ },
858
+ },
760
859
  queryParameters: [Parameters.apiVersion],
761
860
  urlParameters: [
762
861
  Parameters.$host,
763
862
  Parameters.subscriptionId,
764
863
  Parameters.resourceGroupName,
765
864
  Parameters.namespaceName,
766
- Parameters.authorizationRuleName
865
+ Parameters.authorizationRuleName,
767
866
  ],
768
- serializer
867
+ headerParameters: [Parameters.accept],
868
+ serializer,
769
869
  };
770
870
  const getAuthorizationRuleOperationSpec: coreClient.OperationSpec = {
771
- path:
772
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}",
871
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}",
773
872
  httpMethod: "GET",
774
873
  responses: {
775
874
  200: {
776
- bodyMapper: Mappers.SharedAccessAuthorizationRuleResource
777
- }
875
+ bodyMapper: Mappers.SharedAccessAuthorizationRuleResource,
876
+ },
877
+ default: {
878
+ bodyMapper: Mappers.ErrorResponse,
879
+ },
778
880
  },
779
881
  queryParameters: [Parameters.apiVersion],
780
882
  urlParameters: [
@@ -782,155 +884,156 @@ const getAuthorizationRuleOperationSpec: coreClient.OperationSpec = {
782
884
  Parameters.subscriptionId,
783
885
  Parameters.resourceGroupName,
784
886
  Parameters.namespaceName,
785
- Parameters.authorizationRuleName
887
+ Parameters.authorizationRuleName,
786
888
  ],
787
889
  headerParameters: [Parameters.accept],
788
- serializer
890
+ serializer,
789
891
  };
790
- const listOperationSpec: coreClient.OperationSpec = {
791
- path:
792
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces",
892
+ const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = {
893
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules",
793
894
  httpMethod: "GET",
794
895
  responses: {
795
896
  200: {
796
- bodyMapper: Mappers.NamespaceListResult
797
- }
897
+ bodyMapper: Mappers.SharedAccessAuthorizationRuleListResult,
898
+ },
899
+ default: {
900
+ bodyMapper: Mappers.ErrorResponse,
901
+ },
798
902
  },
799
903
  queryParameters: [Parameters.apiVersion],
800
904
  urlParameters: [
801
905
  Parameters.$host,
802
906
  Parameters.subscriptionId,
803
- Parameters.resourceGroupName
907
+ Parameters.resourceGroupName,
908
+ Parameters.namespaceName,
804
909
  ],
805
910
  headerParameters: [Parameters.accept],
806
- serializer
911
+ serializer,
807
912
  };
808
- const listAllOperationSpec: coreClient.OperationSpec = {
809
- path:
810
- "/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces",
811
- httpMethod: "GET",
812
- responses: {
813
- 200: {
814
- bodyMapper: Mappers.NamespaceListResult
815
- }
816
- },
817
- queryParameters: [Parameters.apiVersion],
818
- urlParameters: [Parameters.$host, Parameters.subscriptionId],
819
- headerParameters: [Parameters.accept],
820
- serializer
821
- };
822
- const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = {
823
- path:
824
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules",
825
- httpMethod: "GET",
913
+ const listKeysOperationSpec: coreClient.OperationSpec = {
914
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys",
915
+ httpMethod: "POST",
826
916
  responses: {
827
917
  200: {
828
- bodyMapper: Mappers.SharedAccessAuthorizationRuleListResult
829
- }
918
+ bodyMapper: Mappers.ResourceListKeys,
919
+ },
920
+ default: {
921
+ bodyMapper: Mappers.ErrorResponse,
922
+ },
830
923
  },
831
924
  queryParameters: [Parameters.apiVersion],
832
925
  urlParameters: [
833
926
  Parameters.$host,
834
927
  Parameters.subscriptionId,
835
928
  Parameters.resourceGroupName,
836
- Parameters.namespaceName
929
+ Parameters.namespaceName,
930
+ Parameters.authorizationRuleName,
837
931
  ],
838
932
  headerParameters: [Parameters.accept],
839
- serializer
933
+ serializer,
840
934
  };
841
- const listKeysOperationSpec: coreClient.OperationSpec = {
842
- path:
843
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys",
935
+ const regenerateKeysOperationSpec: coreClient.OperationSpec = {
936
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys",
844
937
  httpMethod: "POST",
845
938
  responses: {
846
939
  200: {
847
- bodyMapper: Mappers.ResourceListKeys
848
- }
940
+ bodyMapper: Mappers.ResourceListKeys,
941
+ },
942
+ default: {
943
+ bodyMapper: Mappers.ErrorResponse,
944
+ },
849
945
  },
946
+ requestBody: Parameters.parameters4,
850
947
  queryParameters: [Parameters.apiVersion],
851
948
  urlParameters: [
852
949
  Parameters.$host,
853
950
  Parameters.subscriptionId,
854
951
  Parameters.resourceGroupName,
855
952
  Parameters.namespaceName,
856
- Parameters.authorizationRuleName
953
+ Parameters.authorizationRuleName,
857
954
  ],
858
- headerParameters: [Parameters.accept],
859
- serializer
955
+ headerParameters: [Parameters.contentType, Parameters.accept],
956
+ mediaType: "json",
957
+ serializer,
860
958
  };
861
- const regenerateKeysOperationSpec: coreClient.OperationSpec = {
862
- path:
863
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys",
959
+ const getPnsCredentialsOperationSpec: coreClient.OperationSpec = {
960
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/pnsCredentials",
864
961
  httpMethod: "POST",
865
962
  responses: {
866
963
  200: {
867
- bodyMapper: Mappers.ResourceListKeys
868
- }
964
+ bodyMapper: Mappers.PnsCredentialsResource,
965
+ },
966
+ default: {
967
+ bodyMapper: Mappers.ErrorResponse,
968
+ },
869
969
  },
870
- requestBody: Parameters.parameters4,
871
970
  queryParameters: [Parameters.apiVersion],
872
971
  urlParameters: [
873
972
  Parameters.$host,
874
973
  Parameters.subscriptionId,
875
974
  Parameters.resourceGroupName,
876
975
  Parameters.namespaceName,
877
- Parameters.authorizationRuleName
878
976
  ],
879
- headerParameters: [Parameters.accept, Parameters.contentType],
880
- mediaType: "json",
881
- serializer
977
+ headerParameters: [Parameters.accept],
978
+ serializer,
882
979
  };
883
- const listNextOperationSpec: coreClient.OperationSpec = {
980
+ const listAllNextOperationSpec: coreClient.OperationSpec = {
884
981
  path: "{nextLink}",
885
982
  httpMethod: "GET",
886
983
  responses: {
887
984
  200: {
888
- bodyMapper: Mappers.NamespaceListResult
889
- }
985
+ bodyMapper: Mappers.NamespaceListResult,
986
+ },
987
+ default: {
988
+ bodyMapper: Mappers.ErrorResponse,
989
+ },
890
990
  },
891
- queryParameters: [Parameters.apiVersion],
892
991
  urlParameters: [
893
992
  Parameters.$host,
894
- Parameters.nextLink,
895
993
  Parameters.subscriptionId,
896
- Parameters.resourceGroupName
994
+ Parameters.nextLink,
897
995
  ],
898
996
  headerParameters: [Parameters.accept],
899
- serializer
997
+ serializer,
900
998
  };
901
- const listAllNextOperationSpec: coreClient.OperationSpec = {
999
+ const listNextOperationSpec: coreClient.OperationSpec = {
902
1000
  path: "{nextLink}",
903
1001
  httpMethod: "GET",
904
1002
  responses: {
905
1003
  200: {
906
- bodyMapper: Mappers.NamespaceListResult
907
- }
1004
+ bodyMapper: Mappers.NamespaceListResult,
1005
+ },
1006
+ default: {
1007
+ bodyMapper: Mappers.ErrorResponse,
1008
+ },
908
1009
  },
909
- queryParameters: [Parameters.apiVersion],
910
1010
  urlParameters: [
911
1011
  Parameters.$host,
1012
+ Parameters.subscriptionId,
1013
+ Parameters.resourceGroupName,
912
1014
  Parameters.nextLink,
913
- Parameters.subscriptionId
914
1015
  ],
915
1016
  headerParameters: [Parameters.accept],
916
- serializer
1017
+ serializer,
917
1018
  };
918
1019
  const listAuthorizationRulesNextOperationSpec: coreClient.OperationSpec = {
919
1020
  path: "{nextLink}",
920
1021
  httpMethod: "GET",
921
1022
  responses: {
922
1023
  200: {
923
- bodyMapper: Mappers.SharedAccessAuthorizationRuleListResult
924
- }
1024
+ bodyMapper: Mappers.SharedAccessAuthorizationRuleListResult,
1025
+ },
1026
+ default: {
1027
+ bodyMapper: Mappers.ErrorResponse,
1028
+ },
925
1029
  },
926
- queryParameters: [Parameters.apiVersion],
927
1030
  urlParameters: [
928
1031
  Parameters.$host,
929
- Parameters.nextLink,
930
1032
  Parameters.subscriptionId,
931
1033
  Parameters.resourceGroupName,
932
- Parameters.namespaceName
1034
+ Parameters.namespaceName,
1035
+ Parameters.nextLink,
933
1036
  ],
934
1037
  headerParameters: [Parameters.accept],
935
- serializer
1038
+ serializer,
936
1039
  };