@azure/arm-servicefabricmesh 0.1.0 → 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 (280) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +75 -73
  4. package/dist/index.js +5478 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/models/index.d.ts +1366 -0
  13. package/dist-esm/src/models/index.d.ts.map +1 -0
  14. package/dist-esm/src/models/index.js +121 -0
  15. package/dist-esm/src/models/index.js.map +1 -0
  16. package/dist-esm/src/models/mappers.d.ts +105 -0
  17. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  18. package/{esm → dist-esm/src}/models/mappers.js +1264 -1320
  19. package/dist-esm/src/models/mappers.js.map +1 -0
  20. package/dist-esm/src/models/parameters.d.ts +25 -0
  21. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/parameters.js +104 -62
  23. package/dist-esm/src/models/parameters.js.map +1 -0
  24. package/dist-esm/src/operations/application.d.ts +82 -0
  25. package/dist-esm/src/operations/application.d.ts.map +1 -0
  26. package/dist-esm/src/operations/application.js +340 -0
  27. package/dist-esm/src/operations/application.js.map +1 -0
  28. package/dist-esm/src/operations/codePackage.d.ts +23 -0
  29. package/dist-esm/src/operations/codePackage.d.ts.map +1 -0
  30. package/dist-esm/src/operations/codePackage.js +66 -0
  31. package/dist-esm/src/operations/codePackage.js.map +1 -0
  32. package/dist-esm/src/operations/gateway.d.ts +83 -0
  33. package/dist-esm/src/operations/gateway.d.ts.map +1 -0
  34. package/dist-esm/src/operations/gateway.js +341 -0
  35. package/dist-esm/src/operations/gateway.js.map +1 -0
  36. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/{esm → dist-esm/src}/operations/index.js +3 -5
  39. package/dist-esm/src/operations/index.js.map +1 -0
  40. package/dist-esm/src/operations/network.d.ts +82 -0
  41. package/dist-esm/src/operations/network.d.ts.map +1 -0
  42. package/dist-esm/src/operations/network.js +340 -0
  43. package/dist-esm/src/operations/network.js.map +1 -0
  44. package/dist-esm/src/operations/operations.d.ts +32 -0
  45. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/operations.js +120 -0
  47. package/dist-esm/src/operations/operations.js.map +1 -0
  48. package/dist-esm/src/operations/secret.d.ts +81 -0
  49. package/dist-esm/src/operations/secret.d.ts.map +1 -0
  50. package/dist-esm/src/operations/secret.js +339 -0
  51. package/dist-esm/src/operations/secret.js.map +1 -0
  52. package/dist-esm/src/operations/secretValueOperations.d.ts +81 -0
  53. package/dist-esm/src/operations/secretValueOperations.d.ts.map +1 -0
  54. package/dist-esm/src/operations/secretValueOperations.js +303 -0
  55. package/dist-esm/src/operations/secretValueOperations.js.map +1 -0
  56. package/dist-esm/src/operations/service.d.ts +49 -0
  57. package/dist-esm/src/operations/service.d.ts.map +1 -0
  58. package/dist-esm/src/operations/service.js +177 -0
  59. package/dist-esm/src/operations/service.js.map +1 -0
  60. package/dist-esm/src/operations/serviceReplica.d.ts +53 -0
  61. package/dist-esm/src/operations/serviceReplica.d.ts.map +1 -0
  62. package/dist-esm/src/operations/serviceReplica.js +196 -0
  63. package/dist-esm/src/operations/serviceReplica.js.map +1 -0
  64. package/dist-esm/src/operations/volume.d.ts +81 -0
  65. package/dist-esm/src/operations/volume.d.ts.map +1 -0
  66. package/dist-esm/src/operations/volume.js +339 -0
  67. package/dist-esm/src/operations/volume.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/application.d.ts +44 -0
  69. package/dist-esm/src/operationsInterfaces/application.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/application.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/application.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/codePackage.d.ts +15 -0
  73. package/dist-esm/src/operationsInterfaces/codePackage.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/codePackage.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/codePackage.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/gateway.d.ts +45 -0
  77. package/dist-esm/src/operationsInterfaces/gateway.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/gateway.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/gateway.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/index.d.ts +11 -0
  81. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/index.js +18 -0
  83. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/network.d.ts +44 -0
  85. package/dist-esm/src/operationsInterfaces/network.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/network.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/network.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  89. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/secret.d.ts +43 -0
  93. package/dist-esm/src/operationsInterfaces/secret.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/secret.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/secret.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/secretValueOperations.d.ts +55 -0
  97. package/dist-esm/src/operationsInterfaces/secretValueOperations.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/secretValueOperations.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/secretValueOperations.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/service.d.ts +23 -0
  101. package/dist-esm/src/operationsInterfaces/service.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/service.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/service.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/serviceReplica.d.ts +25 -0
  105. package/dist-esm/src/operationsInterfaces/serviceReplica.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/serviceReplica.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/serviceReplica.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/volume.d.ts +43 -0
  109. package/dist-esm/src/operationsInterfaces/volume.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/volume.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/volume.js.map +1 -0
  112. package/dist-esm/src/serviceFabricMeshManagementClient.d.ts +27 -0
  113. package/dist-esm/src/serviceFabricMeshManagementClient.d.ts.map +1 -0
  114. package/dist-esm/src/serviceFabricMeshManagementClient.js +60 -0
  115. package/dist-esm/src/serviceFabricMeshManagementClient.js.map +1 -0
  116. package/dist-esm/test/sampleTest.d.ts +2 -0
  117. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  118. package/dist-esm/test/sampleTest.js +40 -0
  119. package/dist-esm/test/sampleTest.js.map +1 -0
  120. package/package.json +87 -26
  121. package/review/arm-servicefabricmesh.api.md +1210 -0
  122. package/rollup.config.js +184 -27
  123. package/src/index.ts +12 -0
  124. package/src/models/index.ts +1603 -0
  125. package/{lib → src}/models/mappers.ts +1315 -1344
  126. package/src/models/parameters.ts +250 -0
  127. package/src/operations/application.ts +418 -0
  128. package/src/operations/codePackage.ts +88 -0
  129. package/src/operations/gateway.ts +419 -0
  130. package/{lib → src}/operations/index.ts +3 -5
  131. package/src/operations/network.ts +418 -0
  132. package/src/operations/operations.ts +137 -0
  133. package/src/operations/secret.ts +417 -0
  134. package/src/operations/secretValueOperations.ts +403 -0
  135. package/src/operations/service.ts +241 -0
  136. package/src/operations/serviceReplica.ts +271 -0
  137. package/src/operations/volume.ts +417 -0
  138. package/src/operationsInterfaces/application.ts +80 -0
  139. package/src/operationsInterfaces/codePackage.ts +33 -0
  140. package/src/operationsInterfaces/gateway.ts +81 -0
  141. package/src/operationsInterfaces/index.ts +18 -0
  142. package/src/operationsInterfaces/network.ts +80 -0
  143. package/src/operationsInterfaces/operations.ts +22 -0
  144. package/src/operationsInterfaces/secret.ts +79 -0
  145. package/src/operationsInterfaces/secretValueOperations.ts +99 -0
  146. package/src/operationsInterfaces/service.ts +46 -0
  147. package/src/operationsInterfaces/serviceReplica.ts +50 -0
  148. package/src/operationsInterfaces/volume.ts +79 -0
  149. package/src/serviceFabricMeshManagementClient.ts +115 -0
  150. package/tsconfig.json +20 -7
  151. package/types/arm-servicefabricmesh.d.ts +1940 -0
  152. package/types/tsdoc-metadata.json +11 -0
  153. package/dist/arm-servicefabricmesh.js +0 -5353
  154. package/dist/arm-servicefabricmesh.js.map +0 -1
  155. package/dist/arm-servicefabricmesh.min.js +0 -1
  156. package/dist/arm-servicefabricmesh.min.js.map +0 -1
  157. package/esm/models/applicationMappers.d.ts +0 -2
  158. package/esm/models/applicationMappers.d.ts.map +0 -1
  159. package/esm/models/applicationMappers.js +0 -11
  160. package/esm/models/applicationMappers.js.map +0 -1
  161. package/esm/models/codePackageMappers.d.ts +0 -2
  162. package/esm/models/codePackageMappers.d.ts.map +0 -1
  163. package/esm/models/codePackageMappers.js +0 -11
  164. package/esm/models/codePackageMappers.js.map +0 -1
  165. package/esm/models/gatewayMappers.d.ts +0 -2
  166. package/esm/models/gatewayMappers.d.ts.map +0 -1
  167. package/esm/models/gatewayMappers.js +0 -11
  168. package/esm/models/gatewayMappers.js.map +0 -1
  169. package/esm/models/index.d.ts +0 -2938
  170. package/esm/models/index.d.ts.map +0 -1
  171. package/esm/models/index.js +0 -10
  172. package/esm/models/index.js.map +0 -1
  173. package/esm/models/mappers.d.ts +0 -102
  174. package/esm/models/mappers.d.ts.map +0 -1
  175. package/esm/models/mappers.js.map +0 -1
  176. package/esm/models/networkMappers.d.ts +0 -2
  177. package/esm/models/networkMappers.d.ts.map +0 -1
  178. package/esm/models/networkMappers.js +0 -11
  179. package/esm/models/networkMappers.js.map +0 -1
  180. package/esm/models/operationsMappers.d.ts +0 -2
  181. package/esm/models/operationsMappers.d.ts.map +0 -1
  182. package/esm/models/operationsMappers.js +0 -11
  183. package/esm/models/operationsMappers.js.map +0 -1
  184. package/esm/models/parameters.d.ts +0 -17
  185. package/esm/models/parameters.d.ts.map +0 -1
  186. package/esm/models/parameters.js.map +0 -1
  187. package/esm/models/secretMappers.d.ts +0 -2
  188. package/esm/models/secretMappers.d.ts.map +0 -1
  189. package/esm/models/secretMappers.js +0 -11
  190. package/esm/models/secretMappers.js.map +0 -1
  191. package/esm/models/secretValueOperationsMappers.d.ts +0 -2
  192. package/esm/models/secretValueOperationsMappers.d.ts.map +0 -1
  193. package/esm/models/secretValueOperationsMappers.js +0 -11
  194. package/esm/models/secretValueOperationsMappers.js.map +0 -1
  195. package/esm/models/serviceMappers.d.ts +0 -2
  196. package/esm/models/serviceMappers.d.ts.map +0 -1
  197. package/esm/models/serviceMappers.js +0 -11
  198. package/esm/models/serviceMappers.js.map +0 -1
  199. package/esm/models/serviceReplicaMappers.d.ts +0 -2
  200. package/esm/models/serviceReplicaMappers.d.ts.map +0 -1
  201. package/esm/models/serviceReplicaMappers.js +0 -11
  202. package/esm/models/serviceReplicaMappers.js.map +0 -1
  203. package/esm/models/volumeMappers.d.ts +0 -2
  204. package/esm/models/volumeMappers.d.ts.map +0 -1
  205. package/esm/models/volumeMappers.js +0 -11
  206. package/esm/models/volumeMappers.js.map +0 -1
  207. package/esm/operations/application.d.ts +0 -162
  208. package/esm/operations/application.d.ts.map +0 -1
  209. package/esm/operations/application.js +0 -238
  210. package/esm/operations/application.js.map +0 -1
  211. package/esm/operations/codePackage.d.ts +0 -44
  212. package/esm/operations/codePackage.d.ts.map +0 -1
  213. package/esm/operations/codePackage.js +0 -65
  214. package/esm/operations/codePackage.js.map +0 -1
  215. package/esm/operations/gateway.d.ts +0 -163
  216. package/esm/operations/gateway.d.ts.map +0 -1
  217. package/esm/operations/gateway.js +0 -238
  218. package/esm/operations/gateway.js.map +0 -1
  219. package/esm/operations/index.d.ts.map +0 -1
  220. package/esm/operations/index.js.map +0 -1
  221. package/esm/operations/network.d.ts +0 -162
  222. package/esm/operations/network.d.ts.map +0 -1
  223. package/esm/operations/network.js +0 -238
  224. package/esm/operations/network.js.map +0 -1
  225. package/esm/operations/operations.d.ts +0 -48
  226. package/esm/operations/operations.d.ts.map +0 -1
  227. package/esm/operations/operations.js +0 -77
  228. package/esm/operations/operations.js.map +0 -1
  229. package/esm/operations/secret.d.ts +0 -162
  230. package/esm/operations/secret.d.ts.map +0 -1
  231. package/esm/operations/secret.js +0 -238
  232. package/esm/operations/secret.js.map +0 -1
  233. package/esm/operations/secretValueOperations.d.ts +0 -175
  234. package/esm/operations/secretValueOperations.d.ts.map +0 -1
  235. package/esm/operations/secretValueOperations.js +0 -226
  236. package/esm/operations/secretValueOperations.js.map +0 -1
  237. package/esm/operations/service.d.ts +0 -82
  238. package/esm/operations/service.d.ts.map +0 -1
  239. package/esm/operations/service.js +0 -117
  240. package/esm/operations/service.js.map +0 -1
  241. package/esm/operations/serviceReplica.d.ts +0 -88
  242. package/esm/operations/serviceReplica.d.ts.map +0 -1
  243. package/esm/operations/serviceReplica.js +0 -121
  244. package/esm/operations/serviceReplica.js.map +0 -1
  245. package/esm/operations/volume.d.ts +0 -162
  246. package/esm/operations/volume.d.ts.map +0 -1
  247. package/esm/operations/volume.js +0 -238
  248. package/esm/operations/volume.js.map +0 -1
  249. package/esm/serviceFabricMeshManagementClient.d.ts +0 -27
  250. package/esm/serviceFabricMeshManagementClient.d.ts.map +0 -1
  251. package/esm/serviceFabricMeshManagementClient.js +0 -42
  252. package/esm/serviceFabricMeshManagementClient.js.map +0 -1
  253. package/esm/serviceFabricMeshManagementClientContext.d.ts +0 -16
  254. package/esm/serviceFabricMeshManagementClientContext.d.ts.map +0 -1
  255. package/esm/serviceFabricMeshManagementClientContext.js +0 -56
  256. package/esm/serviceFabricMeshManagementClientContext.js.map +0 -1
  257. package/lib/models/applicationMappers.ts +0 -76
  258. package/lib/models/codePackageMappers.ts +0 -18
  259. package/lib/models/gatewayMappers.ts +0 -76
  260. package/lib/models/index.ts +0 -3097
  261. package/lib/models/networkMappers.ts +0 -76
  262. package/lib/models/operationsMappers.ts +0 -20
  263. package/lib/models/parameters.ts +0 -175
  264. package/lib/models/secretMappers.ts +0 -76
  265. package/lib/models/secretValueOperationsMappers.ts +0 -77
  266. package/lib/models/serviceMappers.ts +0 -76
  267. package/lib/models/serviceReplicaMappers.ts +0 -40
  268. package/lib/models/volumeMappers.ts +0 -76
  269. package/lib/operations/application.ts +0 -427
  270. package/lib/operations/codePackage.ts +0 -104
  271. package/lib/operations/gateway.ts +0 -428
  272. package/lib/operations/network.ts +0 -427
  273. package/lib/operations/operations.ts +0 -125
  274. package/lib/operations/secret.ts +0 -427
  275. package/lib/operations/secretValueOperations.ts +0 -423
  276. package/lib/operations/service.ts +0 -204
  277. package/lib/operations/serviceReplica.ts +0 -214
  278. package/lib/operations/volume.ts +0 -427
  279. package/lib/serviceFabricMeshManagementClient.ts +0 -60
  280. package/lib/serviceFabricMeshManagementClientContext.ts +0 -62
