@azure/arm-deviceupdate 1.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 (225) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +3665 -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/samples-dev/accountsCreateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/accountsCreateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/accountsCreateSample.js +32 -0
  11. package/dist-esm/samples-dev/accountsCreateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/accountsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/accountsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/accountsDeleteSample.js +31 -0
  15. package/dist-esm/samples-dev/accountsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/accountsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/accountsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/accountsGetSample.js +31 -0
  19. package/dist-esm/samples-dev/accountsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/accountsHeadSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/accountsHeadSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/accountsHeadSample.js +31 -0
  23. package/dist-esm/samples-dev/accountsHeadSample.js.map +1 -0
  24. package/dist-esm/samples-dev/accountsListByResourceGroupSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/accountsListByResourceGroupSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +44 -0
  27. package/dist-esm/samples-dev/accountsListByResourceGroupSample.js.map +1 -0
  28. package/dist-esm/samples-dev/accountsListBySubscriptionSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/accountsListBySubscriptionSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/accountsListBySubscriptionSample.js +43 -0
  31. package/dist-esm/samples-dev/accountsListBySubscriptionSample.js.map +1 -0
  32. package/dist-esm/samples-dev/accountsUpdateSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/accountsUpdateSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/accountsUpdateSample.js +32 -0
  35. package/dist-esm/samples-dev/accountsUpdateSample.js.map +1 -0
  36. package/dist-esm/samples-dev/checkNameAvailabilitySample.d.ts +2 -0
  37. package/dist-esm/samples-dev/checkNameAvailabilitySample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/checkNameAvailabilitySample.js +53 -0
  39. package/dist-esm/samples-dev/checkNameAvailabilitySample.js.map +1 -0
  40. package/dist-esm/samples-dev/instancesCreateSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/instancesCreateSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/instancesCreateSample.js +46 -0
  43. package/dist-esm/samples-dev/instancesCreateSample.js.map +1 -0
  44. package/dist-esm/samples-dev/instancesDeleteSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/instancesDeleteSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/instancesDeleteSample.js +32 -0
  47. package/dist-esm/samples-dev/instancesDeleteSample.js.map +1 -0
  48. package/dist-esm/samples-dev/instancesGetSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/instancesGetSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/instancesGetSample.js +32 -0
  51. package/dist-esm/samples-dev/instancesGetSample.js.map +1 -0
  52. package/dist-esm/samples-dev/instancesHeadSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/instancesHeadSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/instancesHeadSample.js +32 -0
  55. package/dist-esm/samples-dev/instancesHeadSample.js.map +1 -0
  56. package/dist-esm/samples-dev/instancesListByAccountSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/instancesListByAccountSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/instancesListByAccountSample.js +45 -0
  59. package/dist-esm/samples-dev/instancesListByAccountSample.js.map +1 -0
  60. package/dist-esm/samples-dev/instancesUpdateSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/instancesUpdateSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/instancesUpdateSample.js +33 -0
  63. package/dist-esm/samples-dev/instancesUpdateSample.js.map +1 -0
  64. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  67. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  68. package/dist-esm/samples-dev/privateEndpointConnectionProxiesCreateOrUpdateSample.d.ts +2 -0
  69. package/dist-esm/samples-dev/privateEndpointConnectionProxiesCreateOrUpdateSample.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/privateEndpointConnectionProxiesCreateOrUpdateSample.js +53 -0
  71. package/dist-esm/samples-dev/privateEndpointConnectionProxiesCreateOrUpdateSample.js.map +1 -0
  72. package/dist-esm/samples-dev/privateEndpointConnectionProxiesDeleteSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/privateEndpointConnectionProxiesDeleteSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/privateEndpointConnectionProxiesDeleteSample.js +32 -0
  75. package/dist-esm/samples-dev/privateEndpointConnectionProxiesDeleteSample.js.map +1 -0
  76. package/dist-esm/samples-dev/privateEndpointConnectionProxiesGetSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/privateEndpointConnectionProxiesGetSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/privateEndpointConnectionProxiesGetSample.js +32 -0
  79. package/dist-esm/samples-dev/privateEndpointConnectionProxiesGetSample.js.map +1 -0
  80. package/dist-esm/samples-dev/privateEndpointConnectionProxiesListByAccountSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/privateEndpointConnectionProxiesListByAccountSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/privateEndpointConnectionProxiesListByAccountSample.js +45 -0
  83. package/dist-esm/samples-dev/privateEndpointConnectionProxiesListByAccountSample.js.map +1 -0
  84. package/dist-esm/samples-dev/privateEndpointConnectionProxiesUpdatePrivateEndpointPropertiesSample.d.ts +2 -0
  85. package/dist-esm/samples-dev/privateEndpointConnectionProxiesUpdatePrivateEndpointPropertiesSample.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/privateEndpointConnectionProxiesUpdatePrivateEndpointPropertiesSample.js +39 -0
  87. package/dist-esm/samples-dev/privateEndpointConnectionProxiesUpdatePrivateEndpointPropertiesSample.js.map +1 -0
  88. package/dist-esm/samples-dev/privateEndpointConnectionProxiesValidateSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/privateEndpointConnectionProxiesValidateSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/privateEndpointConnectionProxiesValidateSample.js +53 -0
  91. package/dist-esm/samples-dev/privateEndpointConnectionProxiesValidateSample.js.map +1 -0
  92. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.d.ts +2 -0
  93. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +38 -0
  95. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js.map +1 -0
  96. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
  97. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  98. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +32 -0
  99. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
  100. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  101. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  102. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +32 -0
  103. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  104. package/dist-esm/samples-dev/privateEndpointConnectionsListByAccountSample.d.ts +2 -0
  105. package/dist-esm/samples-dev/privateEndpointConnectionsListByAccountSample.d.ts.map +1 -0
  106. package/dist-esm/samples-dev/privateEndpointConnectionsListByAccountSample.js +45 -0
  107. package/dist-esm/samples-dev/privateEndpointConnectionsListByAccountSample.js.map +1 -0
  108. package/dist-esm/samples-dev/privateLinkResourcesGetSample.d.ts +2 -0
  109. package/dist-esm/samples-dev/privateLinkResourcesGetSample.d.ts.map +1 -0
  110. package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +32 -0
  111. package/dist-esm/samples-dev/privateLinkResourcesGetSample.js.map +1 -0
  112. package/dist-esm/samples-dev/privateLinkResourcesListByAccountSample.d.ts +2 -0
  113. package/dist-esm/samples-dev/privateLinkResourcesListByAccountSample.d.ts.map +1 -0
  114. package/dist-esm/samples-dev/privateLinkResourcesListByAccountSample.js +45 -0
  115. package/dist-esm/samples-dev/privateLinkResourcesListByAccountSample.js.map +1 -0
  116. package/dist-esm/src/deviceUpdate.d.ts +31 -0
  117. package/dist-esm/src/deviceUpdate.d.ts.map +1 -0
  118. package/dist-esm/src/deviceUpdate.js +133 -0
  119. package/dist-esm/src/deviceUpdate.js.map +1 -0
  120. package/dist-esm/src/index.d.ts +5 -0
  121. package/dist-esm/src/index.d.ts.map +1 -0
  122. package/dist-esm/src/index.js +12 -0
  123. package/dist-esm/src/index.js.map +1 -0
  124. package/dist-esm/src/lroImpl.d.ts +16 -0
  125. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  126. package/dist-esm/src/lroImpl.js +29 -0
  127. package/dist-esm/src/lroImpl.js.map +1 -0
  128. package/dist-esm/src/models/index.d.ts +941 -0
  129. package/dist-esm/src/models/index.d.ts.map +1 -0
  130. package/dist-esm/src/models/index.js +105 -0
  131. package/dist-esm/src/models/index.js.map +1 -0
  132. package/dist-esm/src/models/mappers.d.ts +44 -0
  133. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  134. package/dist-esm/src/models/mappers.js +1266 -0
  135. package/dist-esm/src/models/mappers.js.map +1 -0
  136. package/dist-esm/src/models/parameters.d.ts +22 -0
  137. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  138. package/dist-esm/src/models/parameters.js +176 -0
  139. package/dist-esm/src/models/parameters.js.map +1 -0
  140. package/dist-esm/src/operations/accounts.d.ts +114 -0
  141. package/dist-esm/src/operations/accounts.d.ts.map +1 -0
  142. package/dist-esm/src/operations/accounts.js +537 -0
  143. package/dist-esm/src/operations/accounts.js.map +1 -0
  144. package/dist-esm/src/operations/index.d.ts +7 -0
  145. package/dist-esm/src/operations/index.d.ts.map +1 -0
  146. package/dist-esm/src/operations/index.js +14 -0
  147. package/dist-esm/src/operations/index.js.map +1 -0
  148. package/dist-esm/src/operations/instances.d.ts +98 -0
  149. package/dist-esm/src/operations/instances.d.ts.map +1 -0
  150. package/dist-esm/src/operations/instances.js +408 -0
  151. package/dist-esm/src/operations/instances.js.map +1 -0
  152. package/dist-esm/src/operations/operations.d.ts +32 -0
  153. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  154. package/dist-esm/src/operations/operations.js +120 -0
  155. package/dist-esm/src/operations/operations.js.map +1 -0
  156. package/dist-esm/src/operations/privateEndpointConnectionProxies.d.ts +100 -0
  157. package/dist-esm/src/operations/privateEndpointConnectionProxies.d.ts.map +1 -0
  158. package/dist-esm/src/operations/privateEndpointConnectionProxies.js +402 -0
  159. package/dist-esm/src/operations/privateEndpointConnectionProxies.js.map +1 -0
  160. package/dist-esm/src/operations/privateEndpointConnections.d.ts +78 -0
  161. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  162. package/dist-esm/src/operations/privateEndpointConnections.js +320 -0
  163. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  164. package/dist-esm/src/operations/privateLinkResources.d.ts +38 -0
  165. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  166. package/dist-esm/src/operations/privateLinkResources.js +131 -0
  167. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  168. package/dist-esm/src/operationsInterfaces/accounts.d.ts +78 -0
  169. package/dist-esm/src/operationsInterfaces/accounts.d.ts.map +1 -0
  170. package/dist-esm/src/operationsInterfaces/accounts.js +9 -0
  171. package/dist-esm/src/operationsInterfaces/accounts.js.map +1 -0
  172. package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
  173. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  174. package/dist-esm/src/operationsInterfaces/index.js +14 -0
  175. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  176. package/dist-esm/src/operationsInterfaces/instances.d.ts +73 -0
  177. package/dist-esm/src/operationsInterfaces/instances.d.ts.map +1 -0
  178. package/dist-esm/src/operationsInterfaces/instances.js +9 -0
  179. package/dist-esm/src/operationsInterfaces/instances.js.map +1 -0
  180. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  181. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  182. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  183. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  184. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionProxies.d.ts +83 -0
  185. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionProxies.d.ts.map +1 -0
  186. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionProxies.js +9 -0
  187. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionProxies.js.map +1 -0
  188. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +61 -0
  189. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  190. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  191. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  192. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +21 -0
  193. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  194. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  195. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  196. package/dist-esm/test/sampleTest.d.ts +2 -0
  197. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  198. package/dist-esm/test/sampleTest.js +38 -0
  199. package/dist-esm/test/sampleTest.js.map +1 -0
  200. package/package.json +122 -0
  201. package/review/arm-deviceupdate.api.md +805 -0
  202. package/rollup.config.js +122 -0
  203. package/src/deviceUpdate.ts +204 -0
  204. package/src/index.ts +12 -0
  205. package/src/lroImpl.ts +34 -0
  206. package/src/models/index.ts +1080 -0
  207. package/src/models/mappers.ts +1356 -0
  208. package/src/models/parameters.ts +210 -0
  209. package/src/operations/accounts.ts +722 -0
  210. package/src/operations/index.ts +14 -0
  211. package/src/operations/instances.ts +579 -0
  212. package/src/operations/operations.ts +137 -0
  213. package/src/operations/privateEndpointConnectionProxies.ts +559 -0
  214. package/src/operations/privateEndpointConnections.ts +450 -0
  215. package/src/operations/privateLinkResources.ts +179 -0
  216. package/src/operationsInterfaces/accounts.ts +152 -0
  217. package/src/operationsInterfaces/index.ts +14 -0
  218. package/src/operationsInterfaces/instances.ts +142 -0
  219. package/src/operationsInterfaces/operations.ts +22 -0
  220. package/src/operationsInterfaces/privateEndpointConnectionProxies.ts +153 -0
  221. package/src/operationsInterfaces/privateEndpointConnections.ts +114 -0
  222. package/src/operationsInterfaces/privateLinkResources.ts +44 -0
  223. package/tsconfig.json +33 -0
  224. package/types/arm-deviceupdate.d.ts +1412 -0
  225. package/types/tsdoc-metadata.json +11 -0
