@azure/arm-cognitiveservices 6.0.0 → 7.0.0-alpha.20211220.3

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 (223) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +1 -1
  3. package/README.md +70 -95
  4. package/dist/index.js +4800 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/cognitiveServicesManagementClient.d.ts +42 -0
  9. package/dist-esm/src/cognitiveServicesManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/cognitiveServicesManagementClient.js +133 -0
  11. package/dist-esm/src/cognitiveServicesManagementClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +1310 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +128 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +68 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/mappers.js +1017 -713
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +26 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +199 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/dist-esm/src/operations/accounts.d.ts +138 -0
  33. package/dist-esm/src/operations/accounts.d.ts.map +1 -0
  34. package/dist-esm/src/operations/accounts.js +628 -0
  35. package/dist-esm/src/operations/accounts.js.map +1 -0
  36. package/dist-esm/src/operations/commitmentPlans.d.ts +76 -0
  37. package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -0
  38. package/dist-esm/src/operations/commitmentPlans.js +293 -0
  39. package/dist-esm/src/operations/commitmentPlans.js.map +1 -0
  40. package/dist-esm/src/operations/commitmentTiers.d.ts +35 -0
  41. package/dist-esm/src/operations/commitmentTiers.d.ts.map +1 -0
  42. package/dist-esm/src/operations/commitmentTiers.js +132 -0
  43. package/dist-esm/src/operations/commitmentTiers.js.map +1 -0
  44. package/dist-esm/src/operations/deletedAccounts.d.ts +57 -0
  45. package/dist-esm/src/operations/deletedAccounts.d.ts.map +1 -0
  46. package/dist-esm/src/operations/deletedAccounts.js +232 -0
  47. package/dist-esm/src/operations/deletedAccounts.js.map +1 -0
  48. package/dist-esm/src/operations/deployments.d.ts +81 -0
  49. package/dist-esm/src/operations/deployments.d.ts.map +1 -0
  50. package/dist-esm/src/operations/deployments.js +331 -0
  51. package/dist-esm/src/operations/deployments.js.map +1 -0
  52. package/{esm → dist-esm/src}/operations/index.d.ts +3 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/dist-esm/src/operations/index.js +17 -0
  55. package/dist-esm/src/operations/index.js.map +1 -0
  56. package/dist-esm/src/operations/operations.d.ts +32 -0
  57. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  58. package/dist-esm/src/operations/operations.js +120 -0
  59. package/dist-esm/src/operations/operations.js.map +1 -0
  60. package/dist-esm/src/operations/privateEndpointConnections.d.ts +70 -0
  61. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  62. package/dist-esm/src/operations/privateEndpointConnections.js +271 -0
  63. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  64. package/dist-esm/src/operations/privateLinkResources.d.ts +20 -0
  65. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  66. package/dist-esm/src/operations/privateLinkResources.js +53 -0
  67. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  68. package/dist-esm/src/operations/resourceSkus.d.ts +32 -0
  69. package/dist-esm/src/operations/resourceSkus.d.ts.map +1 -0
  70. package/dist-esm/src/operations/resourceSkus.js +124 -0
  71. package/dist-esm/src/operations/resourceSkus.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/accounts.d.ts +102 -0
  73. package/dist-esm/src/operationsInterfaces/accounts.d.ts.map +1 -0
  74. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/accounts.js} +2 -1
  75. package/dist-esm/src/operationsInterfaces/accounts.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +51 -0
  77. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -0
  78. package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/commitmentPlans.js} +2 -9
  79. package/dist-esm/src/operationsInterfaces/commitmentPlans.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/commitmentTiers.d.ts +12 -0
  81. package/dist-esm/src/operationsInterfaces/commitmentTiers.d.ts.map +1 -0
  82. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/commitmentTiers.js} +2 -2
  83. package/dist-esm/src/operationsInterfaces/commitmentTiers.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts +36 -0
  85. package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts.map +1 -0
  86. package/{src/models/resourceSkusMappers.ts → dist-esm/src/operationsInterfaces/deletedAccounts.js} +2 -10
  87. package/dist-esm/src/operationsInterfaces/deletedAccounts.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/deployments.d.ts +56 -0
  89. package/dist-esm/src/operationsInterfaces/deployments.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/deployments.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/deployments.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/index.d.ts +10 -0
  93. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/index.js +17 -0
  95. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  97. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +62 -0
  101. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +12 -0
  105. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/resourceSkus.d.ts +11 -0
  109. package/dist-esm/src/operationsInterfaces/resourceSkus.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/resourceSkus.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/resourceSkus.js.map +1 -0
  112. package/dist-esm/test/cognitiveservices_examples.d.ts +4 -0
  113. package/dist-esm/test/cognitiveservices_examples.d.ts.map +1 -0
  114. package/dist-esm/test/cognitiveservices_examples.js +127 -0
  115. package/dist-esm/test/cognitiveservices_examples.js.map +1 -0
  116. package/package.json +65 -22
  117. package/review/arm-cognitiveservices.api.md +1150 -0
  118. package/rollup.config.js +181 -24
  119. package/src/cognitiveServicesManagementClient.ts +148 -172
  120. package/src/index.ts +12 -0
  121. package/src/lroImpl.ts +34 -0
  122. package/src/models/index.ts +1122 -1415
  123. package/src/models/mappers.ts +1161 -835
  124. package/src/models/parameters.ts +159 -40
  125. package/src/operations/accounts.ts +587 -574
  126. package/src/operations/commitmentPlans.ts +394 -0
  127. package/src/operations/commitmentTiers.ts +158 -0
  128. package/src/operations/deletedAccounts.ts +197 -185
  129. package/src/operations/deployments.ts +464 -0
  130. package/src/operations/index.ts +4 -2
  131. package/src/operations/operations.ts +85 -85
  132. package/src/operations/privateEndpointConnections.ts +232 -202
  133. package/src/operations/privateLinkResources.ts +34 -62
  134. package/src/operations/resourceSkus.ts +90 -86
  135. package/src/operationsInterfaces/accounts.ts +195 -0
  136. package/src/operationsInterfaces/commitmentPlans.ts +93 -0
  137. package/src/operationsInterfaces/commitmentTiers.ts +24 -0
  138. package/src/operationsInterfaces/deletedAccounts.ts +68 -0
  139. package/src/operationsInterfaces/deployments.ts +109 -0
  140. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +5 -3
  141. package/src/operationsInterfaces/operations.ts +22 -0
  142. package/src/operationsInterfaces/privateEndpointConnections.ts +115 -0
  143. package/src/operationsInterfaces/privateLinkResources.ts +27 -0
  144. package/src/operationsInterfaces/resourceSkus.ts +22 -0
  145. package/tsconfig.json +3 -3
  146. package/types/arm-cognitiveservices.d.ts +1860 -0
  147. package/types/tsdoc-metadata.json +11 -0
  148. package/dist/arm-cognitiveservices.js +0 -3385
  149. package/dist/arm-cognitiveservices.js.map +0 -1
  150. package/dist/arm-cognitiveservices.min.js +0 -1
  151. package/dist/arm-cognitiveservices.min.js.map +0 -1
  152. package/esm/cognitiveServicesManagementClient.d.ts +0 -77
  153. package/esm/cognitiveServicesManagementClient.d.ts.map +0 -1
  154. package/esm/cognitiveServicesManagementClient.js +0 -108
  155. package/esm/cognitiveServicesManagementClient.js.map +0 -1
  156. package/esm/cognitiveServicesManagementClientContext.d.ts +0 -22
  157. package/esm/cognitiveServicesManagementClientContext.d.ts.map +0 -1
  158. package/esm/cognitiveServicesManagementClientContext.js +0 -61
  159. package/esm/cognitiveServicesManagementClientContext.js.map +0 -1
  160. package/esm/models/accountsMappers.d.ts +0 -2
  161. package/esm/models/accountsMappers.d.ts.map +0 -1
  162. package/esm/models/accountsMappers.js +0 -9
  163. package/esm/models/accountsMappers.js.map +0 -1
  164. package/esm/models/deletedAccountsMappers.d.ts +0 -2
  165. package/esm/models/deletedAccountsMappers.d.ts.map +0 -1
  166. package/esm/models/deletedAccountsMappers.js +0 -9
  167. package/esm/models/deletedAccountsMappers.js.map +0 -1
  168. package/esm/models/index.d.ts +0 -1645
  169. package/esm/models/index.d.ts.map +0 -1
  170. package/esm/models/index.js.map +0 -1
  171. package/esm/models/mappers.d.ts +0 -58
  172. package/esm/models/mappers.d.ts.map +0 -1
  173. package/esm/models/mappers.js.map +0 -1
  174. package/esm/models/operationsMappers.d.ts +0 -2
  175. package/esm/models/operationsMappers.d.ts.map +0 -1
  176. package/esm/models/operationsMappers.js.map +0 -1
  177. package/esm/models/parameters.d.ts +0 -11
  178. package/esm/models/parameters.d.ts.map +0 -1
  179. package/esm/models/parameters.js +0 -115
  180. package/esm/models/parameters.js.map +0 -1
  181. package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
  182. package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
  183. package/esm/models/privateEndpointConnectionsMappers.js +0 -9
  184. package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
  185. package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
  186. package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
  187. package/esm/models/privateLinkResourcesMappers.js +0 -9
  188. package/esm/models/privateLinkResourcesMappers.js.map +0 -1
  189. package/esm/models/resourceSkusMappers.d.ts +0 -2
  190. package/esm/models/resourceSkusMappers.d.ts.map +0 -1
  191. package/esm/models/resourceSkusMappers.js +0 -9
  192. package/esm/models/resourceSkusMappers.js.map +0 -1
  193. package/esm/operations/accounts.d.ts +0 -245
  194. package/esm/operations/accounts.d.ts.map +0 -1
  195. package/esm/operations/accounts.js +0 -389
  196. package/esm/operations/accounts.js.map +0 -1
  197. package/esm/operations/deletedAccounts.d.ts +0 -89
  198. package/esm/operations/deletedAccounts.d.ts.map +0 -1
  199. package/esm/operations/deletedAccounts.js +0 -149
  200. package/esm/operations/deletedAccounts.js.map +0 -1
  201. package/esm/operations/index.d.ts.map +0 -1
  202. package/esm/operations/index.js.map +0 -1
  203. package/esm/operations/operations.d.ts +0 -46
  204. package/esm/operations/operations.d.ts.map +0 -1
  205. package/esm/operations/operations.js +0 -69
  206. package/esm/operations/operations.js.map +0 -1
  207. package/esm/operations/privateEndpointConnections.d.ts +0 -108
  208. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  209. package/esm/operations/privateEndpointConnections.js +0 -193
  210. package/esm/operations/privateEndpointConnections.js.map +0 -1
  211. package/esm/operations/privateLinkResources.d.ts +0 -34
  212. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  213. package/esm/operations/privateLinkResources.js +0 -49
  214. package/esm/operations/privateLinkResources.js.map +0 -1
  215. package/esm/operations/resourceSkus.d.ts +0 -46
  216. package/esm/operations/resourceSkus.d.ts.map +0 -1
  217. package/esm/operations/resourceSkus.js +0 -70
  218. package/esm/operations/resourceSkus.js.map +0 -1
  219. package/src/cognitiveServicesManagementClientContext.ts +0 -74
  220. package/src/models/accountsMappers.ts +0 -51
  221. package/src/models/deletedAccountsMappers.ts +0 -44
  222. package/src/models/privateEndpointConnectionsMappers.ts +0 -44
  223. package/src/models/privateLinkResourcesMappers.ts +0 -44