@@ -0,0 +1,418 @@
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 { Network } 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 { ServiceFabricMeshManagementClient } from "../serviceFabricMeshManagementClient";
15
+ import {
16
+ NetworkResourceDescription,
17
+ NetworkListByResourceGroupNextOptionalParams,
18
+ NetworkListByResourceGroupOptionalParams,
19
+ NetworkListBySubscriptionNextOptionalParams,
20
+ NetworkListBySubscriptionOptionalParams,
21
+ NetworkCreateOptionalParams,
22
+ NetworkCreateResponse,
23
+ NetworkGetOptionalParams,
24
+ NetworkGetResponse,
25
+ NetworkDeleteOptionalParams,
26
+ NetworkListByResourceGroupResponse,
27
+ NetworkListBySubscriptionResponse,
28
+ NetworkListByResourceGroupNextResponse,
29
+ NetworkListBySubscriptionNextResponse
30
+ } from "../models";
31
+
32
+ /// <reference lib="esnext.asynciterable" />
33
+ /** Class containing Network operations. */
34
+ export class NetworkImpl implements Network {
35
+ private readonly client: ServiceFabricMeshManagementClient;
36
+
37
+ /**
38
+ * Initialize a new instance of the class Network class.
39
+ * @param client Reference to the service client
40
+ */
41
+ constructor(client: ServiceFabricMeshManagementClient) {
42
+ this.client = client;
43
+ }
44
+
45
+ /**
46
+ * Gets the information about all network resources in a given resource group. The information include
47
+ * the description and other properties of the Network.
48
+ * @param resourceGroupName Azure resource group name
49
+ * @param options The options parameters.
50
+ */
51
+ public listByResourceGroup(
52
+ resourceGroupName: string,
53
+ options?: NetworkListByResourceGroupOptionalParams
54
+ ): PagedAsyncIterableIterator<NetworkResourceDescription> {
55
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
56
+ return {
57
+ next() {
58
+ return iter.next();
59
+ },
60
+ [Symbol.asyncIterator]() {
61
+ return this;
62
+ },
63
+ byPage: () => {
64
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
65
+ }
66
+ };
67
+ }
68
+
69
+ private async *listByResourceGroupPagingPage(
70
+ resourceGroupName: string,
71
+ options?: NetworkListByResourceGroupOptionalParams
72
+ ): AsyncIterableIterator<NetworkResourceDescription[]> {
73
+ let result = await this._listByResourceGroup(resourceGroupName, options);
74
+ yield result.value || [];
75
+ let continuationToken = result.nextLink;
76
+ while (continuationToken) {
77
+ result = await this._listByResourceGroupNext(
78
+ resourceGroupName,
79
+ continuationToken,
80
+ options
81
+ );
82
+ continuationToken = result.nextLink;
83
+ yield result.value || [];
84
+ }
85
+ }
86
+
87
+ private async *listByResourceGroupPagingAll(
88
+ resourceGroupName: string,
89
+ options?: NetworkListByResourceGroupOptionalParams
90
+ ): AsyncIterableIterator<NetworkResourceDescription> {
91
+ for await (const page of this.listByResourceGroupPagingPage(
92
+ resourceGroupName,
93
+ options
94
+ )) {
95
+ yield* page;
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Gets the information about all network resources in a given resource group. The information include
101
+ * the description and other properties of the network.
102
+ * @param options The options parameters.
103
+ */
104
+ public listBySubscription(
105
+ options?: NetworkListBySubscriptionOptionalParams
106
+ ): PagedAsyncIterableIterator<NetworkResourceDescription> {
107
+ const iter = this.listBySubscriptionPagingAll(options);
108
+ return {
109
+ next() {
110
+ return iter.next();
111
+ },
112
+ [Symbol.asyncIterator]() {
113
+ return this;
114
+ },
115
+ byPage: () => {
116
+ return this.listBySubscriptionPagingPage(options);
117
+ }
118
+ };
119
+ }
120
+
121
+ private async *listBySubscriptionPagingPage(
122
+ options?: NetworkListBySubscriptionOptionalParams
123
+ ): AsyncIterableIterator<NetworkResourceDescription[]> {
124
+ let result = await this._listBySubscription(options);
125
+ yield result.value || [];
126
+ let continuationToken = result.nextLink;
127
+ while (continuationToken) {
128
+ result = await this._listBySubscriptionNext(continuationToken, options);
129
+ continuationToken = result.nextLink;
130
+ yield result.value || [];
131
+ }
132
+ }
133
+
134
+ private async *listBySubscriptionPagingAll(
135
+ options?: NetworkListBySubscriptionOptionalParams
136
+ ): AsyncIterableIterator<NetworkResourceDescription> {
137
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
138
+ yield* page;
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Creates a network resource with the specified name, description and properties. If a network
144
+ * resource with the same name exists, then it is updated with the specified description and
145
+ * properties.
146
+ * @param resourceGroupName Azure resource group name
147
+ * @param networkResourceName The identity of the network.
148
+ * @param networkResourceDescription Description for creating a Network resource.
149
+ * @param options The options parameters.
150
+ */
151
+ create(
152
+ resourceGroupName: string,
153
+ networkResourceName: string,
154
+ networkResourceDescription: NetworkResourceDescription,
155
+ options?: NetworkCreateOptionalParams
156
+ ): Promise<NetworkCreateResponse> {
157
+ return this.client.sendOperationRequest(
158
+ {
159
+ resourceGroupName,
160
+ networkResourceName,
161
+ networkResourceDescription,
162
+ options
163
+ },
164
+ createOperationSpec
165
+ );
166
+ }
167
+
168
+ /**
169
+ * Gets the information about the network resource with the given name. The information include the
170
+ * description and other properties of the network.
171
+ * @param resourceGroupName Azure resource group name
172
+ * @param networkResourceName The identity of the network.
173
+ * @param options The options parameters.
174
+ */
175
+ get(
176
+ resourceGroupName: string,
177
+ networkResourceName: string,
178
+ options?: NetworkGetOptionalParams
179
+ ): Promise<NetworkGetResponse> {
180
+ return this.client.sendOperationRequest(
181
+ { resourceGroupName, networkResourceName, options },
182
+ getOperationSpec
183
+ );
184
+ }
185
+
186
+ /**
187
+ * Deletes the network resource identified by the name.
188
+ * @param resourceGroupName Azure resource group name
189
+ * @param networkResourceName The identity of the network.
190
+ * @param options The options parameters.
191
+ */
192
+ delete(
193
+ resourceGroupName: string,
194
+ networkResourceName: string,
195
+ options?: NetworkDeleteOptionalParams
196
+ ): Promise<void> {
197
+ return this.client.sendOperationRequest(
198
+ { resourceGroupName, networkResourceName, options },
199
+ deleteOperationSpec
200
+ );
201
+ }
202
+
203
+ /**
204
+ * Gets the information about all network resources in a given resource group. The information include
205
+ * the description and other properties of the Network.
206
+ * @param resourceGroupName Azure resource group name
207
+ * @param options The options parameters.
208
+ */
209
+ private _listByResourceGroup(
210
+ resourceGroupName: string,
211
+ options?: NetworkListByResourceGroupOptionalParams
212
+ ): Promise<NetworkListByResourceGroupResponse> {
213
+ return this.client.sendOperationRequest(
214
+ { resourceGroupName, options },
215
+ listByResourceGroupOperationSpec
216
+ );
217
+ }
218
+
219
+ /**
220
+ * Gets the information about all network resources in a given resource group. The information include
221
+ * the description and other properties of the network.
222
+ * @param options The options parameters.
223
+ */
224
+ private _listBySubscription(
225
+ options?: NetworkListBySubscriptionOptionalParams
226
+ ): Promise<NetworkListBySubscriptionResponse> {
227
+ return this.client.sendOperationRequest(
228
+ { options },
229
+ listBySubscriptionOperationSpec
230
+ );
231
+ }
232
+
233
+ /**
234
+ * ListByResourceGroupNext
235
+ * @param resourceGroupName Azure resource group name
236
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
237
+ * @param options The options parameters.
238
+ */
239
+ private _listByResourceGroupNext(
240
+ resourceGroupName: string,
241
+ nextLink: string,
242
+ options?: NetworkListByResourceGroupNextOptionalParams
243
+ ): Promise<NetworkListByResourceGroupNextResponse> {
244
+ return this.client.sendOperationRequest(
245
+ { resourceGroupName, nextLink, options },
246
+ listByResourceGroupNextOperationSpec
247
+ );
248
+ }
249
+
250
+ /**
251
+ * ListBySubscriptionNext
252
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
253
+ * @param options The options parameters.
254
+ */
255
+ private _listBySubscriptionNext(
256
+ nextLink: string,
257
+ options?: NetworkListBySubscriptionNextOptionalParams
258
+ ): Promise<NetworkListBySubscriptionNextResponse> {
259
+ return this.client.sendOperationRequest(
260
+ { nextLink, options },
261
+ listBySubscriptionNextOperationSpec
262
+ );
263
+ }
264
+ }
265
+ // Operation Specifications
266
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
267
+
268
+ const createOperationSpec: coreClient.OperationSpec = {
269
+ path:
270
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}",
271
+ httpMethod: "PUT",
272
+ responses: {
273
+ 200: {
274
+ bodyMapper: Mappers.NetworkResourceDescription
275
+ },
276
+ 201: {
277
+ bodyMapper: Mappers.NetworkResourceDescription
278
+ },
279
+ 202: {},
280
+ default: {
281
+ bodyMapper: Mappers.ErrorModel
282
+ }
283
+ },
284
+ requestBody: Parameters.networkResourceDescription,
285
+ queryParameters: [Parameters.apiVersion],
286
+ urlParameters: [
287
+ Parameters.$host,
288
+ Parameters.subscriptionId,
289
+ Parameters.resourceGroupName,
290
+ Parameters.networkResourceName
291
+ ],
292
+ headerParameters: [Parameters.accept, Parameters.contentType],
293
+ mediaType: "json",
294
+ serializer
295
+ };
296
+ const getOperationSpec: coreClient.OperationSpec = {
297
+ path:
298
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}",
299
+ httpMethod: "GET",
300
+ responses: {
301
+ 200: {
302
+ bodyMapper: Mappers.NetworkResourceDescription
303
+ },
304
+ default: {
305
+ bodyMapper: Mappers.ErrorModel
306
+ }
307
+ },
308
+ queryParameters: [Parameters.apiVersion],
309
+ urlParameters: [
310
+ Parameters.$host,
311
+ Parameters.subscriptionId,
312
+ Parameters.resourceGroupName,
313
+ Parameters.networkResourceName
314
+ ],
315
+ headerParameters: [Parameters.accept],
316
+ serializer
317
+ };
318
+ const deleteOperationSpec: coreClient.OperationSpec = {
319
+ path:
320
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks/{networkResourceName}",
321
+ httpMethod: "DELETE",
322
+ responses: {
323
+ 200: {},
324
+ 202: {},
325
+ 204: {},
326
+ default: {
327
+ bodyMapper: Mappers.ErrorModel
328
+ }
329
+ },
330
+ queryParameters: [Parameters.apiVersion],
331
+ urlParameters: [
332
+ Parameters.$host,
333
+ Parameters.subscriptionId,
334
+ Parameters.resourceGroupName,
335
+ Parameters.networkResourceName
336
+ ],
337
+ headerParameters: [Parameters.accept],
338
+ serializer
339
+ };
340
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
341
+ path:
342
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/networks",
343
+ httpMethod: "GET",
344
+ responses: {
345
+ 200: {
346
+ bodyMapper: Mappers.NetworkResourceDescriptionList
347
+ },
348
+ default: {
349
+ bodyMapper: Mappers.ErrorModel
350
+ }
351
+ },
352
+ queryParameters: [Parameters.apiVersion],
353
+ urlParameters: [
354
+ Parameters.$host,
355
+ Parameters.subscriptionId,
356
+ Parameters.resourceGroupName
357
+ ],
358
+ headerParameters: [Parameters.accept],
359
+ serializer
360
+ };
361
+ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
362
+ path:
363
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabricMesh/networks",
364
+ httpMethod: "GET",
365
+ responses: {
366
+ 200: {
367
+ bodyMapper: Mappers.NetworkResourceDescriptionList
368
+ },
369
+ default: {
370
+ bodyMapper: Mappers.ErrorModel
371
+ }
372
+ },
373
+ queryParameters: [Parameters.apiVersion],
374
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
375
+ headerParameters: [Parameters.accept],
376
+ serializer
377
+ };
378
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
379
+ path: "{nextLink}",
380
+ httpMethod: "GET",
381
+ responses: {
382
+ 200: {
383
+ bodyMapper: Mappers.NetworkResourceDescriptionList
384
+ },
385
+ default: {
386
+ bodyMapper: Mappers.ErrorModel
387
+ }
388
+ },
389
+ queryParameters: [Parameters.apiVersion],
390
+ urlParameters: [
391
+ Parameters.$host,
392
+ Parameters.nextLink,
393
+ Parameters.subscriptionId,
394
+ Parameters.resourceGroupName
395
+ ],
396
+ headerParameters: [Parameters.accept],
397
+ serializer
398
+ };
399
+ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
400
+ path: "{nextLink}",
401
+ httpMethod: "GET",
402
+ responses: {
403
+ 200: {
404
+ bodyMapper: Mappers.NetworkResourceDescriptionList
405
+ },
406
+ default: {
407
+ bodyMapper: Mappers.ErrorModel
408
+ }
409
+ },
410
+ queryParameters: [Parameters.apiVersion],
411
+ urlParameters: [
412
+ Parameters.$host,
413
+ Parameters.nextLink,
414
+ Parameters.subscriptionId
415
+ ],
416
+ headerParameters: [Parameters.accept],
417
+ serializer
418
+ };
@@ -0,0 +1,137 @@
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 { Operations } 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 { ServiceFabricMeshManagementClient } from "../serviceFabricMeshManagementClient";
15
+ import {
16
+ OperationResult,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsListNextResponse
21
+ } from "../models";
22
+
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Operations operations. */
25
+ export class OperationsImpl implements Operations {
26
+ private readonly client: ServiceFabricMeshManagementClient;
27
+
28
+ /**
29
+ * Initialize a new instance of the class Operations class.
30
+ * @param client Reference to the service client
31
+ */
32
+ constructor(client: ServiceFabricMeshManagementClient) {
33
+ this.client = client;
34
+ }
35
+
36
+ /**
37
+ * Lists all the available operations provided by Service Fabric SeaBreeze resource provider.
38
+ * @param options The options parameters.
39
+ */
40
+ public list(
41
+ options?: OperationsListOptionalParams
42
+ ): PagedAsyncIterableIterator<OperationResult> {
43
+ const iter = this.listPagingAll(options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
50
+ },
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: OperationsListOptionalParams
59
+ ): AsyncIterableIterator<OperationResult[]> {
60
+ let result = await this._list(options);
61
+ yield result.value || [];
62
+ let continuationToken = result.nextLink;
63
+ while (continuationToken) {
64
+ result = await this._listNext(continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ yield result.value || [];
67
+ }
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ options?: OperationsListOptionalParams
72
+ ): AsyncIterableIterator<OperationResult> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Lists all the available operations provided by Service Fabric SeaBreeze resource provider.
80
+ * @param options The options parameters.
81
+ */
82
+ private _list(
83
+ options?: OperationsListOptionalParams
84
+ ): Promise<OperationsListResponse> {
85
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
86
+ }
87
+
88
+ /**
89
+ * ListNext
90
+ * @param nextLink The nextLink from the previous successful call to the List method.
91
+ * @param options The options parameters.
92
+ */
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: OperationsListNextOptionalParams
96
+ ): Promise<OperationsListNextResponse> {
97
+ return this.client.sendOperationRequest(
98
+ { nextLink, options },
99
+ listNextOperationSpec
100
+ );
101
+ }
102
+ }
103
+ // Operation Specifications
104
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
105
+
106
+ const listOperationSpec: coreClient.OperationSpec = {
107
+ path: "/providers/Microsoft.ServiceFabricMesh/operations",
108
+ httpMethod: "GET",
109
+ responses: {
110
+ 200: {
111
+ bodyMapper: Mappers.OperationListResult
112
+ },
113
+ default: {
114
+ bodyMapper: Mappers.ErrorModel
115
+ }
116
+ },
117
+ queryParameters: [Parameters.apiVersion],
118
+ urlParameters: [Parameters.$host],
119
+ headerParameters: [Parameters.accept],
120
+ serializer
121
+ };
122
+ const listNextOperationSpec: coreClient.OperationSpec = {
123
+ path: "{nextLink}",
124
+ httpMethod: "GET",
125
+ responses: {
126
+ 200: {
127
+ bodyMapper: Mappers.OperationListResult
128
+ },
129
+ default: {
130
+ bodyMapper: Mappers.ErrorModel
131
+ }
132
+ },
133
+ queryParameters: [Parameters.apiVersion],
134
+ urlParameters: [Parameters.$host, Parameters.nextLink],
135
+ headerParameters: [Parameters.accept],
136
+ serializer
137
+ };