package/dist/index.js ADDED
@@ -0,0 +1,3665 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
8
+ var coreLro = require('@azure/core-lro');
9
+
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n["default"] = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
30
+
31
+ /*
32
+ * Copyright (c) Microsoft Corporation.
33
+ * Licensed under the MIT License.
34
+ *
35
+ * Code generated by Microsoft (R) AutoRest Code Generator.
36
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
37
+ */
38
+ /** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */
39
+ exports.KnownCheckNameAvailabilityReason = void 0;
40
+ (function (KnownCheckNameAvailabilityReason) {
41
+ KnownCheckNameAvailabilityReason["Invalid"] = "Invalid";
42
+ KnownCheckNameAvailabilityReason["AlreadyExists"] = "AlreadyExists";
43
+ })(exports.KnownCheckNameAvailabilityReason || (exports.KnownCheckNameAvailabilityReason = {}));
44
+ /** Known values of {@link ProvisioningState} that the service accepts. */
45
+ exports.KnownProvisioningState = void 0;
46
+ (function (KnownProvisioningState) {
47
+ KnownProvisioningState["Succeeded"] = "Succeeded";
48
+ KnownProvisioningState["Deleted"] = "Deleted";
49
+ KnownProvisioningState["Failed"] = "Failed";
50
+ KnownProvisioningState["Canceled"] = "Canceled";
51
+ KnownProvisioningState["Accepted"] = "Accepted";
52
+ KnownProvisioningState["Creating"] = "Creating";
53
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
54
+ /** Known values of {@link PublicNetworkAccess} that the service accepts. */
55
+ exports.KnownPublicNetworkAccess = void 0;
56
+ (function (KnownPublicNetworkAccess) {
57
+ KnownPublicNetworkAccess["Enabled"] = "Enabled";
58
+ KnownPublicNetworkAccess["Disabled"] = "Disabled";
59
+ })(exports.KnownPublicNetworkAccess || (exports.KnownPublicNetworkAccess = {}));
60
+ /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
61
+ exports.KnownPrivateEndpointServiceConnectionStatus = void 0;
62
+ (function (KnownPrivateEndpointServiceConnectionStatus) {
63
+ KnownPrivateEndpointServiceConnectionStatus["Pending"] = "Pending";
64
+ KnownPrivateEndpointServiceConnectionStatus["Approved"] = "Approved";
65
+ KnownPrivateEndpointServiceConnectionStatus["Rejected"] = "Rejected";
66
+ })(exports.KnownPrivateEndpointServiceConnectionStatus || (exports.KnownPrivateEndpointServiceConnectionStatus = {}));
67
+ /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */
68
+ exports.KnownPrivateEndpointConnectionProvisioningState = void 0;
69
+ (function (KnownPrivateEndpointConnectionProvisioningState) {
70
+ KnownPrivateEndpointConnectionProvisioningState["Succeeded"] = "Succeeded";
71
+ KnownPrivateEndpointConnectionProvisioningState["Creating"] = "Creating";
72
+ KnownPrivateEndpointConnectionProvisioningState["Deleting"] = "Deleting";
73
+ KnownPrivateEndpointConnectionProvisioningState["Failed"] = "Failed";
74
+ })(exports.KnownPrivateEndpointConnectionProvisioningState || (exports.KnownPrivateEndpointConnectionProvisioningState = {}));
75
+ /** Known values of {@link CreatedByType} that the service accepts. */
76
+ exports.KnownCreatedByType = void 0;
77
+ (function (KnownCreatedByType) {
78
+ KnownCreatedByType["User"] = "User";
79
+ KnownCreatedByType["Application"] = "Application";
80
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
81
+ KnownCreatedByType["Key"] = "Key";
82
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
83
+ /** Known values of {@link Sku} that the service accepts. */
84
+ exports.KnownSku = void 0;
85
+ (function (KnownSku) {
86
+ KnownSku["Free"] = "Free";
87
+ KnownSku["Standard"] = "Standard";
88
+ })(exports.KnownSku || (exports.KnownSku = {}));
89
+ /** Known values of {@link Role} that the service accepts. */
90
+ exports.KnownRole = void 0;
91
+ (function (KnownRole) {
92
+ KnownRole["Primary"] = "Primary";
93
+ KnownRole["Failover"] = "Failover";
94
+ })(exports.KnownRole || (exports.KnownRole = {}));
95
+ /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */
96
+ exports.KnownManagedServiceIdentityType = void 0;
97
+ (function (KnownManagedServiceIdentityType) {
98
+ KnownManagedServiceIdentityType["None"] = "None";
99
+ KnownManagedServiceIdentityType["SystemAssigned"] = "SystemAssigned";
100
+ KnownManagedServiceIdentityType["UserAssigned"] = "UserAssigned";
101
+ KnownManagedServiceIdentityType["SystemAssignedUserAssigned"] = "SystemAssigned,UserAssigned";
102
+ })(exports.KnownManagedServiceIdentityType || (exports.KnownManagedServiceIdentityType = {}));
103
+ /** Known values of {@link AuthenticationType} that the service accepts. */
104
+ exports.KnownAuthenticationType = void 0;
105
+ (function (KnownAuthenticationType) {
106
+ KnownAuthenticationType["KeyBased"] = "KeyBased";
107
+ })(exports.KnownAuthenticationType || (exports.KnownAuthenticationType = {}));
108
+ /** Known values of {@link GroupIdProvisioningState} that the service accepts. */
109
+ exports.KnownGroupIdProvisioningState = void 0;
110
+ (function (KnownGroupIdProvisioningState) {
111
+ KnownGroupIdProvisioningState["Succeeded"] = "Succeeded";
112
+ KnownGroupIdProvisioningState["Failed"] = "Failed";
113
+ KnownGroupIdProvisioningState["Canceled"] = "Canceled";
114
+ })(exports.KnownGroupIdProvisioningState || (exports.KnownGroupIdProvisioningState = {}));
115
+ /** Known values of {@link PrivateEndpointConnectionProxyProvisioningState} that the service accepts. */
116
+ exports.KnownPrivateEndpointConnectionProxyProvisioningState = void 0;
117
+ (function (KnownPrivateEndpointConnectionProxyProvisioningState) {
118
+ KnownPrivateEndpointConnectionProxyProvisioningState["Succeeded"] = "Succeeded";
119
+ KnownPrivateEndpointConnectionProxyProvisioningState["Creating"] = "Creating";
120
+ KnownPrivateEndpointConnectionProxyProvisioningState["Deleting"] = "Deleting";
121
+ KnownPrivateEndpointConnectionProxyProvisioningState["Failed"] = "Failed";
122
+ })(exports.KnownPrivateEndpointConnectionProxyProvisioningState || (exports.KnownPrivateEndpointConnectionProxyProvisioningState = {}));
123
+ /** Known values of {@link Origin} that the service accepts. */
124
+ exports.KnownOrigin = void 0;
125
+ (function (KnownOrigin) {
126
+ KnownOrigin["User"] = "user";
127
+ KnownOrigin["System"] = "system";
128
+ KnownOrigin["UserSystem"] = "user,system";
129
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
130
+ /** Known values of {@link ActionType} that the service accepts. */
131
+ exports.KnownActionType = void 0;
132
+ (function (KnownActionType) {
133
+ KnownActionType["Internal"] = "Internal";
134
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
135
+
136
+ /*
137
+ * Copyright (c) Microsoft Corporation.
138
+ * Licensed under the MIT License.
139
+ *
140
+ * Code generated by Microsoft (R) AutoRest Code Generator.
141
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
142
+ */
143
+ const CheckNameAvailabilityRequest = {
144
+ type: {
145
+ name: "Composite",
146
+ className: "CheckNameAvailabilityRequest",
147
+ modelProperties: {
148
+ name: {
149
+ serializedName: "name",
150
+ type: {
151
+ name: "String"
152
+ }
153
+ },
154
+ type: {
155
+ serializedName: "type",
156
+ type: {
157
+ name: "String"
158
+ }
159
+ }
160
+ }
161
+ }
162
+ };
163
+ const CheckNameAvailabilityResponse = {
164
+ type: {
165
+ name: "Composite",
166
+ className: "CheckNameAvailabilityResponse",
167
+ modelProperties: {
168
+ nameAvailable: {
169
+ serializedName: "nameAvailable",
170
+ type: {
171
+ name: "Boolean"
172
+ }
173
+ },
174
+ reason: {
175
+ serializedName: "reason",
176
+ type: {
177
+ name: "String"
178
+ }
179
+ },
180
+ message: {
181
+ serializedName: "message",
182
+ type: {
183
+ name: "String"
184
+ }
185
+ }
186
+ }
187
+ }
188
+ };
189
+ const ErrorResponse = {
190
+ type: {
191
+ name: "Composite",
192
+ className: "ErrorResponse",
193
+ modelProperties: {
194
+ error: {
195
+ serializedName: "error",
196
+ type: {
197
+ name: "Composite",
198
+ className: "ErrorDetail"
199
+ }
200
+ }
201
+ }
202
+ }
203
+ };
204
+ const ErrorDetail = {
205
+ type: {
206
+ name: "Composite",
207
+ className: "ErrorDetail",
208
+ modelProperties: {
209
+ code: {
210
+ serializedName: "code",
211
+ readOnly: true,
212
+ type: {
213
+ name: "String"
214
+ }
215
+ },
216
+ message: {
217
+ serializedName: "message",
218
+ readOnly: true,
219
+ type: {
220
+ name: "String"
221
+ }
222
+ },
223
+ target: {
224
+ serializedName: "target",
225
+ readOnly: true,
226
+ type: {
227
+ name: "String"
228
+ }
229
+ },
230
+ details: {
231
+ serializedName: "details",
232
+ readOnly: true,
233
+ type: {
234
+ name: "Sequence",
235
+ element: {
236
+ type: {
237
+ name: "Composite",
238
+ className: "ErrorDetail"
239
+ }
240
+ }
241
+ }
242
+ },
243
+ additionalInfo: {
244
+ serializedName: "additionalInfo",
245
+ readOnly: true,
246
+ type: {
247
+ name: "Sequence",
248
+ element: {
249
+ type: {
250
+ name: "Composite",
251
+ className: "ErrorAdditionalInfo"
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
258
+ };
259
+ const ErrorAdditionalInfo = {
260
+ type: {
261
+ name: "Composite",
262
+ className: "ErrorAdditionalInfo",
263
+ modelProperties: {
264
+ type: {
265
+ serializedName: "type",
266
+ readOnly: true,
267
+ type: {
268
+ name: "String"
269
+ }
270
+ },
271
+ info: {
272
+ serializedName: "info",
273
+ readOnly: true,
274
+ type: {
275
+ name: "Dictionary",
276
+ value: { type: { name: "any" } }
277
+ }
278
+ }
279
+ }
280
+ }
281
+ };
282
+ const AccountList = {
283
+ type: {
284
+ name: "Composite",
285
+ className: "AccountList",
286
+ modelProperties: {
287
+ nextLink: {
288
+ serializedName: "nextLink",
289
+ type: {
290
+ name: "String"
291
+ }
292
+ },
293
+ value: {
294
+ serializedName: "value",
295
+ type: {
296
+ name: "Sequence",
297
+ element: {
298
+ type: {
299
+ name: "Composite",
300
+ className: "Account"
301
+ }
302
+ }
303
+ }
304
+ }
305
+ }
306
+ }
307
+ };
308
+ const PrivateEndpoint = {
309
+ type: {
310
+ name: "Composite",
311
+ className: "PrivateEndpoint",
312
+ modelProperties: {
313
+ id: {
314
+ serializedName: "id",
315
+ readOnly: true,
316
+ type: {
317
+ name: "String"
318
+ }
319
+ }
320
+ }
321
+ }
322
+ };
323
+ const PrivateLinkServiceConnectionState = {
324
+ type: {
325
+ name: "Composite",
326
+ className: "PrivateLinkServiceConnectionState",
327
+ modelProperties: {
328
+ status: {
329
+ serializedName: "status",
330
+ type: {
331
+ name: "String"
332
+ }
333
+ },
334
+ description: {
335
+ serializedName: "description",
336
+ type: {
337
+ name: "String"
338
+ }
339
+ },
340
+ actionsRequired: {
341
+ serializedName: "actionsRequired",
342
+ type: {
343
+ name: "String"
344
+ }
345
+ }
346
+ }
347
+ }
348
+ };
349
+ const Resource = {
350
+ type: {
351
+ name: "Composite",
352
+ className: "Resource",
353
+ modelProperties: {
354
+ id: {
355
+ serializedName: "id",
356
+ readOnly: true,
357
+ type: {
358
+ name: "String"
359
+ }
360
+ },
361
+ name: {
362
+ serializedName: "name",
363
+ readOnly: true,
364
+ type: {
365
+ name: "String"
366
+ }
367
+ },
368
+ type: {
369
+ serializedName: "type",
370
+ readOnly: true,
371
+ type: {
372
+ name: "String"
373
+ }
374
+ },
375
+ systemData: {
376
+ serializedName: "systemData",
377
+ type: {
378
+ name: "Composite",
379
+ className: "SystemData"
380
+ }
381
+ }
382
+ }
383
+ }
384
+ };
385
+ const SystemData = {
386
+ type: {
387
+ name: "Composite",
388
+ className: "SystemData",
389
+ modelProperties: {
390
+ createdBy: {
391
+ serializedName: "createdBy",
392
+ type: {
393
+ name: "String"
394
+ }
395
+ },
396
+ createdByType: {
397
+ serializedName: "createdByType",
398
+ type: {
399
+ name: "String"
400
+ }
401
+ },
402
+ createdAt: {
403
+ serializedName: "createdAt",
404
+ type: {
405
+ name: "DateTime"
406
+ }
407
+ },
408
+ lastModifiedBy: {
409
+ serializedName: "lastModifiedBy",
410
+ type: {
411
+ name: "String"
412
+ }
413
+ },
414
+ lastModifiedByType: {
415
+ serializedName: "lastModifiedByType",
416
+ type: {
417
+ name: "String"
418
+ }
419
+ },
420
+ lastModifiedAt: {
421
+ serializedName: "lastModifiedAt",
422
+ type: {
423
+ name: "DateTime"
424
+ }
425
+ }
426
+ }
427
+ }
428
+ };
429
+ const Location = {
430
+ type: {
431
+ name: "Composite",
432
+ className: "Location",
433
+ modelProperties: {
434
+ name: {
435
+ serializedName: "name",
436
+ type: {
437
+ name: "String"
438
+ }
439
+ },
440
+ role: {
441
+ defaultValue: "Primary",
442
+ serializedName: "role",
443
+ type: {
444
+ name: "String"
445
+ }
446
+ }
447
+ }
448
+ }
449
+ };
450
+ const ManagedServiceIdentity = {
451
+ type: {
452
+ name: "Composite",
453
+ className: "ManagedServiceIdentity",
454
+ modelProperties: {
455
+ principalId: {
456
+ serializedName: "principalId",
457
+ readOnly: true,
458
+ type: {
459
+ name: "Uuid"
460
+ }
461
+ },
462
+ tenantId: {
463
+ serializedName: "tenantId",
464
+ readOnly: true,
465
+ type: {
466
+ name: "Uuid"
467
+ }
468
+ },
469
+ type: {
470
+ serializedName: "type",
471
+ required: true,
472
+ type: {
473
+ name: "String"
474
+ }
475
+ },
476
+ userAssignedIdentities: {
477
+ serializedName: "userAssignedIdentities",
478
+ type: {
479
+ name: "Dictionary",
480
+ value: {
481
+ type: { name: "Composite", className: "UserAssignedIdentity" }
482
+ }
483
+ }
484
+ }
485
+ }
486
+ }
487
+ };
488
+ const UserAssignedIdentity = {
489
+ type: {
490
+ name: "Composite",
491
+ className: "UserAssignedIdentity",
492
+ modelProperties: {
493
+ principalId: {
494
+ serializedName: "principalId",
495
+ readOnly: true,
496
+ type: {
497
+ name: "Uuid"
498
+ }
499
+ },
500
+ clientId: {
501
+ serializedName: "clientId",
502
+ readOnly: true,
503
+ type: {
504
+ name: "Uuid"
505
+ }
506
+ }
507
+ }
508
+ }
509
+ };
510
+ const TagUpdate = {
511
+ type: {
512
+ name: "Composite",
513
+ className: "TagUpdate",
514
+ modelProperties: {
515
+ tags: {
516
+ serializedName: "tags",
517
+ type: {
518
+ name: "Dictionary",
519
+ value: { type: { name: "String" } }
520
+ }
521
+ }
522
+ }
523
+ }
524
+ };
525
+ const InstanceList = {
526
+ type: {
527
+ name: "Composite",
528
+ className: "InstanceList",
529
+ modelProperties: {
530
+ nextLink: {
531
+ serializedName: "nextLink",
532
+ type: {
533
+ name: "String"
534
+ }
535
+ },
536
+ value: {
537
+ serializedName: "value",
538
+ type: {
539
+ name: "Sequence",
540
+ element: {
541
+ type: {
542
+ name: "Composite",
543
+ className: "Instance"
544
+ }
545
+ }
546
+ }
547
+ }
548
+ }
549
+ }
550
+ };
551
+ const IotHubSettings = {
552
+ type: {
553
+ name: "Composite",
554
+ className: "IotHubSettings",
555
+ modelProperties: {
556
+ resourceId: {
557
+ constraints: {
558
+ MaxLength: 244,
559
+ MinLength: 108
560
+ },
561
+ serializedName: "resourceId",
562
+ required: true,
563
+ type: {
564
+ name: "String"
565
+ }
566
+ }
567
+ }
568
+ }
569
+ };
570
+ const DiagnosticStorageProperties = {
571
+ type: {
572
+ name: "Composite",
573
+ className: "DiagnosticStorageProperties",
574
+ modelProperties: {
575
+ authenticationType: {
576
+ serializedName: "authenticationType",
577
+ required: true,
578
+ type: {
579
+ name: "String"
580
+ }
581
+ },
582
+ connectionString: {
583
+ serializedName: "connectionString",
584
+ type: {
585
+ name: "String"
586
+ }
587
+ },
588
+ resourceId: {
589
+ serializedName: "resourceId",
590
+ required: true,
591
+ type: {
592
+ name: "String"
593
+ }
594
+ }
595
+ }
596
+ }
597
+ };
598
+ const PrivateEndpointConnectionListResult = {
599
+ type: {
600
+ name: "Composite",
601
+ className: "PrivateEndpointConnectionListResult",
602
+ modelProperties: {
603
+ value: {
604
+ serializedName: "value",
605
+ type: {
606
+ name: "Sequence",
607
+ element: {
608
+ type: {
609
+ name: "Composite",
610
+ className: "PrivateEndpointConnection"
611
+ }
612
+ }
613
+ }
614
+ }
615
+ }
616
+ }
617
+ };
618
+ const PrivateLinkResourceListResult = {
619
+ type: {
620
+ name: "Composite",
621
+ className: "PrivateLinkResourceListResult",
622
+ modelProperties: {
623
+ value: {
624
+ serializedName: "value",
625
+ type: {
626
+ name: "Sequence",
627
+ element: {
628
+ type: {
629
+ name: "Composite",
630
+ className: "GroupInformation"
631
+ }
632
+ }
633
+ }
634
+ },
635
+ nextLink: {
636
+ serializedName: "nextLink",
637
+ type: {
638
+ name: "String"
639
+ }
640
+ }
641
+ }
642
+ }
643
+ };
644
+ const PrivateLinkResourceProperties = {
645
+ type: {
646
+ name: "Composite",
647
+ className: "PrivateLinkResourceProperties",
648
+ modelProperties: {
649
+ groupId: {
650
+ serializedName: "groupId",
651
+ readOnly: true,
652
+ type: {
653
+ name: "String"
654
+ }
655
+ },
656
+ requiredMembers: {
657
+ serializedName: "requiredMembers",
658
+ readOnly: true,
659
+ type: {
660
+ name: "Sequence",
661
+ element: {
662
+ type: {
663
+ name: "String"
664
+ }
665
+ }
666
+ }
667
+ },
668
+ requiredZoneNames: {
669
+ serializedName: "requiredZoneNames",
670
+ type: {
671
+ name: "Sequence",
672
+ element: {
673
+ type: {
674
+ name: "String"
675
+ }
676
+ }
677
+ }
678
+ }
679
+ }
680
+ }
681
+ };
682
+ const PrivateEndpointConnectionProxyListResult = {
683
+ type: {
684
+ name: "Composite",
685
+ className: "PrivateEndpointConnectionProxyListResult",
686
+ modelProperties: {
687
+ value: {
688
+ serializedName: "value",
689
+ type: {
690
+ name: "Sequence",
691
+ element: {
692
+ type: {
693
+ name: "Composite",
694
+ className: "PrivateEndpointConnectionProxy"
695
+ }
696
+ }
697
+ }
698
+ },
699
+ nextLink: {
700
+ serializedName: "nextLink",
701
+ type: {
702
+ name: "String"
703
+ }
704
+ }
705
+ }
706
+ }
707
+ };
708
+ const PrivateEndpointConnectionProxyProperties = {
709
+ type: {
710
+ name: "Composite",
711
+ className: "PrivateEndpointConnectionProxyProperties",
712
+ modelProperties: {
713
+ eTag: {
714
+ serializedName: "eTag",
715
+ readOnly: true,
716
+ type: {
717
+ name: "String"
718
+ }
719
+ },
720
+ remotePrivateEndpoint: {
721
+ serializedName: "remotePrivateEndpoint",
722
+ type: {
723
+ name: "Composite",
724
+ className: "RemotePrivateEndpoint"
725
+ }
726
+ },
727
+ status: {
728
+ serializedName: "status",
729
+ type: {
730
+ name: "String"
731
+ }
732
+ }
733
+ }
734
+ }
735
+ };
736
+ const RemotePrivateEndpoint = {
737
+ type: {
738
+ name: "Composite",
739
+ className: "RemotePrivateEndpoint",
740
+ modelProperties: {
741
+ id: {
742
+ serializedName: "id",
743
+ type: {
744
+ name: "String"
745
+ }
746
+ },
747
+ location: {
748
+ serializedName: "location",
749
+ type: {
750
+ name: "String"
751
+ }
752
+ },
753
+ immutableSubscriptionId: {
754
+ serializedName: "immutableSubscriptionId",
755
+ type: {
756
+ name: "String"
757
+ }
758
+ },
759
+ immutableResourceId: {
760
+ serializedName: "immutableResourceId",
761
+ type: {
762
+ name: "String"
763
+ }
764
+ },
765
+ vnetTrafficTag: {
766
+ serializedName: "vnetTrafficTag",
767
+ type: {
768
+ name: "String"
769
+ }
770
+ },
771
+ manualPrivateLinkServiceConnections: {
772
+ serializedName: "manualPrivateLinkServiceConnections",
773
+ type: {
774
+ name: "Sequence",
775
+ element: {
776
+ type: {
777
+ name: "Composite",
778
+ className: "PrivateLinkServiceConnection"
779
+ }
780
+ }
781
+ }
782
+ },
783
+ privateLinkServiceConnections: {
784
+ serializedName: "privateLinkServiceConnections",
785
+ type: {
786
+ name: "Sequence",
787
+ element: {
788
+ type: {
789
+ name: "Composite",
790
+ className: "PrivateLinkServiceConnection"
791
+ }
792
+ }
793
+ }
794
+ },
795
+ privateLinkServiceProxies: {
796
+ serializedName: "privateLinkServiceProxies",
797
+ type: {
798
+ name: "Sequence",
799
+ element: {
800
+ type: {
801
+ name: "Composite",
802
+ className: "PrivateLinkServiceProxy"
803
+ }
804
+ }
805
+ }
806
+ },
807
+ connectionDetails: {
808
+ serializedName: "connectionDetails",
809
+ type: {
810
+ name: "Sequence",
811
+ element: {
812
+ type: {
813
+ name: "Composite",
814
+ className: "ConnectionDetails"
815
+ }
816
+ }
817
+ }
818
+ }
819
+ }
820
+ }
821
+ };
822
+ const PrivateLinkServiceConnection = {
823
+ type: {
824
+ name: "Composite",
825
+ className: "PrivateLinkServiceConnection",
826
+ modelProperties: {
827
+ name: {
828
+ serializedName: "name",
829
+ type: {
830
+ name: "String"
831
+ }
832
+ },
833
+ groupIds: {
834
+ serializedName: "groupIds",
835
+ type: {
836
+ name: "Sequence",
837
+ element: {
838
+ type: {
839
+ name: "String"
840
+ }
841
+ }
842
+ }
843
+ },
844
+ requestMessage: {
845
+ serializedName: "requestMessage",
846
+ type: {
847
+ name: "String"
848
+ }
849
+ }
850
+ }
851
+ }
852
+ };
853
+ const PrivateLinkServiceProxy = {
854
+ type: {
855
+ name: "Composite",
856
+ className: "PrivateLinkServiceProxy",
857
+ modelProperties: {
858
+ id: {
859
+ serializedName: "id",
860
+ type: {
861
+ name: "String"
862
+ }
863
+ },
864
+ remotePrivateLinkServiceConnectionState: {
865
+ serializedName: "remotePrivateLinkServiceConnectionState",
866
+ type: {
867
+ name: "Composite",
868
+ className: "PrivateLinkServiceConnectionState"
869
+ }
870
+ },
871
+ remotePrivateEndpointConnection: {
872
+ serializedName: "remotePrivateEndpointConnection",
873
+ type: {
874
+ name: "Composite",
875
+ className: "PrivateLinkServiceProxyRemotePrivateEndpointConnection"
876
+ }
877
+ },
878
+ groupConnectivityInformation: {
879
+ serializedName: "groupConnectivityInformation",
880
+ type: {
881
+ name: "Sequence",
882
+ element: {
883
+ type: {
884
+ name: "Composite",
885
+ className: "GroupConnectivityInformation"
886
+ }
887
+ }
888
+ }
889
+ }
890
+ }
891
+ }
892
+ };
893
+ const RemotePrivateEndpointConnection = {
894
+ type: {
895
+ name: "Composite",
896
+ className: "RemotePrivateEndpointConnection",
897
+ modelProperties: {
898
+ id: {
899
+ serializedName: "id",
900
+ readOnly: true,
901
+ type: {
902
+ name: "String"
903
+ }
904
+ }
905
+ }
906
+ }
907
+ };
908
+ const GroupConnectivityInformation = {
909
+ type: {
910
+ name: "Composite",
911
+ className: "GroupConnectivityInformation",
912
+ modelProperties: {
913
+ groupId: {
914
+ serializedName: "groupId",
915
+ readOnly: true,
916
+ type: {
917
+ name: "String"
918
+ }
919
+ },
920
+ memberName: {
921
+ serializedName: "memberName",
922
+ readOnly: true,
923
+ type: {
924
+ name: "String"
925
+ }
926
+ },
927
+ customerVisibleFqdns: {
928
+ serializedName: "customerVisibleFqdns",
929
+ type: {
930
+ name: "Sequence",
931
+ element: {
932
+ type: {
933
+ name: "String"
934
+ }
935
+ }
936
+ }
937
+ },
938
+ internalFqdn: {
939
+ serializedName: "internalFqdn",
940
+ readOnly: true,
941
+ type: {
942
+ name: "String"
943
+ }
944
+ },
945
+ redirectMapId: {
946
+ serializedName: "redirectMapId",
947
+ type: {
948
+ name: "String"
949
+ }
950
+ },
951
+ privateLinkServiceArmRegion: {
952
+ serializedName: "privateLinkServiceArmRegion",
953
+ type: {
954
+ name: "String"
955
+ }
956
+ }
957
+ }
958
+ }
959
+ };
960
+ const ConnectionDetails = {
961
+ type: {
962
+ name: "Composite",
963
+ className: "ConnectionDetails",
964
+ modelProperties: {
965
+ id: {
966
+ serializedName: "id",
967
+ readOnly: true,
968
+ type: {
969
+ name: "String"
970
+ }
971
+ },
972
+ privateIpAddress: {
973
+ serializedName: "privateIpAddress",
974
+ readOnly: true,
975
+ type: {
976
+ name: "String"
977
+ }
978
+ },
979
+ linkIdentifier: {
980
+ serializedName: "linkIdentifier",
981
+ readOnly: true,
982
+ type: {
983
+ name: "String"
984
+ }
985
+ },
986
+ groupId: {
987
+ serializedName: "groupId",
988
+ readOnly: true,
989
+ type: {
990
+ name: "String"
991
+ }
992
+ },
993
+ memberName: {
994
+ serializedName: "memberName",
995
+ readOnly: true,
996
+ type: {
997
+ name: "String"
998
+ }
999
+ }
1000
+ }
1001
+ }
1002
+ };
1003
+ const PrivateEndpointUpdate = {
1004
+ type: {
1005
+ name: "Composite",
1006
+ className: "PrivateEndpointUpdate",
1007
+ modelProperties: {
1008
+ id: {
1009
+ serializedName: "id",
1010
+ type: {
1011
+ name: "String"
1012
+ }
1013
+ },
1014
+ location: {
1015
+ serializedName: "location",
1016
+ type: {
1017
+ name: "String"
1018
+ }
1019
+ },
1020
+ immutableSubscriptionId: {
1021
+ serializedName: "immutableSubscriptionId",
1022
+ type: {
1023
+ name: "String"
1024
+ }
1025
+ },
1026
+ immutableResourceId: {
1027
+ serializedName: "immutableResourceId",
1028
+ type: {
1029
+ name: "String"
1030
+ }
1031
+ },
1032
+ vnetTrafficTag: {
1033
+ serializedName: "vnetTrafficTag",
1034
+ type: {
1035
+ name: "String"
1036
+ }
1037
+ }
1038
+ }
1039
+ }
1040
+ };
1041
+ const OperationListResult = {
1042
+ type: {
1043
+ name: "Composite",
1044
+ className: "OperationListResult",
1045
+ modelProperties: {
1046
+ value: {
1047
+ serializedName: "value",
1048
+ readOnly: true,
1049
+ type: {
1050
+ name: "Sequence",
1051
+ element: {
1052
+ type: {
1053
+ name: "Composite",
1054
+ className: "Operation"
1055
+ }
1056
+ }
1057
+ }
1058
+ },
1059
+ nextLink: {
1060
+ serializedName: "nextLink",
1061
+ readOnly: true,
1062
+ type: {
1063
+ name: "String"
1064
+ }
1065
+ }
1066
+ }
1067
+ }
1068
+ };
1069
+ const Operation = {
1070
+ type: {
1071
+ name: "Composite",
1072
+ className: "Operation",
1073
+ modelProperties: {
1074
+ name: {
1075
+ serializedName: "name",
1076
+ readOnly: true,
1077
+ type: {
1078
+ name: "String"
1079
+ }
1080
+ },
1081
+ isDataAction: {
1082
+ serializedName: "isDataAction",
1083
+ readOnly: true,
1084
+ type: {
1085
+ name: "Boolean"
1086
+ }
1087
+ },
1088
+ display: {
1089
+ serializedName: "display",
1090
+ type: {
1091
+ name: "Composite",
1092
+ className: "OperationDisplay"
1093
+ }
1094
+ },
1095
+ origin: {
1096
+ serializedName: "origin",
1097
+ readOnly: true,
1098
+ type: {
1099
+ name: "String"
1100
+ }
1101
+ },
1102
+ actionType: {
1103
+ serializedName: "actionType",
1104
+ readOnly: true,
1105
+ type: {
1106
+ name: "String"
1107
+ }
1108
+ }
1109
+ }
1110
+ }
1111
+ };
1112
+ const OperationDisplay = {
1113
+ type: {
1114
+ name: "Composite",
1115
+ className: "OperationDisplay",
1116
+ modelProperties: {
1117
+ provider: {
1118
+ serializedName: "provider",
1119
+ readOnly: true,
1120
+ type: {
1121
+ name: "String"
1122
+ }
1123
+ },
1124
+ resource: {
1125
+ serializedName: "resource",
1126
+ readOnly: true,
1127
+ type: {
1128
+ name: "String"
1129
+ }
1130
+ },
1131
+ operation: {
1132
+ serializedName: "operation",
1133
+ readOnly: true,
1134
+ type: {
1135
+ name: "String"
1136
+ }
1137
+ },
1138
+ description: {
1139
+ serializedName: "description",
1140
+ readOnly: true,
1141
+ type: {
1142
+ name: "String"
1143
+ }
1144
+ }
1145
+ }
1146
+ }
1147
+ };
1148
+ const PrivateEndpointConnection = {
1149
+ type: {
1150
+ name: "Composite",
1151
+ className: "PrivateEndpointConnection",
1152
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { privateEndpoint: {
1153
+ serializedName: "properties.privateEndpoint",
1154
+ type: {
1155
+ name: "Composite",
1156
+ className: "PrivateEndpoint"
1157
+ }
1158
+ }, privateLinkServiceConnectionState: {
1159
+ serializedName: "properties.privateLinkServiceConnectionState",
1160
+ type: {
1161
+ name: "Composite",
1162
+ className: "PrivateLinkServiceConnectionState"
1163
+ }
1164
+ }, groupIds: {
1165
+ serializedName: "properties.groupIds",
1166
+ type: {
1167
+ name: "Sequence",
1168
+ element: {
1169
+ type: {
1170
+ name: "String"
1171
+ }
1172
+ }
1173
+ }
1174
+ }, provisioningState: {
1175
+ serializedName: "properties.provisioningState",
1176
+ readOnly: true,
1177
+ type: {
1178
+ name: "String"
1179
+ }
1180
+ } })
1181
+ }
1182
+ };
1183
+ const TrackedResource = {
1184
+ type: {
1185
+ name: "Composite",
1186
+ className: "TrackedResource",
1187
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
1188
+ serializedName: "tags",
1189
+ type: {
1190
+ name: "Dictionary",
1191
+ value: { type: { name: "String" } }
1192
+ }
1193
+ }, location: {
1194
+ serializedName: "location",
1195
+ required: true,
1196
+ type: {
1197
+ name: "String"
1198
+ }
1199
+ } })
1200
+ }
1201
+ };
1202
+ const ProxyResource = {
1203
+ type: {
1204
+ name: "Composite",
1205
+ className: "ProxyResource",
1206
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
1207
+ }
1208
+ };
1209
+ const AccountUpdate = {
1210
+ type: {
1211
+ name: "Composite",
1212
+ className: "AccountUpdate",
1213
+ modelProperties: Object.assign(Object.assign({}, TagUpdate.type.modelProperties), { identity: {
1214
+ serializedName: "identity",
1215
+ type: {
1216
+ name: "Composite",
1217
+ className: "ManagedServiceIdentity"
1218
+ }
1219
+ }, location: {
1220
+ serializedName: "location",
1221
+ type: {
1222
+ name: "String"
1223
+ }
1224
+ } })
1225
+ }
1226
+ };
1227
+ const GroupInformationProperties = {
1228
+ type: {
1229
+ name: "Composite",
1230
+ className: "GroupInformationProperties",
1231
+ modelProperties: Object.assign(Object.assign({}, PrivateLinkResourceProperties.type.modelProperties), { provisioningState: {
1232
+ serializedName: "provisioningState",
1233
+ readOnly: true,
1234
+ type: {
1235
+ name: "String"
1236
+ }
1237
+ } })
1238
+ }
1239
+ };
1240
+ const PrivateEndpointConnectionProxy = {
1241
+ type: {
1242
+ name: "Composite",
1243
+ className: "PrivateEndpointConnectionProxy",
1244
+ modelProperties: Object.assign(Object.assign(Object.assign({}, ProxyResource.type.modelProperties), PrivateEndpointConnectionProxyProperties.type.modelProperties), { provisioningState: {
1245
+ serializedName: "properties.provisioningState",
1246
+ readOnly: true,
1247
+ type: {
1248
+ name: "String"
1249
+ }
1250
+ } })
1251
+ }
1252
+ };
1253
+ const PrivateLinkServiceProxyRemotePrivateEndpointConnection = {
1254
+ type: {
1255
+ name: "Composite",
1256
+ className: "PrivateLinkServiceProxyRemotePrivateEndpointConnection",
1257
+ modelProperties: Object.assign({}, RemotePrivateEndpointConnection.type.modelProperties)
1258
+ }
1259
+ };
1260
+ const Account = {
1261
+ type: {
1262
+ name: "Composite",
1263
+ className: "Account",
1264
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { identity: {
1265
+ serializedName: "identity",
1266
+ type: {
1267
+ name: "Composite",
1268
+ className: "ManagedServiceIdentity"
1269
+ }
1270
+ }, provisioningState: {
1271
+ serializedName: "properties.provisioningState",
1272
+ readOnly: true,
1273
+ type: {
1274
+ name: "String"
1275
+ }
1276
+ }, hostName: {
1277
+ serializedName: "properties.hostName",
1278
+ readOnly: true,
1279
+ type: {
1280
+ name: "String"
1281
+ }
1282
+ }, publicNetworkAccess: {
1283
+ defaultValue: "Enabled",
1284
+ serializedName: "properties.publicNetworkAccess",
1285
+ type: {
1286
+ name: "String"
1287
+ }
1288
+ }, privateEndpointConnections: {
1289
+ serializedName: "properties.privateEndpointConnections",
1290
+ type: {
1291
+ name: "Sequence",
1292
+ element: {
1293
+ type: {
1294
+ name: "Composite",
1295
+ className: "PrivateEndpointConnection"
1296
+ }
1297
+ }
1298
+ }
1299
+ }, sku: {
1300
+ defaultValue: "Standard",
1301
+ serializedName: "properties.sku",
1302
+ type: {
1303
+ name: "String"
1304
+ }
1305
+ }, locations: {
1306
+ serializedName: "properties.locations",
1307
+ readOnly: true,
1308
+ type: {
1309
+ name: "Sequence",
1310
+ element: {
1311
+ type: {
1312
+ name: "Composite",
1313
+ className: "Location"
1314
+ }
1315
+ }
1316
+ }
1317
+ } })
1318
+ }
1319
+ };
1320
+ const Instance = {
1321
+ type: {
1322
+ name: "Composite",
1323
+ className: "Instance",
1324
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { provisioningState: {
1325
+ serializedName: "properties.provisioningState",
1326
+ readOnly: true,
1327
+ type: {
1328
+ name: "String"
1329
+ }
1330
+ }, accountName: {
1331
+ serializedName: "properties.accountName",
1332
+ readOnly: true,
1333
+ type: {
1334
+ name: "String"
1335
+ }
1336
+ }, iotHubs: {
1337
+ serializedName: "properties.iotHubs",
1338
+ type: {
1339
+ name: "Sequence",
1340
+ element: {
1341
+ type: {
1342
+ name: "Composite",
1343
+ className: "IotHubSettings"
1344
+ }
1345
+ }
1346
+ }
1347
+ }, enableDiagnostics: {
1348
+ serializedName: "properties.enableDiagnostics",
1349
+ type: {
1350
+ name: "Boolean"
1351
+ }
1352
+ }, diagnosticStorageProperties: {
1353
+ serializedName: "properties.diagnosticStorageProperties",
1354
+ type: {
1355
+ name: "Composite",
1356
+ className: "DiagnosticStorageProperties"
1357
+ }
1358
+ } })
1359
+ }
1360
+ };
1361
+ const GroupInformation = {
1362
+ type: {
1363
+ name: "Composite",
1364
+ className: "GroupInformation",
1365
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { groupId: {
1366
+ serializedName: "properties.groupId",
1367
+ readOnly: true,
1368
+ type: {
1369
+ name: "String"
1370
+ }
1371
+ }, requiredMembers: {
1372
+ serializedName: "properties.requiredMembers",
1373
+ readOnly: true,
1374
+ type: {
1375
+ name: "Sequence",
1376
+ element: {
1377
+ type: {
1378
+ name: "String"
1379
+ }
1380
+ }
1381
+ }
1382
+ }, requiredZoneNames: {
1383
+ serializedName: "properties.requiredZoneNames",
1384
+ type: {
1385
+ name: "Sequence",
1386
+ element: {
1387
+ type: {
1388
+ name: "String"
1389
+ }
1390
+ }
1391
+ }
1392
+ }, provisioningState: {
1393
+ serializedName: "properties.provisioningState",
1394
+ readOnly: true,
1395
+ type: {
1396
+ name: "String"
1397
+ }
1398
+ } })
1399
+ }
1400
+ };
1401
+
1402
+ var Mappers = /*#__PURE__*/Object.freeze({
1403
+ __proto__: null,
1404
+ CheckNameAvailabilityRequest: CheckNameAvailabilityRequest,
1405
+ CheckNameAvailabilityResponse: CheckNameAvailabilityResponse,
1406
+ ErrorResponse: ErrorResponse,
1407
+ ErrorDetail: ErrorDetail,
1408
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
1409
+ AccountList: AccountList,
1410
+ PrivateEndpoint: PrivateEndpoint,
1411
+ PrivateLinkServiceConnectionState: PrivateLinkServiceConnectionState,
1412
+ Resource: Resource,
1413
+ SystemData: SystemData,
1414
+ Location: Location,
1415
+ ManagedServiceIdentity: ManagedServiceIdentity,
1416
+ UserAssignedIdentity: UserAssignedIdentity,
1417
+ TagUpdate: TagUpdate,
1418
+ InstanceList: InstanceList,
1419
+ IotHubSettings: IotHubSettings,
1420
+ DiagnosticStorageProperties: DiagnosticStorageProperties,
1421
+ PrivateEndpointConnectionListResult: PrivateEndpointConnectionListResult,
1422
+ PrivateLinkResourceListResult: PrivateLinkResourceListResult,
1423
+ PrivateLinkResourceProperties: PrivateLinkResourceProperties,
1424
+ PrivateEndpointConnectionProxyListResult: PrivateEndpointConnectionProxyListResult,
1425
+ PrivateEndpointConnectionProxyProperties: PrivateEndpointConnectionProxyProperties,
1426
+ RemotePrivateEndpoint: RemotePrivateEndpoint,
1427
+ PrivateLinkServiceConnection: PrivateLinkServiceConnection,
1428
+ PrivateLinkServiceProxy: PrivateLinkServiceProxy,
1429
+ RemotePrivateEndpointConnection: RemotePrivateEndpointConnection,
1430
+ GroupConnectivityInformation: GroupConnectivityInformation,
1431
+ ConnectionDetails: ConnectionDetails,
1432
+ PrivateEndpointUpdate: PrivateEndpointUpdate,
1433
+ OperationListResult: OperationListResult,
1434
+ Operation: Operation,
1435
+ OperationDisplay: OperationDisplay,
1436
+ PrivateEndpointConnection: PrivateEndpointConnection,
1437
+ TrackedResource: TrackedResource,
1438
+ ProxyResource: ProxyResource,
1439
+ AccountUpdate: AccountUpdate,
1440
+ GroupInformationProperties: GroupInformationProperties,
1441
+ PrivateEndpointConnectionProxy: PrivateEndpointConnectionProxy,
1442
+ PrivateLinkServiceProxyRemotePrivateEndpointConnection: PrivateLinkServiceProxyRemotePrivateEndpointConnection,
1443
+ Account: Account,
1444
+ Instance: Instance,
1445
+ GroupInformation: GroupInformation
1446
+ });
1447
+
1448
+ /*
1449
+ * Copyright (c) Microsoft Corporation.
1450
+ * Licensed under the MIT License.
1451
+ *
1452
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1453
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1454
+ */
1455
+ const contentType = {
1456
+ parameterPath: ["options", "contentType"],
1457
+ mapper: {
1458
+ defaultValue: "application/json",
1459
+ isConstant: true,
1460
+ serializedName: "Content-Type",
1461
+ type: {
1462
+ name: "String"
1463
+ }
1464
+ }
1465
+ };
1466
+ const request = {
1467
+ parameterPath: "request",
1468
+ mapper: CheckNameAvailabilityRequest
1469
+ };
1470
+ const accept = {
1471
+ parameterPath: "accept",
1472
+ mapper: {
1473
+ defaultValue: "application/json",
1474
+ isConstant: true,
1475
+ serializedName: "Accept",
1476
+ type: {
1477
+ name: "String"
1478
+ }
1479
+ }
1480
+ };
1481
+ const $host = {
1482
+ parameterPath: "$host",
1483
+ mapper: {
1484
+ serializedName: "$host",
1485
+ required: true,
1486
+ type: {
1487
+ name: "String"
1488
+ }
1489
+ },
1490
+ skipEncoding: true
1491
+ };
1492
+ const apiVersion = {
1493
+ parameterPath: "apiVersion",
1494
+ mapper: {
1495
+ defaultValue: "2022-04-01-preview",
1496
+ isConstant: true,
1497
+ serializedName: "api-version",
1498
+ type: {
1499
+ name: "String"
1500
+ }
1501
+ }
1502
+ };
1503
+ const subscriptionId = {
1504
+ parameterPath: "subscriptionId",
1505
+ mapper: {
1506
+ serializedName: "subscriptionId",
1507
+ required: true,
1508
+ type: {
1509
+ name: "String"
1510
+ }
1511
+ }
1512
+ };
1513
+ const resourceGroupName = {
1514
+ parameterPath: "resourceGroupName",
1515
+ mapper: {
1516
+ serializedName: "resourceGroupName",
1517
+ required: true,
1518
+ type: {
1519
+ name: "String"
1520
+ }
1521
+ }
1522
+ };
1523
+ const accountName = {
1524
+ parameterPath: "accountName",
1525
+ mapper: {
1526
+ constraints: {
1527
+ Pattern: new RegExp("^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$"),
1528
+ MaxLength: 24,
1529
+ MinLength: 3
1530
+ },
1531
+ serializedName: "accountName",
1532
+ required: true,
1533
+ type: {
1534
+ name: "String"
1535
+ }
1536
+ }
1537
+ };
1538
+ const account = {
1539
+ parameterPath: "account",
1540
+ mapper: Account
1541
+ };
1542
+ const accountUpdatePayload = {
1543
+ parameterPath: "accountUpdatePayload",
1544
+ mapper: AccountUpdate
1545
+ };
1546
+ const nextLink = {
1547
+ parameterPath: "nextLink",
1548
+ mapper: {
1549
+ serializedName: "nextLink",
1550
+ required: true,
1551
+ type: {
1552
+ name: "String"
1553
+ }
1554
+ },
1555
+ skipEncoding: true
1556
+ };
1557
+ const instanceName = {
1558
+ parameterPath: "instanceName",
1559
+ mapper: {
1560
+ constraints: {
1561
+ Pattern: new RegExp("^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$"),
1562
+ MaxLength: 36,
1563
+ MinLength: 3
1564
+ },
1565
+ serializedName: "instanceName",
1566
+ required: true,
1567
+ type: {
1568
+ name: "String"
1569
+ }
1570
+ }
1571
+ };
1572
+ const instance = {
1573
+ parameterPath: "instance",
1574
+ mapper: Instance
1575
+ };
1576
+ const tagUpdatePayload = {
1577
+ parameterPath: "tagUpdatePayload",
1578
+ mapper: TagUpdate
1579
+ };
1580
+ const privateEndpointConnectionName = {
1581
+ parameterPath: "privateEndpointConnectionName",
1582
+ mapper: {
1583
+ serializedName: "privateEndpointConnectionName",
1584
+ required: true,
1585
+ type: {
1586
+ name: "String"
1587
+ }
1588
+ }
1589
+ };
1590
+ const privateEndpointConnection = {
1591
+ parameterPath: "privateEndpointConnection",
1592
+ mapper: PrivateEndpointConnection
1593
+ };
1594
+ const groupId = {
1595
+ parameterPath: "groupId",
1596
+ mapper: {
1597
+ serializedName: "groupId",
1598
+ required: true,
1599
+ type: {
1600
+ name: "String"
1601
+ }
1602
+ }
1603
+ };
1604
+ const privateEndpointConnectionProxy = {
1605
+ parameterPath: "privateEndpointConnectionProxy",
1606
+ mapper: PrivateEndpointConnectionProxy
1607
+ };
1608
+ const privateEndpointConnectionProxyId = {
1609
+ parameterPath: "privateEndpointConnectionProxyId",
1610
+ mapper: {
1611
+ serializedName: "privateEndpointConnectionProxyId",
1612
+ required: true,
1613
+ type: {
1614
+ name: "String"
1615
+ }
1616
+ }
1617
+ };
1618
+ const privateEndpointUpdate = {
1619
+ parameterPath: "privateEndpointUpdate",
1620
+ mapper: PrivateEndpointUpdate
1621
+ };
1622
+
1623
+ /*
1624
+ * Copyright (c) Microsoft Corporation.
1625
+ * Licensed under the MIT License.
1626
+ *
1627
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1628
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1629
+ */
1630
+ class LroImpl {
1631
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
1632
+ this.sendOperationFn = sendOperationFn;
1633
+ this.args = args;
1634
+ this.spec = spec;
1635
+ this.requestPath = requestPath;
1636
+ this.requestMethod = requestMethod;
1637
+ }
1638
+ sendInitialRequest() {
1639
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1640
+ return this.sendOperationFn(this.args, this.spec);
1641
+ });
1642
+ }
1643
+ sendPollRequest(path) {
1644
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1645
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
1646
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
1647
+ });
1648
+ }
1649
+ }
1650
+
1651
+ /*
1652
+ * Copyright (c) Microsoft Corporation.
1653
+ * Licensed under the MIT License.
1654
+ *
1655
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1656
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1657
+ */
1658
+ /// <reference lib="esnext.asynciterable" />
1659
+ /** Class containing Accounts operations. */
1660
+ class AccountsImpl {
1661
+ /**
1662
+ * Initialize a new instance of the class Accounts class.
1663
+ * @param client Reference to the service client
1664
+ */
1665
+ constructor(client) {
1666
+ this.client = client;
1667
+ }
1668
+ /**
1669
+ * Returns list of Accounts.
1670
+ * @param options The options parameters.
1671
+ */
1672
+ listBySubscription(options) {
1673
+ const iter = this.listBySubscriptionPagingAll(options);
1674
+ return {
1675
+ next() {
1676
+ return iter.next();
1677
+ },
1678
+ [Symbol.asyncIterator]() {
1679
+ return this;
1680
+ },
1681
+ byPage: () => {
1682
+ return this.listBySubscriptionPagingPage(options);
1683
+ }
1684
+ };
1685
+ }
1686
+ listBySubscriptionPagingPage(options) {
1687
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
1688
+ let result = yield tslib.__await(this._listBySubscription(options));
1689
+ yield yield tslib.__await(result.value || []);
1690
+ let continuationToken = result.nextLink;
1691
+ while (continuationToken) {
1692
+ result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
1693
+ continuationToken = result.nextLink;
1694
+ yield yield tslib.__await(result.value || []);
1695
+ }
1696
+ });
1697
+ }
1698
+ listBySubscriptionPagingAll(options) {
1699
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
1700
+ var e_1, _a;
1701
+ try {
1702
+ for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1703
+ const page = _c.value;
1704
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1705
+ }
1706
+ }
1707
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1708
+ finally {
1709
+ try {
1710
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1711
+ }
1712
+ finally { if (e_1) throw e_1.error; }
1713
+ }
1714
+ });
1715
+ }
1716
+ /**
1717
+ * Returns list of Accounts.
1718
+ * @param resourceGroupName The resource group name.
1719
+ * @param options The options parameters.
1720
+ */
1721
+ listByResourceGroup(resourceGroupName, options) {
1722
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
1723
+ return {
1724
+ next() {
1725
+ return iter.next();
1726
+ },
1727
+ [Symbol.asyncIterator]() {
1728
+ return this;
1729
+ },
1730
+ byPage: () => {
1731
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
1732
+ }
1733
+ };
1734
+ }
1735
+ listByResourceGroupPagingPage(resourceGroupName, options) {
1736
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
1737
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
1738
+ yield yield tslib.__await(result.value || []);
1739
+ let continuationToken = result.nextLink;
1740
+ while (continuationToken) {
1741
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
1742
+ continuationToken = result.nextLink;
1743
+ yield yield tslib.__await(result.value || []);
1744
+ }
1745
+ });
1746
+ }
1747
+ listByResourceGroupPagingAll(resourceGroupName, options) {
1748
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
1749
+ var e_2, _a;
1750
+ try {
1751
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1752
+ const page = _c.value;
1753
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1754
+ }
1755
+ }
1756
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
1757
+ finally {
1758
+ try {
1759
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1760
+ }
1761
+ finally { if (e_2) throw e_2.error; }
1762
+ }
1763
+ });
1764
+ }
1765
+ /**
1766
+ * Returns list of Accounts.
1767
+ * @param options The options parameters.
1768
+ */
1769
+ _listBySubscription(options) {
1770
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
1771
+ }
1772
+ /**
1773
+ * Returns list of Accounts.
1774
+ * @param resourceGroupName The resource group name.
1775
+ * @param options The options parameters.
1776
+ */
1777
+ _listByResourceGroup(resourceGroupName, options) {
1778
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
1779
+ }
1780
+ /**
1781
+ * Returns account details for the given account name.
1782
+ * @param resourceGroupName The resource group name.
1783
+ * @param accountName Account name.
1784
+ * @param options The options parameters.
1785
+ */
1786
+ get(resourceGroupName, accountName, options) {
1787
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, getOperationSpec$4);
1788
+ }
1789
+ /**
1790
+ * Checks whether account exists.
1791
+ * @param resourceGroupName The resource group name.
1792
+ * @param accountName Account name.
1793
+ * @param options The options parameters.
1794
+ */
1795
+ head(resourceGroupName, accountName, options) {
1796
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, headOperationSpec$1);
1797
+ }
1798
+ /**
1799
+ * Creates or updates Account.
1800
+ * @param resourceGroupName The resource group name.
1801
+ * @param accountName Account name.
1802
+ * @param account Account details.
1803
+ * @param options The options parameters.
1804
+ */
1805
+ beginCreate(resourceGroupName, accountName, account, options) {
1806
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1807
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1808
+ return this.client.sendOperationRequest(args, spec);
1809
+ });
1810
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1811
+ var _a;
1812
+ let currentRawResponse = undefined;
1813
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1814
+ const callback = (rawResponse, flatResponse) => {
1815
+ currentRawResponse = rawResponse;
1816
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1817
+ };
1818
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1819
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1820
+ return {
1821
+ flatResponse,
1822
+ rawResponse: {
1823
+ statusCode: currentRawResponse.status,
1824
+ body: currentRawResponse.parsedBody,
1825
+ headers: currentRawResponse.headers.toJSON()
1826
+ }
1827
+ };
1828
+ });
1829
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, account, options }, createOperationSpec$1);
1830
+ const poller = new coreLro.LroEngine(lro, {
1831
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1832
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1833
+ lroResourceLocationConfig: "azure-async-operation"
1834
+ });
1835
+ yield poller.poll();
1836
+ return poller;
1837
+ });
1838
+ }
1839
+ /**
1840
+ * Creates or updates Account.
1841
+ * @param resourceGroupName The resource group name.
1842
+ * @param accountName Account name.
1843
+ * @param account Account details.
1844
+ * @param options The options parameters.
1845
+ */
1846
+ beginCreateAndWait(resourceGroupName, accountName, account, options) {
1847
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1848
+ const poller = yield this.beginCreate(resourceGroupName, accountName, account, options);
1849
+ return poller.pollUntilDone();
1850
+ });
1851
+ }
1852
+ /**
1853
+ * Deletes account.
1854
+ * @param resourceGroupName The resource group name.
1855
+ * @param accountName Account name.
1856
+ * @param options The options parameters.
1857
+ */
1858
+ beginDelete(resourceGroupName, accountName, options) {
1859
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1860
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1861
+ return this.client.sendOperationRequest(args, spec);
1862
+ });
1863
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1864
+ var _a;
1865
+ let currentRawResponse = undefined;
1866
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1867
+ const callback = (rawResponse, flatResponse) => {
1868
+ currentRawResponse = rawResponse;
1869
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1870
+ };
1871
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1872
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1873
+ return {
1874
+ flatResponse,
1875
+ rawResponse: {
1876
+ statusCode: currentRawResponse.status,
1877
+ body: currentRawResponse.parsedBody,
1878
+ headers: currentRawResponse.headers.toJSON()
1879
+ }
1880
+ };
1881
+ });
1882
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, options }, deleteOperationSpec$3);
1883
+ const poller = new coreLro.LroEngine(lro, {
1884
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1885
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1886
+ lroResourceLocationConfig: "location"
1887
+ });
1888
+ yield poller.poll();
1889
+ return poller;
1890
+ });
1891
+ }
1892
+ /**
1893
+ * Deletes account.
1894
+ * @param resourceGroupName The resource group name.
1895
+ * @param accountName Account name.
1896
+ * @param options The options parameters.
1897
+ */
1898
+ beginDeleteAndWait(resourceGroupName, accountName, options) {
1899
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1900
+ const poller = yield this.beginDelete(resourceGroupName, accountName, options);
1901
+ return poller.pollUntilDone();
1902
+ });
1903
+ }
1904
+ /**
1905
+ * Updates account's patchable properties
1906
+ * @param resourceGroupName The resource group name.
1907
+ * @param accountName Account name.
1908
+ * @param accountUpdatePayload Updated Account.
1909
+ * @param options The options parameters.
1910
+ */
1911
+ beginUpdate(resourceGroupName, accountName, accountUpdatePayload, options) {
1912
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1913
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1914
+ return this.client.sendOperationRequest(args, spec);
1915
+ });
1916
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1917
+ var _a;
1918
+ let currentRawResponse = undefined;
1919
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1920
+ const callback = (rawResponse, flatResponse) => {
1921
+ currentRawResponse = rawResponse;
1922
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1923
+ };
1924
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1925
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1926
+ return {
1927
+ flatResponse,
1928
+ rawResponse: {
1929
+ statusCode: currentRawResponse.status,
1930
+ body: currentRawResponse.parsedBody,
1931
+ headers: currentRawResponse.headers.toJSON()
1932
+ }
1933
+ };
1934
+ });
1935
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, accountUpdatePayload, options }, updateOperationSpec$1);
1936
+ const poller = new coreLro.LroEngine(lro, {
1937
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1938
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1939
+ lroResourceLocationConfig: "azure-async-operation"
1940
+ });
1941
+ yield poller.poll();
1942
+ return poller;
1943
+ });
1944
+ }
1945
+ /**
1946
+ * Updates account's patchable properties
1947
+ * @param resourceGroupName The resource group name.
1948
+ * @param accountName Account name.
1949
+ * @param accountUpdatePayload Updated Account.
1950
+ * @param options The options parameters.
1951
+ */
1952
+ beginUpdateAndWait(resourceGroupName, accountName, accountUpdatePayload, options) {
1953
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1954
+ const poller = yield this.beginUpdate(resourceGroupName, accountName, accountUpdatePayload, options);
1955
+ return poller.pollUntilDone();
1956
+ });
1957
+ }
1958
+ /**
1959
+ * ListBySubscriptionNext
1960
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
1961
+ * @param options The options parameters.
1962
+ */
1963
+ _listBySubscriptionNext(nextLink, options) {
1964
+ return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
1965
+ }
1966
+ /**
1967
+ * ListByResourceGroupNext
1968
+ * @param resourceGroupName The resource group name.
1969
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
1970
+ * @param options The options parameters.
1971
+ */
1972
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
1973
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
1974
+ }
1975
+ }
1976
+ // Operation Specifications
1977
+ const serializer$6 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1978
+ const listBySubscriptionOperationSpec = {
1979
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/accounts",
1980
+ httpMethod: "GET",
1981
+ responses: {
1982
+ 200: {
1983
+ bodyMapper: AccountList
1984
+ },
1985
+ default: {
1986
+ bodyMapper: ErrorResponse
1987
+ }
1988
+ },
1989
+ queryParameters: [apiVersion],
1990
+ urlParameters: [$host, subscriptionId],
1991
+ headerParameters: [accept],
1992
+ serializer: serializer$6
1993
+ };
1994
+ const listByResourceGroupOperationSpec = {
1995
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts",
1996
+ httpMethod: "GET",
1997
+ responses: {
1998
+ 200: {
1999
+ bodyMapper: AccountList
2000
+ },
2001
+ default: {
2002
+ bodyMapper: ErrorResponse
2003
+ }
2004
+ },
2005
+ queryParameters: [apiVersion],
2006
+ urlParameters: [
2007
+ $host,
2008
+ subscriptionId,
2009
+ resourceGroupName
2010
+ ],
2011
+ headerParameters: [accept],
2012
+ serializer: serializer$6
2013
+ };
2014
+ const getOperationSpec$4 = {
2015
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}",
2016
+ httpMethod: "GET",
2017
+ responses: {
2018
+ 200: {
2019
+ bodyMapper: Account
2020
+ },
2021
+ default: {
2022
+ bodyMapper: ErrorResponse
2023
+ }
2024
+ },
2025
+ queryParameters: [apiVersion],
2026
+ urlParameters: [
2027
+ $host,
2028
+ subscriptionId,
2029
+ resourceGroupName,
2030
+ accountName
2031
+ ],
2032
+ headerParameters: [accept],
2033
+ serializer: serializer$6
2034
+ };
2035
+ const headOperationSpec$1 = {
2036
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}",
2037
+ httpMethod: "HEAD",
2038
+ responses: {
2039
+ 200: {},
2040
+ default: {
2041
+ bodyMapper: ErrorResponse
2042
+ }
2043
+ },
2044
+ queryParameters: [apiVersion],
2045
+ urlParameters: [
2046
+ $host,
2047
+ subscriptionId,
2048
+ resourceGroupName,
2049
+ accountName
2050
+ ],
2051
+ headerParameters: [accept],
2052
+ serializer: serializer$6
2053
+ };
2054
+ const createOperationSpec$1 = {
2055
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}",
2056
+ httpMethod: "PUT",
2057
+ responses: {
2058
+ 200: {
2059
+ bodyMapper: Account
2060
+ },
2061
+ 201: {
2062
+ bodyMapper: Account
2063
+ },
2064
+ 202: {
2065
+ bodyMapper: Account
2066
+ },
2067
+ 204: {
2068
+ bodyMapper: Account
2069
+ },
2070
+ default: {
2071
+ bodyMapper: ErrorResponse
2072
+ }
2073
+ },
2074
+ requestBody: account,
2075
+ queryParameters: [apiVersion],
2076
+ urlParameters: [
2077
+ $host,
2078
+ subscriptionId,
2079
+ resourceGroupName,
2080
+ accountName
2081
+ ],
2082
+ headerParameters: [contentType, accept],
2083
+ mediaType: "json",
2084
+ serializer: serializer$6
2085
+ };
2086
+ const deleteOperationSpec$3 = {
2087
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}",
2088
+ httpMethod: "DELETE",
2089
+ responses: {
2090
+ 200: {},
2091
+ 201: {},
2092
+ 202: {},
2093
+ 204: {},
2094
+ default: {
2095
+ bodyMapper: ErrorResponse
2096
+ }
2097
+ },
2098
+ queryParameters: [apiVersion],
2099
+ urlParameters: [
2100
+ $host,
2101
+ subscriptionId,
2102
+ resourceGroupName,
2103
+ accountName
2104
+ ],
2105
+ headerParameters: [accept],
2106
+ serializer: serializer$6
2107
+ };
2108
+ const updateOperationSpec$1 = {
2109
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}",
2110
+ httpMethod: "PATCH",
2111
+ responses: {
2112
+ 200: {
2113
+ bodyMapper: Account
2114
+ },
2115
+ 201: {
2116
+ bodyMapper: Account
2117
+ },
2118
+ 202: {
2119
+ bodyMapper: Account
2120
+ },
2121
+ 204: {
2122
+ bodyMapper: Account
2123
+ },
2124
+ default: {
2125
+ bodyMapper: ErrorResponse
2126
+ }
2127
+ },
2128
+ requestBody: accountUpdatePayload,
2129
+ queryParameters: [apiVersion],
2130
+ urlParameters: [
2131
+ $host,
2132
+ subscriptionId,
2133
+ resourceGroupName,
2134
+ accountName
2135
+ ],
2136
+ headerParameters: [contentType, accept],
2137
+ mediaType: "json",
2138
+ serializer: serializer$6
2139
+ };
2140
+ const listBySubscriptionNextOperationSpec = {
2141
+ path: "{nextLink}",
2142
+ httpMethod: "GET",
2143
+ responses: {
2144
+ 200: {
2145
+ bodyMapper: AccountList
2146
+ },
2147
+ default: {
2148
+ bodyMapper: ErrorResponse
2149
+ }
2150
+ },
2151
+ queryParameters: [apiVersion],
2152
+ urlParameters: [
2153
+ $host,
2154
+ subscriptionId,
2155
+ nextLink
2156
+ ],
2157
+ headerParameters: [accept],
2158
+ serializer: serializer$6
2159
+ };
2160
+ const listByResourceGroupNextOperationSpec = {
2161
+ path: "{nextLink}",
2162
+ httpMethod: "GET",
2163
+ responses: {
2164
+ 200: {
2165
+ bodyMapper: AccountList
2166
+ },
2167
+ default: {
2168
+ bodyMapper: ErrorResponse
2169
+ }
2170
+ },
2171
+ queryParameters: [apiVersion],
2172
+ urlParameters: [
2173
+ $host,
2174
+ subscriptionId,
2175
+ resourceGroupName,
2176
+ nextLink
2177
+ ],
2178
+ headerParameters: [accept],
2179
+ serializer: serializer$6
2180
+ };
2181
+
2182
+ /*
2183
+ * Copyright (c) Microsoft Corporation.
2184
+ * Licensed under the MIT License.
2185
+ *
2186
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2187
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2188
+ */
2189
+ /// <reference lib="esnext.asynciterable" />
2190
+ /** Class containing Instances operations. */
2191
+ class InstancesImpl {
2192
+ /**
2193
+ * Initialize a new instance of the class Instances class.
2194
+ * @param client Reference to the service client
2195
+ */
2196
+ constructor(client) {
2197
+ this.client = client;
2198
+ }
2199
+ /**
2200
+ * Returns instances for the given account name.
2201
+ * @param resourceGroupName The resource group name.
2202
+ * @param accountName Account name.
2203
+ * @param options The options parameters.
2204
+ */
2205
+ listByAccount(resourceGroupName, accountName, options) {
2206
+ const iter = this.listByAccountPagingAll(resourceGroupName, accountName, options);
2207
+ return {
2208
+ next() {
2209
+ return iter.next();
2210
+ },
2211
+ [Symbol.asyncIterator]() {
2212
+ return this;
2213
+ },
2214
+ byPage: () => {
2215
+ return this.listByAccountPagingPage(resourceGroupName, accountName, options);
2216
+ }
2217
+ };
2218
+ }
2219
+ listByAccountPagingPage(resourceGroupName, accountName, options) {
2220
+ return tslib.__asyncGenerator(this, arguments, function* listByAccountPagingPage_1() {
2221
+ let result = yield tslib.__await(this._listByAccount(resourceGroupName, accountName, options));
2222
+ yield yield tslib.__await(result.value || []);
2223
+ let continuationToken = result.nextLink;
2224
+ while (continuationToken) {
2225
+ result = yield tslib.__await(this._listByAccountNext(resourceGroupName, accountName, continuationToken, options));
2226
+ continuationToken = result.nextLink;
2227
+ yield yield tslib.__await(result.value || []);
2228
+ }
2229
+ });
2230
+ }
2231
+ listByAccountPagingAll(resourceGroupName, accountName, options) {
2232
+ return tslib.__asyncGenerator(this, arguments, function* listByAccountPagingAll_1() {
2233
+ var e_1, _a;
2234
+ try {
2235
+ for (var _b = tslib.__asyncValues(this.listByAccountPagingPage(resourceGroupName, accountName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2236
+ const page = _c.value;
2237
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2238
+ }
2239
+ }
2240
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2241
+ finally {
2242
+ try {
2243
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2244
+ }
2245
+ finally { if (e_1) throw e_1.error; }
2246
+ }
2247
+ });
2248
+ }
2249
+ /**
2250
+ * Returns instances for the given account name.
2251
+ * @param resourceGroupName The resource group name.
2252
+ * @param accountName Account name.
2253
+ * @param options The options parameters.
2254
+ */
2255
+ _listByAccount(resourceGroupName, accountName, options) {
2256
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listByAccountOperationSpec$3);
2257
+ }
2258
+ /**
2259
+ * Returns instance details for the given instance and account name.
2260
+ * @param resourceGroupName The resource group name.
2261
+ * @param accountName Account name.
2262
+ * @param instanceName Instance name.
2263
+ * @param options The options parameters.
2264
+ */
2265
+ get(resourceGroupName, accountName, instanceName, options) {
2266
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, instanceName, options }, getOperationSpec$3);
2267
+ }
2268
+ /**
2269
+ * Checks whether instance exists.
2270
+ * @param resourceGroupName The resource group name.
2271
+ * @param accountName Account name.
2272
+ * @param instanceName Instance name.
2273
+ * @param options The options parameters.
2274
+ */
2275
+ head(resourceGroupName, accountName, instanceName, options) {
2276
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, instanceName, options }, headOperationSpec);
2277
+ }
2278
+ /**
2279
+ * Creates or updates instance.
2280
+ * @param resourceGroupName The resource group name.
2281
+ * @param accountName Account name.
2282
+ * @param instanceName Instance name.
2283
+ * @param instance Instance details.
2284
+ * @param options The options parameters.
2285
+ */
2286
+ beginCreate(resourceGroupName, accountName, instanceName, instance, options) {
2287
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2288
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2289
+ return this.client.sendOperationRequest(args, spec);
2290
+ });
2291
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2292
+ var _a;
2293
+ let currentRawResponse = undefined;
2294
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2295
+ const callback = (rawResponse, flatResponse) => {
2296
+ currentRawResponse = rawResponse;
2297
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2298
+ };
2299
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2300
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2301
+ return {
2302
+ flatResponse,
2303
+ rawResponse: {
2304
+ statusCode: currentRawResponse.status,
2305
+ body: currentRawResponse.parsedBody,
2306
+ headers: currentRawResponse.headers.toJSON()
2307
+ }
2308
+ };
2309
+ });
2310
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, instanceName, instance, options }, createOperationSpec);
2311
+ const poller = new coreLro.LroEngine(lro, {
2312
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2313
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2314
+ lroResourceLocationConfig: "azure-async-operation"
2315
+ });
2316
+ yield poller.poll();
2317
+ return poller;
2318
+ });
2319
+ }
2320
+ /**
2321
+ * Creates or updates instance.
2322
+ * @param resourceGroupName The resource group name.
2323
+ * @param accountName Account name.
2324
+ * @param instanceName Instance name.
2325
+ * @param instance Instance details.
2326
+ * @param options The options parameters.
2327
+ */
2328
+ beginCreateAndWait(resourceGroupName, accountName, instanceName, instance, options) {
2329
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2330
+ const poller = yield this.beginCreate(resourceGroupName, accountName, instanceName, instance, options);
2331
+ return poller.pollUntilDone();
2332
+ });
2333
+ }
2334
+ /**
2335
+ * Deletes instance.
2336
+ * @param resourceGroupName The resource group name.
2337
+ * @param accountName Account name.
2338
+ * @param instanceName Instance name.
2339
+ * @param options The options parameters.
2340
+ */
2341
+ beginDelete(resourceGroupName, accountName, instanceName, options) {
2342
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2343
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2344
+ return this.client.sendOperationRequest(args, spec);
2345
+ });
2346
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2347
+ var _a;
2348
+ let currentRawResponse = undefined;
2349
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2350
+ const callback = (rawResponse, flatResponse) => {
2351
+ currentRawResponse = rawResponse;
2352
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2353
+ };
2354
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2355
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2356
+ return {
2357
+ flatResponse,
2358
+ rawResponse: {
2359
+ statusCode: currentRawResponse.status,
2360
+ body: currentRawResponse.parsedBody,
2361
+ headers: currentRawResponse.headers.toJSON()
2362
+ }
2363
+ };
2364
+ });
2365
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, instanceName, options }, deleteOperationSpec$2);
2366
+ const poller = new coreLro.LroEngine(lro, {
2367
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2368
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2369
+ lroResourceLocationConfig: "location"
2370
+ });
2371
+ yield poller.poll();
2372
+ return poller;
2373
+ });
2374
+ }
2375
+ /**
2376
+ * Deletes instance.
2377
+ * @param resourceGroupName The resource group name.
2378
+ * @param accountName Account name.
2379
+ * @param instanceName Instance name.
2380
+ * @param options The options parameters.
2381
+ */
2382
+ beginDeleteAndWait(resourceGroupName, accountName, instanceName, options) {
2383
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2384
+ const poller = yield this.beginDelete(resourceGroupName, accountName, instanceName, options);
2385
+ return poller.pollUntilDone();
2386
+ });
2387
+ }
2388
+ /**
2389
+ * Updates instance's tags.
2390
+ * @param resourceGroupName The resource group name.
2391
+ * @param accountName Account name.
2392
+ * @param instanceName Instance name.
2393
+ * @param tagUpdatePayload Updated tags.
2394
+ * @param options The options parameters.
2395
+ */
2396
+ update(resourceGroupName, accountName, instanceName, tagUpdatePayload, options) {
2397
+ return this.client.sendOperationRequest({
2398
+ resourceGroupName,
2399
+ accountName,
2400
+ instanceName,
2401
+ tagUpdatePayload,
2402
+ options
2403
+ }, updateOperationSpec);
2404
+ }
2405
+ /**
2406
+ * ListByAccountNext
2407
+ * @param resourceGroupName The resource group name.
2408
+ * @param accountName Account name.
2409
+ * @param nextLink The nextLink from the previous successful call to the ListByAccount method.
2410
+ * @param options The options parameters.
2411
+ */
2412
+ _listByAccountNext(resourceGroupName, accountName, nextLink, options) {
2413
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, nextLink, options }, listByAccountNextOperationSpec);
2414
+ }
2415
+ }
2416
+ // Operation Specifications
2417
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2418
+ const listByAccountOperationSpec$3 = {
2419
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances",
2420
+ httpMethod: "GET",
2421
+ responses: {
2422
+ 200: {
2423
+ bodyMapper: InstanceList
2424
+ },
2425
+ default: {
2426
+ bodyMapper: ErrorResponse
2427
+ }
2428
+ },
2429
+ queryParameters: [apiVersion],
2430
+ urlParameters: [
2431
+ $host,
2432
+ subscriptionId,
2433
+ resourceGroupName,
2434
+ accountName
2435
+ ],
2436
+ headerParameters: [accept],
2437
+ serializer: serializer$5
2438
+ };
2439
+ const getOperationSpec$3 = {
2440
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}",
2441
+ httpMethod: "GET",
2442
+ responses: {
2443
+ 200: {
2444
+ bodyMapper: Instance
2445
+ },
2446
+ default: {
2447
+ bodyMapper: ErrorResponse
2448
+ }
2449
+ },
2450
+ queryParameters: [apiVersion],
2451
+ urlParameters: [
2452
+ $host,
2453
+ subscriptionId,
2454
+ resourceGroupName,
2455
+ accountName,
2456
+ instanceName
2457
+ ],
2458
+ headerParameters: [accept],
2459
+ serializer: serializer$5
2460
+ };
2461
+ const headOperationSpec = {
2462
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}",
2463
+ httpMethod: "HEAD",
2464
+ responses: {
2465
+ 200: {},
2466
+ default: {
2467
+ bodyMapper: ErrorResponse
2468
+ }
2469
+ },
2470
+ queryParameters: [apiVersion],
2471
+ urlParameters: [
2472
+ $host,
2473
+ subscriptionId,
2474
+ resourceGroupName,
2475
+ accountName,
2476
+ instanceName
2477
+ ],
2478
+ headerParameters: [accept],
2479
+ serializer: serializer$5
2480
+ };
2481
+ const createOperationSpec = {
2482
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}",
2483
+ httpMethod: "PUT",
2484
+ responses: {
2485
+ 200: {
2486
+ bodyMapper: Instance
2487
+ },
2488
+ 201: {
2489
+ bodyMapper: Instance
2490
+ },
2491
+ 202: {
2492
+ bodyMapper: Instance
2493
+ },
2494
+ 204: {
2495
+ bodyMapper: Instance
2496
+ },
2497
+ default: {
2498
+ bodyMapper: ErrorResponse
2499
+ }
2500
+ },
2501
+ requestBody: instance,
2502
+ queryParameters: [apiVersion],
2503
+ urlParameters: [
2504
+ $host,
2505
+ subscriptionId,
2506
+ resourceGroupName,
2507
+ accountName,
2508
+ instanceName
2509
+ ],
2510
+ headerParameters: [contentType, accept],
2511
+ mediaType: "json",
2512
+ serializer: serializer$5
2513
+ };
2514
+ const deleteOperationSpec$2 = {
2515
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}",
2516
+ httpMethod: "DELETE",
2517
+ responses: {
2518
+ 200: {},
2519
+ 201: {},
2520
+ 202: {},
2521
+ 204: {},
2522
+ default: {
2523
+ bodyMapper: ErrorResponse
2524
+ }
2525
+ },
2526
+ queryParameters: [apiVersion],
2527
+ urlParameters: [
2528
+ $host,
2529
+ subscriptionId,
2530
+ resourceGroupName,
2531
+ accountName,
2532
+ instanceName
2533
+ ],
2534
+ headerParameters: [accept],
2535
+ serializer: serializer$5
2536
+ };
2537
+ const updateOperationSpec = {
2538
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}",
2539
+ httpMethod: "PATCH",
2540
+ responses: {
2541
+ 200: {
2542
+ bodyMapper: Instance
2543
+ },
2544
+ default: {
2545
+ bodyMapper: ErrorResponse
2546
+ }
2547
+ },
2548
+ requestBody: tagUpdatePayload,
2549
+ queryParameters: [apiVersion],
2550
+ urlParameters: [
2551
+ $host,
2552
+ subscriptionId,
2553
+ resourceGroupName,
2554
+ accountName,
2555
+ instanceName
2556
+ ],
2557
+ headerParameters: [contentType, accept],
2558
+ mediaType: "json",
2559
+ serializer: serializer$5
2560
+ };
2561
+ const listByAccountNextOperationSpec = {
2562
+ path: "{nextLink}",
2563
+ httpMethod: "GET",
2564
+ responses: {
2565
+ 200: {
2566
+ bodyMapper: InstanceList
2567
+ },
2568
+ default: {
2569
+ bodyMapper: ErrorResponse
2570
+ }
2571
+ },
2572
+ queryParameters: [apiVersion],
2573
+ urlParameters: [
2574
+ $host,
2575
+ subscriptionId,
2576
+ resourceGroupName,
2577
+ accountName,
2578
+ nextLink
2579
+ ],
2580
+ headerParameters: [accept],
2581
+ serializer: serializer$5
2582
+ };
2583
+
2584
+ /*
2585
+ * Copyright (c) Microsoft Corporation.
2586
+ * Licensed under the MIT License.
2587
+ *
2588
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2589
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2590
+ */
2591
+ /// <reference lib="esnext.asynciterable" />
2592
+ /** Class containing PrivateEndpointConnections operations. */
2593
+ class PrivateEndpointConnectionsImpl {
2594
+ /**
2595
+ * Initialize a new instance of the class PrivateEndpointConnections class.
2596
+ * @param client Reference to the service client
2597
+ */
2598
+ constructor(client) {
2599
+ this.client = client;
2600
+ }
2601
+ /**
2602
+ * List all private endpoint connections in a device update account.
2603
+ * @param resourceGroupName The resource group name.
2604
+ * @param accountName Account name.
2605
+ * @param options The options parameters.
2606
+ */
2607
+ listByAccount(resourceGroupName, accountName, options) {
2608
+ const iter = this.listByAccountPagingAll(resourceGroupName, accountName, options);
2609
+ return {
2610
+ next() {
2611
+ return iter.next();
2612
+ },
2613
+ [Symbol.asyncIterator]() {
2614
+ return this;
2615
+ },
2616
+ byPage: () => {
2617
+ return this.listByAccountPagingPage(resourceGroupName, accountName, options);
2618
+ }
2619
+ };
2620
+ }
2621
+ listByAccountPagingPage(resourceGroupName, accountName, options) {
2622
+ return tslib.__asyncGenerator(this, arguments, function* listByAccountPagingPage_1() {
2623
+ let result = yield tslib.__await(this._listByAccount(resourceGroupName, accountName, options));
2624
+ yield yield tslib.__await(result.value || []);
2625
+ });
2626
+ }
2627
+ listByAccountPagingAll(resourceGroupName, accountName, options) {
2628
+ return tslib.__asyncGenerator(this, arguments, function* listByAccountPagingAll_1() {
2629
+ var e_1, _a;
2630
+ try {
2631
+ for (var _b = tslib.__asyncValues(this.listByAccountPagingPage(resourceGroupName, accountName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2632
+ const page = _c.value;
2633
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2634
+ }
2635
+ }
2636
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2637
+ finally {
2638
+ try {
2639
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2640
+ }
2641
+ finally { if (e_1) throw e_1.error; }
2642
+ }
2643
+ });
2644
+ }
2645
+ /**
2646
+ * List all private endpoint connections in a device update account.
2647
+ * @param resourceGroupName The resource group name.
2648
+ * @param accountName Account name.
2649
+ * @param options The options parameters.
2650
+ */
2651
+ _listByAccount(resourceGroupName, accountName, options) {
2652
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listByAccountOperationSpec$2);
2653
+ }
2654
+ /**
2655
+ * Get the specified private endpoint connection associated with the device update account.
2656
+ * @param resourceGroupName The resource group name.
2657
+ * @param accountName Account name.
2658
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
2659
+ * Azure resource
2660
+ * @param options The options parameters.
2661
+ */
2662
+ get(resourceGroupName, accountName, privateEndpointConnectionName, options) {
2663
+ return this.client.sendOperationRequest({
2664
+ resourceGroupName,
2665
+ accountName,
2666
+ privateEndpointConnectionName,
2667
+ options
2668
+ }, getOperationSpec$2);
2669
+ }
2670
+ /**
2671
+ * Update the state of specified private endpoint connection associated with the device update account.
2672
+ * @param resourceGroupName The resource group name.
2673
+ * @param accountName Account name.
2674
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
2675
+ * Azure resource
2676
+ * @param privateEndpointConnection The parameters for creating a private endpoint connection.
2677
+ * @param options The options parameters.
2678
+ */
2679
+ beginCreateOrUpdate(resourceGroupName, accountName, privateEndpointConnectionName, privateEndpointConnection, options) {
2680
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2681
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2682
+ return this.client.sendOperationRequest(args, spec);
2683
+ });
2684
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2685
+ var _a;
2686
+ let currentRawResponse = undefined;
2687
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2688
+ const callback = (rawResponse, flatResponse) => {
2689
+ currentRawResponse = rawResponse;
2690
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2691
+ };
2692
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2693
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2694
+ return {
2695
+ flatResponse,
2696
+ rawResponse: {
2697
+ statusCode: currentRawResponse.status,
2698
+ body: currentRawResponse.parsedBody,
2699
+ headers: currentRawResponse.headers.toJSON()
2700
+ }
2701
+ };
2702
+ });
2703
+ const lro = new LroImpl(sendOperation, {
2704
+ resourceGroupName,
2705
+ accountName,
2706
+ privateEndpointConnectionName,
2707
+ privateEndpointConnection,
2708
+ options
2709
+ }, createOrUpdateOperationSpec$1);
2710
+ const poller = new coreLro.LroEngine(lro, {
2711
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2712
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2713
+ lroResourceLocationConfig: "azure-async-operation"
2714
+ });
2715
+ yield poller.poll();
2716
+ return poller;
2717
+ });
2718
+ }
2719
+ /**
2720
+ * Update the state of specified private endpoint connection associated with the device update account.
2721
+ * @param resourceGroupName The resource group name.
2722
+ * @param accountName Account name.
2723
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
2724
+ * Azure resource
2725
+ * @param privateEndpointConnection The parameters for creating a private endpoint connection.
2726
+ * @param options The options parameters.
2727
+ */
2728
+ beginCreateOrUpdateAndWait(resourceGroupName, accountName, privateEndpointConnectionName, privateEndpointConnection, options) {
2729
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2730
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, accountName, privateEndpointConnectionName, privateEndpointConnection, options);
2731
+ return poller.pollUntilDone();
2732
+ });
2733
+ }
2734
+ /**
2735
+ * Deletes the specified private endpoint connection associated with the device update account.
2736
+ * @param resourceGroupName The resource group name.
2737
+ * @param accountName Account name.
2738
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
2739
+ * Azure resource
2740
+ * @param options The options parameters.
2741
+ */
2742
+ beginDelete(resourceGroupName, accountName, privateEndpointConnectionName, options) {
2743
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2744
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2745
+ return this.client.sendOperationRequest(args, spec);
2746
+ });
2747
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2748
+ var _a;
2749
+ let currentRawResponse = undefined;
2750
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2751
+ const callback = (rawResponse, flatResponse) => {
2752
+ currentRawResponse = rawResponse;
2753
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2754
+ };
2755
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2756
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2757
+ return {
2758
+ flatResponse,
2759
+ rawResponse: {
2760
+ statusCode: currentRawResponse.status,
2761
+ body: currentRawResponse.parsedBody,
2762
+ headers: currentRawResponse.headers.toJSON()
2763
+ }
2764
+ };
2765
+ });
2766
+ const lro = new LroImpl(sendOperation, {
2767
+ resourceGroupName,
2768
+ accountName,
2769
+ privateEndpointConnectionName,
2770
+ options
2771
+ }, deleteOperationSpec$1);
2772
+ const poller = new coreLro.LroEngine(lro, {
2773
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2774
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2775
+ lroResourceLocationConfig: "location"
2776
+ });
2777
+ yield poller.poll();
2778
+ return poller;
2779
+ });
2780
+ }
2781
+ /**
2782
+ * Deletes the specified private endpoint connection associated with the device update account.
2783
+ * @param resourceGroupName The resource group name.
2784
+ * @param accountName Account name.
2785
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
2786
+ * Azure resource
2787
+ * @param options The options parameters.
2788
+ */
2789
+ beginDeleteAndWait(resourceGroupName, accountName, privateEndpointConnectionName, options) {
2790
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2791
+ const poller = yield this.beginDelete(resourceGroupName, accountName, privateEndpointConnectionName, options);
2792
+ return poller.pollUntilDone();
2793
+ });
2794
+ }
2795
+ }
2796
+ // Operation Specifications
2797
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2798
+ const listByAccountOperationSpec$2 = {
2799
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections",
2800
+ httpMethod: "GET",
2801
+ responses: {
2802
+ 200: {
2803
+ bodyMapper: PrivateEndpointConnectionListResult
2804
+ },
2805
+ default: {
2806
+ bodyMapper: ErrorResponse
2807
+ }
2808
+ },
2809
+ queryParameters: [apiVersion],
2810
+ urlParameters: [
2811
+ $host,
2812
+ subscriptionId,
2813
+ resourceGroupName,
2814
+ accountName
2815
+ ],
2816
+ headerParameters: [accept],
2817
+ serializer: serializer$4
2818
+ };
2819
+ const getOperationSpec$2 = {
2820
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
2821
+ httpMethod: "GET",
2822
+ responses: {
2823
+ 200: {
2824
+ bodyMapper: PrivateEndpointConnection
2825
+ },
2826
+ default: {
2827
+ bodyMapper: ErrorResponse
2828
+ }
2829
+ },
2830
+ queryParameters: [apiVersion],
2831
+ urlParameters: [
2832
+ $host,
2833
+ subscriptionId,
2834
+ resourceGroupName,
2835
+ accountName,
2836
+ privateEndpointConnectionName
2837
+ ],
2838
+ headerParameters: [accept],
2839
+ serializer: serializer$4
2840
+ };
2841
+ const createOrUpdateOperationSpec$1 = {
2842
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
2843
+ httpMethod: "PUT",
2844
+ responses: {
2845
+ 200: {
2846
+ bodyMapper: PrivateEndpointConnection
2847
+ },
2848
+ 201: {
2849
+ bodyMapper: PrivateEndpointConnection
2850
+ },
2851
+ 202: {
2852
+ bodyMapper: PrivateEndpointConnection
2853
+ },
2854
+ 204: {
2855
+ bodyMapper: PrivateEndpointConnection
2856
+ },
2857
+ default: {
2858
+ bodyMapper: ErrorResponse
2859
+ }
2860
+ },
2861
+ requestBody: privateEndpointConnection,
2862
+ queryParameters: [apiVersion],
2863
+ urlParameters: [
2864
+ $host,
2865
+ subscriptionId,
2866
+ resourceGroupName,
2867
+ accountName,
2868
+ privateEndpointConnectionName
2869
+ ],
2870
+ headerParameters: [contentType, accept],
2871
+ mediaType: "json",
2872
+ serializer: serializer$4
2873
+ };
2874
+ const deleteOperationSpec$1 = {
2875
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
2876
+ httpMethod: "DELETE",
2877
+ responses: {
2878
+ 200: {},
2879
+ 201: {},
2880
+ 202: {},
2881
+ 204: {},
2882
+ default: {
2883
+ bodyMapper: ErrorResponse
2884
+ }
2885
+ },
2886
+ queryParameters: [apiVersion],
2887
+ urlParameters: [
2888
+ $host,
2889
+ subscriptionId,
2890
+ resourceGroupName,
2891
+ accountName,
2892
+ privateEndpointConnectionName
2893
+ ],
2894
+ headerParameters: [accept],
2895
+ serializer: serializer$4
2896
+ };
2897
+
2898
+ /*
2899
+ * Copyright (c) Microsoft Corporation.
2900
+ * Licensed under the MIT License.
2901
+ *
2902
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2903
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2904
+ */
2905
+ /// <reference lib="esnext.asynciterable" />
2906
+ /** Class containing PrivateLinkResources operations. */
2907
+ class PrivateLinkResourcesImpl {
2908
+ /**
2909
+ * Initialize a new instance of the class PrivateLinkResources class.
2910
+ * @param client Reference to the service client
2911
+ */
2912
+ constructor(client) {
2913
+ this.client = client;
2914
+ }
2915
+ /**
2916
+ * List all private link resources in a device update account.
2917
+ * @param resourceGroupName The resource group name.
2918
+ * @param accountName Account name.
2919
+ * @param options The options parameters.
2920
+ */
2921
+ listByAccount(resourceGroupName, accountName, options) {
2922
+ const iter = this.listByAccountPagingAll(resourceGroupName, accountName, options);
2923
+ return {
2924
+ next() {
2925
+ return iter.next();
2926
+ },
2927
+ [Symbol.asyncIterator]() {
2928
+ return this;
2929
+ },
2930
+ byPage: () => {
2931
+ return this.listByAccountPagingPage(resourceGroupName, accountName, options);
2932
+ }
2933
+ };
2934
+ }
2935
+ listByAccountPagingPage(resourceGroupName, accountName, options) {
2936
+ return tslib.__asyncGenerator(this, arguments, function* listByAccountPagingPage_1() {
2937
+ let result = yield tslib.__await(this._listByAccount(resourceGroupName, accountName, options));
2938
+ yield yield tslib.__await(result.value || []);
2939
+ });
2940
+ }
2941
+ listByAccountPagingAll(resourceGroupName, accountName, options) {
2942
+ return tslib.__asyncGenerator(this, arguments, function* listByAccountPagingAll_1() {
2943
+ var e_1, _a;
2944
+ try {
2945
+ for (var _b = tslib.__asyncValues(this.listByAccountPagingPage(resourceGroupName, accountName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2946
+ const page = _c.value;
2947
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2948
+ }
2949
+ }
2950
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2951
+ finally {
2952
+ try {
2953
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2954
+ }
2955
+ finally { if (e_1) throw e_1.error; }
2956
+ }
2957
+ });
2958
+ }
2959
+ /**
2960
+ * List all private link resources in a device update account.
2961
+ * @param resourceGroupName The resource group name.
2962
+ * @param accountName Account name.
2963
+ * @param options The options parameters.
2964
+ */
2965
+ _listByAccount(resourceGroupName, accountName, options) {
2966
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listByAccountOperationSpec$1);
2967
+ }
2968
+ /**
2969
+ * Get the specified private link resource associated with the device update account.
2970
+ * @param resourceGroupName The resource group name.
2971
+ * @param accountName Account name.
2972
+ * @param groupId The group ID of the private link resource.
2973
+ * @param options The options parameters.
2974
+ */
2975
+ get(resourceGroupName, accountName, groupId, options) {
2976
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, groupId, options }, getOperationSpec$1);
2977
+ }
2978
+ }
2979
+ // Operation Specifications
2980
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2981
+ const listByAccountOperationSpec$1 = {
2982
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateLinkResources",
2983
+ httpMethod: "GET",
2984
+ responses: {
2985
+ 200: {
2986
+ bodyMapper: PrivateLinkResourceListResult
2987
+ },
2988
+ default: {
2989
+ bodyMapper: ErrorResponse
2990
+ }
2991
+ },
2992
+ queryParameters: [apiVersion],
2993
+ urlParameters: [
2994
+ $host,
2995
+ subscriptionId,
2996
+ resourceGroupName,
2997
+ accountName
2998
+ ],
2999
+ headerParameters: [accept],
3000
+ serializer: serializer$3
3001
+ };
3002
+ const getOperationSpec$1 = {
3003
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateLinkResources/{groupId}",
3004
+ httpMethod: "GET",
3005
+ responses: {
3006
+ 200: {
3007
+ bodyMapper: GroupInformation
3008
+ },
3009
+ default: {
3010
+ bodyMapper: ErrorResponse
3011
+ }
3012
+ },
3013
+ queryParameters: [apiVersion],
3014
+ urlParameters: [
3015
+ $host,
3016
+ subscriptionId,
3017
+ resourceGroupName,
3018
+ accountName,
3019
+ groupId
3020
+ ],
3021
+ headerParameters: [accept],
3022
+ serializer: serializer$3
3023
+ };
3024
+
3025
+ /*
3026
+ * Copyright (c) Microsoft Corporation.
3027
+ * Licensed under the MIT License.
3028
+ *
3029
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3030
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3031
+ */
3032
+ /// <reference lib="esnext.asynciterable" />
3033
+ /** Class containing PrivateEndpointConnectionProxies operations. */
3034
+ class PrivateEndpointConnectionProxiesImpl {
3035
+ /**
3036
+ * Initialize a new instance of the class PrivateEndpointConnectionProxies class.
3037
+ * @param client Reference to the service client
3038
+ */
3039
+ constructor(client) {
3040
+ this.client = client;
3041
+ }
3042
+ /**
3043
+ * (INTERNAL - DO NOT USE) List all private endpoint connection proxies in a device update account.
3044
+ * @param resourceGroupName The resource group name.
3045
+ * @param accountName Account name.
3046
+ * @param options The options parameters.
3047
+ */
3048
+ listByAccount(resourceGroupName, accountName, options) {
3049
+ const iter = this.listByAccountPagingAll(resourceGroupName, accountName, options);
3050
+ return {
3051
+ next() {
3052
+ return iter.next();
3053
+ },
3054
+ [Symbol.asyncIterator]() {
3055
+ return this;
3056
+ },
3057
+ byPage: () => {
3058
+ return this.listByAccountPagingPage(resourceGroupName, accountName, options);
3059
+ }
3060
+ };
3061
+ }
3062
+ listByAccountPagingPage(resourceGroupName, accountName, options) {
3063
+ return tslib.__asyncGenerator(this, arguments, function* listByAccountPagingPage_1() {
3064
+ let result = yield tslib.__await(this._listByAccount(resourceGroupName, accountName, options));
3065
+ yield yield tslib.__await(result.value || []);
3066
+ });
3067
+ }
3068
+ listByAccountPagingAll(resourceGroupName, accountName, options) {
3069
+ return tslib.__asyncGenerator(this, arguments, function* listByAccountPagingAll_1() {
3070
+ var e_1, _a;
3071
+ try {
3072
+ for (var _b = tslib.__asyncValues(this.listByAccountPagingPage(resourceGroupName, accountName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3073
+ const page = _c.value;
3074
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3075
+ }
3076
+ }
3077
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3078
+ finally {
3079
+ try {
3080
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3081
+ }
3082
+ finally { if (e_1) throw e_1.error; }
3083
+ }
3084
+ });
3085
+ }
3086
+ /**
3087
+ * (INTERNAL - DO NOT USE) List all private endpoint connection proxies in a device update account.
3088
+ * @param resourceGroupName The resource group name.
3089
+ * @param accountName Account name.
3090
+ * @param options The options parameters.
3091
+ */
3092
+ _listByAccount(resourceGroupName, accountName, options) {
3093
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listByAccountOperationSpec);
3094
+ }
3095
+ /**
3096
+ * (INTERNAL - DO NOT USE) Validates a private endpoint connection proxy object.
3097
+ * @param resourceGroupName The resource group name.
3098
+ * @param accountName Account name.
3099
+ * @param privateEndpointConnectionProxyId The ID of the private endpoint connection proxy object.
3100
+ * @param privateEndpointConnectionProxy The parameters for creating a private endpoint connection
3101
+ * proxy.
3102
+ * @param options The options parameters.
3103
+ */
3104
+ validate(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy, options) {
3105
+ return this.client.sendOperationRequest({
3106
+ resourceGroupName,
3107
+ accountName,
3108
+ privateEndpointConnectionProxyId,
3109
+ privateEndpointConnectionProxy,
3110
+ options
3111
+ }, validateOperationSpec);
3112
+ }
3113
+ /**
3114
+ * (INTERNAL - DO NOT USE) Updates a private endpoint inside the private endpoint connection proxy
3115
+ * object.
3116
+ * @param resourceGroupName The resource group name.
3117
+ * @param accountName Account name.
3118
+ * @param privateEndpointConnectionProxyId The ID of the private endpoint connection proxy object.
3119
+ * @param privateEndpointUpdate The parameters for updating a private endpoint connection proxy.
3120
+ * @param options The options parameters.
3121
+ */
3122
+ updatePrivateEndpointProperties(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointUpdate, options) {
3123
+ return this.client.sendOperationRequest({
3124
+ resourceGroupName,
3125
+ accountName,
3126
+ privateEndpointConnectionProxyId,
3127
+ privateEndpointUpdate,
3128
+ options
3129
+ }, updatePrivateEndpointPropertiesOperationSpec);
3130
+ }
3131
+ /**
3132
+ * (INTERNAL - DO NOT USE) Get the specified private endpoint connection proxy associated with the
3133
+ * device update account.
3134
+ * @param resourceGroupName The resource group name.
3135
+ * @param accountName Account name.
3136
+ * @param privateEndpointConnectionProxyId The ID of the private endpoint connection proxy object.
3137
+ * @param options The options parameters.
3138
+ */
3139
+ get(resourceGroupName, accountName, privateEndpointConnectionProxyId, options) {
3140
+ return this.client.sendOperationRequest({
3141
+ resourceGroupName,
3142
+ accountName,
3143
+ privateEndpointConnectionProxyId,
3144
+ options
3145
+ }, getOperationSpec);
3146
+ }
3147
+ /**
3148
+ * (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint connection proxy resource
3149
+ * associated with the device update account.
3150
+ * @param resourceGroupName The resource group name.
3151
+ * @param accountName Account name.
3152
+ * @param privateEndpointConnectionProxyId The ID of the private endpoint connection proxy object.
3153
+ * @param privateEndpointConnectionProxy The parameters for creating a private endpoint connection
3154
+ * proxy.
3155
+ * @param options The options parameters.
3156
+ */
3157
+ beginCreateOrUpdate(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy, options) {
3158
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3159
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3160
+ return this.client.sendOperationRequest(args, spec);
3161
+ });
3162
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3163
+ var _a;
3164
+ let currentRawResponse = undefined;
3165
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3166
+ const callback = (rawResponse, flatResponse) => {
3167
+ currentRawResponse = rawResponse;
3168
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3169
+ };
3170
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3171
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3172
+ return {
3173
+ flatResponse,
3174
+ rawResponse: {
3175
+ statusCode: currentRawResponse.status,
3176
+ body: currentRawResponse.parsedBody,
3177
+ headers: currentRawResponse.headers.toJSON()
3178
+ }
3179
+ };
3180
+ });
3181
+ const lro = new LroImpl(sendOperation, {
3182
+ resourceGroupName,
3183
+ accountName,
3184
+ privateEndpointConnectionProxyId,
3185
+ privateEndpointConnectionProxy,
3186
+ options
3187
+ }, createOrUpdateOperationSpec);
3188
+ const poller = new coreLro.LroEngine(lro, {
3189
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3190
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3191
+ lroResourceLocationConfig: "azure-async-operation"
3192
+ });
3193
+ yield poller.poll();
3194
+ return poller;
3195
+ });
3196
+ }
3197
+ /**
3198
+ * (INTERNAL - DO NOT USE) Creates or updates the specified private endpoint connection proxy resource
3199
+ * associated with the device update account.
3200
+ * @param resourceGroupName The resource group name.
3201
+ * @param accountName Account name.
3202
+ * @param privateEndpointConnectionProxyId The ID of the private endpoint connection proxy object.
3203
+ * @param privateEndpointConnectionProxy The parameters for creating a private endpoint connection
3204
+ * proxy.
3205
+ * @param options The options parameters.
3206
+ */
3207
+ beginCreateOrUpdateAndWait(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy, options) {
3208
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3209
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, accountName, privateEndpointConnectionProxyId, privateEndpointConnectionProxy, options);
3210
+ return poller.pollUntilDone();
3211
+ });
3212
+ }
3213
+ /**
3214
+ * (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection proxy associated with the
3215
+ * device update account.
3216
+ * @param resourceGroupName The resource group name.
3217
+ * @param accountName Account name.
3218
+ * @param privateEndpointConnectionProxyId The ID of the private endpoint connection proxy object.
3219
+ * @param options The options parameters.
3220
+ */
3221
+ beginDelete(resourceGroupName, accountName, privateEndpointConnectionProxyId, options) {
3222
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3223
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3224
+ return this.client.sendOperationRequest(args, spec);
3225
+ });
3226
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3227
+ var _a;
3228
+ let currentRawResponse = undefined;
3229
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3230
+ const callback = (rawResponse, flatResponse) => {
3231
+ currentRawResponse = rawResponse;
3232
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3233
+ };
3234
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3235
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3236
+ return {
3237
+ flatResponse,
3238
+ rawResponse: {
3239
+ statusCode: currentRawResponse.status,
3240
+ body: currentRawResponse.parsedBody,
3241
+ headers: currentRawResponse.headers.toJSON()
3242
+ }
3243
+ };
3244
+ });
3245
+ const lro = new LroImpl(sendOperation, {
3246
+ resourceGroupName,
3247
+ accountName,
3248
+ privateEndpointConnectionProxyId,
3249
+ options
3250
+ }, deleteOperationSpec);
3251
+ const poller = new coreLro.LroEngine(lro, {
3252
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3253
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3254
+ lroResourceLocationConfig: "location"
3255
+ });
3256
+ yield poller.poll();
3257
+ return poller;
3258
+ });
3259
+ }
3260
+ /**
3261
+ * (INTERNAL - DO NOT USE) Deletes the specified private endpoint connection proxy associated with the
3262
+ * device update account.
3263
+ * @param resourceGroupName The resource group name.
3264
+ * @param accountName Account name.
3265
+ * @param privateEndpointConnectionProxyId The ID of the private endpoint connection proxy object.
3266
+ * @param options The options parameters.
3267
+ */
3268
+ beginDeleteAndWait(resourceGroupName, accountName, privateEndpointConnectionProxyId, options) {
3269
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3270
+ const poller = yield this.beginDelete(resourceGroupName, accountName, privateEndpointConnectionProxyId, options);
3271
+ return poller.pollUntilDone();
3272
+ });
3273
+ }
3274
+ }
3275
+ // Operation Specifications
3276
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3277
+ const listByAccountOperationSpec = {
3278
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies",
3279
+ httpMethod: "GET",
3280
+ responses: {
3281
+ 200: {
3282
+ bodyMapper: PrivateEndpointConnectionProxyListResult
3283
+ },
3284
+ default: {
3285
+ bodyMapper: ErrorResponse
3286
+ }
3287
+ },
3288
+ queryParameters: [apiVersion],
3289
+ urlParameters: [
3290
+ $host,
3291
+ subscriptionId,
3292
+ resourceGroupName,
3293
+ accountName
3294
+ ],
3295
+ headerParameters: [accept],
3296
+ serializer: serializer$2
3297
+ };
3298
+ const validateOperationSpec = {
3299
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}/validate",
3300
+ httpMethod: "POST",
3301
+ responses: {
3302
+ 200: {},
3303
+ default: {
3304
+ bodyMapper: ErrorResponse
3305
+ }
3306
+ },
3307
+ requestBody: privateEndpointConnectionProxy,
3308
+ queryParameters: [apiVersion],
3309
+ urlParameters: [
3310
+ $host,
3311
+ subscriptionId,
3312
+ resourceGroupName,
3313
+ accountName,
3314
+ privateEndpointConnectionProxyId
3315
+ ],
3316
+ headerParameters: [contentType, accept],
3317
+ mediaType: "json",
3318
+ serializer: serializer$2
3319
+ };
3320
+ const updatePrivateEndpointPropertiesOperationSpec = {
3321
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}/updatePrivateEndpointProperties",
3322
+ httpMethod: "POST",
3323
+ responses: {
3324
+ 200: {},
3325
+ default: {
3326
+ bodyMapper: ErrorResponse
3327
+ }
3328
+ },
3329
+ requestBody: privateEndpointUpdate,
3330
+ queryParameters: [apiVersion],
3331
+ urlParameters: [
3332
+ $host,
3333
+ subscriptionId,
3334
+ resourceGroupName,
3335
+ accountName,
3336
+ privateEndpointConnectionProxyId
3337
+ ],
3338
+ headerParameters: [contentType, accept],
3339
+ mediaType: "json",
3340
+ serializer: serializer$2
3341
+ };
3342
+ const getOperationSpec = {
3343
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}",
3344
+ httpMethod: "GET",
3345
+ responses: {
3346
+ 200: {
3347
+ bodyMapper: PrivateEndpointConnectionProxy
3348
+ },
3349
+ default: {
3350
+ bodyMapper: ErrorResponse
3351
+ }
3352
+ },
3353
+ queryParameters: [apiVersion],
3354
+ urlParameters: [
3355
+ $host,
3356
+ subscriptionId,
3357
+ resourceGroupName,
3358
+ accountName,
3359
+ privateEndpointConnectionProxyId
3360
+ ],
3361
+ headerParameters: [accept],
3362
+ serializer: serializer$2
3363
+ };
3364
+ const createOrUpdateOperationSpec = {
3365
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}",
3366
+ httpMethod: "PUT",
3367
+ responses: {
3368
+ 200: {
3369
+ bodyMapper: PrivateEndpointConnectionProxy
3370
+ },
3371
+ 201: {
3372
+ bodyMapper: PrivateEndpointConnectionProxy
3373
+ },
3374
+ 202: {
3375
+ bodyMapper: PrivateEndpointConnectionProxy
3376
+ },
3377
+ 204: {
3378
+ bodyMapper: PrivateEndpointConnectionProxy
3379
+ },
3380
+ default: {
3381
+ bodyMapper: ErrorResponse
3382
+ }
3383
+ },
3384
+ requestBody: privateEndpointConnectionProxy,
3385
+ queryParameters: [apiVersion],
3386
+ urlParameters: [
3387
+ $host,
3388
+ subscriptionId,
3389
+ resourceGroupName,
3390
+ accountName,
3391
+ privateEndpointConnectionProxyId
3392
+ ],
3393
+ headerParameters: [contentType, accept],
3394
+ mediaType: "json",
3395
+ serializer: serializer$2
3396
+ };
3397
+ const deleteOperationSpec = {
3398
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyId}",
3399
+ httpMethod: "DELETE",
3400
+ responses: {
3401
+ 200: {},
3402
+ 201: {},
3403
+ 202: {},
3404
+ 204: {},
3405
+ default: {
3406
+ bodyMapper: ErrorResponse
3407
+ }
3408
+ },
3409
+ queryParameters: [apiVersion],
3410
+ urlParameters: [
3411
+ $host,
3412
+ subscriptionId,
3413
+ resourceGroupName,
3414
+ accountName,
3415
+ privateEndpointConnectionProxyId
3416
+ ],
3417
+ headerParameters: [accept],
3418
+ serializer: serializer$2
3419
+ };
3420
+
3421
+ /*
3422
+ * Copyright (c) Microsoft Corporation.
3423
+ * Licensed under the MIT License.
3424
+ *
3425
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3426
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3427
+ */
3428
+ /// <reference lib="esnext.asynciterable" />
3429
+ /** Class containing Operations operations. */
3430
+ class OperationsImpl {
3431
+ /**
3432
+ * Initialize a new instance of the class Operations class.
3433
+ * @param client Reference to the service client
3434
+ */
3435
+ constructor(client) {
3436
+ this.client = client;
3437
+ }
3438
+ /**
3439
+ * Returns list of operations for Microsoft.DeviceUpdate resource provider.
3440
+ * @param options The options parameters.
3441
+ */
3442
+ list(options) {
3443
+ const iter = this.listPagingAll(options);
3444
+ return {
3445
+ next() {
3446
+ return iter.next();
3447
+ },
3448
+ [Symbol.asyncIterator]() {
3449
+ return this;
3450
+ },
3451
+ byPage: () => {
3452
+ return this.listPagingPage(options);
3453
+ }
3454
+ };
3455
+ }
3456
+ listPagingPage(options) {
3457
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3458
+ let result = yield tslib.__await(this._list(options));
3459
+ yield yield tslib.__await(result.value || []);
3460
+ let continuationToken = result.nextLink;
3461
+ while (continuationToken) {
3462
+ result = yield tslib.__await(this._listNext(continuationToken, options));
3463
+ continuationToken = result.nextLink;
3464
+ yield yield tslib.__await(result.value || []);
3465
+ }
3466
+ });
3467
+ }
3468
+ listPagingAll(options) {
3469
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3470
+ var e_1, _a;
3471
+ try {
3472
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3473
+ const page = _c.value;
3474
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3475
+ }
3476
+ }
3477
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3478
+ finally {
3479
+ try {
3480
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3481
+ }
3482
+ finally { if (e_1) throw e_1.error; }
3483
+ }
3484
+ });
3485
+ }
3486
+ /**
3487
+ * Returns list of operations for Microsoft.DeviceUpdate resource provider.
3488
+ * @param options The options parameters.
3489
+ */
3490
+ _list(options) {
3491
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
3492
+ }
3493
+ /**
3494
+ * ListNext
3495
+ * @param nextLink The nextLink from the previous successful call to the List method.
3496
+ * @param options The options parameters.
3497
+ */
3498
+ _listNext(nextLink, options) {
3499
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
3500
+ }
3501
+ }
3502
+ // Operation Specifications
3503
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3504
+ const listOperationSpec = {
3505
+ path: "/providers/Microsoft.DeviceUpdate/operations",
3506
+ httpMethod: "GET",
3507
+ responses: {
3508
+ 200: {
3509
+ bodyMapper: OperationListResult
3510
+ },
3511
+ default: {
3512
+ bodyMapper: ErrorResponse
3513
+ }
3514
+ },
3515
+ queryParameters: [apiVersion],
3516
+ urlParameters: [$host],
3517
+ headerParameters: [accept],
3518
+ serializer: serializer$1
3519
+ };
3520
+ const listNextOperationSpec = {
3521
+ path: "{nextLink}",
3522
+ httpMethod: "GET",
3523
+ responses: {
3524
+ 200: {
3525
+ bodyMapper: OperationListResult
3526
+ },
3527
+ default: {
3528
+ bodyMapper: ErrorResponse
3529
+ }
3530
+ },
3531
+ queryParameters: [apiVersion],
3532
+ urlParameters: [$host, nextLink],
3533
+ headerParameters: [accept],
3534
+ serializer: serializer$1
3535
+ };
3536
+
3537
+ /*
3538
+ * Copyright (c) Microsoft Corporation.
3539
+ * Licensed under the MIT License.
3540
+ *
3541
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3542
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3543
+ */
3544
+ class DeviceUpdate extends coreClient__namespace.ServiceClient {
3545
+ /**
3546
+ * Initializes a new instance of the DeviceUpdate class.
3547
+ * @param credentials Subscription credentials which uniquely identify client subscription.
3548
+ * @param subscriptionId The Azure subscription ID.
3549
+ * @param options The parameter options
3550
+ */
3551
+ constructor(credentials, subscriptionId, options) {
3552
+ var _a, _b;
3553
+ if (credentials === undefined) {
3554
+ throw new Error("'credentials' cannot be null");
3555
+ }
3556
+ if (subscriptionId === undefined) {
3557
+ throw new Error("'subscriptionId' cannot be null");
3558
+ }
3559
+ // Initializing default values for options
3560
+ if (!options) {
3561
+ options = {};
3562
+ }
3563
+ const defaults = {
3564
+ requestContentType: "application/json; charset=utf-8",
3565
+ credential: credentials
3566
+ };
3567
+ const packageDetails = `azsdk-js-arm-deviceupdate/1.0.0-beta.1`;
3568
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3569
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3570
+ : `${packageDetails}`;
3571
+ if (!options.credentialScopes) {
3572
+ options.credentialScopes = ["https://management.azure.com/.default"];
3573
+ }
3574
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
3575
+ userAgentPrefix
3576
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
3577
+ super(optionsWithDefaults);
3578
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
3579
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
3580
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
3581
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
3582
+ if (!bearerTokenAuthenticationPolicyFound) {
3583
+ this.pipeline.removePolicy({
3584
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
3585
+ });
3586
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3587
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
3588
+ challengeCallbacks: {
3589
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3590
+ }
3591
+ }));
3592
+ }
3593
+ }
3594
+ // Parameter assignments
3595
+ this.subscriptionId = subscriptionId;
3596
+ // Assigning values to Constant parameters
3597
+ this.$host = options.$host || "https://management.azure.com";
3598
+ this.apiVersion = options.apiVersion || "2022-04-01-preview";
3599
+ this.accounts = new AccountsImpl(this);
3600
+ this.instances = new InstancesImpl(this);
3601
+ this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
3602
+ this.privateLinkResources = new PrivateLinkResourcesImpl(this);
3603
+ this.privateEndpointConnectionProxies = new PrivateEndpointConnectionProxiesImpl(this);
3604
+ this.operations = new OperationsImpl(this);
3605
+ this.addCustomApiVersionPolicy(options.apiVersion);
3606
+ }
3607
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
3608
+ addCustomApiVersionPolicy(apiVersion) {
3609
+ if (!apiVersion) {
3610
+ return;
3611
+ }
3612
+ const apiVersionPolicy = {
3613
+ name: "CustomApiVersionPolicy",
3614
+ sendRequest(request, next) {
3615
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3616
+ const param = request.url.split("?");
3617
+ if (param.length > 1) {
3618
+ const newParams = param[1].split("&").map((item) => {
3619
+ if (item.indexOf("api-version") > -1) {
3620
+ return item.replace(/(?<==).*$/, apiVersion);
3621
+ }
3622
+ else {
3623
+ return item;
3624
+ }
3625
+ });
3626
+ request.url = param[0] + "?" + newParams.join("&");
3627
+ }
3628
+ return next(request);
3629
+ });
3630
+ }
3631
+ };
3632
+ this.pipeline.addPolicy(apiVersionPolicy);
3633
+ }
3634
+ /**
3635
+ * Checks ADU resource name availability.
3636
+ * @param request Check Name Availability Request.
3637
+ * @param options The options parameters.
3638
+ */
3639
+ checkNameAvailability(request, options) {
3640
+ return this.sendOperationRequest({ request, options }, checkNameAvailabilityOperationSpec);
3641
+ }
3642
+ }
3643
+ // Operation Specifications
3644
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3645
+ const checkNameAvailabilityOperationSpec = {
3646
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/checknameavailability",
3647
+ httpMethod: "POST",
3648
+ responses: {
3649
+ 200: {
3650
+ bodyMapper: CheckNameAvailabilityResponse
3651
+ },
3652
+ default: {
3653
+ bodyMapper: ErrorResponse
3654
+ }
3655
+ },
3656
+ requestBody: request,
3657
+ queryParameters: [apiVersion],
3658
+ urlParameters: [$host, subscriptionId],
3659
+ headerParameters: [contentType, accept],
3660
+ mediaType: "json",
3661
+ serializer
3662
+ };
3663
+
3664
+ exports.DeviceUpdate = DeviceUpdate;
3665
+ //# sourceMappingURL=index.js.map