package/dist/index.js ADDED
@@ -0,0 +1,4800 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var coreClient = require('@azure/core-client');
6
+ var tslib = require('tslib');
7
+ var coreLro = require('@azure/core-lro');
8
+
9
+ /*
10
+ * Copyright (c) Microsoft Corporation.
11
+ * Licensed under the MIT License.
12
+ *
13
+ * Code generated by Microsoft (R) AutoRest Code Generator.
14
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
15
+ */
16
+ (function (KnownSkuTier) {
17
+ KnownSkuTier["Free"] = "Free";
18
+ KnownSkuTier["Basic"] = "Basic";
19
+ KnownSkuTier["Standard"] = "Standard";
20
+ KnownSkuTier["Premium"] = "Premium";
21
+ KnownSkuTier["Enterprise"] = "Enterprise";
22
+ })(exports.KnownSkuTier || (exports.KnownSkuTier = {}));
23
+ (function (KnownCreatedByType) {
24
+ KnownCreatedByType["User"] = "User";
25
+ KnownCreatedByType["Application"] = "Application";
26
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
27
+ KnownCreatedByType["Key"] = "Key";
28
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
29
+ (function (KnownProvisioningState) {
30
+ KnownProvisioningState["Accepted"] = "Accepted";
31
+ KnownProvisioningState["Creating"] = "Creating";
32
+ KnownProvisioningState["Deleting"] = "Deleting";
33
+ KnownProvisioningState["Moving"] = "Moving";
34
+ KnownProvisioningState["Failed"] = "Failed";
35
+ KnownProvisioningState["Succeeded"] = "Succeeded";
36
+ KnownProvisioningState["ResolvingDNS"] = "ResolvingDNS";
37
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
38
+ (function (KnownNetworkRuleAction) {
39
+ KnownNetworkRuleAction["Allow"] = "Allow";
40
+ KnownNetworkRuleAction["Deny"] = "Deny";
41
+ })(exports.KnownNetworkRuleAction || (exports.KnownNetworkRuleAction = {}));
42
+ (function (KnownKeySource) {
43
+ KnownKeySource["MicrosoftCognitiveServices"] = "Microsoft.CognitiveServices";
44
+ KnownKeySource["MicrosoftKeyVault"] = "Microsoft.KeyVault";
45
+ })(exports.KnownKeySource || (exports.KnownKeySource = {}));
46
+ (function (KnownPrivateEndpointServiceConnectionStatus) {
47
+ KnownPrivateEndpointServiceConnectionStatus["Pending"] = "Pending";
48
+ KnownPrivateEndpointServiceConnectionStatus["Approved"] = "Approved";
49
+ KnownPrivateEndpointServiceConnectionStatus["Rejected"] = "Rejected";
50
+ })(exports.KnownPrivateEndpointServiceConnectionStatus || (exports.KnownPrivateEndpointServiceConnectionStatus = {}));
51
+ (function (KnownPrivateEndpointConnectionProvisioningState) {
52
+ KnownPrivateEndpointConnectionProvisioningState["Succeeded"] = "Succeeded";
53
+ KnownPrivateEndpointConnectionProvisioningState["Creating"] = "Creating";
54
+ KnownPrivateEndpointConnectionProvisioningState["Deleting"] = "Deleting";
55
+ KnownPrivateEndpointConnectionProvisioningState["Failed"] = "Failed";
56
+ })(exports.KnownPrivateEndpointConnectionProvisioningState || (exports.KnownPrivateEndpointConnectionProvisioningState = {}));
57
+ (function (KnownPublicNetworkAccess) {
58
+ KnownPublicNetworkAccess["Enabled"] = "Enabled";
59
+ KnownPublicNetworkAccess["Disabled"] = "Disabled";
60
+ })(exports.KnownPublicNetworkAccess || (exports.KnownPublicNetworkAccess = {}));
61
+ (function (KnownResourceSkuRestrictionsReasonCode) {
62
+ KnownResourceSkuRestrictionsReasonCode["QuotaId"] = "QuotaId";
63
+ KnownResourceSkuRestrictionsReasonCode["NotAvailableForSubscription"] = "NotAvailableForSubscription";
64
+ })(exports.KnownResourceSkuRestrictionsReasonCode || (exports.KnownResourceSkuRestrictionsReasonCode = {}));
65
+ (function (KnownUnitType) {
66
+ KnownUnitType["Count"] = "Count";
67
+ KnownUnitType["Bytes"] = "Bytes";
68
+ KnownUnitType["Seconds"] = "Seconds";
69
+ KnownUnitType["Percent"] = "Percent";
70
+ KnownUnitType["CountPerSecond"] = "CountPerSecond";
71
+ KnownUnitType["BytesPerSecond"] = "BytesPerSecond";
72
+ KnownUnitType["Milliseconds"] = "Milliseconds";
73
+ })(exports.KnownUnitType || (exports.KnownUnitType = {}));
74
+ (function (KnownQuotaUsageStatus) {
75
+ KnownQuotaUsageStatus["Included"] = "Included";
76
+ KnownQuotaUsageStatus["Blocked"] = "Blocked";
77
+ KnownQuotaUsageStatus["InOverage"] = "InOverage";
78
+ KnownQuotaUsageStatus["Unknown"] = "Unknown";
79
+ })(exports.KnownQuotaUsageStatus || (exports.KnownQuotaUsageStatus = {}));
80
+ (function (KnownOrigin) {
81
+ KnownOrigin["User"] = "user";
82
+ KnownOrigin["System"] = "system";
83
+ KnownOrigin["UserSystem"] = "user,system";
84
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
85
+ (function (KnownActionType) {
86
+ KnownActionType["Internal"] = "Internal";
87
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
88
+ (function (KnownHostingModel) {
89
+ KnownHostingModel["Web"] = "Web";
90
+ KnownHostingModel["ConnectedContainer"] = "ConnectedContainer";
91
+ KnownHostingModel["DisconnectedContainer"] = "DisconnectedContainer";
92
+ })(exports.KnownHostingModel || (exports.KnownHostingModel = {}));
93
+ (function (KnownDeploymentProvisioningState) {
94
+ KnownDeploymentProvisioningState["Accepted"] = "Accepted";
95
+ KnownDeploymentProvisioningState["Creating"] = "Creating";
96
+ KnownDeploymentProvisioningState["Deleting"] = "Deleting";
97
+ KnownDeploymentProvisioningState["Moving"] = "Moving";
98
+ KnownDeploymentProvisioningState["Failed"] = "Failed";
99
+ KnownDeploymentProvisioningState["Succeeded"] = "Succeeded";
100
+ })(exports.KnownDeploymentProvisioningState || (exports.KnownDeploymentProvisioningState = {}));
101
+ (function (KnownDeploymentScaleType) {
102
+ KnownDeploymentScaleType["Manual"] = "Manual";
103
+ })(exports.KnownDeploymentScaleType || (exports.KnownDeploymentScaleType = {}));
104
+
105
+ /*
106
+ * Copyright (c) Microsoft Corporation.
107
+ * Licensed under the MIT License.
108
+ *
109
+ * Code generated by Microsoft (R) AutoRest Code Generator.
110
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
111
+ */
112
+ const Sku = {
113
+ type: {
114
+ name: "Composite",
115
+ className: "Sku",
116
+ modelProperties: {
117
+ name: {
118
+ serializedName: "name",
119
+ required: true,
120
+ type: {
121
+ name: "String"
122
+ }
123
+ },
124
+ tier: {
125
+ serializedName: "tier",
126
+ type: {
127
+ name: "String"
128
+ }
129
+ },
130
+ size: {
131
+ serializedName: "size",
132
+ type: {
133
+ name: "String"
134
+ }
135
+ },
136
+ family: {
137
+ serializedName: "family",
138
+ type: {
139
+ name: "String"
140
+ }
141
+ },
142
+ capacity: {
143
+ serializedName: "capacity",
144
+ type: {
145
+ name: "Number"
146
+ }
147
+ }
148
+ }
149
+ }
150
+ };
151
+ const Identity = {
152
+ type: {
153
+ name: "Composite",
154
+ className: "Identity",
155
+ modelProperties: {
156
+ type: {
157
+ serializedName: "type",
158
+ type: {
159
+ name: "Enum",
160
+ allowedValues: [
161
+ "None",
162
+ "SystemAssigned",
163
+ "UserAssigned",
164
+ "SystemAssigned, UserAssigned"
165
+ ]
166
+ }
167
+ },
168
+ tenantId: {
169
+ serializedName: "tenantId",
170
+ readOnly: true,
171
+ type: {
172
+ name: "String"
173
+ }
174
+ },
175
+ principalId: {
176
+ serializedName: "principalId",
177
+ readOnly: true,
178
+ type: {
179
+ name: "String"
180
+ }
181
+ },
182
+ userAssignedIdentities: {
183
+ serializedName: "userAssignedIdentities",
184
+ type: {
185
+ name: "Dictionary",
186
+ value: {
187
+ type: { name: "Composite", className: "UserAssignedIdentity" }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ };
194
+ const UserAssignedIdentity = {
195
+ type: {
196
+ name: "Composite",
197
+ className: "UserAssignedIdentity",
198
+ modelProperties: {
199
+ principalId: {
200
+ serializedName: "principalId",
201
+ readOnly: true,
202
+ type: {
203
+ name: "String"
204
+ }
205
+ },
206
+ clientId: {
207
+ serializedName: "clientId",
208
+ readOnly: true,
209
+ type: {
210
+ name: "String"
211
+ }
212
+ }
213
+ }
214
+ }
215
+ };
216
+ const SystemData = {
217
+ type: {
218
+ name: "Composite",
219
+ className: "SystemData",
220
+ modelProperties: {
221
+ createdBy: {
222
+ serializedName: "createdBy",
223
+ type: {
224
+ name: "String"
225
+ }
226
+ },
227
+ createdByType: {
228
+ serializedName: "createdByType",
229
+ type: {
230
+ name: "String"
231
+ }
232
+ },
233
+ createdAt: {
234
+ serializedName: "createdAt",
235
+ type: {
236
+ name: "DateTime"
237
+ }
238
+ },
239
+ lastModifiedBy: {
240
+ serializedName: "lastModifiedBy",
241
+ type: {
242
+ name: "String"
243
+ }
244
+ },
245
+ lastModifiedByType: {
246
+ serializedName: "lastModifiedByType",
247
+ type: {
248
+ name: "String"
249
+ }
250
+ },
251
+ lastModifiedAt: {
252
+ serializedName: "lastModifiedAt",
253
+ type: {
254
+ name: "DateTime"
255
+ }
256
+ }
257
+ }
258
+ }
259
+ };
260
+ const AccountProperties = {
261
+ type: {
262
+ name: "Composite",
263
+ className: "AccountProperties",
264
+ modelProperties: {
265
+ provisioningState: {
266
+ serializedName: "provisioningState",
267
+ readOnly: true,
268
+ type: {
269
+ name: "String"
270
+ }
271
+ },
272
+ endpoint: {
273
+ serializedName: "endpoint",
274
+ readOnly: true,
275
+ type: {
276
+ name: "String"
277
+ }
278
+ },
279
+ internalId: {
280
+ serializedName: "internalId",
281
+ readOnly: true,
282
+ type: {
283
+ name: "String"
284
+ }
285
+ },
286
+ capabilities: {
287
+ serializedName: "capabilities",
288
+ readOnly: true,
289
+ type: {
290
+ name: "Sequence",
291
+ element: {
292
+ type: {
293
+ name: "Composite",
294
+ className: "SkuCapability"
295
+ }
296
+ }
297
+ }
298
+ },
299
+ isMigrated: {
300
+ serializedName: "isMigrated",
301
+ readOnly: true,
302
+ type: {
303
+ name: "Boolean"
304
+ }
305
+ },
306
+ migrationToken: {
307
+ serializedName: "migrationToken",
308
+ type: {
309
+ name: "String"
310
+ }
311
+ },
312
+ skuChangeInfo: {
313
+ serializedName: "skuChangeInfo",
314
+ type: {
315
+ name: "Composite",
316
+ className: "SkuChangeInfo"
317
+ }
318
+ },
319
+ customSubDomainName: {
320
+ serializedName: "customSubDomainName",
321
+ type: {
322
+ name: "String"
323
+ }
324
+ },
325
+ networkAcls: {
326
+ serializedName: "networkAcls",
327
+ type: {
328
+ name: "Composite",
329
+ className: "NetworkRuleSet"
330
+ }
331
+ },
332
+ encryption: {
333
+ serializedName: "encryption",
334
+ type: {
335
+ name: "Composite",
336
+ className: "Encryption"
337
+ }
338
+ },
339
+ userOwnedStorage: {
340
+ serializedName: "userOwnedStorage",
341
+ type: {
342
+ name: "Sequence",
343
+ element: {
344
+ type: {
345
+ name: "Composite",
346
+ className: "UserOwnedStorage"
347
+ }
348
+ }
349
+ }
350
+ },
351
+ privateEndpointConnections: {
352
+ serializedName: "privateEndpointConnections",
353
+ readOnly: true,
354
+ type: {
355
+ name: "Sequence",
356
+ element: {
357
+ type: {
358
+ name: "Composite",
359
+ className: "PrivateEndpointConnection"
360
+ }
361
+ }
362
+ }
363
+ },
364
+ publicNetworkAccess: {
365
+ serializedName: "publicNetworkAccess",
366
+ type: {
367
+ name: "String"
368
+ }
369
+ },
370
+ apiProperties: {
371
+ serializedName: "apiProperties",
372
+ type: {
373
+ name: "Composite",
374
+ className: "ApiProperties"
375
+ }
376
+ },
377
+ dateCreated: {
378
+ serializedName: "dateCreated",
379
+ readOnly: true,
380
+ type: {
381
+ name: "String"
382
+ }
383
+ },
384
+ callRateLimit: {
385
+ serializedName: "callRateLimit",
386
+ type: {
387
+ name: "Composite",
388
+ className: "CallRateLimit"
389
+ }
390
+ },
391
+ quotaLimit: {
392
+ serializedName: "quotaLimit",
393
+ type: {
394
+ name: "Composite",
395
+ className: "QuotaLimit"
396
+ }
397
+ },
398
+ restrictOutboundNetworkAccess: {
399
+ serializedName: "restrictOutboundNetworkAccess",
400
+ type: {
401
+ name: "Boolean"
402
+ }
403
+ },
404
+ allowedFqdnList: {
405
+ serializedName: "allowedFqdnList",
406
+ type: {
407
+ name: "Sequence",
408
+ element: {
409
+ type: {
410
+ name: "String"
411
+ }
412
+ }
413
+ }
414
+ },
415
+ disableLocalAuth: {
416
+ serializedName: "disableLocalAuth",
417
+ type: {
418
+ name: "Boolean"
419
+ }
420
+ },
421
+ endpoints: {
422
+ serializedName: "endpoints",
423
+ readOnly: true,
424
+ type: {
425
+ name: "Dictionary",
426
+ value: { type: { name: "String" } }
427
+ }
428
+ },
429
+ restore: {
430
+ serializedName: "restore",
431
+ type: {
432
+ name: "Boolean"
433
+ }
434
+ }
435
+ }
436
+ }
437
+ };
438
+ const SkuCapability = {
439
+ type: {
440
+ name: "Composite",
441
+ className: "SkuCapability",
442
+ modelProperties: {
443
+ name: {
444
+ serializedName: "name",
445
+ type: {
446
+ name: "String"
447
+ }
448
+ },
449
+ value: {
450
+ serializedName: "value",
451
+ type: {
452
+ name: "String"
453
+ }
454
+ }
455
+ }
456
+ }
457
+ };
458
+ const SkuChangeInfo = {
459
+ type: {
460
+ name: "Composite",
461
+ className: "SkuChangeInfo",
462
+ modelProperties: {
463
+ countOfDowngrades: {
464
+ serializedName: "countOfDowngrades",
465
+ type: {
466
+ name: "Number"
467
+ }
468
+ },
469
+ countOfUpgradesAfterDowngrades: {
470
+ serializedName: "countOfUpgradesAfterDowngrades",
471
+ type: {
472
+ name: "Number"
473
+ }
474
+ },
475
+ lastChangeDate: {
476
+ serializedName: "lastChangeDate",
477
+ type: {
478
+ name: "String"
479
+ }
480
+ }
481
+ }
482
+ }
483
+ };
484
+ const NetworkRuleSet = {
485
+ type: {
486
+ name: "Composite",
487
+ className: "NetworkRuleSet",
488
+ modelProperties: {
489
+ defaultAction: {
490
+ serializedName: "defaultAction",
491
+ type: {
492
+ name: "String"
493
+ }
494
+ },
495
+ ipRules: {
496
+ serializedName: "ipRules",
497
+ type: {
498
+ name: "Sequence",
499
+ element: {
500
+ type: {
501
+ name: "Composite",
502
+ className: "IpRule"
503
+ }
504
+ }
505
+ }
506
+ },
507
+ virtualNetworkRules: {
508
+ serializedName: "virtualNetworkRules",
509
+ type: {
510
+ name: "Sequence",
511
+ element: {
512
+ type: {
513
+ name: "Composite",
514
+ className: "VirtualNetworkRule"
515
+ }
516
+ }
517
+ }
518
+ }
519
+ }
520
+ }
521
+ };
522
+ const IpRule = {
523
+ type: {
524
+ name: "Composite",
525
+ className: "IpRule",
526
+ modelProperties: {
527
+ value: {
528
+ serializedName: "value",
529
+ required: true,
530
+ type: {
531
+ name: "String"
532
+ }
533
+ }
534
+ }
535
+ }
536
+ };
537
+ const VirtualNetworkRule = {
538
+ type: {
539
+ name: "Composite",
540
+ className: "VirtualNetworkRule",
541
+ modelProperties: {
542
+ id: {
543
+ serializedName: "id",
544
+ required: true,
545
+ type: {
546
+ name: "String"
547
+ }
548
+ },
549
+ state: {
550
+ serializedName: "state",
551
+ type: {
552
+ name: "String"
553
+ }
554
+ },
555
+ ignoreMissingVnetServiceEndpoint: {
556
+ serializedName: "ignoreMissingVnetServiceEndpoint",
557
+ type: {
558
+ name: "Boolean"
559
+ }
560
+ }
561
+ }
562
+ }
563
+ };
564
+ const Encryption = {
565
+ type: {
566
+ name: "Composite",
567
+ className: "Encryption",
568
+ modelProperties: {
569
+ keyVaultProperties: {
570
+ serializedName: "keyVaultProperties",
571
+ type: {
572
+ name: "Composite",
573
+ className: "KeyVaultProperties"
574
+ }
575
+ },
576
+ keySource: {
577
+ defaultValue: "Microsoft.KeyVault",
578
+ serializedName: "keySource",
579
+ type: {
580
+ name: "String"
581
+ }
582
+ }
583
+ }
584
+ }
585
+ };
586
+ const KeyVaultProperties = {
587
+ type: {
588
+ name: "Composite",
589
+ className: "KeyVaultProperties",
590
+ modelProperties: {
591
+ keyName: {
592
+ serializedName: "keyName",
593
+ type: {
594
+ name: "String"
595
+ }
596
+ },
597
+ keyVersion: {
598
+ serializedName: "keyVersion",
599
+ type: {
600
+ name: "String"
601
+ }
602
+ },
603
+ keyVaultUri: {
604
+ serializedName: "keyVaultUri",
605
+ type: {
606
+ name: "String"
607
+ }
608
+ },
609
+ identityClientId: {
610
+ serializedName: "identityClientId",
611
+ type: {
612
+ name: "String"
613
+ }
614
+ }
615
+ }
616
+ }
617
+ };
618
+ const UserOwnedStorage = {
619
+ type: {
620
+ name: "Composite",
621
+ className: "UserOwnedStorage",
622
+ modelProperties: {
623
+ resourceId: {
624
+ serializedName: "resourceId",
625
+ type: {
626
+ name: "String"
627
+ }
628
+ },
629
+ identityClientId: {
630
+ serializedName: "identityClientId",
631
+ type: {
632
+ name: "String"
633
+ }
634
+ }
635
+ }
636
+ }
637
+ };
638
+ const PrivateEndpointConnectionProperties = {
639
+ type: {
640
+ name: "Composite",
641
+ className: "PrivateEndpointConnectionProperties",
642
+ modelProperties: {
643
+ privateEndpoint: {
644
+ serializedName: "privateEndpoint",
645
+ type: {
646
+ name: "Composite",
647
+ className: "PrivateEndpoint"
648
+ }
649
+ },
650
+ privateLinkServiceConnectionState: {
651
+ serializedName: "privateLinkServiceConnectionState",
652
+ type: {
653
+ name: "Composite",
654
+ className: "PrivateLinkServiceConnectionState"
655
+ }
656
+ },
657
+ provisioningState: {
658
+ serializedName: "provisioningState",
659
+ readOnly: true,
660
+ type: {
661
+ name: "String"
662
+ }
663
+ },
664
+ groupIds: {
665
+ serializedName: "groupIds",
666
+ type: {
667
+ name: "Sequence",
668
+ element: {
669
+ type: {
670
+ name: "String"
671
+ }
672
+ }
673
+ }
674
+ }
675
+ }
676
+ }
677
+ };
678
+ const PrivateEndpoint = {
679
+ type: {
680
+ name: "Composite",
681
+ className: "PrivateEndpoint",
682
+ modelProperties: {
683
+ id: {
684
+ serializedName: "id",
685
+ readOnly: true,
686
+ type: {
687
+ name: "String"
688
+ }
689
+ }
690
+ }
691
+ }
692
+ };
693
+ const PrivateLinkServiceConnectionState = {
694
+ type: {
695
+ name: "Composite",
696
+ className: "PrivateLinkServiceConnectionState",
697
+ modelProperties: {
698
+ status: {
699
+ serializedName: "status",
700
+ type: {
701
+ name: "String"
702
+ }
703
+ },
704
+ description: {
705
+ serializedName: "description",
706
+ type: {
707
+ name: "String"
708
+ }
709
+ },
710
+ actionsRequired: {
711
+ serializedName: "actionsRequired",
712
+ type: {
713
+ name: "String"
714
+ }
715
+ }
716
+ }
717
+ }
718
+ };
719
+ const Resource = {
720
+ type: {
721
+ name: "Composite",
722
+ className: "Resource",
723
+ modelProperties: {
724
+ id: {
725
+ serializedName: "id",
726
+ readOnly: true,
727
+ type: {
728
+ name: "String"
729
+ }
730
+ },
731
+ name: {
732
+ serializedName: "name",
733
+ readOnly: true,
734
+ type: {
735
+ name: "String"
736
+ }
737
+ },
738
+ type: {
739
+ serializedName: "type",
740
+ readOnly: true,
741
+ type: {
742
+ name: "String"
743
+ }
744
+ }
745
+ }
746
+ }
747
+ };
748
+ const ApiProperties = {
749
+ type: {
750
+ name: "Composite",
751
+ className: "ApiProperties",
752
+ additionalProperties: { type: { name: "Object" } },
753
+ modelProperties: {
754
+ qnaRuntimeEndpoint: {
755
+ serializedName: "qnaRuntimeEndpoint",
756
+ type: {
757
+ name: "String"
758
+ }
759
+ },
760
+ qnaAzureSearchEndpointKey: {
761
+ serializedName: "qnaAzureSearchEndpointKey",
762
+ type: {
763
+ name: "String"
764
+ }
765
+ },
766
+ qnaAzureSearchEndpointId: {
767
+ serializedName: "qnaAzureSearchEndpointId",
768
+ type: {
769
+ name: "String"
770
+ }
771
+ },
772
+ statisticsEnabled: {
773
+ serializedName: "statisticsEnabled",
774
+ type: {
775
+ name: "Boolean"
776
+ }
777
+ },
778
+ eventHubConnectionString: {
779
+ constraints: {
780
+ Pattern: new RegExp("^( *)Endpoint=sb:\\/\\/(.*);( *)SharedAccessKeyName=(.*);( *)SharedAccessKey=(.*)$"),
781
+ MaxLength: 1000
782
+ },
783
+ serializedName: "eventHubConnectionString",
784
+ type: {
785
+ name: "String"
786
+ }
787
+ },
788
+ storageAccountConnectionString: {
789
+ constraints: {
790
+ Pattern: new RegExp("^(( *)DefaultEndpointsProtocol=(http|https)( *);( *))?AccountName=(.*)AccountKey=(.*)EndpointSuffix=(.*)$"),
791
+ MaxLength: 1000
792
+ },
793
+ serializedName: "storageAccountConnectionString",
794
+ type: {
795
+ name: "String"
796
+ }
797
+ },
798
+ aadClientId: {
799
+ constraints: {
800
+ MaxLength: 500
801
+ },
802
+ serializedName: "aadClientId",
803
+ type: {
804
+ name: "String"
805
+ }
806
+ },
807
+ aadTenantId: {
808
+ constraints: {
809
+ MaxLength: 500
810
+ },
811
+ serializedName: "aadTenantId",
812
+ type: {
813
+ name: "String"
814
+ }
815
+ },
816
+ superUser: {
817
+ constraints: {
818
+ MaxLength: 500
819
+ },
820
+ serializedName: "superUser",
821
+ type: {
822
+ name: "String"
823
+ }
824
+ },
825
+ websiteName: {
826
+ constraints: {
827
+ MaxLength: 500
828
+ },
829
+ serializedName: "websiteName",
830
+ type: {
831
+ name: "String"
832
+ }
833
+ }
834
+ }
835
+ }
836
+ };
837
+ const CallRateLimit = {
838
+ type: {
839
+ name: "Composite",
840
+ className: "CallRateLimit",
841
+ modelProperties: {
842
+ count: {
843
+ serializedName: "count",
844
+ type: {
845
+ name: "Number"
846
+ }
847
+ },
848
+ renewalPeriod: {
849
+ serializedName: "renewalPeriod",
850
+ type: {
851
+ name: "Number"
852
+ }
853
+ },
854
+ rules: {
855
+ serializedName: "rules",
856
+ type: {
857
+ name: "Sequence",
858
+ element: {
859
+ type: {
860
+ name: "Composite",
861
+ className: "ThrottlingRule"
862
+ }
863
+ }
864
+ }
865
+ }
866
+ }
867
+ }
868
+ };
869
+ const ThrottlingRule = {
870
+ type: {
871
+ name: "Composite",
872
+ className: "ThrottlingRule",
873
+ modelProperties: {
874
+ key: {
875
+ serializedName: "key",
876
+ type: {
877
+ name: "String"
878
+ }
879
+ },
880
+ renewalPeriod: {
881
+ serializedName: "renewalPeriod",
882
+ type: {
883
+ name: "Number"
884
+ }
885
+ },
886
+ count: {
887
+ serializedName: "count",
888
+ type: {
889
+ name: "Number"
890
+ }
891
+ },
892
+ minCount: {
893
+ serializedName: "minCount",
894
+ type: {
895
+ name: "Number"
896
+ }
897
+ },
898
+ dynamicThrottlingEnabled: {
899
+ serializedName: "dynamicThrottlingEnabled",
900
+ type: {
901
+ name: "Boolean"
902
+ }
903
+ },
904
+ matchPatterns: {
905
+ serializedName: "matchPatterns",
906
+ type: {
907
+ name: "Sequence",
908
+ element: {
909
+ type: {
910
+ name: "Composite",
911
+ className: "RequestMatchPattern"
912
+ }
913
+ }
914
+ }
915
+ }
916
+ }
917
+ }
918
+ };
919
+ const RequestMatchPattern = {
920
+ type: {
921
+ name: "Composite",
922
+ className: "RequestMatchPattern",
923
+ modelProperties: {
924
+ path: {
925
+ serializedName: "path",
926
+ type: {
927
+ name: "String"
928
+ }
929
+ },
930
+ method: {
931
+ serializedName: "method",
932
+ type: {
933
+ name: "String"
934
+ }
935
+ }
936
+ }
937
+ }
938
+ };
939
+ const QuotaLimit = {
940
+ type: {
941
+ name: "Composite",
942
+ className: "QuotaLimit",
943
+ modelProperties: {
944
+ count: {
945
+ serializedName: "count",
946
+ type: {
947
+ name: "Number"
948
+ }
949
+ },
950
+ renewalPeriod: {
951
+ serializedName: "renewalPeriod",
952
+ type: {
953
+ name: "Number"
954
+ }
955
+ },
956
+ rules: {
957
+ serializedName: "rules",
958
+ type: {
959
+ name: "Sequence",
960
+ element: {
961
+ type: {
962
+ name: "Composite",
963
+ className: "ThrottlingRule"
964
+ }
965
+ }
966
+ }
967
+ }
968
+ }
969
+ }
970
+ };
971
+ const ErrorResponse = {
972
+ type: {
973
+ name: "Composite",
974
+ className: "ErrorResponse",
975
+ modelProperties: {
976
+ error: {
977
+ serializedName: "error",
978
+ type: {
979
+ name: "Composite",
980
+ className: "ErrorDetail"
981
+ }
982
+ }
983
+ }
984
+ }
985
+ };
986
+ const ErrorDetail = {
987
+ type: {
988
+ name: "Composite",
989
+ className: "ErrorDetail",
990
+ modelProperties: {
991
+ code: {
992
+ serializedName: "code",
993
+ readOnly: true,
994
+ type: {
995
+ name: "String"
996
+ }
997
+ },
998
+ message: {
999
+ serializedName: "message",
1000
+ readOnly: true,
1001
+ type: {
1002
+ name: "String"
1003
+ }
1004
+ },
1005
+ target: {
1006
+ serializedName: "target",
1007
+ readOnly: true,
1008
+ type: {
1009
+ name: "String"
1010
+ }
1011
+ },
1012
+ details: {
1013
+ serializedName: "details",
1014
+ readOnly: true,
1015
+ type: {
1016
+ name: "Sequence",
1017
+ element: {
1018
+ type: {
1019
+ name: "Composite",
1020
+ className: "ErrorDetail"
1021
+ }
1022
+ }
1023
+ }
1024
+ },
1025
+ additionalInfo: {
1026
+ serializedName: "additionalInfo",
1027
+ readOnly: true,
1028
+ type: {
1029
+ name: "Sequence",
1030
+ element: {
1031
+ type: {
1032
+ name: "Composite",
1033
+ className: "ErrorAdditionalInfo"
1034
+ }
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+ }
1040
+ };
1041
+ const ErrorAdditionalInfo = {
1042
+ type: {
1043
+ name: "Composite",
1044
+ className: "ErrorAdditionalInfo",
1045
+ modelProperties: {
1046
+ type: {
1047
+ serializedName: "type",
1048
+ readOnly: true,
1049
+ type: {
1050
+ name: "String"
1051
+ }
1052
+ },
1053
+ info: {
1054
+ serializedName: "info",
1055
+ readOnly: true,
1056
+ type: {
1057
+ name: "Dictionary",
1058
+ value: { type: { name: "any" } }
1059
+ }
1060
+ }
1061
+ }
1062
+ }
1063
+ };
1064
+ const AccountListResult = {
1065
+ type: {
1066
+ name: "Composite",
1067
+ className: "AccountListResult",
1068
+ modelProperties: {
1069
+ nextLink: {
1070
+ serializedName: "nextLink",
1071
+ type: {
1072
+ name: "String"
1073
+ }
1074
+ },
1075
+ value: {
1076
+ serializedName: "value",
1077
+ readOnly: true,
1078
+ type: {
1079
+ name: "Sequence",
1080
+ element: {
1081
+ type: {
1082
+ name: "Composite",
1083
+ className: "Account"
1084
+ }
1085
+ }
1086
+ }
1087
+ }
1088
+ }
1089
+ }
1090
+ };
1091
+ const ApiKeys = {
1092
+ type: {
1093
+ name: "Composite",
1094
+ className: "ApiKeys",
1095
+ modelProperties: {
1096
+ key1: {
1097
+ serializedName: "key1",
1098
+ type: {
1099
+ name: "String"
1100
+ }
1101
+ },
1102
+ key2: {
1103
+ serializedName: "key2",
1104
+ type: {
1105
+ name: "String"
1106
+ }
1107
+ }
1108
+ }
1109
+ }
1110
+ };
1111
+ const RegenerateKeyParameters = {
1112
+ type: {
1113
+ name: "Composite",
1114
+ className: "RegenerateKeyParameters",
1115
+ modelProperties: {
1116
+ keyName: {
1117
+ serializedName: "keyName",
1118
+ required: true,
1119
+ type: {
1120
+ name: "Enum",
1121
+ allowedValues: ["Key1", "Key2"]
1122
+ }
1123
+ }
1124
+ }
1125
+ }
1126
+ };
1127
+ const ResourceSkuListResult = {
1128
+ type: {
1129
+ name: "Composite",
1130
+ className: "ResourceSkuListResult",
1131
+ modelProperties: {
1132
+ value: {
1133
+ serializedName: "value",
1134
+ required: true,
1135
+ type: {
1136
+ name: "Sequence",
1137
+ element: {
1138
+ type: {
1139
+ name: "Composite",
1140
+ className: "ResourceSku"
1141
+ }
1142
+ }
1143
+ }
1144
+ },
1145
+ nextLink: {
1146
+ serializedName: "nextLink",
1147
+ type: {
1148
+ name: "String"
1149
+ }
1150
+ }
1151
+ }
1152
+ }
1153
+ };
1154
+ const ResourceSku = {
1155
+ type: {
1156
+ name: "Composite",
1157
+ className: "ResourceSku",
1158
+ modelProperties: {
1159
+ resourceType: {
1160
+ serializedName: "resourceType",
1161
+ type: {
1162
+ name: "String"
1163
+ }
1164
+ },
1165
+ name: {
1166
+ serializedName: "name",
1167
+ type: {
1168
+ name: "String"
1169
+ }
1170
+ },
1171
+ tier: {
1172
+ serializedName: "tier",
1173
+ type: {
1174
+ name: "String"
1175
+ }
1176
+ },
1177
+ kind: {
1178
+ serializedName: "kind",
1179
+ type: {
1180
+ name: "String"
1181
+ }
1182
+ },
1183
+ locations: {
1184
+ serializedName: "locations",
1185
+ type: {
1186
+ name: "Sequence",
1187
+ element: {
1188
+ type: {
1189
+ name: "String"
1190
+ }
1191
+ }
1192
+ }
1193
+ },
1194
+ restrictions: {
1195
+ serializedName: "restrictions",
1196
+ type: {
1197
+ name: "Sequence",
1198
+ element: {
1199
+ type: {
1200
+ name: "Composite",
1201
+ className: "ResourceSkuRestrictions"
1202
+ }
1203
+ }
1204
+ }
1205
+ }
1206
+ }
1207
+ }
1208
+ };
1209
+ const ResourceSkuRestrictions = {
1210
+ type: {
1211
+ name: "Composite",
1212
+ className: "ResourceSkuRestrictions",
1213
+ modelProperties: {
1214
+ type: {
1215
+ serializedName: "type",
1216
+ type: {
1217
+ name: "Enum",
1218
+ allowedValues: ["Location", "Zone"]
1219
+ }
1220
+ },
1221
+ values: {
1222
+ serializedName: "values",
1223
+ type: {
1224
+ name: "Sequence",
1225
+ element: {
1226
+ type: {
1227
+ name: "String"
1228
+ }
1229
+ }
1230
+ }
1231
+ },
1232
+ restrictionInfo: {
1233
+ serializedName: "restrictionInfo",
1234
+ type: {
1235
+ name: "Composite",
1236
+ className: "ResourceSkuRestrictionInfo"
1237
+ }
1238
+ },
1239
+ reasonCode: {
1240
+ serializedName: "reasonCode",
1241
+ type: {
1242
+ name: "String"
1243
+ }
1244
+ }
1245
+ }
1246
+ }
1247
+ };
1248
+ const ResourceSkuRestrictionInfo = {
1249
+ type: {
1250
+ name: "Composite",
1251
+ className: "ResourceSkuRestrictionInfo",
1252
+ modelProperties: {
1253
+ locations: {
1254
+ serializedName: "locations",
1255
+ type: {
1256
+ name: "Sequence",
1257
+ element: {
1258
+ type: {
1259
+ name: "String"
1260
+ }
1261
+ }
1262
+ }
1263
+ },
1264
+ zones: {
1265
+ serializedName: "zones",
1266
+ type: {
1267
+ name: "Sequence",
1268
+ element: {
1269
+ type: {
1270
+ name: "String"
1271
+ }
1272
+ }
1273
+ }
1274
+ }
1275
+ }
1276
+ }
1277
+ };
1278
+ const AccountSkuListResult = {
1279
+ type: {
1280
+ name: "Composite",
1281
+ className: "AccountSkuListResult",
1282
+ modelProperties: {
1283
+ value: {
1284
+ serializedName: "value",
1285
+ type: {
1286
+ name: "Sequence",
1287
+ element: {
1288
+ type: {
1289
+ name: "Composite",
1290
+ className: "AccountSku"
1291
+ }
1292
+ }
1293
+ }
1294
+ }
1295
+ }
1296
+ }
1297
+ };
1298
+ const AccountSku = {
1299
+ type: {
1300
+ name: "Composite",
1301
+ className: "AccountSku",
1302
+ modelProperties: {
1303
+ resourceType: {
1304
+ serializedName: "resourceType",
1305
+ type: {
1306
+ name: "String"
1307
+ }
1308
+ },
1309
+ sku: {
1310
+ serializedName: "sku",
1311
+ type: {
1312
+ name: "Composite",
1313
+ className: "Sku"
1314
+ }
1315
+ }
1316
+ }
1317
+ }
1318
+ };
1319
+ const UsageListResult = {
1320
+ type: {
1321
+ name: "Composite",
1322
+ className: "UsageListResult",
1323
+ modelProperties: {
1324
+ value: {
1325
+ serializedName: "value",
1326
+ type: {
1327
+ name: "Sequence",
1328
+ element: {
1329
+ type: {
1330
+ name: "Composite",
1331
+ className: "Usage"
1332
+ }
1333
+ }
1334
+ }
1335
+ }
1336
+ }
1337
+ }
1338
+ };
1339
+ const Usage = {
1340
+ type: {
1341
+ name: "Composite",
1342
+ className: "Usage",
1343
+ modelProperties: {
1344
+ unit: {
1345
+ serializedName: "unit",
1346
+ type: {
1347
+ name: "String"
1348
+ }
1349
+ },
1350
+ name: {
1351
+ serializedName: "name",
1352
+ type: {
1353
+ name: "Composite",
1354
+ className: "MetricName"
1355
+ }
1356
+ },
1357
+ quotaPeriod: {
1358
+ serializedName: "quotaPeriod",
1359
+ type: {
1360
+ name: "String"
1361
+ }
1362
+ },
1363
+ limit: {
1364
+ serializedName: "limit",
1365
+ type: {
1366
+ name: "Number"
1367
+ }
1368
+ },
1369
+ currentValue: {
1370
+ serializedName: "currentValue",
1371
+ type: {
1372
+ name: "Number"
1373
+ }
1374
+ },
1375
+ nextResetTime: {
1376
+ serializedName: "nextResetTime",
1377
+ type: {
1378
+ name: "String"
1379
+ }
1380
+ },
1381
+ status: {
1382
+ serializedName: "status",
1383
+ type: {
1384
+ name: "String"
1385
+ }
1386
+ }
1387
+ }
1388
+ }
1389
+ };
1390
+ const MetricName = {
1391
+ type: {
1392
+ name: "Composite",
1393
+ className: "MetricName",
1394
+ modelProperties: {
1395
+ value: {
1396
+ serializedName: "value",
1397
+ type: {
1398
+ name: "String"
1399
+ }
1400
+ },
1401
+ localizedValue: {
1402
+ serializedName: "localizedValue",
1403
+ type: {
1404
+ name: "String"
1405
+ }
1406
+ }
1407
+ }
1408
+ }
1409
+ };
1410
+ const OperationListResult = {
1411
+ type: {
1412
+ name: "Composite",
1413
+ className: "OperationListResult",
1414
+ modelProperties: {
1415
+ value: {
1416
+ serializedName: "value",
1417
+ readOnly: true,
1418
+ type: {
1419
+ name: "Sequence",
1420
+ element: {
1421
+ type: {
1422
+ name: "Composite",
1423
+ className: "Operation"
1424
+ }
1425
+ }
1426
+ }
1427
+ },
1428
+ nextLink: {
1429
+ serializedName: "nextLink",
1430
+ readOnly: true,
1431
+ type: {
1432
+ name: "String"
1433
+ }
1434
+ }
1435
+ }
1436
+ }
1437
+ };
1438
+ const Operation = {
1439
+ type: {
1440
+ name: "Composite",
1441
+ className: "Operation",
1442
+ modelProperties: {
1443
+ name: {
1444
+ serializedName: "name",
1445
+ readOnly: true,
1446
+ type: {
1447
+ name: "String"
1448
+ }
1449
+ },
1450
+ isDataAction: {
1451
+ serializedName: "isDataAction",
1452
+ readOnly: true,
1453
+ type: {
1454
+ name: "Boolean"
1455
+ }
1456
+ },
1457
+ display: {
1458
+ serializedName: "display",
1459
+ type: {
1460
+ name: "Composite",
1461
+ className: "OperationDisplay"
1462
+ }
1463
+ },
1464
+ origin: {
1465
+ serializedName: "origin",
1466
+ readOnly: true,
1467
+ type: {
1468
+ name: "String"
1469
+ }
1470
+ },
1471
+ actionType: {
1472
+ serializedName: "actionType",
1473
+ readOnly: true,
1474
+ type: {
1475
+ name: "String"
1476
+ }
1477
+ }
1478
+ }
1479
+ }
1480
+ };
1481
+ const OperationDisplay = {
1482
+ type: {
1483
+ name: "Composite",
1484
+ className: "OperationDisplay",
1485
+ modelProperties: {
1486
+ provider: {
1487
+ serializedName: "provider",
1488
+ readOnly: true,
1489
+ type: {
1490
+ name: "String"
1491
+ }
1492
+ },
1493
+ resource: {
1494
+ serializedName: "resource",
1495
+ readOnly: true,
1496
+ type: {
1497
+ name: "String"
1498
+ }
1499
+ },
1500
+ operation: {
1501
+ serializedName: "operation",
1502
+ readOnly: true,
1503
+ type: {
1504
+ name: "String"
1505
+ }
1506
+ },
1507
+ description: {
1508
+ serializedName: "description",
1509
+ readOnly: true,
1510
+ type: {
1511
+ name: "String"
1512
+ }
1513
+ }
1514
+ }
1515
+ }
1516
+ };
1517
+ const CheckSkuAvailabilityParameter = {
1518
+ type: {
1519
+ name: "Composite",
1520
+ className: "CheckSkuAvailabilityParameter",
1521
+ modelProperties: {
1522
+ skus: {
1523
+ serializedName: "skus",
1524
+ required: true,
1525
+ type: {
1526
+ name: "Sequence",
1527
+ element: {
1528
+ type: {
1529
+ name: "String"
1530
+ }
1531
+ }
1532
+ }
1533
+ },
1534
+ kind: {
1535
+ serializedName: "kind",
1536
+ required: true,
1537
+ type: {
1538
+ name: "String"
1539
+ }
1540
+ },
1541
+ type: {
1542
+ serializedName: "type",
1543
+ required: true,
1544
+ type: {
1545
+ name: "String"
1546
+ }
1547
+ }
1548
+ }
1549
+ }
1550
+ };
1551
+ const SkuAvailabilityListResult = {
1552
+ type: {
1553
+ name: "Composite",
1554
+ className: "SkuAvailabilityListResult",
1555
+ modelProperties: {
1556
+ value: {
1557
+ serializedName: "value",
1558
+ type: {
1559
+ name: "Sequence",
1560
+ element: {
1561
+ type: {
1562
+ name: "Composite",
1563
+ className: "SkuAvailability"
1564
+ }
1565
+ }
1566
+ }
1567
+ }
1568
+ }
1569
+ }
1570
+ };
1571
+ const SkuAvailability = {
1572
+ type: {
1573
+ name: "Composite",
1574
+ className: "SkuAvailability",
1575
+ modelProperties: {
1576
+ kind: {
1577
+ serializedName: "kind",
1578
+ type: {
1579
+ name: "String"
1580
+ }
1581
+ },
1582
+ type: {
1583
+ serializedName: "type",
1584
+ type: {
1585
+ name: "String"
1586
+ }
1587
+ },
1588
+ skuName: {
1589
+ serializedName: "skuName",
1590
+ type: {
1591
+ name: "String"
1592
+ }
1593
+ },
1594
+ skuAvailable: {
1595
+ serializedName: "skuAvailable",
1596
+ type: {
1597
+ name: "Boolean"
1598
+ }
1599
+ },
1600
+ reason: {
1601
+ serializedName: "reason",
1602
+ type: {
1603
+ name: "String"
1604
+ }
1605
+ },
1606
+ message: {
1607
+ serializedName: "message",
1608
+ type: {
1609
+ name: "String"
1610
+ }
1611
+ }
1612
+ }
1613
+ }
1614
+ };
1615
+ const CommitmentTierListResult = {
1616
+ type: {
1617
+ name: "Composite",
1618
+ className: "CommitmentTierListResult",
1619
+ modelProperties: {
1620
+ nextLink: {
1621
+ serializedName: "nextLink",
1622
+ type: {
1623
+ name: "String"
1624
+ }
1625
+ },
1626
+ value: {
1627
+ serializedName: "value",
1628
+ readOnly: true,
1629
+ type: {
1630
+ name: "Sequence",
1631
+ element: {
1632
+ type: {
1633
+ name: "Composite",
1634
+ className: "CommitmentTier"
1635
+ }
1636
+ }
1637
+ }
1638
+ }
1639
+ }
1640
+ }
1641
+ };
1642
+ const CommitmentTier = {
1643
+ type: {
1644
+ name: "Composite",
1645
+ className: "CommitmentTier",
1646
+ modelProperties: {
1647
+ kind: {
1648
+ serializedName: "kind",
1649
+ type: {
1650
+ name: "String"
1651
+ }
1652
+ },
1653
+ skuName: {
1654
+ serializedName: "skuName",
1655
+ type: {
1656
+ name: "String"
1657
+ }
1658
+ },
1659
+ hostingModel: {
1660
+ serializedName: "hostingModel",
1661
+ type: {
1662
+ name: "String"
1663
+ }
1664
+ },
1665
+ planType: {
1666
+ serializedName: "planType",
1667
+ type: {
1668
+ name: "String"
1669
+ }
1670
+ },
1671
+ tier: {
1672
+ serializedName: "tier",
1673
+ type: {
1674
+ name: "String"
1675
+ }
1676
+ },
1677
+ maxCount: {
1678
+ serializedName: "maxCount",
1679
+ type: {
1680
+ name: "Number"
1681
+ }
1682
+ },
1683
+ quota: {
1684
+ serializedName: "quota",
1685
+ type: {
1686
+ name: "Composite",
1687
+ className: "CommitmentQuota"
1688
+ }
1689
+ },
1690
+ cost: {
1691
+ serializedName: "cost",
1692
+ type: {
1693
+ name: "Composite",
1694
+ className: "CommitmentCost"
1695
+ }
1696
+ }
1697
+ }
1698
+ }
1699
+ };
1700
+ const CommitmentQuota = {
1701
+ type: {
1702
+ name: "Composite",
1703
+ className: "CommitmentQuota",
1704
+ modelProperties: {
1705
+ quantity: {
1706
+ serializedName: "quantity",
1707
+ type: {
1708
+ name: "Number"
1709
+ }
1710
+ },
1711
+ unit: {
1712
+ serializedName: "unit",
1713
+ type: {
1714
+ name: "String"
1715
+ }
1716
+ }
1717
+ }
1718
+ }
1719
+ };
1720
+ const CommitmentCost = {
1721
+ type: {
1722
+ name: "Composite",
1723
+ className: "CommitmentCost",
1724
+ modelProperties: {
1725
+ commitmentMeterId: {
1726
+ serializedName: "commitmentMeterId",
1727
+ type: {
1728
+ name: "String"
1729
+ }
1730
+ },
1731
+ overageMeterId: {
1732
+ serializedName: "overageMeterId",
1733
+ type: {
1734
+ name: "String"
1735
+ }
1736
+ }
1737
+ }
1738
+ }
1739
+ };
1740
+ const CheckDomainAvailabilityParameter = {
1741
+ type: {
1742
+ name: "Composite",
1743
+ className: "CheckDomainAvailabilityParameter",
1744
+ modelProperties: {
1745
+ subdomainName: {
1746
+ serializedName: "subdomainName",
1747
+ required: true,
1748
+ type: {
1749
+ name: "String"
1750
+ }
1751
+ },
1752
+ type: {
1753
+ serializedName: "type",
1754
+ required: true,
1755
+ type: {
1756
+ name: "String"
1757
+ }
1758
+ },
1759
+ kind: {
1760
+ serializedName: "kind",
1761
+ type: {
1762
+ name: "String"
1763
+ }
1764
+ }
1765
+ }
1766
+ }
1767
+ };
1768
+ const DomainAvailability = {
1769
+ type: {
1770
+ name: "Composite",
1771
+ className: "DomainAvailability",
1772
+ modelProperties: {
1773
+ isSubdomainAvailable: {
1774
+ serializedName: "isSubdomainAvailable",
1775
+ type: {
1776
+ name: "Boolean"
1777
+ }
1778
+ },
1779
+ reason: {
1780
+ serializedName: "reason",
1781
+ type: {
1782
+ name: "String"
1783
+ }
1784
+ },
1785
+ subdomainName: {
1786
+ serializedName: "subdomainName",
1787
+ type: {
1788
+ name: "String"
1789
+ }
1790
+ },
1791
+ type: {
1792
+ serializedName: "type",
1793
+ type: {
1794
+ name: "String"
1795
+ }
1796
+ },
1797
+ kind: {
1798
+ serializedName: "kind",
1799
+ type: {
1800
+ name: "String"
1801
+ }
1802
+ }
1803
+ }
1804
+ }
1805
+ };
1806
+ const PrivateEndpointConnectionListResult = {
1807
+ type: {
1808
+ name: "Composite",
1809
+ className: "PrivateEndpointConnectionListResult",
1810
+ modelProperties: {
1811
+ value: {
1812
+ serializedName: "value",
1813
+ type: {
1814
+ name: "Sequence",
1815
+ element: {
1816
+ type: {
1817
+ name: "Composite",
1818
+ className: "PrivateEndpointConnection"
1819
+ }
1820
+ }
1821
+ }
1822
+ }
1823
+ }
1824
+ }
1825
+ };
1826
+ const PrivateLinkResourceListResult = {
1827
+ type: {
1828
+ name: "Composite",
1829
+ className: "PrivateLinkResourceListResult",
1830
+ modelProperties: {
1831
+ value: {
1832
+ serializedName: "value",
1833
+ type: {
1834
+ name: "Sequence",
1835
+ element: {
1836
+ type: {
1837
+ name: "Composite",
1838
+ className: "PrivateLinkResource"
1839
+ }
1840
+ }
1841
+ }
1842
+ }
1843
+ }
1844
+ }
1845
+ };
1846
+ const PrivateLinkResourceProperties = {
1847
+ type: {
1848
+ name: "Composite",
1849
+ className: "PrivateLinkResourceProperties",
1850
+ modelProperties: {
1851
+ groupId: {
1852
+ serializedName: "groupId",
1853
+ readOnly: true,
1854
+ type: {
1855
+ name: "String"
1856
+ }
1857
+ },
1858
+ requiredMembers: {
1859
+ serializedName: "requiredMembers",
1860
+ readOnly: true,
1861
+ type: {
1862
+ name: "Sequence",
1863
+ element: {
1864
+ type: {
1865
+ name: "String"
1866
+ }
1867
+ }
1868
+ }
1869
+ },
1870
+ requiredZoneNames: {
1871
+ serializedName: "requiredZoneNames",
1872
+ type: {
1873
+ name: "Sequence",
1874
+ element: {
1875
+ type: {
1876
+ name: "String"
1877
+ }
1878
+ }
1879
+ }
1880
+ },
1881
+ displayName: {
1882
+ serializedName: "displayName",
1883
+ readOnly: true,
1884
+ type: {
1885
+ name: "String"
1886
+ }
1887
+ }
1888
+ }
1889
+ }
1890
+ };
1891
+ const DeploymentListResult = {
1892
+ type: {
1893
+ name: "Composite",
1894
+ className: "DeploymentListResult",
1895
+ modelProperties: {
1896
+ nextLink: {
1897
+ serializedName: "nextLink",
1898
+ type: {
1899
+ name: "String"
1900
+ }
1901
+ },
1902
+ value: {
1903
+ serializedName: "value",
1904
+ readOnly: true,
1905
+ type: {
1906
+ name: "Sequence",
1907
+ element: {
1908
+ type: {
1909
+ name: "Composite",
1910
+ className: "Deployment"
1911
+ }
1912
+ }
1913
+ }
1914
+ }
1915
+ }
1916
+ }
1917
+ };
1918
+ const DeploymentProperties = {
1919
+ type: {
1920
+ name: "Composite",
1921
+ className: "DeploymentProperties",
1922
+ modelProperties: {
1923
+ provisioningState: {
1924
+ serializedName: "provisioningState",
1925
+ readOnly: true,
1926
+ type: {
1927
+ name: "String"
1928
+ }
1929
+ },
1930
+ model: {
1931
+ serializedName: "model",
1932
+ type: {
1933
+ name: "Composite",
1934
+ className: "DeploymentModel"
1935
+ }
1936
+ },
1937
+ scaleSettings: {
1938
+ serializedName: "scaleSettings",
1939
+ type: {
1940
+ name: "Composite",
1941
+ className: "DeploymentScaleSettings"
1942
+ }
1943
+ }
1944
+ }
1945
+ }
1946
+ };
1947
+ const DeploymentModel = {
1948
+ type: {
1949
+ name: "Composite",
1950
+ className: "DeploymentModel",
1951
+ modelProperties: {
1952
+ format: {
1953
+ serializedName: "format",
1954
+ type: {
1955
+ name: "String"
1956
+ }
1957
+ },
1958
+ name: {
1959
+ serializedName: "name",
1960
+ type: {
1961
+ name: "String"
1962
+ }
1963
+ },
1964
+ version: {
1965
+ serializedName: "version",
1966
+ type: {
1967
+ name: "String"
1968
+ }
1969
+ }
1970
+ }
1971
+ }
1972
+ };
1973
+ const DeploymentScaleSettings = {
1974
+ type: {
1975
+ name: "Composite",
1976
+ className: "DeploymentScaleSettings",
1977
+ modelProperties: {
1978
+ scaleType: {
1979
+ serializedName: "scaleType",
1980
+ type: {
1981
+ name: "String"
1982
+ }
1983
+ },
1984
+ capacity: {
1985
+ serializedName: "capacity",
1986
+ type: {
1987
+ name: "Number"
1988
+ }
1989
+ }
1990
+ }
1991
+ }
1992
+ };
1993
+ const CommitmentPlanListResult = {
1994
+ type: {
1995
+ name: "Composite",
1996
+ className: "CommitmentPlanListResult",
1997
+ modelProperties: {
1998
+ nextLink: {
1999
+ serializedName: "nextLink",
2000
+ type: {
2001
+ name: "String"
2002
+ }
2003
+ },
2004
+ value: {
2005
+ serializedName: "value",
2006
+ readOnly: true,
2007
+ type: {
2008
+ name: "Sequence",
2009
+ element: {
2010
+ type: {
2011
+ name: "Composite",
2012
+ className: "CommitmentPlan"
2013
+ }
2014
+ }
2015
+ }
2016
+ }
2017
+ }
2018
+ }
2019
+ };
2020
+ const CommitmentPlanProperties = {
2021
+ type: {
2022
+ name: "Composite",
2023
+ className: "CommitmentPlanProperties",
2024
+ modelProperties: {
2025
+ hostingModel: {
2026
+ serializedName: "hostingModel",
2027
+ type: {
2028
+ name: "String"
2029
+ }
2030
+ },
2031
+ planType: {
2032
+ serializedName: "planType",
2033
+ type: {
2034
+ name: "String"
2035
+ }
2036
+ },
2037
+ current: {
2038
+ serializedName: "current",
2039
+ type: {
2040
+ name: "Composite",
2041
+ className: "CommitmentPeriod"
2042
+ }
2043
+ },
2044
+ autoRenew: {
2045
+ serializedName: "autoRenew",
2046
+ type: {
2047
+ name: "Boolean"
2048
+ }
2049
+ },
2050
+ next: {
2051
+ serializedName: "next",
2052
+ type: {
2053
+ name: "Composite",
2054
+ className: "CommitmentPeriod"
2055
+ }
2056
+ },
2057
+ last: {
2058
+ serializedName: "last",
2059
+ type: {
2060
+ name: "Composite",
2061
+ className: "CommitmentPeriod"
2062
+ }
2063
+ }
2064
+ }
2065
+ }
2066
+ };
2067
+ const CommitmentPeriod = {
2068
+ type: {
2069
+ name: "Composite",
2070
+ className: "CommitmentPeriod",
2071
+ modelProperties: {
2072
+ tier: {
2073
+ serializedName: "tier",
2074
+ type: {
2075
+ name: "String"
2076
+ }
2077
+ },
2078
+ count: {
2079
+ serializedName: "count",
2080
+ type: {
2081
+ name: "Number"
2082
+ }
2083
+ },
2084
+ quota: {
2085
+ serializedName: "quota",
2086
+ type: {
2087
+ name: "Composite",
2088
+ className: "CommitmentQuota"
2089
+ }
2090
+ },
2091
+ startDate: {
2092
+ serializedName: "startDate",
2093
+ readOnly: true,
2094
+ type: {
2095
+ name: "String"
2096
+ }
2097
+ },
2098
+ endDate: {
2099
+ serializedName: "endDate",
2100
+ readOnly: true,
2101
+ type: {
2102
+ name: "String"
2103
+ }
2104
+ }
2105
+ }
2106
+ }
2107
+ };
2108
+ const AzureEntityResource = {
2109
+ type: {
2110
+ name: "Composite",
2111
+ className: "AzureEntityResource",
2112
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { etag: {
2113
+ serializedName: "etag",
2114
+ readOnly: true,
2115
+ type: {
2116
+ name: "String"
2117
+ }
2118
+ } })
2119
+ }
2120
+ };
2121
+ const PrivateLinkResource = {
2122
+ type: {
2123
+ name: "Composite",
2124
+ className: "PrivateLinkResource",
2125
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { properties: {
2126
+ serializedName: "properties",
2127
+ type: {
2128
+ name: "Composite",
2129
+ className: "PrivateLinkResourceProperties"
2130
+ }
2131
+ } })
2132
+ }
2133
+ };
2134
+ const ProxyResource = {
2135
+ type: {
2136
+ name: "Composite",
2137
+ className: "ProxyResource",
2138
+ modelProperties: Object.assign({}, Resource.type.modelProperties)
2139
+ }
2140
+ };
2141
+ const PrivateEndpointConnection = {
2142
+ type: {
2143
+ name: "Composite",
2144
+ className: "PrivateEndpointConnection",
2145
+ modelProperties: Object.assign(Object.assign({}, AzureEntityResource.type.modelProperties), { properties: {
2146
+ serializedName: "properties",
2147
+ type: {
2148
+ name: "Composite",
2149
+ className: "PrivateEndpointConnectionProperties"
2150
+ }
2151
+ }, systemData: {
2152
+ serializedName: "systemData",
2153
+ type: {
2154
+ name: "Composite",
2155
+ className: "SystemData"
2156
+ }
2157
+ }, location: {
2158
+ serializedName: "location",
2159
+ type: {
2160
+ name: "String"
2161
+ }
2162
+ } })
2163
+ }
2164
+ };
2165
+ const Account = {
2166
+ type: {
2167
+ name: "Composite",
2168
+ className: "Account",
2169
+ modelProperties: Object.assign(Object.assign({}, AzureEntityResource.type.modelProperties), { kind: {
2170
+ serializedName: "kind",
2171
+ type: {
2172
+ name: "String"
2173
+ }
2174
+ }, sku: {
2175
+ serializedName: "sku",
2176
+ type: {
2177
+ name: "Composite",
2178
+ className: "Sku"
2179
+ }
2180
+ }, identity: {
2181
+ serializedName: "identity",
2182
+ type: {
2183
+ name: "Composite",
2184
+ className: "Identity"
2185
+ }
2186
+ }, systemData: {
2187
+ serializedName: "systemData",
2188
+ type: {
2189
+ name: "Composite",
2190
+ className: "SystemData"
2191
+ }
2192
+ }, tags: {
2193
+ serializedName: "tags",
2194
+ type: {
2195
+ name: "Dictionary",
2196
+ value: { type: { name: "String" } }
2197
+ }
2198
+ }, location: {
2199
+ serializedName: "location",
2200
+ type: {
2201
+ name: "String"
2202
+ }
2203
+ }, properties: {
2204
+ serializedName: "properties",
2205
+ type: {
2206
+ name: "Composite",
2207
+ className: "AccountProperties"
2208
+ }
2209
+ } })
2210
+ }
2211
+ };
2212
+ const Deployment = {
2213
+ type: {
2214
+ name: "Composite",
2215
+ className: "Deployment",
2216
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
2217
+ serializedName: "systemData",
2218
+ type: {
2219
+ name: "Composite",
2220
+ className: "SystemData"
2221
+ }
2222
+ }, etag: {
2223
+ serializedName: "etag",
2224
+ readOnly: true,
2225
+ type: {
2226
+ name: "String"
2227
+ }
2228
+ }, properties: {
2229
+ serializedName: "properties",
2230
+ type: {
2231
+ name: "Composite",
2232
+ className: "DeploymentProperties"
2233
+ }
2234
+ } })
2235
+ }
2236
+ };
2237
+ const CommitmentPlan = {
2238
+ type: {
2239
+ name: "Composite",
2240
+ className: "CommitmentPlan",
2241
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
2242
+ serializedName: "systemData",
2243
+ type: {
2244
+ name: "Composite",
2245
+ className: "SystemData"
2246
+ }
2247
+ }, etag: {
2248
+ serializedName: "etag",
2249
+ readOnly: true,
2250
+ type: {
2251
+ name: "String"
2252
+ }
2253
+ }, properties: {
2254
+ serializedName: "properties",
2255
+ type: {
2256
+ name: "Composite",
2257
+ className: "CommitmentPlanProperties"
2258
+ }
2259
+ } })
2260
+ }
2261
+ };
2262
+
2263
+ var Mappers = /*#__PURE__*/Object.freeze({
2264
+ __proto__: null,
2265
+ Sku: Sku,
2266
+ Identity: Identity,
2267
+ UserAssignedIdentity: UserAssignedIdentity,
2268
+ SystemData: SystemData,
2269
+ AccountProperties: AccountProperties,
2270
+ SkuCapability: SkuCapability,
2271
+ SkuChangeInfo: SkuChangeInfo,
2272
+ NetworkRuleSet: NetworkRuleSet,
2273
+ IpRule: IpRule,
2274
+ VirtualNetworkRule: VirtualNetworkRule,
2275
+ Encryption: Encryption,
2276
+ KeyVaultProperties: KeyVaultProperties,
2277
+ UserOwnedStorage: UserOwnedStorage,
2278
+ PrivateEndpointConnectionProperties: PrivateEndpointConnectionProperties,
2279
+ PrivateEndpoint: PrivateEndpoint,
2280
+ PrivateLinkServiceConnectionState: PrivateLinkServiceConnectionState,
2281
+ Resource: Resource,
2282
+ ApiProperties: ApiProperties,
2283
+ CallRateLimit: CallRateLimit,
2284
+ ThrottlingRule: ThrottlingRule,
2285
+ RequestMatchPattern: RequestMatchPattern,
2286
+ QuotaLimit: QuotaLimit,
2287
+ ErrorResponse: ErrorResponse,
2288
+ ErrorDetail: ErrorDetail,
2289
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
2290
+ AccountListResult: AccountListResult,
2291
+ ApiKeys: ApiKeys,
2292
+ RegenerateKeyParameters: RegenerateKeyParameters,
2293
+ ResourceSkuListResult: ResourceSkuListResult,
2294
+ ResourceSku: ResourceSku,
2295
+ ResourceSkuRestrictions: ResourceSkuRestrictions,
2296
+ ResourceSkuRestrictionInfo: ResourceSkuRestrictionInfo,
2297
+ AccountSkuListResult: AccountSkuListResult,
2298
+ AccountSku: AccountSku,
2299
+ UsageListResult: UsageListResult,
2300
+ Usage: Usage,
2301
+ MetricName: MetricName,
2302
+ OperationListResult: OperationListResult,
2303
+ Operation: Operation,
2304
+ OperationDisplay: OperationDisplay,
2305
+ CheckSkuAvailabilityParameter: CheckSkuAvailabilityParameter,
2306
+ SkuAvailabilityListResult: SkuAvailabilityListResult,
2307
+ SkuAvailability: SkuAvailability,
2308
+ CommitmentTierListResult: CommitmentTierListResult,
2309
+ CommitmentTier: CommitmentTier,
2310
+ CommitmentQuota: CommitmentQuota,
2311
+ CommitmentCost: CommitmentCost,
2312
+ CheckDomainAvailabilityParameter: CheckDomainAvailabilityParameter,
2313
+ DomainAvailability: DomainAvailability,
2314
+ PrivateEndpointConnectionListResult: PrivateEndpointConnectionListResult,
2315
+ PrivateLinkResourceListResult: PrivateLinkResourceListResult,
2316
+ PrivateLinkResourceProperties: PrivateLinkResourceProperties,
2317
+ DeploymentListResult: DeploymentListResult,
2318
+ DeploymentProperties: DeploymentProperties,
2319
+ DeploymentModel: DeploymentModel,
2320
+ DeploymentScaleSettings: DeploymentScaleSettings,
2321
+ CommitmentPlanListResult: CommitmentPlanListResult,
2322
+ CommitmentPlanProperties: CommitmentPlanProperties,
2323
+ CommitmentPeriod: CommitmentPeriod,
2324
+ AzureEntityResource: AzureEntityResource,
2325
+ PrivateLinkResource: PrivateLinkResource,
2326
+ ProxyResource: ProxyResource,
2327
+ PrivateEndpointConnection: PrivateEndpointConnection,
2328
+ Account: Account,
2329
+ Deployment: Deployment,
2330
+ CommitmentPlan: CommitmentPlan
2331
+ });
2332
+
2333
+ /*
2334
+ * Copyright (c) Microsoft Corporation.
2335
+ * Licensed under the MIT License.
2336
+ *
2337
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2338
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2339
+ */
2340
+ const contentType = {
2341
+ parameterPath: ["options", "contentType"],
2342
+ mapper: {
2343
+ defaultValue: "application/json",
2344
+ isConstant: true,
2345
+ serializedName: "Content-Type",
2346
+ type: {
2347
+ name: "String"
2348
+ }
2349
+ }
2350
+ };
2351
+ const account = {
2352
+ parameterPath: "account",
2353
+ mapper: Account
2354
+ };
2355
+ const accept = {
2356
+ parameterPath: "accept",
2357
+ mapper: {
2358
+ defaultValue: "application/json",
2359
+ isConstant: true,
2360
+ serializedName: "Accept",
2361
+ type: {
2362
+ name: "String"
2363
+ }
2364
+ }
2365
+ };
2366
+ const $host = {
2367
+ parameterPath: "$host",
2368
+ mapper: {
2369
+ serializedName: "$host",
2370
+ required: true,
2371
+ type: {
2372
+ name: "String"
2373
+ }
2374
+ },
2375
+ skipEncoding: true
2376
+ };
2377
+ const resourceGroupName = {
2378
+ parameterPath: "resourceGroupName",
2379
+ mapper: {
2380
+ constraints: {
2381
+ MaxLength: 90,
2382
+ MinLength: 1
2383
+ },
2384
+ serializedName: "resourceGroupName",
2385
+ required: true,
2386
+ type: {
2387
+ name: "String"
2388
+ }
2389
+ }
2390
+ };
2391
+ const accountName = {
2392
+ parameterPath: "accountName",
2393
+ mapper: {
2394
+ constraints: {
2395
+ Pattern: new RegExp("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"),
2396
+ MaxLength: 64,
2397
+ MinLength: 2
2398
+ },
2399
+ serializedName: "accountName",
2400
+ required: true,
2401
+ type: {
2402
+ name: "String"
2403
+ }
2404
+ }
2405
+ };
2406
+ const apiVersion = {
2407
+ parameterPath: "apiVersion",
2408
+ mapper: {
2409
+ defaultValue: "2021-10-01",
2410
+ isConstant: true,
2411
+ serializedName: "api-version",
2412
+ type: {
2413
+ name: "String"
2414
+ }
2415
+ }
2416
+ };
2417
+ const subscriptionId = {
2418
+ parameterPath: "subscriptionId",
2419
+ mapper: {
2420
+ constraints: {
2421
+ MinLength: 1
2422
+ },
2423
+ serializedName: "subscriptionId",
2424
+ required: true,
2425
+ type: {
2426
+ name: "String"
2427
+ }
2428
+ }
2429
+ };
2430
+ const filter = {
2431
+ parameterPath: ["options", "filter"],
2432
+ mapper: {
2433
+ serializedName: "$filter",
2434
+ type: {
2435
+ name: "String"
2436
+ }
2437
+ }
2438
+ };
2439
+ const nextLink = {
2440
+ parameterPath: "nextLink",
2441
+ mapper: {
2442
+ serializedName: "nextLink",
2443
+ required: true,
2444
+ type: {
2445
+ name: "String"
2446
+ }
2447
+ },
2448
+ skipEncoding: true
2449
+ };
2450
+ const location = {
2451
+ parameterPath: "location",
2452
+ mapper: {
2453
+ serializedName: "location",
2454
+ required: true,
2455
+ type: {
2456
+ name: "String"
2457
+ }
2458
+ }
2459
+ };
2460
+ const privateEndpointConnectionName = {
2461
+ parameterPath: "privateEndpointConnectionName",
2462
+ mapper: {
2463
+ serializedName: "privateEndpointConnectionName",
2464
+ required: true,
2465
+ type: {
2466
+ name: "String"
2467
+ }
2468
+ }
2469
+ };
2470
+ const properties = {
2471
+ parameterPath: "properties",
2472
+ mapper: PrivateEndpointConnection
2473
+ };
2474
+ const deploymentName = {
2475
+ parameterPath: "deploymentName",
2476
+ mapper: {
2477
+ serializedName: "deploymentName",
2478
+ required: true,
2479
+ type: {
2480
+ name: "String"
2481
+ }
2482
+ }
2483
+ };
2484
+ const deployment = {
2485
+ parameterPath: "deployment",
2486
+ mapper: Deployment
2487
+ };
2488
+ const commitmentPlanName = {
2489
+ parameterPath: "commitmentPlanName",
2490
+ mapper: {
2491
+ serializedName: "commitmentPlanName",
2492
+ required: true,
2493
+ type: {
2494
+ name: "String"
2495
+ }
2496
+ }
2497
+ };
2498
+ const commitmentPlan = {
2499
+ parameterPath: "commitmentPlan",
2500
+ mapper: CommitmentPlan
2501
+ };
2502
+
2503
+ /*
2504
+ * Copyright (c) Microsoft Corporation.
2505
+ * Licensed under the MIT License.
2506
+ *
2507
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2508
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2509
+ */
2510
+ class LroImpl {
2511
+ constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
2512
+ this.sendOperationFn = sendOperationFn;
2513
+ this.args = args;
2514
+ this.spec = spec;
2515
+ this.requestPath = requestPath;
2516
+ this.requestMethod = requestMethod;
2517
+ }
2518
+ sendInitialRequest() {
2519
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2520
+ return this.sendOperationFn(this.args, this.spec);
2521
+ });
2522
+ }
2523
+ sendPollRequest(path) {
2524
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2525
+ const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
2526
+ return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
2527
+ });
2528
+ }
2529
+ }
2530
+
2531
+ /*
2532
+ * Copyright (c) Microsoft Corporation.
2533
+ * Licensed under the MIT License.
2534
+ *
2535
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2536
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2537
+ */
2538
+ /// <reference lib="esnext.asynciterable" />
2539
+ /** Class containing Accounts operations. */
2540
+ class AccountsImpl {
2541
+ /**
2542
+ * Initialize a new instance of the class Accounts class.
2543
+ * @param client Reference to the service client
2544
+ */
2545
+ constructor(client) {
2546
+ this.client = client;
2547
+ }
2548
+ /**
2549
+ * Returns all the resources of a particular type belonging to a resource group
2550
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2551
+ * @param options The options parameters.
2552
+ */
2553
+ listByResourceGroup(resourceGroupName, options) {
2554
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
2555
+ return {
2556
+ next() {
2557
+ return iter.next();
2558
+ },
2559
+ [Symbol.asyncIterator]() {
2560
+ return this;
2561
+ },
2562
+ byPage: () => {
2563
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
2564
+ }
2565
+ };
2566
+ }
2567
+ listByResourceGroupPagingPage(resourceGroupName, options) {
2568
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
2569
+ let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
2570
+ yield yield tslib.__await(result.value || []);
2571
+ let continuationToken = result.nextLink;
2572
+ while (continuationToken) {
2573
+ result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
2574
+ continuationToken = result.nextLink;
2575
+ yield yield tslib.__await(result.value || []);
2576
+ }
2577
+ });
2578
+ }
2579
+ listByResourceGroupPagingAll(resourceGroupName, options) {
2580
+ return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
2581
+ var e_1, _a;
2582
+ try {
2583
+ for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
2584
+ const page = _c.value;
2585
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2586
+ }
2587
+ }
2588
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2589
+ finally {
2590
+ try {
2591
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2592
+ }
2593
+ finally { if (e_1) throw e_1.error; }
2594
+ }
2595
+ });
2596
+ }
2597
+ /**
2598
+ * Returns all the resources of a particular type belonging to a subscription.
2599
+ * @param options The options parameters.
2600
+ */
2601
+ list(options) {
2602
+ const iter = this.listPagingAll(options);
2603
+ return {
2604
+ next() {
2605
+ return iter.next();
2606
+ },
2607
+ [Symbol.asyncIterator]() {
2608
+ return this;
2609
+ },
2610
+ byPage: () => {
2611
+ return this.listPagingPage(options);
2612
+ }
2613
+ };
2614
+ }
2615
+ listPagingPage(options) {
2616
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2617
+ let result = yield tslib.__await(this._list(options));
2618
+ yield yield tslib.__await(result.value || []);
2619
+ let continuationToken = result.nextLink;
2620
+ while (continuationToken) {
2621
+ result = yield tslib.__await(this._listNext(continuationToken, options));
2622
+ continuationToken = result.nextLink;
2623
+ yield yield tslib.__await(result.value || []);
2624
+ }
2625
+ });
2626
+ }
2627
+ listPagingAll(options) {
2628
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2629
+ var e_2, _a;
2630
+ try {
2631
+ for (var _b = tslib.__asyncValues(this.listPagingPage(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_2_1) { e_2 = { error: e_2_1 }; }
2637
+ finally {
2638
+ try {
2639
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
2640
+ }
2641
+ finally { if (e_2) throw e_2.error; }
2642
+ }
2643
+ });
2644
+ }
2645
+ /**
2646
+ * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the
2647
+ * keys for developer to access intelligent APIs. It's also the resource type for billing.
2648
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2649
+ * @param accountName The name of Cognitive Services account.
2650
+ * @param account The parameters to provide for the created account.
2651
+ * @param options The options parameters.
2652
+ */
2653
+ beginCreate(resourceGroupName, accountName, account, options) {
2654
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2655
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2656
+ return this.client.sendOperationRequest(args, spec);
2657
+ });
2658
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2659
+ var _a;
2660
+ let currentRawResponse = undefined;
2661
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2662
+ const callback = (rawResponse, flatResponse) => {
2663
+ currentRawResponse = rawResponse;
2664
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2665
+ };
2666
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2667
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2668
+ return {
2669
+ flatResponse,
2670
+ rawResponse: {
2671
+ statusCode: currentRawResponse.status,
2672
+ body: currentRawResponse.parsedBody,
2673
+ headers: currentRawResponse.headers.toJSON()
2674
+ }
2675
+ };
2676
+ });
2677
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, account, options }, createOperationSpec);
2678
+ return new coreLro.LroEngine(lro, {
2679
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2680
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2681
+ });
2682
+ });
2683
+ }
2684
+ /**
2685
+ * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the
2686
+ * keys for developer to access intelligent APIs. It's also the resource type for billing.
2687
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2688
+ * @param accountName The name of Cognitive Services account.
2689
+ * @param account The parameters to provide for the created account.
2690
+ * @param options The options parameters.
2691
+ */
2692
+ beginCreateAndWait(resourceGroupName, accountName, account, options) {
2693
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2694
+ const poller = yield this.beginCreate(resourceGroupName, accountName, account, options);
2695
+ return poller.pollUntilDone();
2696
+ });
2697
+ }
2698
+ /**
2699
+ * Updates a Cognitive Services account
2700
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2701
+ * @param accountName The name of Cognitive Services account.
2702
+ * @param account The parameters to provide for the created account.
2703
+ * @param options The options parameters.
2704
+ */
2705
+ beginUpdate(resourceGroupName, accountName, account, options) {
2706
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2707
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2708
+ return this.client.sendOperationRequest(args, spec);
2709
+ });
2710
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2711
+ var _a;
2712
+ let currentRawResponse = undefined;
2713
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2714
+ const callback = (rawResponse, flatResponse) => {
2715
+ currentRawResponse = rawResponse;
2716
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2717
+ };
2718
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2719
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2720
+ return {
2721
+ flatResponse,
2722
+ rawResponse: {
2723
+ statusCode: currentRawResponse.status,
2724
+ body: currentRawResponse.parsedBody,
2725
+ headers: currentRawResponse.headers.toJSON()
2726
+ }
2727
+ };
2728
+ });
2729
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, account, options }, updateOperationSpec);
2730
+ return new coreLro.LroEngine(lro, {
2731
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2732
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2733
+ });
2734
+ });
2735
+ }
2736
+ /**
2737
+ * Updates a Cognitive Services account
2738
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2739
+ * @param accountName The name of Cognitive Services account.
2740
+ * @param account The parameters to provide for the created account.
2741
+ * @param options The options parameters.
2742
+ */
2743
+ beginUpdateAndWait(resourceGroupName, accountName, account, options) {
2744
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2745
+ const poller = yield this.beginUpdate(resourceGroupName, accountName, account, options);
2746
+ return poller.pollUntilDone();
2747
+ });
2748
+ }
2749
+ /**
2750
+ * Deletes a Cognitive Services account from the resource group.
2751
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2752
+ * @param accountName The name of Cognitive Services account.
2753
+ * @param options The options parameters.
2754
+ */
2755
+ beginDelete(resourceGroupName, accountName, options) {
2756
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2757
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2758
+ return this.client.sendOperationRequest(args, spec);
2759
+ });
2760
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2761
+ var _a;
2762
+ let currentRawResponse = undefined;
2763
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2764
+ const callback = (rawResponse, flatResponse) => {
2765
+ currentRawResponse = rawResponse;
2766
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2767
+ };
2768
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2769
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2770
+ return {
2771
+ flatResponse,
2772
+ rawResponse: {
2773
+ statusCode: currentRawResponse.status,
2774
+ body: currentRawResponse.parsedBody,
2775
+ headers: currentRawResponse.headers.toJSON()
2776
+ }
2777
+ };
2778
+ });
2779
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, options }, deleteOperationSpec);
2780
+ return new coreLro.LroEngine(lro, {
2781
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2782
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2783
+ });
2784
+ });
2785
+ }
2786
+ /**
2787
+ * Deletes a Cognitive Services account from the resource group.
2788
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2789
+ * @param accountName The name of Cognitive Services account.
2790
+ * @param options The options parameters.
2791
+ */
2792
+ beginDeleteAndWait(resourceGroupName, accountName, options) {
2793
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2794
+ const poller = yield this.beginDelete(resourceGroupName, accountName, options);
2795
+ return poller.pollUntilDone();
2796
+ });
2797
+ }
2798
+ /**
2799
+ * Returns a Cognitive Services account specified by the parameters.
2800
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2801
+ * @param accountName The name of Cognitive Services account.
2802
+ * @param options The options parameters.
2803
+ */
2804
+ get(resourceGroupName, accountName, options) {
2805
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, getOperationSpec);
2806
+ }
2807
+ /**
2808
+ * Returns all the resources of a particular type belonging to a resource group
2809
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2810
+ * @param options The options parameters.
2811
+ */
2812
+ _listByResourceGroup(resourceGroupName, options) {
2813
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
2814
+ }
2815
+ /**
2816
+ * Returns all the resources of a particular type belonging to a subscription.
2817
+ * @param options The options parameters.
2818
+ */
2819
+ _list(options) {
2820
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
2821
+ }
2822
+ /**
2823
+ * Lists the account keys for the specified Cognitive Services account.
2824
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2825
+ * @param accountName The name of Cognitive Services account.
2826
+ * @param options The options parameters.
2827
+ */
2828
+ listKeys(resourceGroupName, accountName, options) {
2829
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listKeysOperationSpec);
2830
+ }
2831
+ /**
2832
+ * Regenerates the specified account key for the specified Cognitive Services account.
2833
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2834
+ * @param accountName The name of Cognitive Services account.
2835
+ * @param keyName key name to generate (Key1|Key2)
2836
+ * @param options The options parameters.
2837
+ */
2838
+ regenerateKey(resourceGroupName, accountName, keyName, options) {
2839
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, keyName, options }, regenerateKeyOperationSpec);
2840
+ }
2841
+ /**
2842
+ * List available SKUs for the requested Cognitive Services account
2843
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2844
+ * @param accountName The name of Cognitive Services account.
2845
+ * @param options The options parameters.
2846
+ */
2847
+ listSkus(resourceGroupName, accountName, options) {
2848
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listSkusOperationSpec);
2849
+ }
2850
+ /**
2851
+ * Get usages for the requested Cognitive Services account
2852
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2853
+ * @param accountName The name of Cognitive Services account.
2854
+ * @param options The options parameters.
2855
+ */
2856
+ listUsages(resourceGroupName, accountName, options) {
2857
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listUsagesOperationSpec);
2858
+ }
2859
+ /**
2860
+ * ListByResourceGroupNext
2861
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2862
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
2863
+ * @param options The options parameters.
2864
+ */
2865
+ _listByResourceGroupNext(resourceGroupName, nextLink, options) {
2866
+ return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
2867
+ }
2868
+ /**
2869
+ * ListNext
2870
+ * @param nextLink The nextLink from the previous successful call to the List method.
2871
+ * @param options The options parameters.
2872
+ */
2873
+ _listNext(nextLink, options) {
2874
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
2875
+ }
2876
+ }
2877
+ // Operation Specifications
2878
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
2879
+ const createOperationSpec = {
2880
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
2881
+ httpMethod: "PUT",
2882
+ responses: {
2883
+ 200: {
2884
+ bodyMapper: Account
2885
+ },
2886
+ 201: {
2887
+ bodyMapper: Account
2888
+ },
2889
+ 202: {
2890
+ bodyMapper: Account
2891
+ },
2892
+ 204: {
2893
+ bodyMapper: Account
2894
+ },
2895
+ default: {
2896
+ bodyMapper: ErrorResponse
2897
+ }
2898
+ },
2899
+ requestBody: account,
2900
+ queryParameters: [apiVersion],
2901
+ urlParameters: [
2902
+ $host,
2903
+ resourceGroupName,
2904
+ accountName,
2905
+ subscriptionId
2906
+ ],
2907
+ headerParameters: [contentType, accept],
2908
+ mediaType: "json",
2909
+ serializer
2910
+ };
2911
+ const updateOperationSpec = {
2912
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
2913
+ httpMethod: "PATCH",
2914
+ responses: {
2915
+ 200: {
2916
+ bodyMapper: Account
2917
+ },
2918
+ 201: {
2919
+ bodyMapper: Account
2920
+ },
2921
+ 202: {
2922
+ bodyMapper: Account
2923
+ },
2924
+ 204: {
2925
+ bodyMapper: Account
2926
+ },
2927
+ default: {
2928
+ bodyMapper: ErrorResponse
2929
+ }
2930
+ },
2931
+ requestBody: account,
2932
+ queryParameters: [apiVersion],
2933
+ urlParameters: [
2934
+ $host,
2935
+ resourceGroupName,
2936
+ accountName,
2937
+ subscriptionId
2938
+ ],
2939
+ headerParameters: [contentType, accept],
2940
+ mediaType: "json",
2941
+ serializer
2942
+ };
2943
+ const deleteOperationSpec = {
2944
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
2945
+ httpMethod: "DELETE",
2946
+ responses: {
2947
+ 200: {},
2948
+ 201: {},
2949
+ 202: {},
2950
+ 204: {},
2951
+ default: {
2952
+ bodyMapper: ErrorResponse
2953
+ }
2954
+ },
2955
+ queryParameters: [apiVersion],
2956
+ urlParameters: [
2957
+ $host,
2958
+ resourceGroupName,
2959
+ accountName,
2960
+ subscriptionId
2961
+ ],
2962
+ headerParameters: [accept],
2963
+ serializer
2964
+ };
2965
+ const getOperationSpec = {
2966
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}",
2967
+ httpMethod: "GET",
2968
+ responses: {
2969
+ 200: {
2970
+ bodyMapper: Account
2971
+ },
2972
+ default: {
2973
+ bodyMapper: ErrorResponse
2974
+ }
2975
+ },
2976
+ queryParameters: [apiVersion],
2977
+ urlParameters: [
2978
+ $host,
2979
+ resourceGroupName,
2980
+ accountName,
2981
+ subscriptionId
2982
+ ],
2983
+ headerParameters: [accept],
2984
+ serializer
2985
+ };
2986
+ const listByResourceGroupOperationSpec = {
2987
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts",
2988
+ httpMethod: "GET",
2989
+ responses: {
2990
+ 200: {
2991
+ bodyMapper: AccountListResult
2992
+ },
2993
+ default: {
2994
+ bodyMapper: ErrorResponse
2995
+ }
2996
+ },
2997
+ queryParameters: [apiVersion],
2998
+ urlParameters: [
2999
+ $host,
3000
+ resourceGroupName,
3001
+ subscriptionId
3002
+ ],
3003
+ headerParameters: [accept],
3004
+ serializer
3005
+ };
3006
+ const listOperationSpec = {
3007
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/accounts",
3008
+ httpMethod: "GET",
3009
+ responses: {
3010
+ 200: {
3011
+ bodyMapper: AccountListResult
3012
+ },
3013
+ default: {
3014
+ bodyMapper: ErrorResponse
3015
+ }
3016
+ },
3017
+ queryParameters: [apiVersion],
3018
+ urlParameters: [$host, subscriptionId],
3019
+ headerParameters: [accept],
3020
+ serializer
3021
+ };
3022
+ const listKeysOperationSpec = {
3023
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/listKeys",
3024
+ httpMethod: "POST",
3025
+ responses: {
3026
+ 200: {
3027
+ bodyMapper: ApiKeys
3028
+ },
3029
+ default: {
3030
+ bodyMapper: ErrorResponse
3031
+ }
3032
+ },
3033
+ queryParameters: [apiVersion],
3034
+ urlParameters: [
3035
+ $host,
3036
+ resourceGroupName,
3037
+ accountName,
3038
+ subscriptionId
3039
+ ],
3040
+ headerParameters: [accept],
3041
+ serializer
3042
+ };
3043
+ const regenerateKeyOperationSpec = {
3044
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey",
3045
+ httpMethod: "POST",
3046
+ responses: {
3047
+ 200: {
3048
+ bodyMapper: ApiKeys
3049
+ },
3050
+ default: {
3051
+ bodyMapper: ErrorResponse
3052
+ }
3053
+ },
3054
+ requestBody: {
3055
+ parameterPath: { keyName: ["keyName"] },
3056
+ mapper: Object.assign(Object.assign({}, RegenerateKeyParameters), { required: true })
3057
+ },
3058
+ queryParameters: [apiVersion],
3059
+ urlParameters: [
3060
+ $host,
3061
+ resourceGroupName,
3062
+ accountName,
3063
+ subscriptionId
3064
+ ],
3065
+ headerParameters: [contentType, accept],
3066
+ mediaType: "json",
3067
+ serializer
3068
+ };
3069
+ const listSkusOperationSpec = {
3070
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/skus",
3071
+ httpMethod: "GET",
3072
+ responses: {
3073
+ 200: {
3074
+ bodyMapper: AccountSkuListResult
3075
+ },
3076
+ default: {
3077
+ bodyMapper: ErrorResponse
3078
+ }
3079
+ },
3080
+ queryParameters: [apiVersion],
3081
+ urlParameters: [
3082
+ $host,
3083
+ resourceGroupName,
3084
+ accountName,
3085
+ subscriptionId
3086
+ ],
3087
+ headerParameters: [accept],
3088
+ serializer
3089
+ };
3090
+ const listUsagesOperationSpec = {
3091
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/usages",
3092
+ httpMethod: "GET",
3093
+ responses: {
3094
+ 200: {
3095
+ bodyMapper: UsageListResult
3096
+ },
3097
+ default: {
3098
+ bodyMapper: ErrorResponse
3099
+ }
3100
+ },
3101
+ queryParameters: [apiVersion, filter],
3102
+ urlParameters: [
3103
+ $host,
3104
+ resourceGroupName,
3105
+ accountName,
3106
+ subscriptionId
3107
+ ],
3108
+ headerParameters: [accept],
3109
+ serializer
3110
+ };
3111
+ const listByResourceGroupNextOperationSpec = {
3112
+ path: "{nextLink}",
3113
+ httpMethod: "GET",
3114
+ responses: {
3115
+ 200: {
3116
+ bodyMapper: AccountListResult
3117
+ },
3118
+ default: {
3119
+ bodyMapper: ErrorResponse
3120
+ }
3121
+ },
3122
+ queryParameters: [apiVersion],
3123
+ urlParameters: [
3124
+ $host,
3125
+ resourceGroupName,
3126
+ subscriptionId,
3127
+ nextLink
3128
+ ],
3129
+ headerParameters: [accept],
3130
+ serializer
3131
+ };
3132
+ const listNextOperationSpec = {
3133
+ path: "{nextLink}",
3134
+ httpMethod: "GET",
3135
+ responses: {
3136
+ 200: {
3137
+ bodyMapper: AccountListResult
3138
+ },
3139
+ default: {
3140
+ bodyMapper: ErrorResponse
3141
+ }
3142
+ },
3143
+ queryParameters: [apiVersion],
3144
+ urlParameters: [
3145
+ $host,
3146
+ subscriptionId,
3147
+ nextLink
3148
+ ],
3149
+ headerParameters: [accept],
3150
+ serializer
3151
+ };
3152
+
3153
+ /*
3154
+ * Copyright (c) Microsoft Corporation.
3155
+ * Licensed under the MIT License.
3156
+ *
3157
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3158
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3159
+ */
3160
+ /// <reference lib="esnext.asynciterable" />
3161
+ /** Class containing DeletedAccounts operations. */
3162
+ class DeletedAccountsImpl {
3163
+ /**
3164
+ * Initialize a new instance of the class DeletedAccounts class.
3165
+ * @param client Reference to the service client
3166
+ */
3167
+ constructor(client) {
3168
+ this.client = client;
3169
+ }
3170
+ /**
3171
+ * Returns all the resources of a particular type belonging to a subscription.
3172
+ * @param options The options parameters.
3173
+ */
3174
+ list(options) {
3175
+ const iter = this.listPagingAll(options);
3176
+ return {
3177
+ next() {
3178
+ return iter.next();
3179
+ },
3180
+ [Symbol.asyncIterator]() {
3181
+ return this;
3182
+ },
3183
+ byPage: () => {
3184
+ return this.listPagingPage(options);
3185
+ }
3186
+ };
3187
+ }
3188
+ listPagingPage(options) {
3189
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3190
+ let result = yield tslib.__await(this._list(options));
3191
+ yield yield tslib.__await(result.value || []);
3192
+ let continuationToken = result.nextLink;
3193
+ while (continuationToken) {
3194
+ result = yield tslib.__await(this._listNext(continuationToken, options));
3195
+ continuationToken = result.nextLink;
3196
+ yield yield tslib.__await(result.value || []);
3197
+ }
3198
+ });
3199
+ }
3200
+ listPagingAll(options) {
3201
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3202
+ var e_1, _a;
3203
+ try {
3204
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3205
+ const page = _c.value;
3206
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3207
+ }
3208
+ }
3209
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3210
+ finally {
3211
+ try {
3212
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3213
+ }
3214
+ finally { if (e_1) throw e_1.error; }
3215
+ }
3216
+ });
3217
+ }
3218
+ /**
3219
+ * Returns a Cognitive Services account specified by the parameters.
3220
+ * @param location Resource location.
3221
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3222
+ * @param accountName The name of Cognitive Services account.
3223
+ * @param options The options parameters.
3224
+ */
3225
+ get(location, resourceGroupName, accountName, options) {
3226
+ return this.client.sendOperationRequest({ location, resourceGroupName, accountName, options }, getOperationSpec$1);
3227
+ }
3228
+ /**
3229
+ * Deletes a Cognitive Services account from the resource group.
3230
+ * @param location Resource location.
3231
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3232
+ * @param accountName The name of Cognitive Services account.
3233
+ * @param options The options parameters.
3234
+ */
3235
+ beginPurge(location, resourceGroupName, accountName, options) {
3236
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3237
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3238
+ return this.client.sendOperationRequest(args, spec);
3239
+ });
3240
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3241
+ var _a;
3242
+ let currentRawResponse = undefined;
3243
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3244
+ const callback = (rawResponse, flatResponse) => {
3245
+ currentRawResponse = rawResponse;
3246
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3247
+ };
3248
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3249
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3250
+ return {
3251
+ flatResponse,
3252
+ rawResponse: {
3253
+ statusCode: currentRawResponse.status,
3254
+ body: currentRawResponse.parsedBody,
3255
+ headers: currentRawResponse.headers.toJSON()
3256
+ }
3257
+ };
3258
+ });
3259
+ const lro = new LroImpl(sendOperation, { location, resourceGroupName, accountName, options }, purgeOperationSpec);
3260
+ return new coreLro.LroEngine(lro, {
3261
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3262
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3263
+ });
3264
+ });
3265
+ }
3266
+ /**
3267
+ * Deletes a Cognitive Services account from the resource group.
3268
+ * @param location Resource location.
3269
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3270
+ * @param accountName The name of Cognitive Services account.
3271
+ * @param options The options parameters.
3272
+ */
3273
+ beginPurgeAndWait(location, resourceGroupName, accountName, options) {
3274
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3275
+ const poller = yield this.beginPurge(location, resourceGroupName, accountName, options);
3276
+ return poller.pollUntilDone();
3277
+ });
3278
+ }
3279
+ /**
3280
+ * Returns all the resources of a particular type belonging to a subscription.
3281
+ * @param options The options parameters.
3282
+ */
3283
+ _list(options) {
3284
+ return this.client.sendOperationRequest({ options }, listOperationSpec$1);
3285
+ }
3286
+ /**
3287
+ * ListNext
3288
+ * @param nextLink The nextLink from the previous successful call to the List method.
3289
+ * @param options The options parameters.
3290
+ */
3291
+ _listNext(nextLink, options) {
3292
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
3293
+ }
3294
+ }
3295
+ // Operation Specifications
3296
+ const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
3297
+ const getOperationSpec$1 = {
3298
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
3299
+ httpMethod: "GET",
3300
+ responses: {
3301
+ 200: {
3302
+ bodyMapper: Account
3303
+ },
3304
+ default: {
3305
+ bodyMapper: ErrorResponse
3306
+ }
3307
+ },
3308
+ queryParameters: [apiVersion],
3309
+ urlParameters: [
3310
+ $host,
3311
+ resourceGroupName,
3312
+ accountName,
3313
+ subscriptionId,
3314
+ location
3315
+ ],
3316
+ headerParameters: [accept],
3317
+ serializer: serializer$1
3318
+ };
3319
+ const purgeOperationSpec = {
3320
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/resourceGroups/{resourceGroupName}/deletedAccounts/{accountName}",
3321
+ httpMethod: "DELETE",
3322
+ responses: {
3323
+ 200: {},
3324
+ 201: {},
3325
+ 202: {},
3326
+ 204: {},
3327
+ default: {
3328
+ bodyMapper: ErrorResponse
3329
+ }
3330
+ },
3331
+ queryParameters: [apiVersion],
3332
+ urlParameters: [
3333
+ $host,
3334
+ resourceGroupName,
3335
+ accountName,
3336
+ subscriptionId,
3337
+ location
3338
+ ],
3339
+ headerParameters: [accept],
3340
+ serializer: serializer$1
3341
+ };
3342
+ const listOperationSpec$1 = {
3343
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/deletedAccounts",
3344
+ httpMethod: "GET",
3345
+ responses: {
3346
+ 200: {
3347
+ bodyMapper: AccountListResult
3348
+ },
3349
+ default: {
3350
+ bodyMapper: ErrorResponse
3351
+ }
3352
+ },
3353
+ queryParameters: [apiVersion],
3354
+ urlParameters: [$host, subscriptionId],
3355
+ headerParameters: [accept],
3356
+ serializer: serializer$1
3357
+ };
3358
+ const listNextOperationSpec$1 = {
3359
+ path: "{nextLink}",
3360
+ httpMethod: "GET",
3361
+ responses: {
3362
+ 200: {
3363
+ bodyMapper: AccountListResult
3364
+ },
3365
+ default: {
3366
+ bodyMapper: ErrorResponse
3367
+ }
3368
+ },
3369
+ queryParameters: [apiVersion],
3370
+ urlParameters: [
3371
+ $host,
3372
+ subscriptionId,
3373
+ nextLink
3374
+ ],
3375
+ headerParameters: [accept],
3376
+ serializer: serializer$1
3377
+ };
3378
+
3379
+ /*
3380
+ * Copyright (c) Microsoft Corporation.
3381
+ * Licensed under the MIT License.
3382
+ *
3383
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3384
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3385
+ */
3386
+ /// <reference lib="esnext.asynciterable" />
3387
+ /** Class containing ResourceSkus operations. */
3388
+ class ResourceSkusImpl {
3389
+ /**
3390
+ * Initialize a new instance of the class ResourceSkus class.
3391
+ * @param client Reference to the service client
3392
+ */
3393
+ constructor(client) {
3394
+ this.client = client;
3395
+ }
3396
+ /**
3397
+ * Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription.
3398
+ * @param options The options parameters.
3399
+ */
3400
+ list(options) {
3401
+ const iter = this.listPagingAll(options);
3402
+ return {
3403
+ next() {
3404
+ return iter.next();
3405
+ },
3406
+ [Symbol.asyncIterator]() {
3407
+ return this;
3408
+ },
3409
+ byPage: () => {
3410
+ return this.listPagingPage(options);
3411
+ }
3412
+ };
3413
+ }
3414
+ listPagingPage(options) {
3415
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3416
+ let result = yield tslib.__await(this._list(options));
3417
+ yield yield tslib.__await(result.value || []);
3418
+ let continuationToken = result.nextLink;
3419
+ while (continuationToken) {
3420
+ result = yield tslib.__await(this._listNext(continuationToken, options));
3421
+ continuationToken = result.nextLink;
3422
+ yield yield tslib.__await(result.value || []);
3423
+ }
3424
+ });
3425
+ }
3426
+ listPagingAll(options) {
3427
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3428
+ var e_1, _a;
3429
+ try {
3430
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3431
+ const page = _c.value;
3432
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3433
+ }
3434
+ }
3435
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3436
+ finally {
3437
+ try {
3438
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3439
+ }
3440
+ finally { if (e_1) throw e_1.error; }
3441
+ }
3442
+ });
3443
+ }
3444
+ /**
3445
+ * Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription.
3446
+ * @param options The options parameters.
3447
+ */
3448
+ _list(options) {
3449
+ return this.client.sendOperationRequest({ options }, listOperationSpec$2);
3450
+ }
3451
+ /**
3452
+ * ListNext
3453
+ * @param nextLink The nextLink from the previous successful call to the List method.
3454
+ * @param options The options parameters.
3455
+ */
3456
+ _listNext(nextLink, options) {
3457
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
3458
+ }
3459
+ }
3460
+ // Operation Specifications
3461
+ const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
3462
+ const listOperationSpec$2 = {
3463
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/skus",
3464
+ httpMethod: "GET",
3465
+ responses: {
3466
+ 200: {
3467
+ bodyMapper: ResourceSkuListResult
3468
+ },
3469
+ default: {
3470
+ bodyMapper: ErrorResponse
3471
+ }
3472
+ },
3473
+ queryParameters: [apiVersion],
3474
+ urlParameters: [$host, subscriptionId],
3475
+ headerParameters: [accept],
3476
+ serializer: serializer$2
3477
+ };
3478
+ const listNextOperationSpec$2 = {
3479
+ path: "{nextLink}",
3480
+ httpMethod: "GET",
3481
+ responses: {
3482
+ 200: {
3483
+ bodyMapper: ResourceSkuListResult
3484
+ },
3485
+ default: {
3486
+ bodyMapper: ErrorResponse
3487
+ }
3488
+ },
3489
+ queryParameters: [apiVersion],
3490
+ urlParameters: [
3491
+ $host,
3492
+ subscriptionId,
3493
+ nextLink
3494
+ ],
3495
+ headerParameters: [accept],
3496
+ serializer: serializer$2
3497
+ };
3498
+
3499
+ /*
3500
+ * Copyright (c) Microsoft Corporation.
3501
+ * Licensed under the MIT License.
3502
+ *
3503
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3504
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3505
+ */
3506
+ /// <reference lib="esnext.asynciterable" />
3507
+ /** Class containing Operations operations. */
3508
+ class OperationsImpl {
3509
+ /**
3510
+ * Initialize a new instance of the class Operations class.
3511
+ * @param client Reference to the service client
3512
+ */
3513
+ constructor(client) {
3514
+ this.client = client;
3515
+ }
3516
+ /**
3517
+ * Lists all the available Cognitive Services account operations.
3518
+ * @param options The options parameters.
3519
+ */
3520
+ list(options) {
3521
+ const iter = this.listPagingAll(options);
3522
+ return {
3523
+ next() {
3524
+ return iter.next();
3525
+ },
3526
+ [Symbol.asyncIterator]() {
3527
+ return this;
3528
+ },
3529
+ byPage: () => {
3530
+ return this.listPagingPage(options);
3531
+ }
3532
+ };
3533
+ }
3534
+ listPagingPage(options) {
3535
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3536
+ let result = yield tslib.__await(this._list(options));
3537
+ yield yield tslib.__await(result.value || []);
3538
+ let continuationToken = result.nextLink;
3539
+ while (continuationToken) {
3540
+ result = yield tslib.__await(this._listNext(continuationToken, options));
3541
+ continuationToken = result.nextLink;
3542
+ yield yield tslib.__await(result.value || []);
3543
+ }
3544
+ });
3545
+ }
3546
+ listPagingAll(options) {
3547
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3548
+ var e_1, _a;
3549
+ try {
3550
+ for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3551
+ const page = _c.value;
3552
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3553
+ }
3554
+ }
3555
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3556
+ finally {
3557
+ try {
3558
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3559
+ }
3560
+ finally { if (e_1) throw e_1.error; }
3561
+ }
3562
+ });
3563
+ }
3564
+ /**
3565
+ * Lists all the available Cognitive Services account operations.
3566
+ * @param options The options parameters.
3567
+ */
3568
+ _list(options) {
3569
+ return this.client.sendOperationRequest({ options }, listOperationSpec$3);
3570
+ }
3571
+ /**
3572
+ * ListNext
3573
+ * @param nextLink The nextLink from the previous successful call to the List method.
3574
+ * @param options The options parameters.
3575
+ */
3576
+ _listNext(nextLink, options) {
3577
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$3);
3578
+ }
3579
+ }
3580
+ // Operation Specifications
3581
+ const serializer$3 = coreClient.createSerializer(Mappers, /* isXml */ false);
3582
+ const listOperationSpec$3 = {
3583
+ path: "/providers/Microsoft.CognitiveServices/operations",
3584
+ httpMethod: "GET",
3585
+ responses: {
3586
+ 200: {
3587
+ bodyMapper: OperationListResult
3588
+ },
3589
+ default: {
3590
+ bodyMapper: ErrorResponse
3591
+ }
3592
+ },
3593
+ queryParameters: [apiVersion],
3594
+ urlParameters: [$host],
3595
+ headerParameters: [accept],
3596
+ serializer: serializer$3
3597
+ };
3598
+ const listNextOperationSpec$3 = {
3599
+ path: "{nextLink}",
3600
+ httpMethod: "GET",
3601
+ responses: {
3602
+ 200: {
3603
+ bodyMapper: OperationListResult
3604
+ },
3605
+ default: {
3606
+ bodyMapper: ErrorResponse
3607
+ }
3608
+ },
3609
+ queryParameters: [apiVersion],
3610
+ urlParameters: [$host, nextLink],
3611
+ headerParameters: [accept],
3612
+ serializer: serializer$3
3613
+ };
3614
+
3615
+ /*
3616
+ * Copyright (c) Microsoft Corporation.
3617
+ * Licensed under the MIT License.
3618
+ *
3619
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3620
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3621
+ */
3622
+ /// <reference lib="esnext.asynciterable" />
3623
+ /** Class containing CommitmentTiers operations. */
3624
+ class CommitmentTiersImpl {
3625
+ /**
3626
+ * Initialize a new instance of the class CommitmentTiers class.
3627
+ * @param client Reference to the service client
3628
+ */
3629
+ constructor(client) {
3630
+ this.client = client;
3631
+ }
3632
+ /**
3633
+ * List Commitment Tiers.
3634
+ * @param location Resource location.
3635
+ * @param options The options parameters.
3636
+ */
3637
+ list(location, options) {
3638
+ const iter = this.listPagingAll(location, options);
3639
+ return {
3640
+ next() {
3641
+ return iter.next();
3642
+ },
3643
+ [Symbol.asyncIterator]() {
3644
+ return this;
3645
+ },
3646
+ byPage: () => {
3647
+ return this.listPagingPage(location, options);
3648
+ }
3649
+ };
3650
+ }
3651
+ listPagingPage(location, options) {
3652
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3653
+ let result = yield tslib.__await(this._list(location, options));
3654
+ yield yield tslib.__await(result.value || []);
3655
+ let continuationToken = result.nextLink;
3656
+ while (continuationToken) {
3657
+ result = yield tslib.__await(this._listNext(location, continuationToken, options));
3658
+ continuationToken = result.nextLink;
3659
+ yield yield tslib.__await(result.value || []);
3660
+ }
3661
+ });
3662
+ }
3663
+ listPagingAll(location, options) {
3664
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3665
+ var e_1, _a;
3666
+ try {
3667
+ for (var _b = tslib.__asyncValues(this.listPagingPage(location, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3668
+ const page = _c.value;
3669
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3670
+ }
3671
+ }
3672
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3673
+ finally {
3674
+ try {
3675
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
3676
+ }
3677
+ finally { if (e_1) throw e_1.error; }
3678
+ }
3679
+ });
3680
+ }
3681
+ /**
3682
+ * List Commitment Tiers.
3683
+ * @param location Resource location.
3684
+ * @param options The options parameters.
3685
+ */
3686
+ _list(location, options) {
3687
+ return this.client.sendOperationRequest({ location, options }, listOperationSpec$4);
3688
+ }
3689
+ /**
3690
+ * ListNext
3691
+ * @param location Resource location.
3692
+ * @param nextLink The nextLink from the previous successful call to the List method.
3693
+ * @param options The options parameters.
3694
+ */
3695
+ _listNext(location, nextLink, options) {
3696
+ return this.client.sendOperationRequest({ location, nextLink, options }, listNextOperationSpec$4);
3697
+ }
3698
+ }
3699
+ // Operation Specifications
3700
+ const serializer$4 = coreClient.createSerializer(Mappers, /* isXml */ false);
3701
+ const listOperationSpec$4 = {
3702
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/commitmentTiers",
3703
+ httpMethod: "GET",
3704
+ responses: {
3705
+ 200: {
3706
+ bodyMapper: CommitmentTierListResult
3707
+ },
3708
+ default: {
3709
+ bodyMapper: ErrorResponse
3710
+ }
3711
+ },
3712
+ queryParameters: [apiVersion],
3713
+ urlParameters: [
3714
+ $host,
3715
+ subscriptionId,
3716
+ location
3717
+ ],
3718
+ headerParameters: [accept],
3719
+ serializer: serializer$4
3720
+ };
3721
+ const listNextOperationSpec$4 = {
3722
+ path: "{nextLink}",
3723
+ httpMethod: "GET",
3724
+ responses: {
3725
+ 200: {
3726
+ bodyMapper: CommitmentTierListResult
3727
+ },
3728
+ default: {
3729
+ bodyMapper: ErrorResponse
3730
+ }
3731
+ },
3732
+ queryParameters: [apiVersion],
3733
+ urlParameters: [
3734
+ $host,
3735
+ subscriptionId,
3736
+ nextLink,
3737
+ location
3738
+ ],
3739
+ headerParameters: [accept],
3740
+ serializer: serializer$4
3741
+ };
3742
+
3743
+ /*
3744
+ * Copyright (c) Microsoft Corporation.
3745
+ * Licensed under the MIT License.
3746
+ *
3747
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3748
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3749
+ */
3750
+ /** Class containing PrivateEndpointConnections operations. */
3751
+ class PrivateEndpointConnectionsImpl {
3752
+ /**
3753
+ * Initialize a new instance of the class PrivateEndpointConnections class.
3754
+ * @param client Reference to the service client
3755
+ */
3756
+ constructor(client) {
3757
+ this.client = client;
3758
+ }
3759
+ /**
3760
+ * Gets the private endpoint connections associated with the Cognitive Services account.
3761
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3762
+ * @param accountName The name of Cognitive Services account.
3763
+ * @param options The options parameters.
3764
+ */
3765
+ list(resourceGroupName, accountName, options) {
3766
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOperationSpec$5);
3767
+ }
3768
+ /**
3769
+ * Gets the specified private endpoint connection associated with the Cognitive Services account.
3770
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3771
+ * @param accountName The name of Cognitive Services account.
3772
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3773
+ * Cognitive Services Account
3774
+ * @param options The options parameters.
3775
+ */
3776
+ get(resourceGroupName, accountName, privateEndpointConnectionName, options) {
3777
+ return this.client.sendOperationRequest({
3778
+ resourceGroupName,
3779
+ accountName,
3780
+ privateEndpointConnectionName,
3781
+ options
3782
+ }, getOperationSpec$2);
3783
+ }
3784
+ /**
3785
+ * Update the state of specified private endpoint connection associated with the Cognitive Services
3786
+ * account.
3787
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3788
+ * @param accountName The name of Cognitive Services account.
3789
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3790
+ * Cognitive Services Account
3791
+ * @param properties The private endpoint connection properties.
3792
+ * @param options The options parameters.
3793
+ */
3794
+ beginCreateOrUpdate(resourceGroupName, accountName, privateEndpointConnectionName, properties, options) {
3795
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3796
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3797
+ return this.client.sendOperationRequest(args, spec);
3798
+ });
3799
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3800
+ var _a;
3801
+ let currentRawResponse = undefined;
3802
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3803
+ const callback = (rawResponse, flatResponse) => {
3804
+ currentRawResponse = rawResponse;
3805
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3806
+ };
3807
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3808
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3809
+ return {
3810
+ flatResponse,
3811
+ rawResponse: {
3812
+ statusCode: currentRawResponse.status,
3813
+ body: currentRawResponse.parsedBody,
3814
+ headers: currentRawResponse.headers.toJSON()
3815
+ }
3816
+ };
3817
+ });
3818
+ const lro = new LroImpl(sendOperation, {
3819
+ resourceGroupName,
3820
+ accountName,
3821
+ privateEndpointConnectionName,
3822
+ properties,
3823
+ options
3824
+ }, createOrUpdateOperationSpec);
3825
+ return new coreLro.LroEngine(lro, {
3826
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3827
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3828
+ });
3829
+ });
3830
+ }
3831
+ /**
3832
+ * Update the state of specified private endpoint connection associated with the Cognitive Services
3833
+ * account.
3834
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3835
+ * @param accountName The name of Cognitive Services account.
3836
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3837
+ * Cognitive Services Account
3838
+ * @param properties The private endpoint connection properties.
3839
+ * @param options The options parameters.
3840
+ */
3841
+ beginCreateOrUpdateAndWait(resourceGroupName, accountName, privateEndpointConnectionName, properties, options) {
3842
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3843
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, accountName, privateEndpointConnectionName, properties, options);
3844
+ return poller.pollUntilDone();
3845
+ });
3846
+ }
3847
+ /**
3848
+ * Deletes the specified private endpoint connection associated with the Cognitive Services account.
3849
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3850
+ * @param accountName The name of Cognitive Services account.
3851
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3852
+ * Cognitive Services Account
3853
+ * @param options The options parameters.
3854
+ */
3855
+ beginDelete(resourceGroupName, accountName, privateEndpointConnectionName, options) {
3856
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3857
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3858
+ return this.client.sendOperationRequest(args, spec);
3859
+ });
3860
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3861
+ var _a;
3862
+ let currentRawResponse = undefined;
3863
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3864
+ const callback = (rawResponse, flatResponse) => {
3865
+ currentRawResponse = rawResponse;
3866
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3867
+ };
3868
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3869
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3870
+ return {
3871
+ flatResponse,
3872
+ rawResponse: {
3873
+ statusCode: currentRawResponse.status,
3874
+ body: currentRawResponse.parsedBody,
3875
+ headers: currentRawResponse.headers.toJSON()
3876
+ }
3877
+ };
3878
+ });
3879
+ const lro = new LroImpl(sendOperation, {
3880
+ resourceGroupName,
3881
+ accountName,
3882
+ privateEndpointConnectionName,
3883
+ options
3884
+ }, deleteOperationSpec$1);
3885
+ return new coreLro.LroEngine(lro, {
3886
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3887
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3888
+ });
3889
+ });
3890
+ }
3891
+ /**
3892
+ * Deletes the specified private endpoint connection associated with the Cognitive Services account.
3893
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3894
+ * @param accountName The name of Cognitive Services account.
3895
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
3896
+ * Cognitive Services Account
3897
+ * @param options The options parameters.
3898
+ */
3899
+ beginDeleteAndWait(resourceGroupName, accountName, privateEndpointConnectionName, options) {
3900
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3901
+ const poller = yield this.beginDelete(resourceGroupName, accountName, privateEndpointConnectionName, options);
3902
+ return poller.pollUntilDone();
3903
+ });
3904
+ }
3905
+ }
3906
+ // Operation Specifications
3907
+ const serializer$5 = coreClient.createSerializer(Mappers, /* isXml */ false);
3908
+ const listOperationSpec$5 = {
3909
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections",
3910
+ httpMethod: "GET",
3911
+ responses: {
3912
+ 200: {
3913
+ bodyMapper: PrivateEndpointConnectionListResult
3914
+ },
3915
+ default: {
3916
+ bodyMapper: ErrorResponse
3917
+ }
3918
+ },
3919
+ queryParameters: [apiVersion],
3920
+ urlParameters: [
3921
+ $host,
3922
+ resourceGroupName,
3923
+ accountName,
3924
+ subscriptionId
3925
+ ],
3926
+ headerParameters: [accept],
3927
+ serializer: serializer$5
3928
+ };
3929
+ const getOperationSpec$2 = {
3930
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
3931
+ httpMethod: "GET",
3932
+ responses: {
3933
+ 200: {
3934
+ bodyMapper: PrivateEndpointConnection
3935
+ },
3936
+ default: {
3937
+ bodyMapper: ErrorResponse
3938
+ }
3939
+ },
3940
+ queryParameters: [apiVersion],
3941
+ urlParameters: [
3942
+ $host,
3943
+ resourceGroupName,
3944
+ accountName,
3945
+ subscriptionId,
3946
+ privateEndpointConnectionName
3947
+ ],
3948
+ headerParameters: [accept],
3949
+ serializer: serializer$5
3950
+ };
3951
+ const createOrUpdateOperationSpec = {
3952
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
3953
+ httpMethod: "PUT",
3954
+ responses: {
3955
+ 200: {
3956
+ bodyMapper: PrivateEndpointConnection
3957
+ },
3958
+ 201: {
3959
+ bodyMapper: PrivateEndpointConnection
3960
+ },
3961
+ 202: {
3962
+ bodyMapper: PrivateEndpointConnection
3963
+ },
3964
+ 204: {
3965
+ bodyMapper: PrivateEndpointConnection
3966
+ },
3967
+ default: {
3968
+ bodyMapper: ErrorResponse
3969
+ }
3970
+ },
3971
+ requestBody: properties,
3972
+ queryParameters: [apiVersion],
3973
+ urlParameters: [
3974
+ $host,
3975
+ resourceGroupName,
3976
+ accountName,
3977
+ subscriptionId,
3978
+ privateEndpointConnectionName
3979
+ ],
3980
+ headerParameters: [contentType, accept],
3981
+ mediaType: "json",
3982
+ serializer: serializer$5
3983
+ };
3984
+ const deleteOperationSpec$1 = {
3985
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
3986
+ httpMethod: "DELETE",
3987
+ responses: {
3988
+ 200: {},
3989
+ 201: {},
3990
+ 202: {},
3991
+ 204: {},
3992
+ default: {
3993
+ bodyMapper: ErrorResponse
3994
+ }
3995
+ },
3996
+ queryParameters: [apiVersion],
3997
+ urlParameters: [
3998
+ $host,
3999
+ resourceGroupName,
4000
+ accountName,
4001
+ subscriptionId,
4002
+ privateEndpointConnectionName
4003
+ ],
4004
+ headerParameters: [accept],
4005
+ serializer: serializer$5
4006
+ };
4007
+
4008
+ /*
4009
+ * Copyright (c) Microsoft Corporation.
4010
+ * Licensed under the MIT License.
4011
+ *
4012
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4013
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4014
+ */
4015
+ /** Class containing PrivateLinkResources operations. */
4016
+ class PrivateLinkResourcesImpl {
4017
+ /**
4018
+ * Initialize a new instance of the class PrivateLinkResources class.
4019
+ * @param client Reference to the service client
4020
+ */
4021
+ constructor(client) {
4022
+ this.client = client;
4023
+ }
4024
+ /**
4025
+ * Gets the private link resources that need to be created for a Cognitive Services account.
4026
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4027
+ * @param accountName The name of Cognitive Services account.
4028
+ * @param options The options parameters.
4029
+ */
4030
+ list(resourceGroupName, accountName, options) {
4031
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOperationSpec$6);
4032
+ }
4033
+ }
4034
+ // Operation Specifications
4035
+ const serializer$6 = coreClient.createSerializer(Mappers, /* isXml */ false);
4036
+ const listOperationSpec$6 = {
4037
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateLinkResources",
4038
+ httpMethod: "GET",
4039
+ responses: {
4040
+ 200: {
4041
+ bodyMapper: PrivateLinkResourceListResult
4042
+ },
4043
+ default: {
4044
+ bodyMapper: ErrorResponse
4045
+ }
4046
+ },
4047
+ queryParameters: [apiVersion],
4048
+ urlParameters: [
4049
+ $host,
4050
+ resourceGroupName,
4051
+ accountName,
4052
+ subscriptionId
4053
+ ],
4054
+ headerParameters: [accept],
4055
+ serializer: serializer$6
4056
+ };
4057
+
4058
+ /*
4059
+ * Copyright (c) Microsoft Corporation.
4060
+ * Licensed under the MIT License.
4061
+ *
4062
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4063
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4064
+ */
4065
+ /// <reference lib="esnext.asynciterable" />
4066
+ /** Class containing Deployments operations. */
4067
+ class DeploymentsImpl {
4068
+ /**
4069
+ * Initialize a new instance of the class Deployments class.
4070
+ * @param client Reference to the service client
4071
+ */
4072
+ constructor(client) {
4073
+ this.client = client;
4074
+ }
4075
+ /**
4076
+ * Gets the deployments associated with the Cognitive Services account.
4077
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4078
+ * @param accountName The name of Cognitive Services account.
4079
+ * @param options The options parameters.
4080
+ */
4081
+ list(resourceGroupName, accountName, options) {
4082
+ const iter = this.listPagingAll(resourceGroupName, accountName, options);
4083
+ return {
4084
+ next() {
4085
+ return iter.next();
4086
+ },
4087
+ [Symbol.asyncIterator]() {
4088
+ return this;
4089
+ },
4090
+ byPage: () => {
4091
+ return this.listPagingPage(resourceGroupName, accountName, options);
4092
+ }
4093
+ };
4094
+ }
4095
+ listPagingPage(resourceGroupName, accountName, options) {
4096
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4097
+ let result = yield tslib.__await(this._list(resourceGroupName, accountName, options));
4098
+ yield yield tslib.__await(result.value || []);
4099
+ let continuationToken = result.nextLink;
4100
+ while (continuationToken) {
4101
+ result = yield tslib.__await(this._listNext(resourceGroupName, accountName, continuationToken, options));
4102
+ continuationToken = result.nextLink;
4103
+ yield yield tslib.__await(result.value || []);
4104
+ }
4105
+ });
4106
+ }
4107
+ listPagingAll(resourceGroupName, accountName, options) {
4108
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
4109
+ var e_1, _a;
4110
+ try {
4111
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, accountName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
4112
+ const page = _c.value;
4113
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
4114
+ }
4115
+ }
4116
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
4117
+ finally {
4118
+ try {
4119
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
4120
+ }
4121
+ finally { if (e_1) throw e_1.error; }
4122
+ }
4123
+ });
4124
+ }
4125
+ /**
4126
+ * Gets the deployments associated with the Cognitive Services account.
4127
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4128
+ * @param accountName The name of Cognitive Services account.
4129
+ * @param options The options parameters.
4130
+ */
4131
+ _list(resourceGroupName, accountName, options) {
4132
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOperationSpec$7);
4133
+ }
4134
+ /**
4135
+ * Gets the specified deployments associated with the Cognitive Services account.
4136
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4137
+ * @param accountName The name of Cognitive Services account.
4138
+ * @param deploymentName The name of the deployment associated with the Cognitive Services Account
4139
+ * @param options The options parameters.
4140
+ */
4141
+ get(resourceGroupName, accountName, deploymentName, options) {
4142
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, deploymentName, options }, getOperationSpec$3);
4143
+ }
4144
+ /**
4145
+ * Update the state of specified deployments associated with the Cognitive Services account.
4146
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4147
+ * @param accountName The name of Cognitive Services account.
4148
+ * @param deploymentName The name of the deployment associated with the Cognitive Services Account
4149
+ * @param deployment The deployment properties.
4150
+ * @param options The options parameters.
4151
+ */
4152
+ beginCreateOrUpdate(resourceGroupName, accountName, deploymentName, deployment, options) {
4153
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4154
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4155
+ return this.client.sendOperationRequest(args, spec);
4156
+ });
4157
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4158
+ var _a;
4159
+ let currentRawResponse = undefined;
4160
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
4161
+ const callback = (rawResponse, flatResponse) => {
4162
+ currentRawResponse = rawResponse;
4163
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
4164
+ };
4165
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
4166
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
4167
+ return {
4168
+ flatResponse,
4169
+ rawResponse: {
4170
+ statusCode: currentRawResponse.status,
4171
+ body: currentRawResponse.parsedBody,
4172
+ headers: currentRawResponse.headers.toJSON()
4173
+ }
4174
+ };
4175
+ });
4176
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, deploymentName, deployment, options }, createOrUpdateOperationSpec$1);
4177
+ return new coreLro.LroEngine(lro, {
4178
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4179
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4180
+ });
4181
+ });
4182
+ }
4183
+ /**
4184
+ * Update the state of specified deployments associated with the Cognitive Services account.
4185
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4186
+ * @param accountName The name of Cognitive Services account.
4187
+ * @param deploymentName The name of the deployment associated with the Cognitive Services Account
4188
+ * @param deployment The deployment properties.
4189
+ * @param options The options parameters.
4190
+ */
4191
+ beginCreateOrUpdateAndWait(resourceGroupName, accountName, deploymentName, deployment, options) {
4192
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4193
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, accountName, deploymentName, deployment, options);
4194
+ return poller.pollUntilDone();
4195
+ });
4196
+ }
4197
+ /**
4198
+ * Deletes the specified deployment associated with the Cognitive Services account.
4199
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4200
+ * @param accountName The name of Cognitive Services account.
4201
+ * @param deploymentName The name of the deployment associated with the Cognitive Services Account
4202
+ * @param options The options parameters.
4203
+ */
4204
+ beginDelete(resourceGroupName, accountName, deploymentName, options) {
4205
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4206
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4207
+ return this.client.sendOperationRequest(args, spec);
4208
+ });
4209
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4210
+ var _a;
4211
+ let currentRawResponse = undefined;
4212
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
4213
+ const callback = (rawResponse, flatResponse) => {
4214
+ currentRawResponse = rawResponse;
4215
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
4216
+ };
4217
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
4218
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
4219
+ return {
4220
+ flatResponse,
4221
+ rawResponse: {
4222
+ statusCode: currentRawResponse.status,
4223
+ body: currentRawResponse.parsedBody,
4224
+ headers: currentRawResponse.headers.toJSON()
4225
+ }
4226
+ };
4227
+ });
4228
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, deploymentName, options }, deleteOperationSpec$2);
4229
+ return new coreLro.LroEngine(lro, {
4230
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4231
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4232
+ });
4233
+ });
4234
+ }
4235
+ /**
4236
+ * Deletes the specified deployment associated with the Cognitive Services account.
4237
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4238
+ * @param accountName The name of Cognitive Services account.
4239
+ * @param deploymentName The name of the deployment associated with the Cognitive Services Account
4240
+ * @param options The options parameters.
4241
+ */
4242
+ beginDeleteAndWait(resourceGroupName, accountName, deploymentName, options) {
4243
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4244
+ const poller = yield this.beginDelete(resourceGroupName, accountName, deploymentName, options);
4245
+ return poller.pollUntilDone();
4246
+ });
4247
+ }
4248
+ /**
4249
+ * ListNext
4250
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4251
+ * @param accountName The name of Cognitive Services account.
4252
+ * @param nextLink The nextLink from the previous successful call to the List method.
4253
+ * @param options The options parameters.
4254
+ */
4255
+ _listNext(resourceGroupName, accountName, nextLink, options) {
4256
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, nextLink, options }, listNextOperationSpec$5);
4257
+ }
4258
+ }
4259
+ // Operation Specifications
4260
+ const serializer$7 = coreClient.createSerializer(Mappers, /* isXml */ false);
4261
+ const listOperationSpec$7 = {
4262
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments",
4263
+ httpMethod: "GET",
4264
+ responses: {
4265
+ 200: {
4266
+ bodyMapper: DeploymentListResult
4267
+ },
4268
+ default: {
4269
+ bodyMapper: ErrorResponse
4270
+ }
4271
+ },
4272
+ queryParameters: [apiVersion],
4273
+ urlParameters: [
4274
+ $host,
4275
+ resourceGroupName,
4276
+ accountName,
4277
+ subscriptionId
4278
+ ],
4279
+ headerParameters: [accept],
4280
+ serializer: serializer$7
4281
+ };
4282
+ const getOperationSpec$3 = {
4283
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}",
4284
+ httpMethod: "GET",
4285
+ responses: {
4286
+ 200: {
4287
+ bodyMapper: Deployment
4288
+ },
4289
+ default: {
4290
+ bodyMapper: ErrorResponse
4291
+ }
4292
+ },
4293
+ queryParameters: [apiVersion],
4294
+ urlParameters: [
4295
+ $host,
4296
+ resourceGroupName,
4297
+ accountName,
4298
+ subscriptionId,
4299
+ deploymentName
4300
+ ],
4301
+ headerParameters: [accept],
4302
+ serializer: serializer$7
4303
+ };
4304
+ const createOrUpdateOperationSpec$1 = {
4305
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}",
4306
+ httpMethod: "PUT",
4307
+ responses: {
4308
+ 200: {
4309
+ bodyMapper: Deployment
4310
+ },
4311
+ 201: {
4312
+ bodyMapper: Deployment
4313
+ },
4314
+ 202: {
4315
+ bodyMapper: Deployment
4316
+ },
4317
+ 204: {
4318
+ bodyMapper: Deployment
4319
+ },
4320
+ default: {
4321
+ bodyMapper: ErrorResponse
4322
+ }
4323
+ },
4324
+ requestBody: deployment,
4325
+ queryParameters: [apiVersion],
4326
+ urlParameters: [
4327
+ $host,
4328
+ resourceGroupName,
4329
+ accountName,
4330
+ subscriptionId,
4331
+ deploymentName
4332
+ ],
4333
+ headerParameters: [contentType, accept],
4334
+ mediaType: "json",
4335
+ serializer: serializer$7
4336
+ };
4337
+ const deleteOperationSpec$2 = {
4338
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}",
4339
+ httpMethod: "DELETE",
4340
+ responses: {
4341
+ 200: {},
4342
+ 201: {},
4343
+ 202: {},
4344
+ 204: {},
4345
+ default: {
4346
+ bodyMapper: ErrorResponse
4347
+ }
4348
+ },
4349
+ queryParameters: [apiVersion],
4350
+ urlParameters: [
4351
+ $host,
4352
+ resourceGroupName,
4353
+ accountName,
4354
+ subscriptionId,
4355
+ deploymentName
4356
+ ],
4357
+ headerParameters: [accept],
4358
+ serializer: serializer$7
4359
+ };
4360
+ const listNextOperationSpec$5 = {
4361
+ path: "{nextLink}",
4362
+ httpMethod: "GET",
4363
+ responses: {
4364
+ 200: {
4365
+ bodyMapper: DeploymentListResult
4366
+ },
4367
+ default: {
4368
+ bodyMapper: ErrorResponse
4369
+ }
4370
+ },
4371
+ queryParameters: [apiVersion],
4372
+ urlParameters: [
4373
+ $host,
4374
+ resourceGroupName,
4375
+ accountName,
4376
+ subscriptionId,
4377
+ nextLink
4378
+ ],
4379
+ headerParameters: [accept],
4380
+ serializer: serializer$7
4381
+ };
4382
+
4383
+ /*
4384
+ * Copyright (c) Microsoft Corporation.
4385
+ * Licensed under the MIT License.
4386
+ *
4387
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4388
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4389
+ */
4390
+ /// <reference lib="esnext.asynciterable" />
4391
+ /** Class containing CommitmentPlans operations. */
4392
+ class CommitmentPlansImpl {
4393
+ /**
4394
+ * Initialize a new instance of the class CommitmentPlans class.
4395
+ * @param client Reference to the service client
4396
+ */
4397
+ constructor(client) {
4398
+ this.client = client;
4399
+ }
4400
+ /**
4401
+ * Gets the commitmentPlans associated with the Cognitive Services account.
4402
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4403
+ * @param accountName The name of Cognitive Services account.
4404
+ * @param options The options parameters.
4405
+ */
4406
+ list(resourceGroupName, accountName, options) {
4407
+ const iter = this.listPagingAll(resourceGroupName, accountName, options);
4408
+ return {
4409
+ next() {
4410
+ return iter.next();
4411
+ },
4412
+ [Symbol.asyncIterator]() {
4413
+ return this;
4414
+ },
4415
+ byPage: () => {
4416
+ return this.listPagingPage(resourceGroupName, accountName, options);
4417
+ }
4418
+ };
4419
+ }
4420
+ listPagingPage(resourceGroupName, accountName, options) {
4421
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4422
+ let result = yield tslib.__await(this._list(resourceGroupName, accountName, options));
4423
+ yield yield tslib.__await(result.value || []);
4424
+ let continuationToken = result.nextLink;
4425
+ while (continuationToken) {
4426
+ result = yield tslib.__await(this._listNext(resourceGroupName, accountName, continuationToken, options));
4427
+ continuationToken = result.nextLink;
4428
+ yield yield tslib.__await(result.value || []);
4429
+ }
4430
+ });
4431
+ }
4432
+ listPagingAll(resourceGroupName, accountName, options) {
4433
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
4434
+ var e_1, _a;
4435
+ try {
4436
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, accountName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
4437
+ const page = _c.value;
4438
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
4439
+ }
4440
+ }
4441
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
4442
+ finally {
4443
+ try {
4444
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
4445
+ }
4446
+ finally { if (e_1) throw e_1.error; }
4447
+ }
4448
+ });
4449
+ }
4450
+ /**
4451
+ * Gets the commitmentPlans associated with the Cognitive Services account.
4452
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4453
+ * @param accountName The name of Cognitive Services account.
4454
+ * @param options The options parameters.
4455
+ */
4456
+ _list(resourceGroupName, accountName, options) {
4457
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, options }, listOperationSpec$8);
4458
+ }
4459
+ /**
4460
+ * Gets the specified commitmentPlans associated with the Cognitive Services account.
4461
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4462
+ * @param accountName The name of Cognitive Services account.
4463
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
4464
+ * Account
4465
+ * @param options The options parameters.
4466
+ */
4467
+ get(resourceGroupName, accountName, commitmentPlanName, options) {
4468
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, commitmentPlanName, options }, getOperationSpec$4);
4469
+ }
4470
+ /**
4471
+ * Update the state of specified commitmentPlans associated with the Cognitive Services account.
4472
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4473
+ * @param accountName The name of Cognitive Services account.
4474
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
4475
+ * Account
4476
+ * @param commitmentPlan The commitmentPlan properties.
4477
+ * @param options The options parameters.
4478
+ */
4479
+ createOrUpdate(resourceGroupName, accountName, commitmentPlanName, commitmentPlan, options) {
4480
+ return this.client.sendOperationRequest({
4481
+ resourceGroupName,
4482
+ accountName,
4483
+ commitmentPlanName,
4484
+ commitmentPlan,
4485
+ options
4486
+ }, createOrUpdateOperationSpec$2);
4487
+ }
4488
+ /**
4489
+ * Deletes the specified commitmentPlan associated with the Cognitive Services account.
4490
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4491
+ * @param accountName The name of Cognitive Services account.
4492
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
4493
+ * Account
4494
+ * @param options The options parameters.
4495
+ */
4496
+ beginDelete(resourceGroupName, accountName, commitmentPlanName, options) {
4497
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4498
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4499
+ return this.client.sendOperationRequest(args, spec);
4500
+ });
4501
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4502
+ var _a;
4503
+ let currentRawResponse = undefined;
4504
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
4505
+ const callback = (rawResponse, flatResponse) => {
4506
+ currentRawResponse = rawResponse;
4507
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
4508
+ };
4509
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
4510
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
4511
+ return {
4512
+ flatResponse,
4513
+ rawResponse: {
4514
+ statusCode: currentRawResponse.status,
4515
+ body: currentRawResponse.parsedBody,
4516
+ headers: currentRawResponse.headers.toJSON()
4517
+ }
4518
+ };
4519
+ });
4520
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, commitmentPlanName, options }, deleteOperationSpec$3);
4521
+ return new coreLro.LroEngine(lro, {
4522
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4523
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4524
+ });
4525
+ });
4526
+ }
4527
+ /**
4528
+ * Deletes the specified commitmentPlan associated with the Cognitive Services account.
4529
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4530
+ * @param accountName The name of Cognitive Services account.
4531
+ * @param commitmentPlanName The name of the commitmentPlan associated with the Cognitive Services
4532
+ * Account
4533
+ * @param options The options parameters.
4534
+ */
4535
+ beginDeleteAndWait(resourceGroupName, accountName, commitmentPlanName, options) {
4536
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4537
+ const poller = yield this.beginDelete(resourceGroupName, accountName, commitmentPlanName, options);
4538
+ return poller.pollUntilDone();
4539
+ });
4540
+ }
4541
+ /**
4542
+ * ListNext
4543
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4544
+ * @param accountName The name of Cognitive Services account.
4545
+ * @param nextLink The nextLink from the previous successful call to the List method.
4546
+ * @param options The options parameters.
4547
+ */
4548
+ _listNext(resourceGroupName, accountName, nextLink, options) {
4549
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, nextLink, options }, listNextOperationSpec$6);
4550
+ }
4551
+ }
4552
+ // Operation Specifications
4553
+ const serializer$8 = coreClient.createSerializer(Mappers, /* isXml */ false);
4554
+ const listOperationSpec$8 = {
4555
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans",
4556
+ httpMethod: "GET",
4557
+ responses: {
4558
+ 200: {
4559
+ bodyMapper: CommitmentPlanListResult
4560
+ },
4561
+ default: {
4562
+ bodyMapper: ErrorResponse
4563
+ }
4564
+ },
4565
+ queryParameters: [apiVersion],
4566
+ urlParameters: [
4567
+ $host,
4568
+ resourceGroupName,
4569
+ accountName,
4570
+ subscriptionId
4571
+ ],
4572
+ headerParameters: [accept],
4573
+ serializer: serializer$8
4574
+ };
4575
+ const getOperationSpec$4 = {
4576
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
4577
+ httpMethod: "GET",
4578
+ responses: {
4579
+ 200: {
4580
+ bodyMapper: CommitmentPlan
4581
+ },
4582
+ default: {
4583
+ bodyMapper: ErrorResponse
4584
+ }
4585
+ },
4586
+ queryParameters: [apiVersion],
4587
+ urlParameters: [
4588
+ $host,
4589
+ resourceGroupName,
4590
+ accountName,
4591
+ subscriptionId,
4592
+ commitmentPlanName
4593
+ ],
4594
+ headerParameters: [accept],
4595
+ serializer: serializer$8
4596
+ };
4597
+ const createOrUpdateOperationSpec$2 = {
4598
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
4599
+ httpMethod: "PUT",
4600
+ responses: {
4601
+ 200: {
4602
+ bodyMapper: CommitmentPlan
4603
+ },
4604
+ 201: {
4605
+ bodyMapper: CommitmentPlan
4606
+ },
4607
+ default: {
4608
+ bodyMapper: ErrorResponse
4609
+ }
4610
+ },
4611
+ requestBody: commitmentPlan,
4612
+ queryParameters: [apiVersion],
4613
+ urlParameters: [
4614
+ $host,
4615
+ resourceGroupName,
4616
+ accountName,
4617
+ subscriptionId,
4618
+ commitmentPlanName
4619
+ ],
4620
+ headerParameters: [contentType, accept],
4621
+ mediaType: "json",
4622
+ serializer: serializer$8
4623
+ };
4624
+ const deleteOperationSpec$3 = {
4625
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}",
4626
+ httpMethod: "DELETE",
4627
+ responses: {
4628
+ 200: {},
4629
+ 201: {},
4630
+ 202: {},
4631
+ 204: {},
4632
+ default: {
4633
+ bodyMapper: ErrorResponse
4634
+ }
4635
+ },
4636
+ queryParameters: [apiVersion],
4637
+ urlParameters: [
4638
+ $host,
4639
+ resourceGroupName,
4640
+ accountName,
4641
+ subscriptionId,
4642
+ commitmentPlanName
4643
+ ],
4644
+ headerParameters: [accept],
4645
+ serializer: serializer$8
4646
+ };
4647
+ const listNextOperationSpec$6 = {
4648
+ path: "{nextLink}",
4649
+ httpMethod: "GET",
4650
+ responses: {
4651
+ 200: {
4652
+ bodyMapper: CommitmentPlanListResult
4653
+ },
4654
+ default: {
4655
+ bodyMapper: ErrorResponse
4656
+ }
4657
+ },
4658
+ queryParameters: [apiVersion],
4659
+ urlParameters: [
4660
+ $host,
4661
+ resourceGroupName,
4662
+ accountName,
4663
+ subscriptionId,
4664
+ nextLink
4665
+ ],
4666
+ headerParameters: [accept],
4667
+ serializer: serializer$8
4668
+ };
4669
+
4670
+ /*
4671
+ * Copyright (c) Microsoft Corporation.
4672
+ * Licensed under the MIT License.
4673
+ *
4674
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4675
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4676
+ */
4677
+ class CognitiveServicesManagementClient extends coreClient.ServiceClient {
4678
+ /**
4679
+ * Initializes a new instance of the CognitiveServicesManagementClient class.
4680
+ * @param credentials Subscription credentials which uniquely identify client subscription.
4681
+ * @param subscriptionId The ID of the target subscription.
4682
+ * @param options The parameter options
4683
+ */
4684
+ constructor(credentials, subscriptionId, options) {
4685
+ if (credentials === undefined) {
4686
+ throw new Error("'credentials' cannot be null");
4687
+ }
4688
+ if (subscriptionId === undefined) {
4689
+ throw new Error("'subscriptionId' cannot be null");
4690
+ }
4691
+ // Initializing default values for options
4692
+ if (!options) {
4693
+ options = {};
4694
+ }
4695
+ const defaults = {
4696
+ requestContentType: "application/json; charset=utf-8",
4697
+ credential: credentials
4698
+ };
4699
+ const packageDetails = `azsdk-js-arm-cognitiveservices/7.0.0`;
4700
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
4701
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
4702
+ : `${packageDetails}`;
4703
+ if (!options.credentialScopes) {
4704
+ options.credentialScopes = ["https://management.azure.com/.default"];
4705
+ }
4706
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
4707
+ userAgentPrefix
4708
+ }, baseUri: options.endpoint || "https://management.azure.com" });
4709
+ super(optionsWithDefaults);
4710
+ // Parameter assignments
4711
+ this.subscriptionId = subscriptionId;
4712
+ // Assigning values to Constant parameters
4713
+ this.$host = options.$host || "https://management.azure.com";
4714
+ this.apiVersion = options.apiVersion || "2021-10-01";
4715
+ this.accounts = new AccountsImpl(this);
4716
+ this.deletedAccounts = new DeletedAccountsImpl(this);
4717
+ this.resourceSkus = new ResourceSkusImpl(this);
4718
+ this.operations = new OperationsImpl(this);
4719
+ this.commitmentTiers = new CommitmentTiersImpl(this);
4720
+ this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
4721
+ this.privateLinkResources = new PrivateLinkResourcesImpl(this);
4722
+ this.deployments = new DeploymentsImpl(this);
4723
+ this.commitmentPlans = new CommitmentPlansImpl(this);
4724
+ }
4725
+ /**
4726
+ * Check available SKUs.
4727
+ * @param location Resource location.
4728
+ * @param skus The SKU of the resource.
4729
+ * @param kind The Kind of the resource.
4730
+ * @param typeParam The Type of the resource.
4731
+ * @param options The options parameters.
4732
+ */
4733
+ checkSkuAvailability(location, skus, kind, typeParam, options) {
4734
+ return this.sendOperationRequest({ location, skus, kind, typeParam, options }, checkSkuAvailabilityOperationSpec);
4735
+ }
4736
+ /**
4737
+ * Check whether a domain is available.
4738
+ * @param subdomainName The subdomain name to use.
4739
+ * @param typeParam The Type of the resource.
4740
+ * @param options The options parameters.
4741
+ */
4742
+ checkDomainAvailability(subdomainName, typeParam, options) {
4743
+ return this.sendOperationRequest({ subdomainName, typeParam, options }, checkDomainAvailabilityOperationSpec);
4744
+ }
4745
+ }
4746
+ // Operation Specifications
4747
+ const serializer$9 = coreClient.createSerializer(Mappers, /* isXml */ false);
4748
+ const checkSkuAvailabilityOperationSpec = {
4749
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability",
4750
+ httpMethod: "POST",
4751
+ responses: {
4752
+ 200: {
4753
+ bodyMapper: SkuAvailabilityListResult
4754
+ },
4755
+ default: {
4756
+ bodyMapper: ErrorResponse
4757
+ }
4758
+ },
4759
+ requestBody: {
4760
+ parameterPath: { skus: ["skus"], kind: ["kind"], typeParam: ["typeParam"] },
4761
+ mapper: Object.assign(Object.assign({}, CheckSkuAvailabilityParameter), { required: true })
4762
+ },
4763
+ queryParameters: [apiVersion],
4764
+ urlParameters: [
4765
+ $host,
4766
+ subscriptionId,
4767
+ location
4768
+ ],
4769
+ headerParameters: [contentType, accept],
4770
+ mediaType: "json",
4771
+ serializer: serializer$9
4772
+ };
4773
+ const checkDomainAvailabilityOperationSpec = {
4774
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/checkDomainAvailability",
4775
+ httpMethod: "POST",
4776
+ responses: {
4777
+ 200: {
4778
+ bodyMapper: DomainAvailability
4779
+ },
4780
+ default: {
4781
+ bodyMapper: ErrorResponse
4782
+ }
4783
+ },
4784
+ requestBody: {
4785
+ parameterPath: {
4786
+ subdomainName: ["subdomainName"],
4787
+ typeParam: ["typeParam"],
4788
+ kind: ["options", "kind"]
4789
+ },
4790
+ mapper: Object.assign(Object.assign({}, CheckDomainAvailabilityParameter), { required: true })
4791
+ },
4792
+ queryParameters: [apiVersion],
4793
+ urlParameters: [$host, subscriptionId],
4794
+ headerParameters: [contentType, accept],
4795
+ mediaType: "json",
4796
+ serializer: serializer$9
4797
+ };
4798
+
4799
+ exports.CognitiveServicesManagementClient = CognitiveServicesManagementClient;
4800
+ //# sourceMappingURL=index.js.map