@azure/arm-eventgrid 30.0.0-alpha.20210929.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 (222) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE +21 -0
  3. package/README.md +94 -0
  4. package/dist/index.js +10620 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/eventGridManagementClient.d.ts +31 -0
  9. package/dist-esm/src/eventGridManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/eventGridManagementClient.js +38 -0
  11. package/dist-esm/src/eventGridManagementClient.js.map +1 -0
  12. package/dist-esm/src/eventGridManagementClientContext.d.ts +17 -0
  13. package/dist-esm/src/eventGridManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/eventGridManagementClientContext.js +50 -0
  15. package/dist-esm/src/eventGridManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +2765 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/dist-esm/src/models/index.js +289 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +139 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/dist-esm/src/models/mappers.js +2979 -0
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +53 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +415 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/domainTopics.d.ts +79 -0
  37. package/dist-esm/src/operations/domainTopics.d.ts.map +1 -0
  38. package/dist-esm/src/operations/domainTopics.js +310 -0
  39. package/dist-esm/src/operations/domainTopics.js.map +1 -0
  40. package/dist-esm/src/operations/domains.d.ts +122 -0
  41. package/dist-esm/src/operations/domains.d.ts.map +1 -0
  42. package/dist-esm/src/operations/domains.js +522 -0
  43. package/dist-esm/src/operations/domains.js.map +1 -0
  44. package/dist-esm/src/operations/eventChannels.d.ts +72 -0
  45. package/dist-esm/src/operations/eventChannels.d.ts.map +1 -0
  46. package/dist-esm/src/operations/eventChannels.js +269 -0
  47. package/dist-esm/src/operations/eventChannels.js.map +1 -0
  48. package/dist-esm/src/operations/eventSubscriptions.d.ts +404 -0
  49. package/dist-esm/src/operations/eventSubscriptions.d.ts.map +1 -0
  50. package/dist-esm/src/operations/eventSubscriptions.js +1504 -0
  51. package/dist-esm/src/operations/eventSubscriptions.js.map +1 -0
  52. package/dist-esm/src/operations/extensionTopics.d.ts +24 -0
  53. package/dist-esm/src/operations/extensionTopics.d.ts.map +1 -0
  54. package/dist-esm/src/operations/extensionTopics.js +50 -0
  55. package/dist-esm/src/operations/extensionTopics.js.map +1 -0
  56. package/dist-esm/src/operations/index.d.ts +17 -0
  57. package/dist-esm/src/operations/index.d.ts.map +1 -0
  58. package/dist-esm/src/operations/index.js +24 -0
  59. package/dist-esm/src/operations/index.js.map +1 -0
  60. package/dist-esm/src/operations/operations.d.ts +26 -0
  61. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/operations.js +88 -0
  63. package/dist-esm/src/operations/operations.js.map +1 -0
  64. package/dist-esm/src/operations/partnerNamespaces.d.ts +122 -0
  65. package/dist-esm/src/operations/partnerNamespaces.d.ts.map +1 -0
  66. package/dist-esm/src/operations/partnerNamespaces.js +537 -0
  67. package/dist-esm/src/operations/partnerNamespaces.js.map +1 -0
  68. package/dist-esm/src/operations/partnerRegistrations.d.ts +83 -0
  69. package/dist-esm/src/operations/partnerRegistrations.d.ts.map +1 -0
  70. package/dist-esm/src/operations/partnerRegistrations.js +349 -0
  71. package/dist-esm/src/operations/partnerRegistrations.js.map +1 -0
  72. package/dist-esm/src/operations/partnerTopicEventSubscriptions.d.ts +128 -0
  73. package/dist-esm/src/operations/partnerTopicEventSubscriptions.d.ts.map +1 -0
  74. package/dist-esm/src/operations/partnerTopicEventSubscriptions.js +483 -0
  75. package/dist-esm/src/operations/partnerTopicEventSubscriptions.js.map +1 -0
  76. package/dist-esm/src/operations/partnerTopics.d.ts +97 -0
  77. package/dist-esm/src/operations/partnerTopics.d.ts.map +1 -0
  78. package/dist-esm/src/operations/partnerTopics.js +408 -0
  79. package/dist-esm/src/operations/partnerTopics.js.map +1 -0
  80. package/dist-esm/src/operations/privateEndpointConnections.d.ts +105 -0
  81. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  82. package/dist-esm/src/operations/privateEndpointConnections.js +362 -0
  83. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  84. package/dist-esm/src/operations/privateLinkResources.d.ts +58 -0
  85. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  86. package/dist-esm/src/operations/privateLinkResources.js +184 -0
  87. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  88. package/dist-esm/src/operations/systemTopicEventSubscriptions.d.ts +128 -0
  89. package/dist-esm/src/operations/systemTopicEventSubscriptions.d.ts.map +1 -0
  90. package/dist-esm/src/operations/systemTopicEventSubscriptions.js +483 -0
  91. package/dist-esm/src/operations/systemTopicEventSubscriptions.js.map +1 -0
  92. package/dist-esm/src/operations/systemTopics.d.ts +107 -0
  93. package/dist-esm/src/operations/systemTopics.d.ts.map +1 -0
  94. package/dist-esm/src/operations/systemTopics.js +482 -0
  95. package/dist-esm/src/operations/systemTopics.js.map +1 -0
  96. package/dist-esm/src/operations/topicTypes.d.ts +46 -0
  97. package/dist-esm/src/operations/topicTypes.d.ts.map +1 -0
  98. package/dist-esm/src/operations/topicTypes.js +175 -0
  99. package/dist-esm/src/operations/topicTypes.js.map +1 -0
  100. package/dist-esm/src/operations/topics.d.ts +150 -0
  101. package/dist-esm/src/operations/topics.d.ts.map +1 -0
  102. package/dist-esm/src/operations/topics.js +656 -0
  103. package/dist-esm/src/operations/topics.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/domainTopics.d.ts +54 -0
  105. package/dist-esm/src/operationsInterfaces/domainTopics.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/domainTopics.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/domainTopics.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/domains.d.ts +86 -0
  109. package/dist-esm/src/operationsInterfaces/domains.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/domains.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/domains.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/eventChannels.d.ts +47 -0
  113. package/dist-esm/src/operationsInterfaces/eventChannels.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/eventChannels.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/eventChannels.js.map +1 -0
  116. package/dist-esm/src/operationsInterfaces/eventSubscriptions.d.ts +217 -0
  117. package/dist-esm/src/operationsInterfaces/eventSubscriptions.d.ts.map +1 -0
  118. package/dist-esm/src/operationsInterfaces/eventSubscriptions.js +9 -0
  119. package/dist-esm/src/operationsInterfaces/eventSubscriptions.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/extensionTopics.d.ts +16 -0
  121. package/dist-esm/src/operationsInterfaces/extensionTopics.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/extensionTopics.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/extensionTopics.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/index.d.ts +17 -0
  125. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/index.js +24 -0
  127. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  129. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  131. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/partnerNamespaces.d.ts +86 -0
  133. package/dist-esm/src/operationsInterfaces/partnerNamespaces.d.ts.map +1 -0
  134. package/dist-esm/src/operationsInterfaces/partnerNamespaces.js +9 -0
  135. package/dist-esm/src/operationsInterfaces/partnerNamespaces.js.map +1 -0
  136. package/dist-esm/src/operationsInterfaces/partnerRegistrations.d.ts +47 -0
  137. package/dist-esm/src/operationsInterfaces/partnerRegistrations.d.ts.map +1 -0
  138. package/dist-esm/src/operationsInterfaces/partnerRegistrations.js +9 -0
  139. package/dist-esm/src/operationsInterfaces/partnerRegistrations.js.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/partnerTopicEventSubscriptions.d.ts +103 -0
  141. package/dist-esm/src/operationsInterfaces/partnerTopicEventSubscriptions.d.ts.map +1 -0
  142. package/dist-esm/src/operationsInterfaces/partnerTopicEventSubscriptions.js +9 -0
  143. package/dist-esm/src/operationsInterfaces/partnerTopicEventSubscriptions.js.map +1 -0
  144. package/dist-esm/src/operationsInterfaces/partnerTopics.d.ts +61 -0
  145. package/dist-esm/src/operationsInterfaces/partnerTopics.d.ts.map +1 -0
  146. package/dist-esm/src/operationsInterfaces/partnerTopics.js +9 -0
  147. package/dist-esm/src/operationsInterfaces/partnerTopics.js.map +1 -0
  148. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +74 -0
  149. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  150. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  151. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  152. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +27 -0
  153. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  154. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  155. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  156. package/dist-esm/src/operationsInterfaces/systemTopicEventSubscriptions.d.ts +103 -0
  157. package/dist-esm/src/operationsInterfaces/systemTopicEventSubscriptions.d.ts.map +1 -0
  158. package/dist-esm/src/operationsInterfaces/systemTopicEventSubscriptions.js +9 -0
  159. package/dist-esm/src/operationsInterfaces/systemTopicEventSubscriptions.js.map +1 -0
  160. package/dist-esm/src/operationsInterfaces/systemTopics.d.ts +71 -0
  161. package/dist-esm/src/operationsInterfaces/systemTopics.d.ts.map +1 -0
  162. package/dist-esm/src/operationsInterfaces/systemTopics.js +9 -0
  163. package/dist-esm/src/operationsInterfaces/systemTopics.js.map +1 -0
  164. package/dist-esm/src/operationsInterfaces/topicTypes.d.ts +23 -0
  165. package/dist-esm/src/operationsInterfaces/topicTypes.d.ts.map +1 -0
  166. package/dist-esm/src/operationsInterfaces/topicTypes.js +9 -0
  167. package/dist-esm/src/operationsInterfaces/topicTypes.js.map +1 -0
  168. package/dist-esm/src/operationsInterfaces/topics.d.ts +103 -0
  169. package/dist-esm/src/operationsInterfaces/topics.d.ts.map +1 -0
  170. package/dist-esm/src/operationsInterfaces/topics.js +9 -0
  171. package/dist-esm/src/operationsInterfaces/topics.js.map +1 -0
  172. package/dist-esm/test/eventgrid_examples.d.ts +2 -0
  173. package/dist-esm/test/eventgrid_examples.d.ts.map +1 -0
  174. package/dist-esm/test/eventgrid_examples.js +163 -0
  175. package/dist-esm/test/eventgrid_examples.js.map +1 -0
  176. package/package.json +102 -0
  177. package/review/arm-eventgrid.api.md +2518 -0
  178. package/rollup.config.js +188 -0
  179. package/src/eventGridManagementClient.ts +101 -0
  180. package/src/eventGridManagementClientContext.ts +71 -0
  181. package/src/index.ts +13 -0
  182. package/src/lroImpl.ts +34 -0
  183. package/src/models/index.ts +3297 -0
  184. package/src/models/mappers.ts +3334 -0
  185. package/src/models/parameters.ts +490 -0
  186. package/src/operations/domainTopics.ts +452 -0
  187. package/src/operations/domains.ts +713 -0
  188. package/src/operations/eventChannels.ts +382 -0
  189. package/src/operations/eventSubscriptions.ts +2077 -0
  190. package/src/operations/extensionTopics.ts +67 -0
  191. package/src/operations/index.ts +24 -0
  192. package/src/operations/operations.ts +96 -0
  193. package/src/operations/partnerNamespaces.ts +729 -0
  194. package/src/operations/partnerRegistrations.ts +440 -0
  195. package/src/operations/partnerTopicEventSubscriptions.ts +699 -0
  196. package/src/operations/partnerTopics.ts +532 -0
  197. package/src/operations/privateEndpointConnections.ts +529 -0
  198. package/src/operations/privateLinkResources.ts +259 -0
  199. package/src/operations/systemTopicEventSubscriptions.ts +699 -0
  200. package/src/operations/systemTopics.ts +656 -0
  201. package/src/operations/topicTypes.ts +202 -0
  202. package/src/operations/topics.ts +921 -0
  203. package/src/operationsInterfaces/domainTopics.ts +105 -0
  204. package/src/operationsInterfaces/domains.ts +162 -0
  205. package/src/operationsInterfaces/eventChannels.ts +89 -0
  206. package/src/operationsInterfaces/eventSubscriptions.ts +339 -0
  207. package/src/operationsInterfaces/extensionTopics.ts +30 -0
  208. package/src/operationsInterfaces/index.ts +24 -0
  209. package/src/operationsInterfaces/operations.ts +22 -0
  210. package/src/operationsInterfaces/partnerNamespaces.ts +162 -0
  211. package/src/operationsInterfaces/partnerRegistrations.ts +91 -0
  212. package/src/operationsInterfaces/partnerTopicEventSubscriptions.ts +190 -0
  213. package/src/operationsInterfaces/partnerTopics.ts +114 -0
  214. package/src/operationsInterfaces/privateEndpointConnections.ts +137 -0
  215. package/src/operationsInterfaces/privateLinkResources.ts +52 -0
  216. package/src/operationsInterfaces/systemTopicEventSubscriptions.ts +190 -0
  217. package/src/operationsInterfaces/systemTopics.ts +139 -0
  218. package/src/operationsInterfaces/topicTypes.ts +47 -0
  219. package/src/operationsInterfaces/topics.ts +197 -0
  220. package/tsconfig.json +19 -0
  221. package/types/arm-eventgrid.d.ts +4299 -0
  222. package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,529 @@
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
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PrivateEndpointConnections } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { EventGridManagementClientContext } from "../eventGridManagementClientContext";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ PrivateEndpointConnection,
19
+ Enum28,
20
+ PrivateEndpointConnectionsListByResourceNextOptionalParams,
21
+ PrivateEndpointConnectionsListByResourceOptionalParams,
22
+ Enum25,
23
+ PrivateEndpointConnectionsGetOptionalParams,
24
+ PrivateEndpointConnectionsGetResponse,
25
+ Enum26,
26
+ PrivateEndpointConnectionsUpdateOptionalParams,
27
+ PrivateEndpointConnectionsUpdateResponse,
28
+ Enum27,
29
+ PrivateEndpointConnectionsDeleteOptionalParams,
30
+ PrivateEndpointConnectionsListByResourceResponse,
31
+ PrivateEndpointConnectionsListByResourceNextResponse
32
+ } from "../models";
33
+
34
+ /// <reference lib="esnext.asynciterable" />
35
+ /** Class containing PrivateEndpointConnections operations. */
36
+ export class PrivateEndpointConnectionsImpl
37
+ implements PrivateEndpointConnections {
38
+ private readonly client: EventGridManagementClientContext;
39
+
40
+ /**
41
+ * Initialize a new instance of the class PrivateEndpointConnections class.
42
+ * @param client Reference to the service client
43
+ */
44
+ constructor(client: EventGridManagementClientContext) {
45
+ this.client = client;
46
+ }
47
+
48
+ /**
49
+ * Get all private endpoint connections under a topic, domain, or partner namespace.
50
+ * @param resourceGroupName The name of the resource group within the user's subscription.
51
+ * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or
52
+ * \'partnerNamespaces\'.
53
+ * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or
54
+ * partner namespace name).
55
+ * @param options The options parameters.
56
+ */
57
+ public listByResource(
58
+ resourceGroupName: string,
59
+ parentType: Enum28,
60
+ parentName: string,
61
+ options?: PrivateEndpointConnectionsListByResourceOptionalParams
62
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
63
+ const iter = this.listByResourcePagingAll(
64
+ resourceGroupName,
65
+ parentType,
66
+ parentName,
67
+ options
68
+ );
69
+ return {
70
+ next() {
71
+ return iter.next();
72
+ },
73
+ [Symbol.asyncIterator]() {
74
+ return this;
75
+ },
76
+ byPage: () => {
77
+ return this.listByResourcePagingPage(
78
+ resourceGroupName,
79
+ parentType,
80
+ parentName,
81
+ options
82
+ );
83
+ }
84
+ };
85
+ }
86
+
87
+ private async *listByResourcePagingPage(
88
+ resourceGroupName: string,
89
+ parentType: Enum28,
90
+ parentName: string,
91
+ options?: PrivateEndpointConnectionsListByResourceOptionalParams
92
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
93
+ let result = await this._listByResource(
94
+ resourceGroupName,
95
+ parentType,
96
+ parentName,
97
+ options
98
+ );
99
+ yield result.value || [];
100
+ let continuationToken = result.nextLink;
101
+ while (continuationToken) {
102
+ result = await this._listByResourceNext(
103
+ resourceGroupName,
104
+ parentType,
105
+ parentName,
106
+ continuationToken,
107
+ options
108
+ );
109
+ continuationToken = result.nextLink;
110
+ yield result.value || [];
111
+ }
112
+ }
113
+
114
+ private async *listByResourcePagingAll(
115
+ resourceGroupName: string,
116
+ parentType: Enum28,
117
+ parentName: string,
118
+ options?: PrivateEndpointConnectionsListByResourceOptionalParams
119
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
120
+ for await (const page of this.listByResourcePagingPage(
121
+ resourceGroupName,
122
+ parentType,
123
+ parentName,
124
+ options
125
+ )) {
126
+ yield* page;
127
+ }
128
+ }
129
+
130
+ /**
131
+ * Get a specific private endpoint connection under a topic, domain, or partner namespace.
132
+ * @param resourceGroupName The name of the resource group within the user's subscription.
133
+ * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or
134
+ * \'partnerNamespaces\'.
135
+ * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or
136
+ * partner namespace name).
137
+ * @param privateEndpointConnectionName The name of the private endpoint connection connection.
138
+ * @param options The options parameters.
139
+ */
140
+ get(
141
+ resourceGroupName: string,
142
+ parentType: Enum25,
143
+ parentName: string,
144
+ privateEndpointConnectionName: string,
145
+ options?: PrivateEndpointConnectionsGetOptionalParams
146
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
147
+ return this.client.sendOperationRequest(
148
+ {
149
+ resourceGroupName,
150
+ parentType,
151
+ parentName,
152
+ privateEndpointConnectionName,
153
+ options
154
+ },
155
+ getOperationSpec
156
+ );
157
+ }
158
+
159
+ /**
160
+ * Update a specific private endpoint connection under a topic, domain or partner namespace.
161
+ * @param resourceGroupName The name of the resource group within the user's subscription.
162
+ * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or
163
+ * \'partnerNamespaces\'.
164
+ * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or
165
+ * partner namespace name).
166
+ * @param privateEndpointConnectionName The name of the private endpoint connection connection.
167
+ * @param privateEndpointConnection The private endpoint connection object to update.
168
+ * @param options The options parameters.
169
+ */
170
+ async beginUpdate(
171
+ resourceGroupName: string,
172
+ parentType: Enum26,
173
+ parentName: string,
174
+ privateEndpointConnectionName: string,
175
+ privateEndpointConnection: PrivateEndpointConnection,
176
+ options?: PrivateEndpointConnectionsUpdateOptionalParams
177
+ ): Promise<
178
+ PollerLike<
179
+ PollOperationState<PrivateEndpointConnectionsUpdateResponse>,
180
+ PrivateEndpointConnectionsUpdateResponse
181
+ >
182
+ > {
183
+ const directSendOperation = async (
184
+ args: coreClient.OperationArguments,
185
+ spec: coreClient.OperationSpec
186
+ ): Promise<PrivateEndpointConnectionsUpdateResponse> => {
187
+ return this.client.sendOperationRequest(args, spec);
188
+ };
189
+ const sendOperation = async (
190
+ args: coreClient.OperationArguments,
191
+ spec: coreClient.OperationSpec
192
+ ) => {
193
+ let currentRawResponse:
194
+ | coreClient.FullOperationResponse
195
+ | undefined = undefined;
196
+ const providedCallback = args.options?.onResponse;
197
+ const callback: coreClient.RawResponseCallback = (
198
+ rawResponse: coreClient.FullOperationResponse,
199
+ flatResponse: unknown
200
+ ) => {
201
+ currentRawResponse = rawResponse;
202
+ providedCallback?.(rawResponse, flatResponse);
203
+ };
204
+ const updatedArgs = {
205
+ ...args,
206
+ options: {
207
+ ...args.options,
208
+ onResponse: callback
209
+ }
210
+ };
211
+ const flatResponse = await directSendOperation(updatedArgs, spec);
212
+ return {
213
+ flatResponse,
214
+ rawResponse: {
215
+ statusCode: currentRawResponse!.status,
216
+ body: currentRawResponse!.parsedBody,
217
+ headers: currentRawResponse!.headers.toJSON()
218
+ }
219
+ };
220
+ };
221
+
222
+ const lro = new LroImpl(
223
+ sendOperation,
224
+ {
225
+ resourceGroupName,
226
+ parentType,
227
+ parentName,
228
+ privateEndpointConnectionName,
229
+ privateEndpointConnection,
230
+ options
231
+ },
232
+ updateOperationSpec
233
+ );
234
+ return new LroEngine(lro, {
235
+ resumeFrom: options?.resumeFrom,
236
+ intervalInMs: options?.updateIntervalInMs
237
+ });
238
+ }
239
+
240
+ /**
241
+ * Update a specific private endpoint connection under a topic, domain or partner namespace.
242
+ * @param resourceGroupName The name of the resource group within the user's subscription.
243
+ * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or
244
+ * \'partnerNamespaces\'.
245
+ * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or
246
+ * partner namespace name).
247
+ * @param privateEndpointConnectionName The name of the private endpoint connection connection.
248
+ * @param privateEndpointConnection The private endpoint connection object to update.
249
+ * @param options The options parameters.
250
+ */
251
+ async beginUpdateAndWait(
252
+ resourceGroupName: string,
253
+ parentType: Enum26,
254
+ parentName: string,
255
+ privateEndpointConnectionName: string,
256
+ privateEndpointConnection: PrivateEndpointConnection,
257
+ options?: PrivateEndpointConnectionsUpdateOptionalParams
258
+ ): Promise<PrivateEndpointConnectionsUpdateResponse> {
259
+ const poller = await this.beginUpdate(
260
+ resourceGroupName,
261
+ parentType,
262
+ parentName,
263
+ privateEndpointConnectionName,
264
+ privateEndpointConnection,
265
+ options
266
+ );
267
+ return poller.pollUntilDone();
268
+ }
269
+
270
+ /**
271
+ * Delete a specific private endpoint connection under a topic, domain, or partner namespace.
272
+ * @param resourceGroupName The name of the resource group within the user's subscription.
273
+ * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or
274
+ * \'partnerNamespaces\'.
275
+ * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or
276
+ * partner namespace name).
277
+ * @param privateEndpointConnectionName The name of the private endpoint connection connection.
278
+ * @param options The options parameters.
279
+ */
280
+ async beginDelete(
281
+ resourceGroupName: string,
282
+ parentType: Enum27,
283
+ parentName: string,
284
+ privateEndpointConnectionName: string,
285
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
286
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
287
+ const directSendOperation = async (
288
+ args: coreClient.OperationArguments,
289
+ spec: coreClient.OperationSpec
290
+ ): Promise<void> => {
291
+ return this.client.sendOperationRequest(args, spec);
292
+ };
293
+ const sendOperation = async (
294
+ args: coreClient.OperationArguments,
295
+ spec: coreClient.OperationSpec
296
+ ) => {
297
+ let currentRawResponse:
298
+ | coreClient.FullOperationResponse
299
+ | undefined = undefined;
300
+ const providedCallback = args.options?.onResponse;
301
+ const callback: coreClient.RawResponseCallback = (
302
+ rawResponse: coreClient.FullOperationResponse,
303
+ flatResponse: unknown
304
+ ) => {
305
+ currentRawResponse = rawResponse;
306
+ providedCallback?.(rawResponse, flatResponse);
307
+ };
308
+ const updatedArgs = {
309
+ ...args,
310
+ options: {
311
+ ...args.options,
312
+ onResponse: callback
313
+ }
314
+ };
315
+ const flatResponse = await directSendOperation(updatedArgs, spec);
316
+ return {
317
+ flatResponse,
318
+ rawResponse: {
319
+ statusCode: currentRawResponse!.status,
320
+ body: currentRawResponse!.parsedBody,
321
+ headers: currentRawResponse!.headers.toJSON()
322
+ }
323
+ };
324
+ };
325
+
326
+ const lro = new LroImpl(
327
+ sendOperation,
328
+ {
329
+ resourceGroupName,
330
+ parentType,
331
+ parentName,
332
+ privateEndpointConnectionName,
333
+ options
334
+ },
335
+ deleteOperationSpec
336
+ );
337
+ return new LroEngine(lro, {
338
+ resumeFrom: options?.resumeFrom,
339
+ intervalInMs: options?.updateIntervalInMs
340
+ });
341
+ }
342
+
343
+ /**
344
+ * Delete a specific private endpoint connection under a topic, domain, or partner namespace.
345
+ * @param resourceGroupName The name of the resource group within the user's subscription.
346
+ * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or
347
+ * \'partnerNamespaces\'.
348
+ * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or
349
+ * partner namespace name).
350
+ * @param privateEndpointConnectionName The name of the private endpoint connection connection.
351
+ * @param options The options parameters.
352
+ */
353
+ async beginDeleteAndWait(
354
+ resourceGroupName: string,
355
+ parentType: Enum27,
356
+ parentName: string,
357
+ privateEndpointConnectionName: string,
358
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
359
+ ): Promise<void> {
360
+ const poller = await this.beginDelete(
361
+ resourceGroupName,
362
+ parentType,
363
+ parentName,
364
+ privateEndpointConnectionName,
365
+ options
366
+ );
367
+ return poller.pollUntilDone();
368
+ }
369
+
370
+ /**
371
+ * Get all private endpoint connections under a topic, domain, or partner namespace.
372
+ * @param resourceGroupName The name of the resource group within the user's subscription.
373
+ * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or
374
+ * \'partnerNamespaces\'.
375
+ * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or
376
+ * partner namespace name).
377
+ * @param options The options parameters.
378
+ */
379
+ private _listByResource(
380
+ resourceGroupName: string,
381
+ parentType: Enum28,
382
+ parentName: string,
383
+ options?: PrivateEndpointConnectionsListByResourceOptionalParams
384
+ ): Promise<PrivateEndpointConnectionsListByResourceResponse> {
385
+ return this.client.sendOperationRequest(
386
+ { resourceGroupName, parentType, parentName, options },
387
+ listByResourceOperationSpec
388
+ );
389
+ }
390
+
391
+ /**
392
+ * ListByResourceNext
393
+ * @param resourceGroupName The name of the resource group within the user's subscription.
394
+ * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or
395
+ * \'partnerNamespaces\'.
396
+ * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or
397
+ * partner namespace name).
398
+ * @param nextLink The nextLink from the previous successful call to the ListByResource method.
399
+ * @param options The options parameters.
400
+ */
401
+ private _listByResourceNext(
402
+ resourceGroupName: string,
403
+ parentType: Enum28,
404
+ parentName: string,
405
+ nextLink: string,
406
+ options?: PrivateEndpointConnectionsListByResourceNextOptionalParams
407
+ ): Promise<PrivateEndpointConnectionsListByResourceNextResponse> {
408
+ return this.client.sendOperationRequest(
409
+ { resourceGroupName, parentType, parentName, nextLink, options },
410
+ listByResourceNextOperationSpec
411
+ );
412
+ }
413
+ }
414
+ // Operation Specifications
415
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
416
+
417
+ const getOperationSpec: coreClient.OperationSpec = {
418
+ path:
419
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}",
420
+ httpMethod: "GET",
421
+ responses: {
422
+ 200: {
423
+ bodyMapper: Mappers.PrivateEndpointConnection
424
+ },
425
+ default: {}
426
+ },
427
+ queryParameters: [Parameters.apiVersion],
428
+ urlParameters: [
429
+ Parameters.$host,
430
+ Parameters.subscriptionId,
431
+ Parameters.resourceGroupName,
432
+ Parameters.parentType,
433
+ Parameters.parentName,
434
+ Parameters.privateEndpointConnectionName
435
+ ],
436
+ headerParameters: [Parameters.accept],
437
+ serializer
438
+ };
439
+ const updateOperationSpec: coreClient.OperationSpec = {
440
+ path:
441
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}",
442
+ httpMethod: "PUT",
443
+ responses: {
444
+ 200: {
445
+ bodyMapper: Mappers.PrivateEndpointConnection
446
+ },
447
+ 201: {
448
+ bodyMapper: Mappers.PrivateEndpointConnection
449
+ },
450
+ 202: {
451
+ bodyMapper: Mappers.PrivateEndpointConnection
452
+ },
453
+ 204: {
454
+ bodyMapper: Mappers.PrivateEndpointConnection
455
+ },
456
+ default: {}
457
+ },
458
+ requestBody: Parameters.privateEndpointConnection,
459
+ queryParameters: [Parameters.apiVersion],
460
+ urlParameters: [
461
+ Parameters.$host,
462
+ Parameters.subscriptionId,
463
+ Parameters.resourceGroupName,
464
+ Parameters.parentName,
465
+ Parameters.privateEndpointConnectionName,
466
+ Parameters.parentType1
467
+ ],
468
+ headerParameters: [Parameters.accept, Parameters.contentType],
469
+ mediaType: "json",
470
+ serializer
471
+ };
472
+ const deleteOperationSpec: coreClient.OperationSpec = {
473
+ path:
474
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections/{privateEndpointConnectionName}",
475
+ httpMethod: "DELETE",
476
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
477
+ queryParameters: [Parameters.apiVersion],
478
+ urlParameters: [
479
+ Parameters.$host,
480
+ Parameters.subscriptionId,
481
+ Parameters.resourceGroupName,
482
+ Parameters.parentName,
483
+ Parameters.privateEndpointConnectionName,
484
+ Parameters.parentType2
485
+ ],
486
+ serializer
487
+ };
488
+ const listByResourceOperationSpec: coreClient.OperationSpec = {
489
+ path:
490
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/{parentType}/{parentName}/privateEndpointConnections",
491
+ httpMethod: "GET",
492
+ responses: {
493
+ 200: {
494
+ bodyMapper: Mappers.PrivateEndpointConnectionListResult
495
+ },
496
+ default: {}
497
+ },
498
+ queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
499
+ urlParameters: [
500
+ Parameters.$host,
501
+ Parameters.subscriptionId,
502
+ Parameters.resourceGroupName,
503
+ Parameters.parentName,
504
+ Parameters.parentType3
505
+ ],
506
+ headerParameters: [Parameters.accept],
507
+ serializer
508
+ };
509
+ const listByResourceNextOperationSpec: coreClient.OperationSpec = {
510
+ path: "{nextLink}",
511
+ httpMethod: "GET",
512
+ responses: {
513
+ 200: {
514
+ bodyMapper: Mappers.PrivateEndpointConnectionListResult
515
+ },
516
+ default: {}
517
+ },
518
+ queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
519
+ urlParameters: [
520
+ Parameters.$host,
521
+ Parameters.subscriptionId,
522
+ Parameters.resourceGroupName,
523
+ Parameters.nextLink,
524
+ Parameters.parentName,
525
+ Parameters.parentType3
526
+ ],
527
+ headerParameters: [Parameters.accept],
528
+ serializer
529
+ };