@azure/arm-hardwaresecuritymodules 2.0.0-beta.1 → 2.0.0-beta.2

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 (172) hide show
  1. package/CHANGELOG.md +146 -2
  2. package/dist/index.js +2121 -1216
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/cloudHsmClusterBackupStatusGetSample.d.ts +2 -0
  7. package/dist-esm/samples-dev/cloudHsmClusterBackupStatusGetSample.d.ts.map +1 -0
  8. package/dist-esm/samples-dev/cloudHsmClusterBackupStatusGetSample.js +40 -0
  9. package/dist-esm/samples-dev/cloudHsmClusterBackupStatusGetSample.js.map +1 -0
  10. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.js +4 -4
  11. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.js.map +1 -1
  12. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.js +1 -1
  13. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.js.map +1 -1
  14. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.js +1 -1
  15. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.js +20 -4
  16. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.js.map +1 -1
  17. package/dist-esm/samples-dev/cloudHsmClusterRestoreStatusGetSample.d.ts +2 -0
  18. package/dist-esm/samples-dev/cloudHsmClusterRestoreStatusGetSample.d.ts.map +1 -0
  19. package/dist-esm/samples-dev/cloudHsmClusterRestoreStatusGetSample.js +40 -0
  20. package/dist-esm/samples-dev/cloudHsmClusterRestoreStatusGetSample.js.map +1 -0
  21. package/dist-esm/samples-dev/cloudHsmClustersBackupSample.d.ts +2 -0
  22. package/dist-esm/samples-dev/cloudHsmClustersBackupSample.d.ts.map +1 -0
  23. package/dist-esm/samples-dev/cloudHsmClustersBackupSample.js +39 -0
  24. package/dist-esm/samples-dev/cloudHsmClustersBackupSample.js.map +1 -0
  25. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.js +6 -6
  26. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.js.map +1 -1
  27. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.js +1 -1
  28. package/dist-esm/samples-dev/cloudHsmClustersGetSample.js +1 -1
  29. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.js +2 -2
  30. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.js.map +1 -1
  31. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.js +2 -2
  32. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.js.map +1 -1
  33. package/dist-esm/samples-dev/cloudHsmClustersRestoreSample.d.ts +2 -0
  34. package/dist-esm/samples-dev/cloudHsmClustersRestoreSample.d.ts.map +1 -0
  35. package/dist-esm/samples-dev/cloudHsmClustersRestoreSample.js +43 -0
  36. package/dist-esm/samples-dev/cloudHsmClustersRestoreSample.js.map +1 -0
  37. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.js +4 -4
  38. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.js.map +1 -1
  39. package/dist-esm/samples-dev/cloudHsmClustersValidateBackupPropertiesSample.d.ts +2 -0
  40. package/dist-esm/samples-dev/cloudHsmClustersValidateBackupPropertiesSample.d.ts.map +1 -0
  41. package/dist-esm/samples-dev/cloudHsmClustersValidateBackupPropertiesSample.js +39 -0
  42. package/dist-esm/samples-dev/cloudHsmClustersValidateBackupPropertiesSample.js.map +1 -0
  43. package/dist-esm/samples-dev/cloudHsmClustersValidateRestorePropertiesSample.d.ts +2 -0
  44. package/dist-esm/samples-dev/cloudHsmClustersValidateRestorePropertiesSample.d.ts.map +1 -0
  45. package/dist-esm/samples-dev/cloudHsmClustersValidateRestorePropertiesSample.js +46 -0
  46. package/dist-esm/samples-dev/cloudHsmClustersValidateRestorePropertiesSample.js.map +1 -0
  47. package/dist-esm/samples-dev/dedicatedHsmCreateOrUpdateSample.js +15 -15
  48. package/dist-esm/samples-dev/dedicatedHsmCreateOrUpdateSample.js.map +1 -1
  49. package/dist-esm/samples-dev/dedicatedHsmDeleteSample.js +1 -1
  50. package/dist-esm/samples-dev/dedicatedHsmGetSample.js +3 -3
  51. package/dist-esm/samples-dev/dedicatedHsmListByResourceGroupSample.js +4 -4
  52. package/dist-esm/samples-dev/dedicatedHsmListByResourceGroupSample.js.map +1 -1
  53. package/dist-esm/samples-dev/dedicatedHsmListBySubscriptionSample.js +4 -4
  54. package/dist-esm/samples-dev/dedicatedHsmListBySubscriptionSample.js.map +1 -1
  55. package/dist-esm/samples-dev/dedicatedHsmListOutboundNetworkDependenciesEndpointsSample.js +2 -2
  56. package/dist-esm/samples-dev/dedicatedHsmListOutboundNetworkDependenciesEndpointsSample.js.map +1 -1
  57. package/dist-esm/samples-dev/dedicatedHsmUpdateSample.js +3 -3
  58. package/dist-esm/samples-dev/dedicatedHsmUpdateSample.js.map +1 -1
  59. package/dist-esm/samples-dev/operationsListSample.js +8 -8
  60. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  61. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.js +2 -2
  62. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.js.map +1 -1
  63. package/dist-esm/src/azureHSMResourceProvider.d.ts +7 -2
  64. package/dist-esm/src/azureHSMResourceProvider.d.ts.map +1 -1
  65. package/dist-esm/src/azureHSMResourceProvider.js +44 -10
  66. package/dist-esm/src/azureHSMResourceProvider.js.map +1 -1
  67. package/dist-esm/src/index.d.ts +0 -1
  68. package/dist-esm/src/index.d.ts.map +1 -1
  69. package/dist-esm/src/lroImpl.js +1 -1
  70. package/dist-esm/src/models/index.d.ts +543 -263
  71. package/dist-esm/src/models/index.d.ts.map +1 -1
  72. package/dist-esm/src/models/index.js +109 -49
  73. package/dist-esm/src/models/index.js.map +1 -1
  74. package/dist-esm/src/models/mappers.d.ts +28 -16
  75. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  76. package/dist-esm/src/models/mappers.js +832 -637
  77. package/dist-esm/src/models/mappers.js.map +1 -1
  78. package/dist-esm/src/models/parameters.d.ts +5 -12
  79. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  80. package/dist-esm/src/models/parameters.js +76 -117
  81. package/dist-esm/src/models/parameters.js.map +1 -1
  82. package/dist-esm/src/operations/cloudHsmClusterBackupStatus.d.ts +22 -0
  83. package/dist-esm/src/operations/cloudHsmClusterBackupStatus.d.ts.map +1 -0
  84. package/dist-esm/src/operations/cloudHsmClusterBackupStatus.js +61 -0
  85. package/dist-esm/src/operations/cloudHsmClusterBackupStatus.js.map +1 -0
  86. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.d.ts +7 -7
  87. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.d.ts.map +1 -1
  88. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.js +37 -29
  89. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.js.map +1 -1
  90. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.d.ts +23 -3
  91. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.d.ts.map +1 -1
  92. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.js +105 -6
  93. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.js.map +1 -1
  94. package/dist-esm/src/operations/cloudHsmClusterRestoreStatus.d.ts +22 -0
  95. package/dist-esm/src/operations/cloudHsmClusterRestoreStatus.d.ts.map +1 -0
  96. package/dist-esm/src/operations/cloudHsmClusterRestoreStatus.js +61 -0
  97. package/dist-esm/src/operations/cloudHsmClusterRestoreStatus.js.map +1 -0
  98. package/dist-esm/src/operations/cloudHsmClusters.d.ts +78 -10
  99. package/dist-esm/src/operations/cloudHsmClusters.d.ts.map +1 -1
  100. package/dist-esm/src/operations/cloudHsmClusters.js +467 -82
  101. package/dist-esm/src/operations/cloudHsmClusters.js.map +1 -1
  102. package/dist-esm/src/operations/dedicatedHsmOperations.d.ts +24 -24
  103. package/dist-esm/src/operations/dedicatedHsmOperations.d.ts.map +1 -1
  104. package/dist-esm/src/operations/dedicatedHsmOperations.js +117 -109
  105. package/dist-esm/src/operations/dedicatedHsmOperations.js.map +1 -1
  106. package/dist-esm/src/operations/index.d.ts +3 -1
  107. package/dist-esm/src/operations/index.d.ts.map +1 -1
  108. package/dist-esm/src/operations/index.js +3 -1
  109. package/dist-esm/src/operations/index.js.map +1 -1
  110. package/dist-esm/src/operations/operations.d.ts +4 -4
  111. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  112. package/dist-esm/src/operations/operations.js +8 -8
  113. package/dist-esm/src/operations/operations.js.map +1 -1
  114. package/dist-esm/src/operations/privateEndpointConnections.d.ts +3 -3
  115. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  116. package/dist-esm/src/operations/privateEndpointConnections.js +14 -14
  117. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  118. package/dist-esm/src/operationsInterfaces/cloudHsmClusterBackupStatus.d.ts +14 -0
  119. package/dist-esm/src/operationsInterfaces/cloudHsmClusterBackupStatus.d.ts.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/cloudHsmClusterBackupStatus.js +9 -0
  121. package/dist-esm/src/operationsInterfaces/cloudHsmClusterBackupStatus.js.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.d.ts +7 -7
  123. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.d.ts.map +1 -1
  124. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.d.ts +4 -3
  125. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.d.ts.map +1 -1
  126. package/dist-esm/src/operationsInterfaces/cloudHsmClusterRestoreStatus.d.ts +14 -0
  127. package/dist-esm/src/operationsInterfaces/cloudHsmClusterRestoreStatus.d.ts.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/cloudHsmClusterRestoreStatus.js +9 -0
  129. package/dist-esm/src/operationsInterfaces/cloudHsmClusterRestoreStatus.js.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.d.ts +78 -10
  131. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.d.ts.map +1 -1
  132. package/dist-esm/src/operationsInterfaces/dedicatedHsmOperations.d.ts +18 -18
  133. package/dist-esm/src/operationsInterfaces/dedicatedHsmOperations.d.ts.map +1 -1
  134. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -1
  135. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  136. package/dist-esm/src/operationsInterfaces/index.js +3 -1
  137. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  138. package/dist-esm/src/operationsInterfaces/operations.d.ts +3 -3
  139. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -1
  140. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +1 -1
  141. package/dist-esm/src/pagingHelper.js.map +1 -1
  142. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.d.ts.map +1 -1
  143. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.js +6 -2
  144. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.js.map +1 -1
  145. package/package.json +14 -15
  146. package/review/arm-hardwaresecuritymodules.api.md +298 -93
  147. package/src/azureHSMResourceProvider.ts +67 -20
  148. package/src/lroImpl.ts +4 -4
  149. package/src/models/index.ts +633 -284
  150. package/src/models/mappers.ts +898 -675
  151. package/src/models/parameters.ts +82 -128
  152. package/src/operations/cloudHsmClusterBackupStatus.ts +82 -0
  153. package/src/operations/cloudHsmClusterPrivateEndpointConnections.ts +74 -56
  154. package/src/operations/cloudHsmClusterPrivateLinkResources.ts +145 -13
  155. package/src/operations/cloudHsmClusterRestoreStatus.ts +82 -0
  156. package/src/operations/cloudHsmClusters.ts +684 -151
  157. package/src/operations/dedicatedHsmOperations.ts +224 -215
  158. package/src/operations/index.ts +3 -1
  159. package/src/operations/operations.ts +17 -17
  160. package/src/operations/privateEndpointConnections.ts +30 -30
  161. package/src/operationsInterfaces/cloudHsmClusterBackupStatus.ts +30 -0
  162. package/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.ts +17 -11
  163. package/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.ts +6 -4
  164. package/src/operationsInterfaces/cloudHsmClusterRestoreStatus.ts +30 -0
  165. package/src/operationsInterfaces/cloudHsmClusters.ts +156 -19
  166. package/src/operationsInterfaces/dedicatedHsmOperations.ts +34 -28
  167. package/src/operationsInterfaces/index.ts +3 -1
  168. package/src/operationsInterfaces/operations.ts +4 -4
  169. package/src/operationsInterfaces/privateEndpointConnections.ts +3 -3
  170. package/src/pagingHelper.ts +1 -1
  171. package/types/arm-hardwaresecuritymodules.d.ts +625 -205
  172. package/types/tsdoc-metadata.json +1 -1
package/dist/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var tslib = require('tslib');
5
6
  var coreClient = require('@azure/core-client');
6
7
  var coreRestPipeline = require('@azure/core-rest-pipeline');
7
- var tslib = require('tslib');
8
8
  var coreLro = require('@azure/core-lro');
9
9
 
10
10
  function _interopNamespaceDefault(e) {
@@ -66,20 +66,32 @@ function setContinuationToken(page, continuationToken) {
66
66
  * Code generated by Microsoft (R) AutoRest Code Generator.
67
67
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
68
68
  */
69
- /** Known values of {@link ProvisioningState} that the service accepts. */
70
- exports.KnownProvisioningState = void 0;
71
- (function (KnownProvisioningState) {
72
- /** Provisioning */
73
- KnownProvisioningState["Provisioning"] = "Provisioning";
74
- /** Succeeded */
75
- KnownProvisioningState["Succeeded"] = "Succeeded";
69
+ /** Known values of {@link ActivationState} that the service accepts. */
70
+ exports.KnownActivationState = void 0;
71
+ (function (KnownActivationState) {
72
+ /** NotDefined */
73
+ KnownActivationState["NotDefined"] = "NotDefined";
74
+ /** NotActivated */
75
+ KnownActivationState["NotActivated"] = "NotActivated";
76
+ /** Active */
77
+ KnownActivationState["Active"] = "Active";
76
78
  /** Failed */
77
- KnownProvisioningState["Failed"] = "Failed";
78
- /** Deleting */
79
- KnownProvisioningState["Deleting"] = "Deleting";
80
- /** Canceled */
81
- KnownProvisioningState["Canceled"] = "Canceled";
82
- })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
79
+ KnownActivationState["Failed"] = "Failed";
80
+ /** Unknown */
81
+ KnownActivationState["Unknown"] = "Unknown";
82
+ })(exports.KnownActivationState || (exports.KnownActivationState = {}));
83
+ /** Known values of {@link AutoGeneratedDomainNameLabelScope} that the service accepts. */
84
+ exports.KnownAutoGeneratedDomainNameLabelScope = void 0;
85
+ (function (KnownAutoGeneratedDomainNameLabelScope) {
86
+ /** TenantReuse */
87
+ KnownAutoGeneratedDomainNameLabelScope["TenantReuse"] = "TenantReuse";
88
+ /** SubscriptionReuse */
89
+ KnownAutoGeneratedDomainNameLabelScope["SubscriptionReuse"] = "SubscriptionReuse";
90
+ /** ResourceGroupReuse */
91
+ KnownAutoGeneratedDomainNameLabelScope["ResourceGroupReuse"] = "ResourceGroupReuse";
92
+ /** NoReuse */
93
+ KnownAutoGeneratedDomainNameLabelScope["NoReuse"] = "NoReuse";
94
+ })(exports.KnownAutoGeneratedDomainNameLabelScope || (exports.KnownAutoGeneratedDomainNameLabelScope = {}));
83
95
  /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
84
96
  exports.KnownPrivateEndpointServiceConnectionStatus = void 0;
85
97
  (function (KnownPrivateEndpointServiceConnectionStatus) {
@@ -120,12 +132,26 @@ exports.KnownCreatedByType = void 0;
120
132
  /** Key */
121
133
  KnownCreatedByType["Key"] = "Key";
122
134
  })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
123
- /** Known values of {@link CloudHsmClusterSkuFamily} that the service accepts. */
124
- exports.KnownCloudHsmClusterSkuFamily = void 0;
125
- (function (KnownCloudHsmClusterSkuFamily) {
126
- /** B */
127
- KnownCloudHsmClusterSkuFamily["B"] = "B";
128
- })(exports.KnownCloudHsmClusterSkuFamily || (exports.KnownCloudHsmClusterSkuFamily = {}));
135
+ /** Known values of {@link ProvisioningState} that the service accepts. */
136
+ exports.KnownProvisioningState = void 0;
137
+ (function (KnownProvisioningState) {
138
+ /** Provisioning */
139
+ KnownProvisioningState["Provisioning"] = "Provisioning";
140
+ /** Succeeded */
141
+ KnownProvisioningState["Succeeded"] = "Succeeded";
142
+ /** Failed */
143
+ KnownProvisioningState["Failed"] = "Failed";
144
+ /** Deleting */
145
+ KnownProvisioningState["Deleting"] = "Deleting";
146
+ /** Canceled */
147
+ KnownProvisioningState["Canceled"] = "Canceled";
148
+ })(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
149
+ /** Known values of {@link PublicNetworkAccess} that the service accepts. */
150
+ exports.KnownPublicNetworkAccess = void 0;
151
+ (function (KnownPublicNetworkAccess) {
152
+ /** Disabled */
153
+ KnownPublicNetworkAccess["Disabled"] = "Disabled";
154
+ })(exports.KnownPublicNetworkAccess || (exports.KnownPublicNetworkAccess = {}));
129
155
  /** Known values of {@link ManagedServiceIdentityType} that the service accepts. */
130
156
  exports.KnownManagedServiceIdentityType = void 0;
131
157
  (function (KnownManagedServiceIdentityType) {
@@ -138,36 +164,24 @@ exports.KnownManagedServiceIdentityType = void 0;
138
164
  /** SystemAssignedUserAssigned */
139
165
  KnownManagedServiceIdentityType["SystemAssignedUserAssigned"] = "SystemAssigned,UserAssigned";
140
166
  })(exports.KnownManagedServiceIdentityType || (exports.KnownManagedServiceIdentityType = {}));
141
- /** Known values of {@link IdentityType} that the service accepts. */
142
- exports.KnownIdentityType = void 0;
143
- (function (KnownIdentityType) {
144
- /** User */
145
- KnownIdentityType["User"] = "User";
146
- /** Application */
147
- KnownIdentityType["Application"] = "Application";
148
- /** ManagedIdentity */
149
- KnownIdentityType["ManagedIdentity"] = "ManagedIdentity";
150
- /** Key */
151
- KnownIdentityType["Key"] = "Key";
152
- })(exports.KnownIdentityType || (exports.KnownIdentityType = {}));
153
- /** Known values of {@link JsonWebKeyType} that the service accepts. */
154
- exports.KnownJsonWebKeyType = void 0;
155
- (function (KnownJsonWebKeyType) {
156
- /** The dedicated HSM has been full provisioned. */
157
- KnownJsonWebKeyType["Succeeded"] = "Succeeded";
158
- /** The dedicated HSM is currently being provisioned. */
159
- KnownJsonWebKeyType["Provisioning"] = "Provisioning";
160
- /** A device is currently being allocated for the dedicated HSM resource. */
161
- KnownJsonWebKeyType["Allocating"] = "Allocating";
162
- /** The dedicated HSM is being connected to the virtual network. */
163
- KnownJsonWebKeyType["Connecting"] = "Connecting";
164
- /** Provisioning of the dedicated HSM has failed. */
165
- KnownJsonWebKeyType["Failed"] = "Failed";
166
- /** Validating the subscription has sufficient quota to allocate a dedicated HSM device. */
167
- KnownJsonWebKeyType["CheckingQuota"] = "CheckingQuota";
168
- /** The dedicated HSM is currently being deleted. */
169
- KnownJsonWebKeyType["Deleting"] = "Deleting";
170
- })(exports.KnownJsonWebKeyType || (exports.KnownJsonWebKeyType = {}));
167
+ /** Known values of {@link CloudHsmClusterSkuFamily} that the service accepts. */
168
+ exports.KnownCloudHsmClusterSkuFamily = void 0;
169
+ (function (KnownCloudHsmClusterSkuFamily) {
170
+ /** B */
171
+ KnownCloudHsmClusterSkuFamily["B"] = "B";
172
+ })(exports.KnownCloudHsmClusterSkuFamily || (exports.KnownCloudHsmClusterSkuFamily = {}));
173
+ /** Known values of {@link BackupRestoreOperationStatus} that the service accepts. */
174
+ exports.KnownBackupRestoreOperationStatus = void 0;
175
+ (function (KnownBackupRestoreOperationStatus) {
176
+ /** InProgress */
177
+ KnownBackupRestoreOperationStatus["InProgress"] = "InProgress";
178
+ /** Succeeded */
179
+ KnownBackupRestoreOperationStatus["Succeeded"] = "Succeeded";
180
+ /** Failed */
181
+ KnownBackupRestoreOperationStatus["Failed"] = "Failed";
182
+ /** Cancelled */
183
+ KnownBackupRestoreOperationStatus["Cancelled"] = "Cancelled";
184
+ })(exports.KnownBackupRestoreOperationStatus || (exports.KnownBackupRestoreOperationStatus = {}));
171
185
  /** Known values of {@link SkuName} that the service accepts. */
172
186
  exports.KnownSkuName = void 0;
173
187
  (function (KnownSkuName) {
@@ -186,6 +200,52 @@ exports.KnownSkuName = void 0;
186
200
  /** The dedicated HSM is a payShield 10K, model PS10-D, 10Gb Ethernet Hardware Platform device with 2 local master keys which supports up to 2500 calls per second. */
187
201
  KnownSkuName["PayShield10KLMK2CPS2500"] = "payShield10K_LMK2_CPS2500";
188
202
  })(exports.KnownSkuName || (exports.KnownSkuName = {}));
203
+ /** Known values of {@link JsonWebKeyType} that the service accepts. */
204
+ exports.KnownJsonWebKeyType = void 0;
205
+ (function (KnownJsonWebKeyType) {
206
+ /** The dedicated HSM has been fully provisioned. */
207
+ KnownJsonWebKeyType["Succeeded"] = "Succeeded";
208
+ /** The dedicated HSM is currently being provisioned. */
209
+ KnownJsonWebKeyType["Provisioning"] = "Provisioning";
210
+ /** A device is currently being allocated for the dedicated HSM resource. */
211
+ KnownJsonWebKeyType["Allocating"] = "Allocating";
212
+ /** The dedicated HSM is being connected to the virtual network. */
213
+ KnownJsonWebKeyType["Connecting"] = "Connecting";
214
+ /** Provisioning of the dedicated HSM has failed. */
215
+ KnownJsonWebKeyType["Failed"] = "Failed";
216
+ /** Validating the subscription has sufficient quota to allocate a dedicated HSM device. */
217
+ KnownJsonWebKeyType["CheckingQuota"] = "CheckingQuota";
218
+ /** The dedicated HSM is currently being deleted. */
219
+ KnownJsonWebKeyType["Deleting"] = "Deleting";
220
+ })(exports.KnownJsonWebKeyType || (exports.KnownJsonWebKeyType = {}));
221
+ /** Known values of {@link Origin} that the service accepts. */
222
+ exports.KnownOrigin = void 0;
223
+ (function (KnownOrigin) {
224
+ /** User */
225
+ KnownOrigin["User"] = "user";
226
+ /** System */
227
+ KnownOrigin["System"] = "system";
228
+ /** UserSystem */
229
+ KnownOrigin["UserSystem"] = "user,system";
230
+ })(exports.KnownOrigin || (exports.KnownOrigin = {}));
231
+ /** Known values of {@link ActionType} that the service accepts. */
232
+ exports.KnownActionType = void 0;
233
+ (function (KnownActionType) {
234
+ /** Internal */
235
+ KnownActionType["Internal"] = "Internal";
236
+ })(exports.KnownActionType || (exports.KnownActionType = {}));
237
+ /** Known values of {@link IdentityType} that the service accepts. */
238
+ exports.KnownIdentityType = void 0;
239
+ (function (KnownIdentityType) {
240
+ /** User */
241
+ KnownIdentityType["User"] = "User";
242
+ /** Application */
243
+ KnownIdentityType["Application"] = "Application";
244
+ /** ManagedIdentity */
245
+ KnownIdentityType["ManagedIdentity"] = "ManagedIdentity";
246
+ /** Key */
247
+ KnownIdentityType["Key"] = "Key";
248
+ })(exports.KnownIdentityType || (exports.KnownIdentityType = {}));
189
249
 
190
250
  /*
191
251
  * Copyright (c) Microsoft Corporation.
@@ -194,26 +254,6 @@ exports.KnownSkuName = void 0;
194
254
  * Code generated by Microsoft (R) AutoRest Code Generator.
195
255
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
196
256
  */
197
- const CloudHsmClusterSecurityDomainProperties = {
198
- type: {
199
- name: "Composite",
200
- className: "CloudHsmClusterSecurityDomainProperties",
201
- modelProperties: {
202
- fipsState: {
203
- serializedName: "fipsState",
204
- type: {
205
- name: "Number"
206
- }
207
- },
208
- activationStatus: {
209
- serializedName: "activationStatus",
210
- type: {
211
- name: "String"
212
- }
213
- }
214
- }
215
- }
216
- };
217
257
  const CloudHsmProperties = {
218
258
  type: {
219
259
  name: "Composite",
@@ -222,23 +262,23 @@ const CloudHsmProperties = {
222
262
  fqdn: {
223
263
  serializedName: "fqdn",
224
264
  type: {
225
- name: "String"
226
- }
265
+ name: "String",
266
+ },
227
267
  },
228
268
  state: {
229
269
  serializedName: "state",
230
270
  type: {
231
- name: "String"
232
- }
271
+ name: "String",
272
+ },
233
273
  },
234
274
  stateMessage: {
235
275
  serializedName: "stateMessage",
236
276
  type: {
237
- name: "String"
238
- }
239
- }
240
- }
241
- }
277
+ name: "String",
278
+ },
279
+ },
280
+ },
281
+ },
242
282
  };
243
283
  const PrivateEndpoint = {
244
284
  type: {
@@ -249,11 +289,11 @@ const PrivateEndpoint = {
249
289
  serializedName: "id",
250
290
  readOnly: true,
251
291
  type: {
252
- name: "String"
253
- }
254
- }
255
- }
256
- }
292
+ name: "String",
293
+ },
294
+ },
295
+ },
296
+ },
257
297
  };
258
298
  const PrivateLinkServiceConnectionState = {
259
299
  type: {
@@ -263,23 +303,23 @@ const PrivateLinkServiceConnectionState = {
263
303
  status: {
264
304
  serializedName: "status",
265
305
  type: {
266
- name: "String"
267
- }
306
+ name: "String",
307
+ },
268
308
  },
269
309
  description: {
270
310
  serializedName: "description",
271
311
  type: {
272
- name: "String"
273
- }
312
+ name: "String",
313
+ },
274
314
  },
275
315
  actionsRequired: {
276
316
  serializedName: "actionsRequired",
277
317
  type: {
278
- name: "String"
279
- }
280
- }
281
- }
282
- }
318
+ name: "String",
319
+ },
320
+ },
321
+ },
322
+ },
283
323
  };
284
324
  const Resource = {
285
325
  type: {
@@ -290,32 +330,32 @@ const Resource = {
290
330
  serializedName: "id",
291
331
  readOnly: true,
292
332
  type: {
293
- name: "String"
294
- }
333
+ name: "String",
334
+ },
295
335
  },
296
336
  name: {
297
337
  serializedName: "name",
298
338
  readOnly: true,
299
339
  type: {
300
- name: "String"
301
- }
340
+ name: "String",
341
+ },
302
342
  },
303
343
  type: {
304
344
  serializedName: "type",
305
345
  readOnly: true,
306
346
  type: {
307
- name: "String"
308
- }
347
+ name: "String",
348
+ },
309
349
  },
310
350
  systemData: {
311
351
  serializedName: "systemData",
312
352
  type: {
313
353
  name: "Composite",
314
- className: "SystemData"
315
- }
316
- }
317
- }
318
- }
354
+ className: "SystemData",
355
+ },
356
+ },
357
+ },
358
+ },
319
359
  };
320
360
  const SystemData = {
321
361
  type: {
@@ -325,118 +365,41 @@ const SystemData = {
325
365
  createdBy: {
326
366
  serializedName: "createdBy",
327
367
  type: {
328
- name: "String"
329
- }
368
+ name: "String",
369
+ },
330
370
  },
331
371
  createdByType: {
332
372
  serializedName: "createdByType",
333
373
  type: {
334
- name: "String"
335
- }
374
+ name: "String",
375
+ },
336
376
  },
337
377
  createdAt: {
338
378
  serializedName: "createdAt",
339
379
  type: {
340
- name: "DateTime"
341
- }
380
+ name: "DateTime",
381
+ },
342
382
  },
343
383
  lastModifiedBy: {
344
384
  serializedName: "lastModifiedBy",
345
385
  type: {
346
- name: "String"
347
- }
386
+ name: "String",
387
+ },
348
388
  },
349
389
  lastModifiedByType: {
350
390
  serializedName: "lastModifiedByType",
351
391
  type: {
352
- name: "String"
353
- }
392
+ name: "String",
393
+ },
354
394
  },
355
395
  lastModifiedAt: {
356
396
  serializedName: "lastModifiedAt",
357
397
  type: {
358
- name: "DateTime"
359
- }
360
- }
361
- }
362
- }
363
- };
364
- const RestoreProperties = {
365
- type: {
366
- name: "Composite",
367
- className: "RestoreProperties",
368
- modelProperties: {
369
- foldername: {
370
- serializedName: "foldername",
371
- type: {
372
- name: "String"
373
- }
374
- },
375
- azureStorageResourceUri: {
376
- serializedName: "azureStorageResourceUri",
377
- type: {
378
- name: "String"
379
- }
380
- }
381
- }
382
- }
383
- };
384
- const BackupProperties = {
385
- type: {
386
- name: "Composite",
387
- className: "BackupProperties",
388
- modelProperties: {
389
- azureStorageResourceUri: {
390
- serializedName: "azureStorageResourceUri",
391
- type: {
392
- name: "String"
393
- }
394
- },
395
- lastBackupDateTime: {
396
- serializedName: "lastBackupDateTime",
397
- readOnly: true,
398
- type: {
399
- name: "DateTime"
400
- }
401
- },
402
- lastBackupStatus: {
403
- serializedName: "lastBackupStatus",
404
- readOnly: true,
405
- type: {
406
- name: "String"
407
- }
408
- }
409
- }
410
- }
411
- };
412
- const CloudHsmClusterSku = {
413
- type: {
414
- name: "Composite",
415
- className: "CloudHsmClusterSku",
416
- modelProperties: {
417
- family: {
418
- serializedName: "family",
419
- required: true,
420
- type: {
421
- name: "String"
422
- }
423
- },
424
- name: {
425
- serializedName: "name",
426
- required: true,
427
- type: {
428
- name: "Enum",
429
- allowedValues: ["Standard_B1", "Standard B10"]
430
- }
398
+ name: "DateTime",
399
+ },
431
400
  },
432
- capacity: {
433
- serializedName: "capacity",
434
- type: {
435
- name: "Number"
436
- }
437
- }
438
- }
439
- }
401
+ },
402
+ },
440
403
  };
441
404
  const ManagedServiceIdentity = {
442
405
  type: {
@@ -447,34 +410,34 @@ const ManagedServiceIdentity = {
447
410
  serializedName: "principalId",
448
411
  readOnly: true,
449
412
  type: {
450
- name: "Uuid"
451
- }
413
+ name: "Uuid",
414
+ },
452
415
  },
453
416
  tenantId: {
454
417
  serializedName: "tenantId",
455
418
  readOnly: true,
456
419
  type: {
457
- name: "Uuid"
458
- }
420
+ name: "Uuid",
421
+ },
459
422
  },
460
423
  type: {
461
424
  serializedName: "type",
462
425
  required: true,
463
426
  type: {
464
- name: "String"
465
- }
427
+ name: "String",
428
+ },
466
429
  },
467
430
  userAssignedIdentities: {
468
431
  serializedName: "userAssignedIdentities",
469
432
  type: {
470
433
  name: "Dictionary",
471
434
  value: {
472
- type: { name: "Composite", className: "UserAssignedIdentity" }
473
- }
474
- }
475
- }
476
- }
477
- }
435
+ type: { name: "Composite", className: "UserAssignedIdentity" },
436
+ },
437
+ },
438
+ },
439
+ },
440
+ },
478
441
  };
479
442
  const UserAssignedIdentity = {
480
443
  type: {
@@ -485,55 +448,140 @@ const UserAssignedIdentity = {
485
448
  serializedName: "principalId",
486
449
  readOnly: true,
487
450
  type: {
488
- name: "Uuid"
489
- }
451
+ name: "Uuid",
452
+ },
490
453
  },
491
454
  clientId: {
492
455
  serializedName: "clientId",
493
456
  readOnly: true,
494
457
  type: {
495
- name: "Uuid"
496
- }
497
- }
498
- }
499
- }
458
+ name: "Uuid",
459
+ },
460
+ },
461
+ },
462
+ },
500
463
  };
501
- const CloudHsmClusterError = {
464
+ const CloudHsmClusterSku = {
465
+ type: {
466
+ name: "Composite",
467
+ className: "CloudHsmClusterSku",
468
+ modelProperties: {
469
+ family: {
470
+ serializedName: "family",
471
+ required: true,
472
+ type: {
473
+ name: "String",
474
+ },
475
+ },
476
+ name: {
477
+ serializedName: "name",
478
+ required: true,
479
+ type: {
480
+ name: "Enum",
481
+ allowedValues: ["Standard_B1", "Standard B10"],
482
+ },
483
+ },
484
+ capacity: {
485
+ serializedName: "capacity",
486
+ type: {
487
+ name: "Number",
488
+ },
489
+ },
490
+ },
491
+ },
492
+ };
493
+ const ErrorResponse = {
502
494
  type: {
503
495
  name: "Composite",
504
- className: "CloudHsmClusterError",
496
+ className: "ErrorResponse",
505
497
  modelProperties: {
506
498
  error: {
507
499
  serializedName: "error",
508
500
  type: {
509
501
  name: "Composite",
510
- className: "CHsmError"
511
- }
512
- }
513
- }
514
- }
502
+ className: "ErrorDetail",
503
+ },
504
+ },
505
+ },
506
+ },
515
507
  };
516
- const CHsmError = {
508
+ const ErrorDetail = {
517
509
  type: {
518
510
  name: "Composite",
519
- className: "CHsmError",
511
+ className: "ErrorDetail",
520
512
  modelProperties: {
521
513
  code: {
522
514
  serializedName: "code",
523
515
  readOnly: true,
524
516
  type: {
525
- name: "String"
526
- }
517
+ name: "String",
518
+ },
527
519
  },
528
520
  message: {
529
521
  serializedName: "message",
530
522
  readOnly: true,
531
523
  type: {
532
- name: "String"
533
- }
534
- }
535
- }
536
- }
524
+ name: "String",
525
+ },
526
+ },
527
+ target: {
528
+ serializedName: "target",
529
+ readOnly: true,
530
+ type: {
531
+ name: "String",
532
+ },
533
+ },
534
+ details: {
535
+ serializedName: "details",
536
+ readOnly: true,
537
+ type: {
538
+ name: "Sequence",
539
+ element: {
540
+ type: {
541
+ name: "Composite",
542
+ className: "ErrorDetail",
543
+ },
544
+ },
545
+ },
546
+ },
547
+ additionalInfo: {
548
+ serializedName: "additionalInfo",
549
+ readOnly: true,
550
+ type: {
551
+ name: "Sequence",
552
+ element: {
553
+ type: {
554
+ name: "Composite",
555
+ className: "ErrorAdditionalInfo",
556
+ },
557
+ },
558
+ },
559
+ },
560
+ },
561
+ },
562
+ };
563
+ const ErrorAdditionalInfo = {
564
+ type: {
565
+ name: "Composite",
566
+ className: "ErrorAdditionalInfo",
567
+ modelProperties: {
568
+ type: {
569
+ serializedName: "type",
570
+ readOnly: true,
571
+ type: {
572
+ name: "String",
573
+ },
574
+ },
575
+ info: {
576
+ serializedName: "info",
577
+ readOnly: true,
578
+ type: {
579
+ name: "Dictionary",
580
+ value: { type: { name: "any" } },
581
+ },
582
+ },
583
+ },
584
+ },
537
585
  };
538
586
  const CloudHsmClusterPatchParameters = {
539
587
  type: {
@@ -544,32 +592,18 @@ const CloudHsmClusterPatchParameters = {
544
592
  serializedName: "tags",
545
593
  type: {
546
594
  name: "Dictionary",
547
- value: { type: { name: "String" } }
548
- }
549
- },
550
- sku: {
551
- serializedName: "sku",
552
- type: {
553
- name: "Composite",
554
- className: "CloudHsmClusterSku"
555
- }
595
+ value: { type: { name: "String" } },
596
+ },
556
597
  },
557
598
  identity: {
558
599
  serializedName: "identity",
559
600
  type: {
560
601
  name: "Composite",
561
- className: "ManagedServiceIdentity"
562
- }
602
+ className: "ManagedServiceIdentity",
603
+ },
563
604
  },
564
- backupProperties: {
565
- serializedName: "properties.backupProperties",
566
- type: {
567
- name: "Composite",
568
- className: "BackupProperties"
569
- }
570
- }
571
- }
572
- }
605
+ },
606
+ },
573
607
  };
574
608
  const CloudHsmClusterListResult = {
575
609
  type: {
@@ -583,19 +617,19 @@ const CloudHsmClusterListResult = {
583
617
  element: {
584
618
  type: {
585
619
  name: "Composite",
586
- className: "CloudHsmCluster"
587
- }
588
- }
589
- }
620
+ className: "CloudHsmCluster",
621
+ },
622
+ },
623
+ },
590
624
  },
591
625
  nextLink: {
592
626
  serializedName: "nextLink",
593
627
  type: {
594
- name: "String"
595
- }
596
- }
597
- }
598
- }
628
+ name: "String",
629
+ },
630
+ },
631
+ },
632
+ },
599
633
  };
600
634
  const PrivateLinkResourceListResult = {
601
635
  type: {
@@ -609,13 +643,20 @@ const PrivateLinkResourceListResult = {
609
643
  element: {
610
644
  type: {
611
645
  name: "Composite",
612
- className: "PrivateLinkResource"
613
- }
614
- }
615
- }
616
- }
617
- }
618
- }
646
+ className: "PrivateLinkResource",
647
+ },
648
+ },
649
+ },
650
+ },
651
+ nextLink: {
652
+ serializedName: "nextLink",
653
+ readOnly: true,
654
+ type: {
655
+ name: "String",
656
+ },
657
+ },
658
+ },
659
+ },
619
660
  };
620
661
  const PrivateEndpointConnectionListResult = {
621
662
  type: {
@@ -629,193 +670,179 @@ const PrivateEndpointConnectionListResult = {
629
670
  element: {
630
671
  type: {
631
672
  name: "Composite",
632
- className: "PrivateEndpointConnection"
633
- }
634
- }
635
- }
673
+ className: "PrivateEndpointConnection",
674
+ },
675
+ },
676
+ },
636
677
  },
637
678
  nextLink: {
638
679
  serializedName: "nextLink",
639
680
  type: {
640
- name: "String"
641
- }
642
- }
643
- }
644
- }
681
+ name: "String",
682
+ },
683
+ },
684
+ },
685
+ },
645
686
  };
646
- const DedicatedHsmOperationListResult = {
687
+ const BackupRestoreRequestBaseProperties = {
647
688
  type: {
648
689
  name: "Composite",
649
- className: "DedicatedHsmOperationListResult",
690
+ className: "BackupRestoreRequestBaseProperties",
650
691
  modelProperties: {
651
- value: {
652
- serializedName: "value",
692
+ azureStorageBlobContainerUri: {
693
+ serializedName: "azureStorageBlobContainerUri",
694
+ required: true,
653
695
  type: {
654
- name: "Sequence",
655
- element: {
656
- type: {
657
- name: "Composite",
658
- className: "DedicatedHsmOperation"
659
- }
660
- }
661
- }
662
- }
663
- }
664
- }
696
+ name: "String",
697
+ },
698
+ },
699
+ token: {
700
+ serializedName: "token",
701
+ type: {
702
+ name: "String",
703
+ },
704
+ },
705
+ },
706
+ },
665
707
  };
666
- const DedicatedHsmOperation = {
708
+ const BackupResult = {
667
709
  type: {
668
710
  name: "Composite",
669
- className: "DedicatedHsmOperation",
711
+ className: "BackupResult",
670
712
  modelProperties: {
671
- name: {
672
- serializedName: "name",
673
- type: {
674
- name: "String"
675
- }
676
- },
677
- isDataAction: {
678
- serializedName: "isDataAction",
713
+ status: {
714
+ serializedName: "properties.status",
679
715
  readOnly: true,
680
716
  type: {
681
- name: "Boolean"
682
- }
717
+ name: "String",
718
+ },
683
719
  },
684
- origin: {
685
- serializedName: "origin",
720
+ statusDetails: {
721
+ serializedName: "properties.statusDetails",
686
722
  type: {
687
- name: "String"
688
- }
723
+ name: "String",
724
+ },
689
725
  },
690
- display: {
691
- serializedName: "display",
726
+ error: {
727
+ serializedName: "properties.error",
692
728
  type: {
693
729
  name: "Composite",
694
- className: "DedicatedHsmOperationDisplay"
695
- }
696
- }
697
- }
698
- }
699
- };
700
- const DedicatedHsmOperationDisplay = {
701
- type: {
702
- name: "Composite",
703
- className: "DedicatedHsmOperationDisplay",
704
- modelProperties: {
705
- provider: {
706
- serializedName: "provider",
730
+ className: "ErrorDetail",
731
+ },
732
+ },
733
+ startTime: {
734
+ serializedName: "properties.startTime",
735
+ readOnly: true,
707
736
  type: {
708
- name: "String"
709
- }
737
+ name: "DateTime",
738
+ },
710
739
  },
711
- resource: {
712
- serializedName: "resource",
740
+ endTime: {
741
+ serializedName: "properties.endTime",
742
+ readOnly: true,
743
+ nullable: true,
713
744
  type: {
714
- name: "String"
715
- }
745
+ name: "DateTime",
746
+ },
716
747
  },
717
- operation: {
718
- serializedName: "operation",
748
+ jobId: {
749
+ serializedName: "properties.jobId",
719
750
  type: {
720
- name: "String"
721
- }
751
+ name: "String",
752
+ },
722
753
  },
723
- description: {
724
- serializedName: "description",
754
+ azureStorageBlobContainerUri: {
755
+ serializedName: "properties.azureStorageBlobContainerUri",
725
756
  type: {
726
- name: "String"
727
- }
728
- }
729
- }
730
- }
757
+ name: "String",
758
+ },
759
+ },
760
+ backupId: {
761
+ serializedName: "properties.backupId",
762
+ type: {
763
+ name: "String",
764
+ },
765
+ },
766
+ },
767
+ },
731
768
  };
732
- const DedicatedHsmError = {
769
+ const BackupRestoreBaseResultProperties = {
733
770
  type: {
734
771
  name: "Composite",
735
- className: "DedicatedHsmError",
772
+ className: "BackupRestoreBaseResultProperties",
736
773
  modelProperties: {
774
+ status: {
775
+ serializedName: "status",
776
+ readOnly: true,
777
+ type: {
778
+ name: "String",
779
+ },
780
+ },
781
+ statusDetails: {
782
+ serializedName: "statusDetails",
783
+ type: {
784
+ name: "String",
785
+ },
786
+ },
737
787
  error: {
738
788
  serializedName: "error",
739
789
  type: {
740
790
  name: "Composite",
741
- className: "ErrorModel"
742
- }
743
- }
744
- }
745
- }
746
- };
747
- const ErrorModel = {
748
- type: {
749
- name: "Composite",
750
- className: "ErrorModel",
751
- modelProperties: {
752
- code: {
753
- serializedName: "code",
791
+ className: "ErrorDetail",
792
+ },
793
+ },
794
+ startTime: {
795
+ serializedName: "startTime",
754
796
  readOnly: true,
755
797
  type: {
756
- name: "String"
757
- }
798
+ name: "DateTime",
799
+ },
758
800
  },
759
- message: {
760
- serializedName: "message",
801
+ endTime: {
802
+ serializedName: "endTime",
761
803
  readOnly: true,
804
+ nullable: true,
762
805
  type: {
763
- name: "String"
764
- }
806
+ name: "DateTime",
807
+ },
765
808
  },
766
- innerError: {
767
- serializedName: "innererror",
809
+ jobId: {
810
+ serializedName: "jobId",
768
811
  type: {
769
- name: "Composite",
770
- className: "ErrorModel"
771
- }
772
- }
773
- }
774
- }
812
+ name: "String",
813
+ },
814
+ },
815
+ },
816
+ },
775
817
  };
776
- const SystemDataAutoGenerated = {
818
+ const RestoreResult = {
777
819
  type: {
778
820
  name: "Composite",
779
- className: "SystemDataAutoGenerated",
821
+ className: "RestoreResult",
780
822
  modelProperties: {
781
- createdBy: {
782
- serializedName: "createdBy",
823
+ properties: {
824
+ serializedName: "properties",
783
825
  type: {
784
- name: "String"
785
- }
826
+ name: "Composite",
827
+ className: "BackupRestoreBaseResultProperties",
828
+ },
786
829
  },
787
- createdByType: {
788
- serializedName: "createdByType",
789
- type: {
790
- name: "String"
791
- }
792
- },
793
- createdAt: {
794
- serializedName: "createdAt",
795
- type: {
796
- name: "DateTime"
797
- }
798
- },
799
- lastModifiedBy: {
800
- serializedName: "lastModifiedBy",
801
- type: {
802
- name: "String"
803
- }
804
- },
805
- lastModifiedByType: {
806
- serializedName: "lastModifiedByType",
830
+ },
831
+ },
832
+ };
833
+ const Sku = {
834
+ type: {
835
+ name: "Composite",
836
+ className: "Sku",
837
+ modelProperties: {
838
+ name: {
839
+ serializedName: "name",
807
840
  type: {
808
- name: "String"
809
- }
841
+ name: "String",
842
+ },
810
843
  },
811
- lastModifiedAt: {
812
- serializedName: "lastModifiedAt",
813
- type: {
814
- name: "DateTime"
815
- }
816
- }
817
- }
818
- }
844
+ },
845
+ },
819
846
  };
820
847
  const NetworkProfile = {
821
848
  type: {
@@ -826,8 +853,8 @@ const NetworkProfile = {
826
853
  serializedName: "subnet",
827
854
  type: {
828
855
  name: "Composite",
829
- className: "ApiEntityReference"
830
- }
856
+ className: "ApiEntityReference",
857
+ },
831
858
  },
832
859
  networkInterfaces: {
833
860
  serializedName: "networkInterfaces",
@@ -836,123 +863,92 @@ const NetworkProfile = {
836
863
  element: {
837
864
  type: {
838
865
  name: "Composite",
839
- className: "NetworkInterface"
840
- }
841
- }
842
- }
843
- }
844
- }
845
- }
866
+ className: "NetworkInterface",
867
+ },
868
+ },
869
+ },
870
+ },
871
+ },
872
+ },
846
873
  };
847
874
  const ApiEntityReference = {
848
875
  type: {
849
876
  name: "Composite",
850
877
  className: "ApiEntityReference",
851
878
  modelProperties: {
852
- id: {
853
- serializedName: "id",
879
+ resourceId: {
880
+ serializedName: "resourceId",
854
881
  type: {
855
- name: "String"
856
- }
857
- }
858
- }
859
- }
882
+ name: "String",
883
+ },
884
+ },
885
+ },
886
+ },
860
887
  };
861
888
  const NetworkInterface = {
862
889
  type: {
863
890
  name: "Composite",
864
891
  className: "NetworkInterface",
865
892
  modelProperties: {
866
- id: {
867
- serializedName: "id",
893
+ resourceId: {
894
+ serializedName: "resourceId",
868
895
  readOnly: true,
869
896
  type: {
870
- name: "String"
871
- }
897
+ name: "String",
898
+ },
872
899
  },
873
900
  privateIpAddress: {
874
901
  serializedName: "privateIpAddress",
875
902
  type: {
876
- name: "String"
877
- }
878
- }
879
- }
880
- }
903
+ name: "String",
904
+ },
905
+ },
906
+ },
907
+ },
881
908
  };
882
- const DedicatedHsmResource = {
909
+ const DedicatedHsmError = {
883
910
  type: {
884
911
  name: "Composite",
885
- className: "DedicatedHsmResource",
912
+ className: "DedicatedHsmError",
886
913
  modelProperties: {
887
- id: {
888
- serializedName: "id",
889
- readOnly: true,
914
+ error: {
915
+ serializedName: "error",
890
916
  type: {
891
- name: "String"
892
- }
917
+ name: "Composite",
918
+ className: "ErrorModel",
919
+ },
893
920
  },
894
- name: {
895
- serializedName: "name",
921
+ },
922
+ },
923
+ };
924
+ const ErrorModel = {
925
+ type: {
926
+ name: "Composite",
927
+ className: "ErrorModel",
928
+ modelProperties: {
929
+ code: {
930
+ serializedName: "code",
896
931
  readOnly: true,
897
932
  type: {
898
- name: "String"
899
- }
933
+ name: "String",
934
+ },
900
935
  },
901
- type: {
902
- serializedName: "type",
936
+ message: {
937
+ serializedName: "message",
903
938
  readOnly: true,
904
939
  type: {
905
- name: "String"
906
- }
907
- },
908
- location: {
909
- serializedName: "location",
910
- required: true,
911
- type: {
912
- name: "String"
913
- }
940
+ name: "String",
941
+ },
914
942
  },
915
- sku: {
916
- serializedName: "sku",
943
+ innerError: {
944
+ serializedName: "innererror",
917
945
  type: {
918
946
  name: "Composite",
919
- className: "Sku"
920
- }
921
- },
922
- zones: {
923
- serializedName: "zones",
924
- type: {
925
- name: "Sequence",
926
- element: {
927
- type: {
928
- name: "String"
929
- }
930
- }
931
- }
947
+ className: "ErrorModel",
948
+ },
932
949
  },
933
- tags: {
934
- serializedName: "tags",
935
- type: {
936
- name: "Dictionary",
937
- value: { type: { name: "String" } }
938
- }
939
- }
940
- }
941
- }
942
- };
943
- const Sku = {
944
- type: {
945
- name: "Composite",
946
- className: "Sku",
947
- modelProperties: {
948
- name: {
949
- serializedName: "name",
950
- type: {
951
- name: "String"
952
- }
953
- }
954
- }
955
- }
950
+ },
951
+ },
956
952
  };
957
953
  const DedicatedHsmPatchParameters = {
958
954
  type: {
@@ -963,11 +959,11 @@ const DedicatedHsmPatchParameters = {
963
959
  serializedName: "tags",
964
960
  type: {
965
961
  name: "Dictionary",
966
- value: { type: { name: "String" } }
967
- }
968
- }
969
- }
970
- }
962
+ value: { type: { name: "String" } },
963
+ },
964
+ },
965
+ },
966
+ },
971
967
  };
972
968
  const DedicatedHsmListResult = {
973
969
  type: {
@@ -981,19 +977,19 @@ const DedicatedHsmListResult = {
981
977
  element: {
982
978
  type: {
983
979
  name: "Composite",
984
- className: "DedicatedHsm"
985
- }
986
- }
987
- }
980
+ className: "DedicatedHsm",
981
+ },
982
+ },
983
+ },
988
984
  },
989
985
  nextLink: {
990
986
  serializedName: "nextLink",
991
987
  type: {
992
- name: "String"
993
- }
994
- }
995
- }
996
- }
988
+ name: "String",
989
+ },
990
+ },
991
+ },
992
+ },
997
993
  };
998
994
  const OutboundEnvironmentEndpointCollection = {
999
995
  type: {
@@ -1008,20 +1004,20 @@ const OutboundEnvironmentEndpointCollection = {
1008
1004
  element: {
1009
1005
  type: {
1010
1006
  name: "Composite",
1011
- className: "OutboundEnvironmentEndpoint"
1012
- }
1013
- }
1014
- }
1007
+ className: "OutboundEnvironmentEndpoint",
1008
+ },
1009
+ },
1010
+ },
1015
1011
  },
1016
1012
  nextLink: {
1017
1013
  serializedName: "nextLink",
1018
1014
  readOnly: true,
1019
1015
  type: {
1020
- name: "String"
1021
- }
1022
- }
1023
- }
1024
- }
1016
+ name: "String",
1017
+ },
1018
+ },
1019
+ },
1020
+ },
1025
1021
  };
1026
1022
  const OutboundEnvironmentEndpoint = {
1027
1023
  type: {
@@ -1031,8 +1027,8 @@ const OutboundEnvironmentEndpoint = {
1031
1027
  category: {
1032
1028
  serializedName: "category",
1033
1029
  type: {
1034
- name: "String"
1035
- }
1030
+ name: "String",
1031
+ },
1036
1032
  },
1037
1033
  endpoints: {
1038
1034
  serializedName: "endpoints",
@@ -1041,13 +1037,13 @@ const OutboundEnvironmentEndpoint = {
1041
1037
  element: {
1042
1038
  type: {
1043
1039
  name: "Composite",
1044
- className: "EndpointDependency"
1045
- }
1046
- }
1047
- }
1048
- }
1049
- }
1050
- }
1040
+ className: "EndpointDependency",
1041
+ },
1042
+ },
1043
+ },
1044
+ },
1045
+ },
1046
+ },
1051
1047
  };
1052
1048
  const EndpointDependency = {
1053
1049
  type: {
@@ -1057,8 +1053,8 @@ const EndpointDependency = {
1057
1053
  domainName: {
1058
1054
  serializedName: "domainName",
1059
1055
  type: {
1060
- name: "String"
1061
- }
1056
+ name: "String",
1057
+ },
1062
1058
  },
1063
1059
  endpointDetails: {
1064
1060
  serializedName: "endpointDetails",
@@ -1067,13 +1063,13 @@ const EndpointDependency = {
1067
1063
  element: {
1068
1064
  type: {
1069
1065
  name: "Composite",
1070
- className: "EndpointDetail"
1071
- }
1072
- }
1073
- }
1074
- }
1075
- }
1076
- }
1066
+ className: "EndpointDetail",
1067
+ },
1068
+ },
1069
+ },
1070
+ },
1071
+ },
1072
+ },
1077
1073
  };
1078
1074
  const EndpointDetail = {
1079
1075
  type: {
@@ -1083,157 +1079,233 @@ const EndpointDetail = {
1083
1079
  ipAddress: {
1084
1080
  serializedName: "ipAddress",
1085
1081
  type: {
1086
- name: "String"
1087
- }
1082
+ name: "String",
1083
+ },
1088
1084
  },
1089
1085
  port: {
1090
1086
  serializedName: "port",
1091
1087
  type: {
1092
- name: "Number"
1093
- }
1088
+ name: "Number",
1089
+ },
1094
1090
  },
1095
1091
  protocol: {
1096
1092
  serializedName: "protocol",
1097
1093
  type: {
1098
- name: "String"
1099
- }
1094
+ name: "String",
1095
+ },
1100
1096
  },
1101
1097
  description: {
1102
1098
  serializedName: "description",
1103
1099
  type: {
1104
- name: "String"
1105
- }
1106
- }
1107
- }
1108
- }
1100
+ name: "String",
1101
+ },
1102
+ },
1103
+ },
1104
+ },
1109
1105
  };
1110
- const ResourceListResult = {
1106
+ const OperationListResult = {
1111
1107
  type: {
1112
1108
  name: "Composite",
1113
- className: "ResourceListResult",
1109
+ className: "OperationListResult",
1114
1110
  modelProperties: {
1115
1111
  value: {
1116
1112
  serializedName: "value",
1113
+ readOnly: true,
1117
1114
  type: {
1118
1115
  name: "Sequence",
1119
1116
  element: {
1120
1117
  type: {
1121
1118
  name: "Composite",
1122
- className: "DedicatedHsmResource"
1123
- }
1124
- }
1125
- }
1119
+ className: "Operation",
1120
+ },
1121
+ },
1122
+ },
1126
1123
  },
1127
1124
  nextLink: {
1128
1125
  serializedName: "nextLink",
1126
+ readOnly: true,
1129
1127
  type: {
1130
- name: "String"
1131
- }
1132
- }
1133
- }
1134
- }
1135
- };
1136
- const ProxyResource = {
1137
- type: {
1138
- name: "Composite",
1139
- className: "ProxyResource",
1140
- modelProperties: Object.assign({}, Resource.type.modelProperties)
1141
- }
1128
+ name: "String",
1129
+ },
1130
+ },
1131
+ },
1132
+ },
1142
1133
  };
1143
- const TrackedResource = {
1134
+ const Operation = {
1144
1135
  type: {
1145
1136
  name: "Composite",
1146
- className: "TrackedResource",
1147
- modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
1148
- serializedName: "tags",
1149
- type: {
1150
- name: "Dictionary",
1151
- value: { type: { name: "String" } }
1152
- }
1153
- }, location: {
1154
- serializedName: "location",
1155
- required: true,
1137
+ className: "Operation",
1138
+ modelProperties: {
1139
+ name: {
1140
+ serializedName: "name",
1141
+ readOnly: true,
1156
1142
  type: {
1157
- name: "String"
1158
- }
1159
- } })
1160
- }
1161
- };
1162
- const PrivateLinkResource = {
1163
- type: {
1164
- name: "Composite",
1165
- className: "PrivateLinkResource",
1166
- modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { groupId: {
1167
- serializedName: "properties.groupId",
1143
+ name: "String",
1144
+ },
1145
+ },
1146
+ isDataAction: {
1147
+ serializedName: "isDataAction",
1168
1148
  readOnly: true,
1169
1149
  type: {
1170
- name: "String"
1171
- }
1172
- }, requiredMembers: {
1150
+ name: "Boolean",
1151
+ },
1152
+ },
1153
+ display: {
1154
+ serializedName: "display",
1155
+ type: {
1156
+ name: "Composite",
1157
+ className: "OperationDisplay",
1158
+ },
1159
+ },
1160
+ origin: {
1161
+ serializedName: "origin",
1162
+ readOnly: true,
1163
+ type: {
1164
+ name: "String",
1165
+ },
1166
+ },
1167
+ actionType: {
1168
+ serializedName: "actionType",
1169
+ readOnly: true,
1170
+ type: {
1171
+ name: "String",
1172
+ },
1173
+ },
1174
+ },
1175
+ },
1176
+ };
1177
+ const OperationDisplay = {
1178
+ type: {
1179
+ name: "Composite",
1180
+ className: "OperationDisplay",
1181
+ modelProperties: {
1182
+ provider: {
1183
+ serializedName: "provider",
1184
+ readOnly: true,
1185
+ type: {
1186
+ name: "String",
1187
+ },
1188
+ },
1189
+ resource: {
1190
+ serializedName: "resource",
1191
+ readOnly: true,
1192
+ type: {
1193
+ name: "String",
1194
+ },
1195
+ },
1196
+ operation: {
1197
+ serializedName: "operation",
1198
+ readOnly: true,
1199
+ type: {
1200
+ name: "String",
1201
+ },
1202
+ },
1203
+ description: {
1204
+ serializedName: "description",
1205
+ readOnly: true,
1206
+ type: {
1207
+ name: "String",
1208
+ },
1209
+ },
1210
+ },
1211
+ },
1212
+ };
1213
+ const ProxyResource = {
1214
+ type: {
1215
+ name: "Composite",
1216
+ className: "ProxyResource",
1217
+ modelProperties: Object.assign({}, Resource.type.modelProperties),
1218
+ },
1219
+ };
1220
+ const TrackedResource = {
1221
+ type: {
1222
+ name: "Composite",
1223
+ className: "TrackedResource",
1224
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { tags: {
1225
+ serializedName: "tags",
1226
+ type: {
1227
+ name: "Dictionary",
1228
+ value: { type: { name: "String" } },
1229
+ },
1230
+ }, location: {
1231
+ serializedName: "location",
1232
+ required: true,
1233
+ type: {
1234
+ name: "String",
1235
+ },
1236
+ } }),
1237
+ },
1238
+ };
1239
+ const PrivateLinkResource = {
1240
+ type: {
1241
+ name: "Composite",
1242
+ className: "PrivateLinkResource",
1243
+ modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { groupId: {
1244
+ serializedName: "properties.groupId",
1245
+ readOnly: true,
1246
+ type: {
1247
+ name: "String",
1248
+ },
1249
+ }, requiredMembers: {
1173
1250
  serializedName: "properties.requiredMembers",
1174
1251
  readOnly: true,
1175
1252
  type: {
1176
1253
  name: "Sequence",
1177
1254
  element: {
1178
1255
  type: {
1179
- name: "String"
1180
- }
1181
- }
1182
- }
1256
+ name: "String",
1257
+ },
1258
+ },
1259
+ },
1183
1260
  }, requiredZoneNames: {
1184
1261
  serializedName: "properties.requiredZoneNames",
1185
1262
  type: {
1186
1263
  name: "Sequence",
1187
1264
  element: {
1188
1265
  type: {
1189
- name: "String"
1190
- }
1191
- }
1192
- }
1193
- } })
1194
- }
1266
+ name: "String",
1267
+ },
1268
+ },
1269
+ },
1270
+ } }),
1271
+ },
1195
1272
  };
1196
- const DedicatedHsm = {
1273
+ const BackupRequestProperties = {
1197
1274
  type: {
1198
1275
  name: "Composite",
1199
- className: "DedicatedHsm",
1200
- modelProperties: Object.assign(Object.assign({}, DedicatedHsmResource.type.modelProperties), { systemData: {
1201
- serializedName: "systemData",
1202
- type: {
1203
- name: "Composite",
1204
- className: "SystemDataAutoGenerated"
1205
- }
1206
- }, networkProfile: {
1207
- serializedName: "properties.networkProfile",
1208
- type: {
1209
- name: "Composite",
1210
- className: "NetworkProfile"
1211
- }
1212
- }, managementNetworkProfile: {
1213
- serializedName: "properties.managementNetworkProfile",
1214
- type: {
1215
- name: "Composite",
1216
- className: "NetworkProfile"
1217
- }
1218
- }, stampId: {
1219
- serializedName: "properties.stampId",
1276
+ className: "BackupRequestProperties",
1277
+ modelProperties: Object.assign({}, BackupRestoreRequestBaseProperties.type.modelProperties),
1278
+ },
1279
+ };
1280
+ const RestoreRequestProperties = {
1281
+ type: {
1282
+ name: "Composite",
1283
+ className: "RestoreRequestProperties",
1284
+ modelProperties: Object.assign(Object.assign({}, BackupRestoreRequestBaseProperties.type.modelProperties), { backupId: {
1285
+ serializedName: "backupId",
1286
+ required: true,
1220
1287
  type: {
1221
- name: "String"
1222
- }
1223
- }, statusMessage: {
1224
- serializedName: "properties.statusMessage",
1225
- readOnly: true,
1288
+ name: "String",
1289
+ },
1290
+ } }),
1291
+ },
1292
+ };
1293
+ const BackupResultProperties = {
1294
+ type: {
1295
+ name: "Composite",
1296
+ className: "BackupResultProperties",
1297
+ modelProperties: Object.assign(Object.assign({}, BackupRestoreBaseResultProperties.type.modelProperties), { azureStorageBlobContainerUri: {
1298
+ serializedName: "azureStorageBlobContainerUri",
1226
1299
  type: {
1227
- name: "String"
1228
- }
1229
- }, provisioningState: {
1230
- serializedName: "properties.provisioningState",
1231
- readOnly: true,
1300
+ name: "String",
1301
+ },
1302
+ }, backupId: {
1303
+ serializedName: "backupId",
1232
1304
  type: {
1233
- name: "String"
1234
- }
1235
- } })
1236
- }
1305
+ name: "String",
1306
+ },
1307
+ } }),
1308
+ },
1237
1309
  };
1238
1310
  const PrivateEndpointConnection = {
1239
1311
  type: {
@@ -1242,26 +1314,26 @@ const PrivateEndpointConnection = {
1242
1314
  modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { etag: {
1243
1315
  serializedName: "etag",
1244
1316
  type: {
1245
- name: "String"
1246
- }
1317
+ name: "String",
1318
+ },
1247
1319
  }, privateEndpoint: {
1248
1320
  serializedName: "properties.privateEndpoint",
1249
1321
  type: {
1250
1322
  name: "Composite",
1251
- className: "PrivateEndpoint"
1252
- }
1323
+ className: "PrivateEndpoint",
1324
+ },
1253
1325
  }, privateLinkServiceConnectionState: {
1254
1326
  serializedName: "properties.privateLinkServiceConnectionState",
1255
1327
  type: {
1256
1328
  name: "Composite",
1257
- className: "PrivateLinkServiceConnectionState"
1258
- }
1329
+ className: "PrivateLinkServiceConnectionState",
1330
+ },
1259
1331
  }, provisioningState: {
1260
1332
  serializedName: "properties.provisioningState",
1261
1333
  readOnly: true,
1262
1334
  type: {
1263
- name: "String"
1264
- }
1335
+ name: "String",
1336
+ },
1265
1337
  }, groupIds: {
1266
1338
  serializedName: "properties.groupIds",
1267
1339
  readOnly: true,
@@ -1269,99 +1341,142 @@ const PrivateEndpointConnection = {
1269
1341
  name: "Sequence",
1270
1342
  element: {
1271
1343
  type: {
1272
- name: "String"
1273
- }
1274
- }
1275
- }
1276
- } })
1277
- }
1344
+ name: "String",
1345
+ },
1346
+ },
1347
+ },
1348
+ } }),
1349
+ },
1278
1350
  };
1279
1351
  const CloudHsmClusterResource = {
1280
1352
  type: {
1281
1353
  name: "Composite",
1282
1354
  className: "CloudHsmClusterResource",
1355
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { identity: {
1356
+ serializedName: "identity",
1357
+ type: {
1358
+ name: "Composite",
1359
+ className: "ManagedServiceIdentity",
1360
+ },
1361
+ }, sku: {
1362
+ serializedName: "sku",
1363
+ type: {
1364
+ name: "Composite",
1365
+ className: "CloudHsmClusterSku",
1366
+ },
1367
+ } }),
1368
+ },
1369
+ };
1370
+ const DedicatedHsm = {
1371
+ type: {
1372
+ name: "Composite",
1373
+ className: "DedicatedHsm",
1283
1374
  modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { sku: {
1284
1375
  serializedName: "sku",
1285
1376
  type: {
1286
1377
  name: "Composite",
1287
- className: "CloudHsmClusterSku"
1288
- }
1289
- }, identity: {
1290
- serializedName: "identity",
1378
+ className: "Sku",
1379
+ },
1380
+ }, zones: {
1381
+ serializedName: "zones",
1382
+ type: {
1383
+ name: "Sequence",
1384
+ element: {
1385
+ type: {
1386
+ name: "String",
1387
+ },
1388
+ },
1389
+ },
1390
+ }, networkProfile: {
1391
+ serializedName: "properties.networkProfile",
1291
1392
  type: {
1292
1393
  name: "Composite",
1293
- className: "ManagedServiceIdentity"
1294
- }
1295
- } })
1296
- }
1394
+ className: "NetworkProfile",
1395
+ },
1396
+ }, managementNetworkProfile: {
1397
+ serializedName: "properties.managementNetworkProfile",
1398
+ type: {
1399
+ name: "Composite",
1400
+ className: "NetworkProfile",
1401
+ },
1402
+ }, stampId: {
1403
+ serializedName: "properties.stampId",
1404
+ type: {
1405
+ name: "String",
1406
+ },
1407
+ }, statusMessage: {
1408
+ serializedName: "properties.statusMessage",
1409
+ readOnly: true,
1410
+ type: {
1411
+ name: "String",
1412
+ },
1413
+ }, provisioningState: {
1414
+ serializedName: "properties.provisioningState",
1415
+ readOnly: true,
1416
+ type: {
1417
+ name: "String",
1418
+ },
1419
+ } }),
1420
+ },
1297
1421
  };
1298
1422
  const CloudHsmCluster = {
1299
1423
  type: {
1300
1424
  name: "Composite",
1301
1425
  className: "CloudHsmCluster",
1302
- modelProperties: Object.assign(Object.assign({}, CloudHsmClusterResource.type.modelProperties), { provisioningState: {
1303
- serializedName: "properties.provisioningState",
1426
+ modelProperties: Object.assign(Object.assign({}, CloudHsmClusterResource.type.modelProperties), { activationState: {
1427
+ serializedName: "properties.activationState",
1428
+ readOnly: true,
1304
1429
  type: {
1305
- name: "String"
1306
- }
1430
+ name: "String",
1431
+ },
1307
1432
  }, autoGeneratedDomainNameLabelScope: {
1308
1433
  serializedName: "properties.autoGeneratedDomainNameLabelScope",
1309
1434
  type: {
1310
- name: "String"
1311
- }
1312
- }, securityDomain: {
1313
- serializedName: "properties.securityDomain",
1314
- type: {
1315
- name: "Composite",
1316
- className: "CloudHsmClusterSecurityDomainProperties"
1317
- }
1435
+ name: "String",
1436
+ },
1318
1437
  }, hsms: {
1319
1438
  serializedName: "properties.hsms",
1439
+ readOnly: true,
1320
1440
  type: {
1321
1441
  name: "Sequence",
1322
1442
  element: {
1323
1443
  type: {
1324
1444
  name: "Composite",
1325
- className: "CloudHsmProperties"
1326
- }
1327
- }
1328
- }
1329
- }, publicNetworkAccess: {
1330
- serializedName: "properties.publicNetworkAccess",
1331
- type: {
1332
- name: "String"
1333
- }
1445
+ className: "CloudHsmProperties",
1446
+ },
1447
+ },
1448
+ },
1334
1449
  }, privateEndpointConnections: {
1335
1450
  serializedName: "properties.privateEndpointConnections",
1451
+ readOnly: true,
1336
1452
  type: {
1337
1453
  name: "Sequence",
1338
1454
  element: {
1339
1455
  type: {
1340
1456
  name: "Composite",
1341
- className: "PrivateEndpointConnection"
1342
- }
1343
- }
1344
- }
1345
- }, statusMessage: {
1346
- serializedName: "properties.statusMessage",
1457
+ className: "PrivateEndpointConnection",
1458
+ },
1459
+ },
1460
+ },
1461
+ }, provisioningState: {
1462
+ serializedName: "properties.provisioningState",
1347
1463
  readOnly: true,
1348
1464
  type: {
1349
- name: "String"
1350
- }
1351
- }, restoreProperties: {
1352
- serializedName: "properties.restoreProperties",
1465
+ name: "String",
1466
+ },
1467
+ }, publicNetworkAccess: {
1468
+ serializedName: "properties.publicNetworkAccess",
1353
1469
  type: {
1354
- name: "Composite",
1355
- className: "RestoreProperties"
1356
- }
1357
- }, backupProperties: {
1358
- serializedName: "properties.backupProperties",
1470
+ name: "String",
1471
+ },
1472
+ }, statusMessage: {
1473
+ serializedName: "properties.statusMessage",
1474
+ readOnly: true,
1359
1475
  type: {
1360
- name: "Composite",
1361
- className: "BackupProperties"
1362
- }
1363
- } })
1364
- }
1476
+ name: "String",
1477
+ },
1478
+ } }),
1479
+ },
1365
1480
  };
1366
1481
  const CloudHsmClustersUpdateHeaders = {
1367
1482
  type: {
@@ -1371,11 +1486,11 @@ const CloudHsmClustersUpdateHeaders = {
1371
1486
  location: {
1372
1487
  serializedName: "location",
1373
1488
  type: {
1374
- name: "String"
1375
- }
1376
- }
1377
- }
1378
- }
1489
+ name: "String",
1490
+ },
1491
+ },
1492
+ },
1493
+ },
1379
1494
  };
1380
1495
  const CloudHsmClustersDeleteHeaders = {
1381
1496
  type: {
@@ -1385,57 +1500,210 @@ const CloudHsmClustersDeleteHeaders = {
1385
1500
  location: {
1386
1501
  serializedName: "location",
1387
1502
  type: {
1388
- name: "String"
1389
- }
1390
- }
1391
- }
1392
- }
1503
+ name: "String",
1504
+ },
1505
+ },
1506
+ },
1507
+ },
1508
+ };
1509
+ const CloudHsmClustersValidateBackupPropertiesHeaders = {
1510
+ type: {
1511
+ name: "Composite",
1512
+ className: "CloudHsmClustersValidateBackupPropertiesHeaders",
1513
+ modelProperties: {
1514
+ xMsRequestId: {
1515
+ serializedName: "x-ms-request-id",
1516
+ type: {
1517
+ name: "String",
1518
+ },
1519
+ },
1520
+ },
1521
+ },
1522
+ };
1523
+ const CloudHsmClustersBackupHeaders = {
1524
+ type: {
1525
+ name: "Composite",
1526
+ className: "CloudHsmClustersBackupHeaders",
1527
+ modelProperties: {
1528
+ xMsRequestId: {
1529
+ serializedName: "x-ms-request-id",
1530
+ type: {
1531
+ name: "String",
1532
+ },
1533
+ },
1534
+ },
1535
+ },
1536
+ };
1537
+ const CloudHsmClustersValidateRestorePropertiesHeaders = {
1538
+ type: {
1539
+ name: "Composite",
1540
+ className: "CloudHsmClustersValidateRestorePropertiesHeaders",
1541
+ modelProperties: {
1542
+ xMsRequestId: {
1543
+ serializedName: "x-ms-request-id",
1544
+ type: {
1545
+ name: "String",
1546
+ },
1547
+ },
1548
+ },
1549
+ },
1550
+ };
1551
+ const CloudHsmClustersRestoreHeaders = {
1552
+ type: {
1553
+ name: "Composite",
1554
+ className: "CloudHsmClustersRestoreHeaders",
1555
+ modelProperties: {
1556
+ xMsRequestId: {
1557
+ serializedName: "x-ms-request-id",
1558
+ type: {
1559
+ name: "String",
1560
+ },
1561
+ },
1562
+ },
1563
+ },
1564
+ };
1565
+ const CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders = {
1566
+ type: {
1567
+ name: "Composite",
1568
+ className: "CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders",
1569
+ modelProperties: {
1570
+ location: {
1571
+ serializedName: "location",
1572
+ type: {
1573
+ name: "String",
1574
+ },
1575
+ },
1576
+ },
1577
+ },
1578
+ };
1579
+ const CloudHsmClusterBackupStatusGetHeaders = {
1580
+ type: {
1581
+ name: "Composite",
1582
+ className: "CloudHsmClusterBackupStatusGetHeaders",
1583
+ modelProperties: {
1584
+ xMsRequestId: {
1585
+ serializedName: "x-ms-request-id",
1586
+ type: {
1587
+ name: "String",
1588
+ },
1589
+ },
1590
+ },
1591
+ },
1592
+ };
1593
+ const CloudHsmClusterBackupStatusGetExceptionHeaders = {
1594
+ type: {
1595
+ name: "Composite",
1596
+ className: "CloudHsmClusterBackupStatusGetExceptionHeaders",
1597
+ modelProperties: {
1598
+ xMsRequestId: {
1599
+ serializedName: "x-ms-request-id",
1600
+ type: {
1601
+ name: "String",
1602
+ },
1603
+ },
1604
+ },
1605
+ },
1606
+ };
1607
+ const CloudHsmClusterRestoreStatusGetHeaders = {
1608
+ type: {
1609
+ name: "Composite",
1610
+ className: "CloudHsmClusterRestoreStatusGetHeaders",
1611
+ modelProperties: {
1612
+ xMsRequestId: {
1613
+ serializedName: "x-ms-request-id",
1614
+ type: {
1615
+ name: "String",
1616
+ },
1617
+ },
1618
+ },
1619
+ },
1620
+ };
1621
+ const CloudHsmClusterRestoreStatusGetExceptionHeaders = {
1622
+ type: {
1623
+ name: "Composite",
1624
+ className: "CloudHsmClusterRestoreStatusGetExceptionHeaders",
1625
+ modelProperties: {
1626
+ xMsRequestId: {
1627
+ serializedName: "x-ms-request-id",
1628
+ type: {
1629
+ name: "String",
1630
+ },
1631
+ },
1632
+ },
1633
+ },
1634
+ };
1635
+ const DedicatedHsmUpdateHeaders = {
1636
+ type: {
1637
+ name: "Composite",
1638
+ className: "DedicatedHsmUpdateHeaders",
1639
+ modelProperties: {
1640
+ location: {
1641
+ serializedName: "location",
1642
+ type: {
1643
+ name: "String",
1644
+ },
1645
+ },
1646
+ },
1647
+ },
1393
1648
  };
1394
- const CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders = {
1649
+ const DedicatedHsmDeleteHeaders = {
1395
1650
  type: {
1396
1651
  name: "Composite",
1397
- className: "CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders",
1652
+ className: "DedicatedHsmDeleteHeaders",
1398
1653
  modelProperties: {
1399
1654
  location: {
1400
1655
  serializedName: "location",
1401
1656
  type: {
1402
- name: "String"
1403
- }
1404
- }
1405
- }
1406
- }
1657
+ name: "String",
1658
+ },
1659
+ },
1660
+ },
1661
+ },
1407
1662
  };
1408
1663
 
1409
1664
  var Mappers = /*#__PURE__*/Object.freeze({
1410
1665
  __proto__: null,
1411
1666
  ApiEntityReference: ApiEntityReference,
1412
- BackupProperties: BackupProperties,
1413
- CHsmError: CHsmError,
1667
+ BackupRequestProperties: BackupRequestProperties,
1668
+ BackupRestoreBaseResultProperties: BackupRestoreBaseResultProperties,
1669
+ BackupRestoreRequestBaseProperties: BackupRestoreRequestBaseProperties,
1670
+ BackupResult: BackupResult,
1671
+ BackupResultProperties: BackupResultProperties,
1414
1672
  CloudHsmCluster: CloudHsmCluster,
1415
- CloudHsmClusterError: CloudHsmClusterError,
1673
+ CloudHsmClusterBackupStatusGetExceptionHeaders: CloudHsmClusterBackupStatusGetExceptionHeaders,
1674
+ CloudHsmClusterBackupStatusGetHeaders: CloudHsmClusterBackupStatusGetHeaders,
1416
1675
  CloudHsmClusterListResult: CloudHsmClusterListResult,
1417
1676
  CloudHsmClusterPatchParameters: CloudHsmClusterPatchParameters,
1418
1677
  CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders: CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders,
1419
1678
  CloudHsmClusterResource: CloudHsmClusterResource,
1420
- CloudHsmClusterSecurityDomainProperties: CloudHsmClusterSecurityDomainProperties,
1679
+ CloudHsmClusterRestoreStatusGetExceptionHeaders: CloudHsmClusterRestoreStatusGetExceptionHeaders,
1680
+ CloudHsmClusterRestoreStatusGetHeaders: CloudHsmClusterRestoreStatusGetHeaders,
1421
1681
  CloudHsmClusterSku: CloudHsmClusterSku,
1682
+ CloudHsmClustersBackupHeaders: CloudHsmClustersBackupHeaders,
1422
1683
  CloudHsmClustersDeleteHeaders: CloudHsmClustersDeleteHeaders,
1684
+ CloudHsmClustersRestoreHeaders: CloudHsmClustersRestoreHeaders,
1423
1685
  CloudHsmClustersUpdateHeaders: CloudHsmClustersUpdateHeaders,
1686
+ CloudHsmClustersValidateBackupPropertiesHeaders: CloudHsmClustersValidateBackupPropertiesHeaders,
1687
+ CloudHsmClustersValidateRestorePropertiesHeaders: CloudHsmClustersValidateRestorePropertiesHeaders,
1424
1688
  CloudHsmProperties: CloudHsmProperties,
1425
1689
  DedicatedHsm: DedicatedHsm,
1690
+ DedicatedHsmDeleteHeaders: DedicatedHsmDeleteHeaders,
1426
1691
  DedicatedHsmError: DedicatedHsmError,
1427
1692
  DedicatedHsmListResult: DedicatedHsmListResult,
1428
- DedicatedHsmOperation: DedicatedHsmOperation,
1429
- DedicatedHsmOperationDisplay: DedicatedHsmOperationDisplay,
1430
- DedicatedHsmOperationListResult: DedicatedHsmOperationListResult,
1431
1693
  DedicatedHsmPatchParameters: DedicatedHsmPatchParameters,
1432
- DedicatedHsmResource: DedicatedHsmResource,
1694
+ DedicatedHsmUpdateHeaders: DedicatedHsmUpdateHeaders,
1433
1695
  EndpointDependency: EndpointDependency,
1434
1696
  EndpointDetail: EndpointDetail,
1697
+ ErrorAdditionalInfo: ErrorAdditionalInfo,
1698
+ ErrorDetail: ErrorDetail,
1435
1699
  ErrorModel: ErrorModel,
1700
+ ErrorResponse: ErrorResponse,
1436
1701
  ManagedServiceIdentity: ManagedServiceIdentity,
1437
1702
  NetworkInterface: NetworkInterface,
1438
1703
  NetworkProfile: NetworkProfile,
1704
+ Operation: Operation,
1705
+ OperationDisplay: OperationDisplay,
1706
+ OperationListResult: OperationListResult,
1439
1707
  OutboundEnvironmentEndpoint: OutboundEnvironmentEndpoint,
1440
1708
  OutboundEnvironmentEndpointCollection: OutboundEnvironmentEndpointCollection,
1441
1709
  PrivateEndpoint: PrivateEndpoint,
@@ -1446,11 +1714,10 @@ var Mappers = /*#__PURE__*/Object.freeze({
1446
1714
  PrivateLinkServiceConnectionState: PrivateLinkServiceConnectionState,
1447
1715
  ProxyResource: ProxyResource,
1448
1716
  Resource: Resource,
1449
- ResourceListResult: ResourceListResult,
1450
- RestoreProperties: RestoreProperties,
1717
+ RestoreRequestProperties: RestoreRequestProperties,
1718
+ RestoreResult: RestoreResult,
1451
1719
  Sku: Sku,
1452
1720
  SystemData: SystemData,
1453
- SystemDataAutoGenerated: SystemDataAutoGenerated,
1454
1721
  TrackedResource: TrackedResource,
1455
1722
  UserAssignedIdentity: UserAssignedIdentity
1456
1723
  });
@@ -1469,9 +1736,9 @@ const contentType = {
1469
1736
  isConstant: true,
1470
1737
  serializedName: "Content-Type",
1471
1738
  type: {
1472
- name: "String"
1473
- }
1474
- }
1739
+ name: "String",
1740
+ },
1741
+ },
1475
1742
  };
1476
1743
  const accept = {
1477
1744
  parameterPath: "accept",
@@ -1480,9 +1747,9 @@ const accept = {
1480
1747
  isConstant: true,
1481
1748
  serializedName: "Accept",
1482
1749
  type: {
1483
- name: "String"
1484
- }
1485
- }
1750
+ name: "String",
1751
+ },
1752
+ },
1486
1753
  };
1487
1754
  const $host = {
1488
1755
  parameterPath: "$host",
@@ -1490,10 +1757,10 @@ const $host = {
1490
1757
  serializedName: "$host",
1491
1758
  required: true,
1492
1759
  type: {
1493
- name: "String"
1494
- }
1760
+ name: "String",
1761
+ },
1495
1762
  },
1496
- skipEncoding: true
1763
+ skipEncoding: true,
1497
1764
  };
1498
1765
  const subscriptionId = {
1499
1766
  parameterPath: "subscriptionId",
@@ -1501,58 +1768,70 @@ const subscriptionId = {
1501
1768
  serializedName: "subscriptionId",
1502
1769
  required: true,
1503
1770
  type: {
1504
- name: "Uuid"
1505
- }
1506
- }
1771
+ name: "Uuid",
1772
+ },
1773
+ },
1507
1774
  };
1508
1775
  const resourceGroupName = {
1509
1776
  parameterPath: "resourceGroupName",
1510
1777
  mapper: {
1511
1778
  constraints: {
1512
1779
  MaxLength: 90,
1513
- MinLength: 1
1780
+ MinLength: 1,
1514
1781
  },
1515
1782
  serializedName: "resourceGroupName",
1516
1783
  required: true,
1517
1784
  type: {
1518
- name: "String"
1519
- }
1520
- }
1785
+ name: "String",
1786
+ },
1787
+ },
1521
1788
  };
1522
1789
  const cloudHsmClusterName = {
1523
1790
  parameterPath: "cloudHsmClusterName",
1524
1791
  mapper: {
1525
1792
  constraints: {
1526
- Pattern: new RegExp("^[a-zA-Z0-9-]{3,24}$"),
1527
- MaxLength: 24,
1528
- MinLength: 3
1793
+ Pattern: new RegExp("^[a-zA-Z0-9-]{3,23}$"),
1794
+ MaxLength: 23,
1795
+ MinLength: 3,
1529
1796
  },
1530
1797
  serializedName: "cloudHsmClusterName",
1531
1798
  required: true,
1532
1799
  type: {
1533
- name: "String"
1534
- }
1535
- }
1800
+ name: "String",
1801
+ },
1802
+ },
1536
1803
  };
1537
1804
  const apiVersion = {
1538
1805
  parameterPath: "apiVersion",
1539
1806
  mapper: {
1540
- defaultValue: "2023-12-10-preview",
1807
+ defaultValue: "2024-06-30-preview",
1541
1808
  isConstant: true,
1542
1809
  serializedName: "api-version",
1543
1810
  type: {
1544
- name: "String"
1545
- }
1546
- }
1811
+ name: "String",
1812
+ },
1813
+ },
1547
1814
  };
1548
1815
  const skiptoken = {
1549
1816
  parameterPath: ["options", "skiptoken"],
1550
1817
  mapper: {
1551
1818
  serializedName: "$skiptoken",
1552
1819
  type: {
1553
- name: "String"
1554
- }
1555
- }
1820
+ name: "String",
1821
+ },
1822
+ },
1823
+ };
1824
+ const backupRequestProperties = {
1825
+ parameterPath: ["options", "backupRequestProperties"],
1826
+ mapper: BackupRequestProperties,
1827
+ };
1828
+ const restoreRequestProperties = {
1829
+ parameterPath: ["options", "restoreRequestProperties"],
1830
+ mapper: RestoreRequestProperties,
1831
+ };
1832
+ const restoreRequestProperties1 = {
1833
+ parameterPath: "restoreRequestProperties",
1834
+ mapper: RestoreRequestProperties,
1556
1835
  };
1557
1836
  const nextLink = {
1558
1837
  parameterPath: "nextLink",
@@ -1560,14 +1839,14 @@ const nextLink = {
1560
1839
  serializedName: "nextLink",
1561
1840
  required: true,
1562
1841
  type: {
1563
- name: "String"
1564
- }
1842
+ name: "String",
1843
+ },
1565
1844
  },
1566
- skipEncoding: true
1845
+ skipEncoding: true,
1567
1846
  };
1568
1847
  const properties = {
1569
1848
  parameterPath: "properties",
1570
- mapper: PrivateEndpointConnection
1849
+ mapper: PrivateEndpointConnection,
1571
1850
  };
1572
1851
  const peConnectionName = {
1573
1852
  parameterPath: "peConnectionName",
@@ -1575,71 +1854,50 @@ const peConnectionName = {
1575
1854
  constraints: {
1576
1855
  Pattern: new RegExp("^[a-zA-Z0-9-]{3,24}$"),
1577
1856
  MaxLength: 24,
1578
- MinLength: 3
1857
+ MinLength: 3,
1579
1858
  },
1580
1859
  serializedName: "peConnectionName",
1581
1860
  required: true,
1582
1861
  type: {
1583
- name: "String"
1584
- }
1585
- }
1862
+ name: "String",
1863
+ },
1864
+ },
1586
1865
  };
1587
- const apiVersion1 = {
1588
- parameterPath: "apiVersion",
1866
+ const jobId = {
1867
+ parameterPath: "jobId",
1589
1868
  mapper: {
1590
- defaultValue: "2021-11-30",
1591
- isConstant: true,
1592
- serializedName: "api-version",
1869
+ serializedName: "jobId",
1870
+ required: true,
1593
1871
  type: {
1594
- name: "String"
1595
- }
1596
- }
1872
+ name: "String",
1873
+ },
1874
+ },
1597
1875
  };
1598
1876
  const parameters = {
1599
1877
  parameterPath: "parameters",
1600
- mapper: DedicatedHsm
1601
- };
1602
- const resourceGroupName1 = {
1603
- parameterPath: "resourceGroupName",
1604
- mapper: {
1605
- serializedName: "resourceGroupName",
1606
- required: true,
1607
- type: {
1608
- name: "String"
1609
- }
1610
- }
1878
+ mapper: DedicatedHsm,
1611
1879
  };
1612
1880
  const name = {
1613
1881
  parameterPath: "name",
1614
1882
  mapper: {
1615
1883
  constraints: {
1616
- Pattern: new RegExp("^[a-zA-Z0-9-]{3,24}$")
1884
+ Pattern: new RegExp("^[a-zA-Z0-9-]{3,24}$"),
1617
1885
  },
1618
1886
  serializedName: "name",
1619
1887
  required: true,
1620
1888
  type: {
1621
- name: "String"
1622
- }
1623
- }
1624
- };
1625
- const name1 = {
1626
- parameterPath: "name",
1627
- mapper: {
1628
- serializedName: "name",
1629
- required: true,
1630
- type: {
1631
- name: "String"
1632
- }
1633
- }
1889
+ name: "String",
1890
+ },
1891
+ },
1634
1892
  };
1635
1893
  const top = {
1636
1894
  parameterPath: ["options", "top"],
1637
1895
  mapper: {
1638
1896
  serializedName: "$top",
1639
1897
  type: {
1640
- name: "Number"
1641
- }
1642
- }
1898
+ name: "Number",
1899
+ },
1900
+ },
1643
1901
  };
1644
1902
 
1645
1903
  /*
@@ -1658,7 +1916,7 @@ function createLroSpec(inputs) {
1658
1916
  sendPollRequest: (path, options) => {
1659
1917
  const restSpec = tslib.__rest(spec, ["requestBody"]);
1660
1918
  return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
1661
- }
1919
+ },
1662
1920
  };
1663
1921
  }
1664
1922
 
@@ -1699,7 +1957,7 @@ class CloudHsmClustersImpl {
1699
1957
  throw new Error("maxPageSize is not supported by this operation.");
1700
1958
  }
1701
1959
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
1702
- }
1960
+ },
1703
1961
  };
1704
1962
  }
1705
1963
  listByResourceGroupPagingPage(resourceGroupName, options, settings) {
@@ -1760,7 +2018,7 @@ class CloudHsmClustersImpl {
1760
2018
  throw new Error("maxPageSize is not supported by this operation.");
1761
2019
  }
1762
2020
  return this.listBySubscriptionPagingPage(options, settings);
1763
- }
2021
+ },
1764
2022
  };
1765
2023
  }
1766
2024
  listBySubscriptionPagingPage(options, settings) {
@@ -1783,35 +2041,237 @@ class CloudHsmClustersImpl {
1783
2041
  }
1784
2042
  });
1785
2043
  }
1786
- listBySubscriptionPagingAll(options) {
1787
- return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
1788
- var _a, e_2, _b, _c;
1789
- try {
1790
- for (var _d = true, _e = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1791
- _c = _f.value;
1792
- _d = false;
1793
- const page = _c;
1794
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1795
- }
1796
- }
1797
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1798
- finally {
1799
- try {
1800
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1801
- }
1802
- finally { if (e_2) throw e_2.error; }
1803
- }
2044
+ listBySubscriptionPagingAll(options) {
2045
+ return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
2046
+ var _a, e_2, _b, _c;
2047
+ try {
2048
+ for (var _d = true, _e = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
2049
+ _c = _f.value;
2050
+ _d = false;
2051
+ const page = _c;
2052
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2053
+ }
2054
+ }
2055
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
2056
+ finally {
2057
+ try {
2058
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
2059
+ }
2060
+ finally { if (e_2) throw e_2.error; }
2061
+ }
2062
+ });
2063
+ }
2064
+ /**
2065
+ * Create or Update a Cloud HSM Cluster in the specified subscription.
2066
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2067
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2068
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2069
+ * @param location The geo-location where the resource lives
2070
+ * @param options The options parameters.
2071
+ */
2072
+ beginCreateOrUpdate(resourceGroupName, cloudHsmClusterName, location, options) {
2073
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2074
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2075
+ return this.client.sendOperationRequest(args, spec);
2076
+ });
2077
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2078
+ var _a;
2079
+ let currentRawResponse = undefined;
2080
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2081
+ const callback = (rawResponse, flatResponse) => {
2082
+ currentRawResponse = rawResponse;
2083
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2084
+ };
2085
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2086
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2087
+ return {
2088
+ flatResponse,
2089
+ rawResponse: {
2090
+ statusCode: currentRawResponse.status,
2091
+ body: currentRawResponse.parsedBody,
2092
+ headers: currentRawResponse.headers.toJSON(),
2093
+ },
2094
+ };
2095
+ });
2096
+ const lro = createLroSpec({
2097
+ sendOperationFn,
2098
+ args: { resourceGroupName, cloudHsmClusterName, location, options },
2099
+ spec: createOrUpdateOperationSpec$1,
2100
+ });
2101
+ const poller = yield coreLro.createHttpPoller(lro, {
2102
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2103
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2104
+ resourceLocationConfig: "original-uri",
2105
+ });
2106
+ yield poller.poll();
2107
+ return poller;
2108
+ });
2109
+ }
2110
+ /**
2111
+ * Create or Update a Cloud HSM Cluster in the specified subscription.
2112
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2113
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2114
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2115
+ * @param location The geo-location where the resource lives
2116
+ * @param options The options parameters.
2117
+ */
2118
+ beginCreateOrUpdateAndWait(resourceGroupName, cloudHsmClusterName, location, options) {
2119
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2120
+ const poller = yield this.beginCreateOrUpdate(resourceGroupName, cloudHsmClusterName, location, options);
2121
+ return poller.pollUntilDone();
2122
+ });
2123
+ }
2124
+ /**
2125
+ * Update a Cloud HSM Cluster in the specified subscription.
2126
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2127
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2128
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2129
+ * @param options The options parameters.
2130
+ */
2131
+ beginUpdate(resourceGroupName, cloudHsmClusterName, options) {
2132
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2133
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2134
+ return this.client.sendOperationRequest(args, spec);
2135
+ });
2136
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2137
+ var _a;
2138
+ let currentRawResponse = undefined;
2139
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2140
+ const callback = (rawResponse, flatResponse) => {
2141
+ currentRawResponse = rawResponse;
2142
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2143
+ };
2144
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2145
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2146
+ return {
2147
+ flatResponse,
2148
+ rawResponse: {
2149
+ statusCode: currentRawResponse.status,
2150
+ body: currentRawResponse.parsedBody,
2151
+ headers: currentRawResponse.headers.toJSON(),
2152
+ },
2153
+ };
2154
+ });
2155
+ const lro = createLroSpec({
2156
+ sendOperationFn,
2157
+ args: { resourceGroupName, cloudHsmClusterName, options },
2158
+ spec: updateOperationSpec$1,
2159
+ });
2160
+ const poller = yield coreLro.createHttpPoller(lro, {
2161
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2162
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2163
+ resourceLocationConfig: "location",
2164
+ });
2165
+ yield poller.poll();
2166
+ return poller;
2167
+ });
2168
+ }
2169
+ /**
2170
+ * Update a Cloud HSM Cluster in the specified subscription.
2171
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2172
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2173
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2174
+ * @param options The options parameters.
2175
+ */
2176
+ beginUpdateAndWait(resourceGroupName, cloudHsmClusterName, options) {
2177
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2178
+ const poller = yield this.beginUpdate(resourceGroupName, cloudHsmClusterName, options);
2179
+ return poller.pollUntilDone();
2180
+ });
2181
+ }
2182
+ /**
2183
+ * Gets the specified Cloud HSM Cluster
2184
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2185
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2186
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2187
+ * @param options The options parameters.
2188
+ */
2189
+ get(resourceGroupName, cloudHsmClusterName, options) {
2190
+ return this.client.sendOperationRequest({ resourceGroupName, cloudHsmClusterName, options }, getOperationSpec$4);
2191
+ }
2192
+ /**
2193
+ * Deletes the specified Cloud HSM Cluster
2194
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2195
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2196
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2197
+ * @param options The options parameters.
2198
+ */
2199
+ beginDelete(resourceGroupName, cloudHsmClusterName, options) {
2200
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2201
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2202
+ return this.client.sendOperationRequest(args, spec);
2203
+ });
2204
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2205
+ var _a;
2206
+ let currentRawResponse = undefined;
2207
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2208
+ const callback = (rawResponse, flatResponse) => {
2209
+ currentRawResponse = rawResponse;
2210
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2211
+ };
2212
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2213
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2214
+ return {
2215
+ flatResponse,
2216
+ rawResponse: {
2217
+ statusCode: currentRawResponse.status,
2218
+ body: currentRawResponse.parsedBody,
2219
+ headers: currentRawResponse.headers.toJSON(),
2220
+ },
2221
+ };
2222
+ });
2223
+ const lro = createLroSpec({
2224
+ sendOperationFn,
2225
+ args: { resourceGroupName, cloudHsmClusterName, options },
2226
+ spec: deleteOperationSpec$2,
2227
+ });
2228
+ const poller = yield coreLro.createHttpPoller(lro, {
2229
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2230
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2231
+ resourceLocationConfig: "location",
2232
+ });
2233
+ yield poller.poll();
2234
+ return poller;
2235
+ });
2236
+ }
2237
+ /**
2238
+ * Deletes the specified Cloud HSM Cluster
2239
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2240
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2241
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2242
+ * @param options The options parameters.
2243
+ */
2244
+ beginDeleteAndWait(resourceGroupName, cloudHsmClusterName, options) {
2245
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2246
+ const poller = yield this.beginDelete(resourceGroupName, cloudHsmClusterName, options);
2247
+ return poller.pollUntilDone();
1804
2248
  });
1805
2249
  }
1806
2250
  /**
1807
- * Create or Update a Cloud HSM Cluster in the specified subscription.
2251
+ * The List operation gets information about the Cloud HSM Clusters associated with the subscription
2252
+ * and within the specified resource group.
2253
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2254
+ * @param options The options parameters.
2255
+ */
2256
+ _listByResourceGroup(resourceGroupName, options) {
2257
+ return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
2258
+ }
2259
+ /**
2260
+ * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
2261
+ * @param options The options parameters.
2262
+ */
2263
+ _listBySubscription(options) {
2264
+ return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$1);
2265
+ }
2266
+ /**
2267
+ * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster
2268
+ * resource in the specified subscription.
1808
2269
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1809
2270
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
1810
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
1811
- * @param location The geo-location where the resource lives
2271
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
1812
2272
  * @param options The options parameters.
1813
2273
  */
1814
- beginCreateOrUpdate(resourceGroupName, cloudHsmClusterName, location, options) {
2274
+ beginValidateBackupProperties(resourceGroupName, cloudHsmClusterName, options) {
1815
2275
  return tslib.__awaiter(this, void 0, void 0, function* () {
1816
2276
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1817
2277
  return this.client.sendOperationRequest(args, spec);
@@ -1831,46 +2291,46 @@ class CloudHsmClustersImpl {
1831
2291
  rawResponse: {
1832
2292
  statusCode: currentRawResponse.status,
1833
2293
  body: currentRawResponse.parsedBody,
1834
- headers: currentRawResponse.headers.toJSON()
1835
- }
2294
+ headers: currentRawResponse.headers.toJSON(),
2295
+ },
1836
2296
  };
1837
2297
  });
1838
2298
  const lro = createLroSpec({
1839
2299
  sendOperationFn,
1840
- args: { resourceGroupName, cloudHsmClusterName, location, options },
1841
- spec: createOrUpdateOperationSpec$1
2300
+ args: { resourceGroupName, cloudHsmClusterName, options },
2301
+ spec: validateBackupPropertiesOperationSpec,
1842
2302
  });
1843
2303
  const poller = yield coreLro.createHttpPoller(lro, {
1844
2304
  restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1845
2305
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1846
- resourceLocationConfig: "original-uri"
2306
+ resourceLocationConfig: "azure-async-operation",
1847
2307
  });
1848
2308
  yield poller.poll();
1849
2309
  return poller;
1850
2310
  });
1851
2311
  }
1852
2312
  /**
1853
- * Create or Update a Cloud HSM Cluster in the specified subscription.
2313
+ * Pre Backup operation to validate whether the customer can perform a backup on the Cloud HSM Cluster
2314
+ * resource in the specified subscription.
1854
2315
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1855
2316
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
1856
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
1857
- * @param location The geo-location where the resource lives
2317
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
1858
2318
  * @param options The options parameters.
1859
2319
  */
1860
- beginCreateOrUpdateAndWait(resourceGroupName, cloudHsmClusterName, location, options) {
2320
+ beginValidateBackupPropertiesAndWait(resourceGroupName, cloudHsmClusterName, options) {
1861
2321
  return tslib.__awaiter(this, void 0, void 0, function* () {
1862
- const poller = yield this.beginCreateOrUpdate(resourceGroupName, cloudHsmClusterName, location, options);
2322
+ const poller = yield this.beginValidateBackupProperties(resourceGroupName, cloudHsmClusterName, options);
1863
2323
  return poller.pollUntilDone();
1864
2324
  });
1865
2325
  }
1866
2326
  /**
1867
- * Update a Cloud HSM Cluster in the specified subscription.
2327
+ * Create a backup of the Cloud HSM Cluster in the specified subscription
1868
2328
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1869
2329
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
1870
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
2330
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
1871
2331
  * @param options The options parameters.
1872
2332
  */
1873
- beginUpdate(resourceGroupName, cloudHsmClusterName, options) {
2333
+ beginBackup(resourceGroupName, cloudHsmClusterName, options) {
1874
2334
  return tslib.__awaiter(this, void 0, void 0, function* () {
1875
2335
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1876
2336
  return this.client.sendOperationRequest(args, spec);
@@ -1890,55 +2350,45 @@ class CloudHsmClustersImpl {
1890
2350
  rawResponse: {
1891
2351
  statusCode: currentRawResponse.status,
1892
2352
  body: currentRawResponse.parsedBody,
1893
- headers: currentRawResponse.headers.toJSON()
1894
- }
2353
+ headers: currentRawResponse.headers.toJSON(),
2354
+ },
1895
2355
  };
1896
2356
  });
1897
2357
  const lro = createLroSpec({
1898
2358
  sendOperationFn,
1899
2359
  args: { resourceGroupName, cloudHsmClusterName, options },
1900
- spec: updateOperationSpec$1
2360
+ spec: backupOperationSpec,
1901
2361
  });
1902
2362
  const poller = yield coreLro.createHttpPoller(lro, {
1903
2363
  restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1904
2364
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1905
- resourceLocationConfig: "location"
2365
+ resourceLocationConfig: "azure-async-operation",
1906
2366
  });
1907
2367
  yield poller.poll();
1908
2368
  return poller;
1909
2369
  });
1910
2370
  }
1911
2371
  /**
1912
- * Update a Cloud HSM Cluster in the specified subscription.
2372
+ * Create a backup of the Cloud HSM Cluster in the specified subscription
1913
2373
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1914
2374
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
1915
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
2375
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
1916
2376
  * @param options The options parameters.
1917
2377
  */
1918
- beginUpdateAndWait(resourceGroupName, cloudHsmClusterName, options) {
2378
+ beginBackupAndWait(resourceGroupName, cloudHsmClusterName, options) {
1919
2379
  return tslib.__awaiter(this, void 0, void 0, function* () {
1920
- const poller = yield this.beginUpdate(resourceGroupName, cloudHsmClusterName, options);
2380
+ const poller = yield this.beginBackup(resourceGroupName, cloudHsmClusterName, options);
1921
2381
  return poller.pollUntilDone();
1922
2382
  });
1923
2383
  }
1924
2384
  /**
1925
- * Gets the specified Cloud HSM Cluster
1926
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1927
- * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
1928
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
1929
- * @param options The options parameters.
1930
- */
1931
- get(resourceGroupName, cloudHsmClusterName, options) {
1932
- return this.client.sendOperationRequest({ resourceGroupName, cloudHsmClusterName, options }, getOperationSpec$2);
1933
- }
1934
- /**
1935
- * Deletes the specified Cloud HSM Cluster
2385
+ * Queued validating pre restore operation
1936
2386
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1937
2387
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
1938
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
2388
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
1939
2389
  * @param options The options parameters.
1940
2390
  */
1941
- beginDelete(resourceGroupName, cloudHsmClusterName, options) {
2391
+ beginValidateRestoreProperties(resourceGroupName, cloudHsmClusterName, options) {
1942
2392
  return tslib.__awaiter(this, void 0, void 0, function* () {
1943
2393
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1944
2394
  return this.client.sendOperationRequest(args, spec);
@@ -1958,52 +2408,101 @@ class CloudHsmClustersImpl {
1958
2408
  rawResponse: {
1959
2409
  statusCode: currentRawResponse.status,
1960
2410
  body: currentRawResponse.parsedBody,
1961
- headers: currentRawResponse.headers.toJSON()
1962
- }
2411
+ headers: currentRawResponse.headers.toJSON(),
2412
+ },
1963
2413
  };
1964
2414
  });
1965
2415
  const lro = createLroSpec({
1966
2416
  sendOperationFn,
1967
2417
  args: { resourceGroupName, cloudHsmClusterName, options },
1968
- spec: deleteOperationSpec$2
2418
+ spec: validateRestorePropertiesOperationSpec,
1969
2419
  });
1970
2420
  const poller = yield coreLro.createHttpPoller(lro, {
1971
2421
  restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1972
2422
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1973
- resourceLocationConfig: "location"
2423
+ resourceLocationConfig: "azure-async-operation",
1974
2424
  });
1975
2425
  yield poller.poll();
1976
2426
  return poller;
1977
2427
  });
1978
2428
  }
1979
2429
  /**
1980
- * Deletes the specified Cloud HSM Cluster
2430
+ * Queued validating pre restore operation
1981
2431
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
1982
2432
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
1983
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
2433
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
1984
2434
  * @param options The options parameters.
1985
2435
  */
1986
- beginDeleteAndWait(resourceGroupName, cloudHsmClusterName, options) {
2436
+ beginValidateRestorePropertiesAndWait(resourceGroupName, cloudHsmClusterName, options) {
1987
2437
  return tslib.__awaiter(this, void 0, void 0, function* () {
1988
- const poller = yield this.beginDelete(resourceGroupName, cloudHsmClusterName, options);
2438
+ const poller = yield this.beginValidateRestoreProperties(resourceGroupName, cloudHsmClusterName, options);
1989
2439
  return poller.pollUntilDone();
1990
2440
  });
1991
2441
  }
1992
2442
  /**
1993
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription
1994
- * and within the specified resource group.
2443
+ * Restores all key materials of a specified Cloud HSM Cluster
1995
2444
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2445
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2446
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2447
+ * @param restoreRequestProperties Restore Operation Required properties
1996
2448
  * @param options The options parameters.
1997
2449
  */
1998
- _listByResourceGroup(resourceGroupName, options) {
1999
- return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
2450
+ beginRestore(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, options) {
2451
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2452
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2453
+ return this.client.sendOperationRequest(args, spec);
2454
+ });
2455
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2456
+ var _a;
2457
+ let currentRawResponse = undefined;
2458
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2459
+ const callback = (rawResponse, flatResponse) => {
2460
+ currentRawResponse = rawResponse;
2461
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2462
+ };
2463
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2464
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2465
+ return {
2466
+ flatResponse,
2467
+ rawResponse: {
2468
+ statusCode: currentRawResponse.status,
2469
+ body: currentRawResponse.parsedBody,
2470
+ headers: currentRawResponse.headers.toJSON(),
2471
+ },
2472
+ };
2473
+ });
2474
+ const lro = createLroSpec({
2475
+ sendOperationFn,
2476
+ args: {
2477
+ resourceGroupName,
2478
+ cloudHsmClusterName,
2479
+ restoreRequestProperties,
2480
+ options,
2481
+ },
2482
+ spec: restoreOperationSpec,
2483
+ });
2484
+ const poller = yield coreLro.createHttpPoller(lro, {
2485
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2486
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2487
+ resourceLocationConfig: "azure-async-operation",
2488
+ });
2489
+ yield poller.poll();
2490
+ return poller;
2491
+ });
2000
2492
  }
2001
2493
  /**
2002
- * The List operation gets information about the Cloud HSM Clusters associated with the subscription.
2494
+ * Restores all key materials of a specified Cloud HSM Cluster
2495
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2496
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2497
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2498
+ * @param restoreRequestProperties Restore Operation Required properties
2003
2499
  * @param options The options parameters.
2004
2500
  */
2005
- _listBySubscription(options) {
2006
- return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec$1);
2501
+ beginRestoreAndWait(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, options) {
2502
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2503
+ const poller = yield this.beginRestore(resourceGroupName, cloudHsmClusterName, restoreRequestProperties, options);
2504
+ return poller.pollUntilDone();
2505
+ });
2007
2506
  }
2008
2507
  /**
2009
2508
  * ListByResourceGroupNext
@@ -2024,215 +2523,359 @@ class CloudHsmClustersImpl {
2024
2523
  }
2025
2524
  }
2026
2525
  // Operation Specifications
2027
- const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2526
+ const serializer$7 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2028
2527
  const createOrUpdateOperationSpec$1 = {
2029
2528
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}",
2030
2529
  httpMethod: "PUT",
2031
2530
  responses: {
2032
2531
  200: {
2033
- bodyMapper: CloudHsmCluster
2532
+ bodyMapper: CloudHsmCluster,
2533
+ },
2534
+ 201: {
2535
+ bodyMapper: CloudHsmCluster,
2536
+ },
2537
+ 202: {
2538
+ bodyMapper: CloudHsmCluster,
2539
+ },
2540
+ 204: {
2541
+ bodyMapper: CloudHsmCluster,
2542
+ },
2543
+ default: {
2544
+ bodyMapper: ErrorResponse,
2545
+ },
2546
+ },
2547
+ requestBody: {
2548
+ parameterPath: {
2549
+ tags: ["options", "tags"],
2550
+ location: ["location"],
2551
+ identity: ["options", "identity"],
2552
+ sku: ["options", "sku"],
2553
+ autoGeneratedDomainNameLabelScope: [
2554
+ "options",
2555
+ "autoGeneratedDomainNameLabelScope",
2556
+ ],
2557
+ publicNetworkAccess: ["options", "publicNetworkAccess"],
2558
+ },
2559
+ mapper: Object.assign(Object.assign({}, CloudHsmCluster), { required: true }),
2560
+ },
2561
+ queryParameters: [apiVersion],
2562
+ urlParameters: [
2563
+ $host,
2564
+ subscriptionId,
2565
+ resourceGroupName,
2566
+ cloudHsmClusterName,
2567
+ ],
2568
+ headerParameters: [contentType, accept],
2569
+ mediaType: "json",
2570
+ serializer: serializer$7,
2571
+ };
2572
+ const updateOperationSpec$1 = {
2573
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}",
2574
+ httpMethod: "PATCH",
2575
+ responses: {
2576
+ 200: {
2577
+ bodyMapper: CloudHsmCluster,
2578
+ },
2579
+ 201: {
2580
+ bodyMapper: CloudHsmCluster,
2581
+ },
2582
+ 202: {
2583
+ bodyMapper: CloudHsmCluster,
2584
+ },
2585
+ 204: {
2586
+ bodyMapper: CloudHsmCluster,
2587
+ },
2588
+ default: {
2589
+ bodyMapper: ErrorResponse,
2590
+ },
2591
+ },
2592
+ requestBody: {
2593
+ parameterPath: {
2594
+ tags: ["options", "tags"],
2595
+ identity: ["options", "identity"],
2596
+ },
2597
+ mapper: Object.assign(Object.assign({}, CloudHsmClusterPatchParameters), { required: true }),
2598
+ },
2599
+ queryParameters: [apiVersion],
2600
+ urlParameters: [
2601
+ $host,
2602
+ subscriptionId,
2603
+ resourceGroupName,
2604
+ cloudHsmClusterName,
2605
+ ],
2606
+ headerParameters: [contentType, accept],
2607
+ mediaType: "json",
2608
+ serializer: serializer$7,
2609
+ };
2610
+ const getOperationSpec$4 = {
2611
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}",
2612
+ httpMethod: "GET",
2613
+ responses: {
2614
+ 200: {
2615
+ bodyMapper: CloudHsmCluster,
2616
+ },
2617
+ default: {
2618
+ bodyMapper: ErrorResponse,
2619
+ },
2620
+ },
2621
+ queryParameters: [apiVersion],
2622
+ urlParameters: [
2623
+ $host,
2624
+ subscriptionId,
2625
+ resourceGroupName,
2626
+ cloudHsmClusterName,
2627
+ ],
2628
+ headerParameters: [accept],
2629
+ serializer: serializer$7,
2630
+ };
2631
+ const deleteOperationSpec$2 = {
2632
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}",
2633
+ httpMethod: "DELETE",
2634
+ responses: {
2635
+ 200: {
2636
+ headersMapper: CloudHsmClustersDeleteHeaders,
2637
+ },
2638
+ 201: {
2639
+ headersMapper: CloudHsmClustersDeleteHeaders,
2640
+ },
2641
+ 202: {
2642
+ headersMapper: CloudHsmClustersDeleteHeaders,
2643
+ },
2644
+ 204: {
2645
+ headersMapper: CloudHsmClustersDeleteHeaders,
2646
+ },
2647
+ default: {
2648
+ bodyMapper: ErrorResponse,
2649
+ },
2650
+ },
2651
+ queryParameters: [apiVersion],
2652
+ urlParameters: [
2653
+ $host,
2654
+ subscriptionId,
2655
+ resourceGroupName,
2656
+ cloudHsmClusterName,
2657
+ ],
2658
+ headerParameters: [accept],
2659
+ serializer: serializer$7,
2660
+ };
2661
+ const listByResourceGroupOperationSpec$1 = {
2662
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters",
2663
+ httpMethod: "GET",
2664
+ responses: {
2665
+ 200: {
2666
+ bodyMapper: CloudHsmClusterListResult,
2667
+ },
2668
+ default: {
2669
+ bodyMapper: ErrorResponse,
2670
+ },
2671
+ },
2672
+ queryParameters: [apiVersion, skiptoken],
2673
+ urlParameters: [
2674
+ $host,
2675
+ subscriptionId,
2676
+ resourceGroupName,
2677
+ ],
2678
+ headerParameters: [accept],
2679
+ serializer: serializer$7,
2680
+ };
2681
+ const listBySubscriptionOperationSpec$1 = {
2682
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters",
2683
+ httpMethod: "GET",
2684
+ responses: {
2685
+ 200: {
2686
+ bodyMapper: CloudHsmClusterListResult,
2687
+ },
2688
+ default: {
2689
+ bodyMapper: ErrorResponse,
2690
+ },
2691
+ },
2692
+ queryParameters: [apiVersion, skiptoken],
2693
+ urlParameters: [$host, subscriptionId],
2694
+ headerParameters: [accept],
2695
+ serializer: serializer$7,
2696
+ };
2697
+ const validateBackupPropertiesOperationSpec = {
2698
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/validateBackupProperties",
2699
+ httpMethod: "POST",
2700
+ responses: {
2701
+ 200: {
2702
+ bodyMapper: BackupResult,
2703
+ headersMapper: CloudHsmClustersValidateBackupPropertiesHeaders,
2034
2704
  },
2035
2705
  201: {
2036
- bodyMapper: CloudHsmCluster
2706
+ bodyMapper: BackupResult,
2707
+ headersMapper: CloudHsmClustersValidateBackupPropertiesHeaders,
2037
2708
  },
2038
2709
  202: {
2039
- bodyMapper: CloudHsmCluster
2710
+ bodyMapper: BackupResult,
2711
+ headersMapper: CloudHsmClustersValidateBackupPropertiesHeaders,
2040
2712
  },
2041
2713
  204: {
2042
- bodyMapper: CloudHsmCluster
2714
+ bodyMapper: BackupResult,
2715
+ headersMapper: CloudHsmClustersValidateBackupPropertiesHeaders,
2043
2716
  },
2044
2717
  default: {
2045
- bodyMapper: CloudHsmClusterError
2046
- }
2047
- },
2048
- requestBody: {
2049
- parameterPath: {
2050
- tags: ["options", "tags"],
2051
- location: ["location"],
2052
- sku: ["options", "sku"],
2053
- identity: ["options", "identity"],
2054
- provisioningState: ["options", "provisioningState"],
2055
- autoGeneratedDomainNameLabelScope: [
2056
- "options",
2057
- "autoGeneratedDomainNameLabelScope"
2058
- ],
2059
- securityDomain: ["options", "securityDomain"],
2060
- hsms: ["options", "hsms"],
2061
- publicNetworkAccess: ["options", "publicNetworkAccess"],
2062
- privateEndpointConnections: ["options", "privateEndpointConnections"],
2063
- restoreProperties: ["options", "restoreProperties"],
2064
- backupProperties: ["options", "backupProperties"]
2718
+ bodyMapper: ErrorResponse,
2065
2719
  },
2066
- mapper: Object.assign(Object.assign({}, CloudHsmCluster), { required: true })
2067
2720
  },
2721
+ requestBody: backupRequestProperties,
2068
2722
  queryParameters: [apiVersion],
2069
2723
  urlParameters: [
2070
2724
  $host,
2071
2725
  subscriptionId,
2072
2726
  resourceGroupName,
2073
- cloudHsmClusterName
2727
+ cloudHsmClusterName,
2074
2728
  ],
2075
2729
  headerParameters: [contentType, accept],
2076
2730
  mediaType: "json",
2077
- serializer: serializer$5
2731
+ serializer: serializer$7,
2078
2732
  };
2079
- const updateOperationSpec$1 = {
2080
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}",
2081
- httpMethod: "PATCH",
2733
+ const backupOperationSpec = {
2734
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/backup",
2735
+ httpMethod: "POST",
2082
2736
  responses: {
2083
2737
  200: {
2084
- bodyMapper: CloudHsmCluster
2738
+ bodyMapper: BackupResult,
2739
+ headersMapper: CloudHsmClustersBackupHeaders,
2085
2740
  },
2086
2741
  201: {
2087
- bodyMapper: CloudHsmCluster
2742
+ bodyMapper: BackupResult,
2743
+ headersMapper: CloudHsmClustersBackupHeaders,
2088
2744
  },
2089
2745
  202: {
2090
- bodyMapper: CloudHsmCluster
2746
+ bodyMapper: BackupResult,
2747
+ headersMapper: CloudHsmClustersBackupHeaders,
2091
2748
  },
2092
2749
  204: {
2093
- bodyMapper: CloudHsmCluster
2750
+ bodyMapper: BackupResult,
2751
+ headersMapper: CloudHsmClustersBackupHeaders,
2094
2752
  },
2095
2753
  default: {
2096
- bodyMapper: CloudHsmClusterError
2097
- }
2098
- },
2099
- requestBody: {
2100
- parameterPath: {
2101
- tags: ["options", "tags"],
2102
- sku: ["options", "sku"],
2103
- identity: ["options", "identity"],
2104
- backupProperties: ["options", "backupProperties"]
2754
+ bodyMapper: ErrorResponse,
2105
2755
  },
2106
- mapper: Object.assign(Object.assign({}, CloudHsmClusterPatchParameters), { required: true })
2107
2756
  },
2757
+ requestBody: backupRequestProperties,
2108
2758
  queryParameters: [apiVersion],
2109
2759
  urlParameters: [
2110
2760
  $host,
2111
2761
  subscriptionId,
2112
2762
  resourceGroupName,
2113
- cloudHsmClusterName
2763
+ cloudHsmClusterName,
2114
2764
  ],
2115
2765
  headerParameters: [contentType, accept],
2116
2766
  mediaType: "json",
2117
- serializer: serializer$5
2767
+ serializer: serializer$7,
2118
2768
  };
2119
- const getOperationSpec$2 = {
2120
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}",
2121
- httpMethod: "GET",
2769
+ const validateRestorePropertiesOperationSpec = {
2770
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/validateRestoreProperties",
2771
+ httpMethod: "POST",
2122
2772
  responses: {
2123
2773
  200: {
2124
- bodyMapper: CloudHsmCluster
2774
+ bodyMapper: RestoreResult,
2775
+ headersMapper: CloudHsmClustersValidateRestorePropertiesHeaders,
2776
+ },
2777
+ 201: {
2778
+ bodyMapper: RestoreResult,
2779
+ headersMapper: CloudHsmClustersValidateRestorePropertiesHeaders,
2780
+ },
2781
+ 202: {
2782
+ bodyMapper: RestoreResult,
2783
+ headersMapper: CloudHsmClustersValidateRestorePropertiesHeaders,
2784
+ },
2785
+ 204: {
2786
+ bodyMapper: RestoreResult,
2787
+ headersMapper: CloudHsmClustersValidateRestorePropertiesHeaders,
2125
2788
  },
2126
2789
  default: {
2127
- bodyMapper: CloudHsmClusterError
2128
- }
2129
- },
2130
- queryParameters: [apiVersion],
2131
- urlParameters: [
2132
- $host,
2133
- subscriptionId,
2134
- resourceGroupName,
2135
- cloudHsmClusterName
2136
- ],
2137
- headerParameters: [accept],
2138
- serializer: serializer$5
2139
- };
2140
- const deleteOperationSpec$2 = {
2141
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}",
2142
- httpMethod: "DELETE",
2143
- responses: {
2144
- 200: {},
2145
- 201: {},
2146
- 202: {},
2147
- 204: {},
2148
- default: {
2149
- bodyMapper: CloudHsmClusterError
2150
- }
2790
+ bodyMapper: ErrorResponse,
2791
+ },
2151
2792
  },
2793
+ requestBody: restoreRequestProperties,
2152
2794
  queryParameters: [apiVersion],
2153
2795
  urlParameters: [
2154
2796
  $host,
2155
2797
  subscriptionId,
2156
2798
  resourceGroupName,
2157
- cloudHsmClusterName
2799
+ cloudHsmClusterName,
2158
2800
  ],
2159
- headerParameters: [accept],
2160
- serializer: serializer$5
2801
+ headerParameters: [contentType, accept],
2802
+ mediaType: "json",
2803
+ serializer: serializer$7,
2161
2804
  };
2162
- const listByResourceGroupOperationSpec$1 = {
2163
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters",
2164
- httpMethod: "GET",
2805
+ const restoreOperationSpec = {
2806
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/restore",
2807
+ httpMethod: "POST",
2165
2808
  responses: {
2166
2809
  200: {
2167
- bodyMapper: CloudHsmClusterListResult
2810
+ bodyMapper: RestoreResult,
2811
+ headersMapper: CloudHsmClustersRestoreHeaders,
2812
+ },
2813
+ 201: {
2814
+ bodyMapper: RestoreResult,
2815
+ headersMapper: CloudHsmClustersRestoreHeaders,
2816
+ },
2817
+ 202: {
2818
+ bodyMapper: RestoreResult,
2819
+ headersMapper: CloudHsmClustersRestoreHeaders,
2820
+ },
2821
+ 204: {
2822
+ bodyMapper: RestoreResult,
2823
+ headersMapper: CloudHsmClustersRestoreHeaders,
2168
2824
  },
2169
2825
  default: {
2170
- bodyMapper: CloudHsmClusterError
2171
- }
2826
+ bodyMapper: ErrorResponse,
2827
+ },
2172
2828
  },
2173
- queryParameters: [apiVersion, skiptoken],
2829
+ requestBody: restoreRequestProperties1,
2830
+ queryParameters: [apiVersion],
2174
2831
  urlParameters: [
2175
2832
  $host,
2176
2833
  subscriptionId,
2177
- resourceGroupName
2834
+ resourceGroupName,
2835
+ cloudHsmClusterName,
2178
2836
  ],
2179
- headerParameters: [accept],
2180
- serializer: serializer$5
2181
- };
2182
- const listBySubscriptionOperationSpec$1 = {
2183
- path: "/subscriptions/{subscriptionId}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters",
2184
- httpMethod: "GET",
2185
- responses: {
2186
- 200: {
2187
- bodyMapper: CloudHsmClusterListResult
2188
- },
2189
- default: {
2190
- bodyMapper: CloudHsmClusterError
2191
- }
2192
- },
2193
- queryParameters: [apiVersion, skiptoken],
2194
- urlParameters: [$host, subscriptionId],
2195
- headerParameters: [accept],
2196
- serializer: serializer$5
2837
+ headerParameters: [contentType, accept],
2838
+ mediaType: "json",
2839
+ serializer: serializer$7,
2197
2840
  };
2198
2841
  const listByResourceGroupNextOperationSpec$1 = {
2199
2842
  path: "{nextLink}",
2200
2843
  httpMethod: "GET",
2201
2844
  responses: {
2202
2845
  200: {
2203
- bodyMapper: CloudHsmClusterListResult
2846
+ bodyMapper: CloudHsmClusterListResult,
2204
2847
  },
2205
2848
  default: {
2206
- bodyMapper: CloudHsmClusterError
2207
- }
2849
+ bodyMapper: ErrorResponse,
2850
+ },
2208
2851
  },
2209
2852
  urlParameters: [
2210
2853
  $host,
2211
2854
  subscriptionId,
2212
2855
  resourceGroupName,
2213
- nextLink
2856
+ nextLink,
2214
2857
  ],
2215
2858
  headerParameters: [accept],
2216
- serializer: serializer$5
2859
+ serializer: serializer$7,
2217
2860
  };
2218
2861
  const listBySubscriptionNextOperationSpec$1 = {
2219
2862
  path: "{nextLink}",
2220
2863
  httpMethod: "GET",
2221
2864
  responses: {
2222
2865
  200: {
2223
- bodyMapper: CloudHsmClusterListResult
2866
+ bodyMapper: CloudHsmClusterListResult,
2224
2867
  },
2225
2868
  default: {
2226
- bodyMapper: CloudHsmClusterError
2227
- }
2869
+ bodyMapper: ErrorResponse,
2870
+ },
2228
2871
  },
2229
2872
  urlParameters: [
2230
2873
  $host,
2231
2874
  subscriptionId,
2232
- nextLink
2875
+ nextLink,
2233
2876
  ],
2234
2877
  headerParameters: [accept],
2235
- serializer: serializer$5
2878
+ serializer: serializer$7,
2236
2879
  };
2237
2880
 
2238
2881
  /*
@@ -2242,6 +2885,7 @@ const listBySubscriptionNextOperationSpec$1 = {
2242
2885
  * Code generated by Microsoft (R) AutoRest Code Generator.
2243
2886
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2244
2887
  */
2888
+ /// <reference lib="esnext.asynciterable" />
2245
2889
  /** Class containing CloudHsmClusterPrivateLinkResources operations. */
2246
2890
  class CloudHsmClusterPrivateLinkResourcesImpl {
2247
2891
  /**
@@ -2255,35 +2899,131 @@ class CloudHsmClusterPrivateLinkResourcesImpl {
2255
2899
  * Gets the private link resources supported for the Cloud Hsm Cluster.
2256
2900
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2257
2901
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2258
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
2902
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2259
2903
  * @param options The options parameters.
2260
2904
  */
2261
2905
  listByCloudHsmCluster(resourceGroupName, cloudHsmClusterName, options) {
2906
+ const iter = this.listByCloudHsmClusterPagingAll(resourceGroupName, cloudHsmClusterName, options);
2907
+ return {
2908
+ next() {
2909
+ return iter.next();
2910
+ },
2911
+ [Symbol.asyncIterator]() {
2912
+ return this;
2913
+ },
2914
+ byPage: (settings) => {
2915
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2916
+ throw new Error("maxPageSize is not supported by this operation.");
2917
+ }
2918
+ return this.listByCloudHsmClusterPagingPage(resourceGroupName, cloudHsmClusterName, options, settings);
2919
+ },
2920
+ };
2921
+ }
2922
+ listByCloudHsmClusterPagingPage(resourceGroupName, cloudHsmClusterName, options, settings) {
2923
+ return tslib.__asyncGenerator(this, arguments, function* listByCloudHsmClusterPagingPage_1() {
2924
+ let result;
2925
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2926
+ if (!continuationToken) {
2927
+ result = yield tslib.__await(this._listByCloudHsmCluster(resourceGroupName, cloudHsmClusterName, options));
2928
+ let page = result.value || [];
2929
+ continuationToken = result.nextLink;
2930
+ setContinuationToken(page, continuationToken);
2931
+ yield yield tslib.__await(page);
2932
+ }
2933
+ while (continuationToken) {
2934
+ result = yield tslib.__await(this._listByCloudHsmClusterNext(resourceGroupName, cloudHsmClusterName, continuationToken, options));
2935
+ continuationToken = result.nextLink;
2936
+ let page = result.value || [];
2937
+ setContinuationToken(page, continuationToken);
2938
+ yield yield tslib.__await(page);
2939
+ }
2940
+ });
2941
+ }
2942
+ listByCloudHsmClusterPagingAll(resourceGroupName, cloudHsmClusterName, options) {
2943
+ return tslib.__asyncGenerator(this, arguments, function* listByCloudHsmClusterPagingAll_1() {
2944
+ var _a, e_1, _b, _c;
2945
+ try {
2946
+ for (var _d = true, _e = tslib.__asyncValues(this.listByCloudHsmClusterPagingPage(resourceGroupName, cloudHsmClusterName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
2947
+ _c = _f.value;
2948
+ _d = false;
2949
+ const page = _c;
2950
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2951
+ }
2952
+ }
2953
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2954
+ finally {
2955
+ try {
2956
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
2957
+ }
2958
+ finally { if (e_1) throw e_1.error; }
2959
+ }
2960
+ });
2961
+ }
2962
+ /**
2963
+ * Gets the private link resources supported for the Cloud Hsm Cluster.
2964
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2965
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2966
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2967
+ * @param options The options parameters.
2968
+ */
2969
+ _listByCloudHsmCluster(resourceGroupName, cloudHsmClusterName, options) {
2262
2970
  return this.client.sendOperationRequest({ resourceGroupName, cloudHsmClusterName, options }, listByCloudHsmClusterOperationSpec$1);
2263
2971
  }
2972
+ /**
2973
+ * ListByCloudHsmClusterNext
2974
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2975
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2976
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2977
+ * @param nextLink The nextLink from the previous successful call to the ListByCloudHsmCluster method.
2978
+ * @param options The options parameters.
2979
+ */
2980
+ _listByCloudHsmClusterNext(resourceGroupName, cloudHsmClusterName, nextLink, options) {
2981
+ return this.client.sendOperationRequest({ resourceGroupName, cloudHsmClusterName, nextLink, options }, listByCloudHsmClusterNextOperationSpec$1);
2982
+ }
2264
2983
  }
2265
2984
  // Operation Specifications
2266
- const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2985
+ const serializer$6 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2267
2986
  const listByCloudHsmClusterOperationSpec$1 = {
2268
2987
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateLinkResources",
2269
2988
  httpMethod: "GET",
2270
2989
  responses: {
2271
2990
  200: {
2272
- bodyMapper: PrivateLinkResourceListResult
2991
+ bodyMapper: PrivateLinkResourceListResult,
2273
2992
  },
2274
2993
  default: {
2275
- bodyMapper: CloudHsmClusterError
2276
- }
2994
+ bodyMapper: ErrorResponse,
2995
+ },
2277
2996
  },
2278
2997
  queryParameters: [apiVersion],
2279
2998
  urlParameters: [
2280
2999
  $host,
2281
3000
  subscriptionId,
2282
3001
  resourceGroupName,
2283
- cloudHsmClusterName
3002
+ cloudHsmClusterName,
3003
+ ],
3004
+ headerParameters: [accept],
3005
+ serializer: serializer$6,
3006
+ };
3007
+ const listByCloudHsmClusterNextOperationSpec$1 = {
3008
+ path: "{nextLink}",
3009
+ httpMethod: "GET",
3010
+ responses: {
3011
+ 200: {
3012
+ bodyMapper: PrivateLinkResourceListResult,
3013
+ },
3014
+ default: {
3015
+ bodyMapper: ErrorResponse,
3016
+ },
3017
+ },
3018
+ urlParameters: [
3019
+ $host,
3020
+ subscriptionId,
3021
+ resourceGroupName,
3022
+ cloudHsmClusterName,
3023
+ nextLink,
2284
3024
  ],
2285
3025
  headerParameters: [accept],
2286
- serializer: serializer$4
3026
+ serializer: serializer$6,
2287
3027
  };
2288
3028
 
2289
3029
  /*
@@ -2306,7 +3046,7 @@ class CloudHsmClusterPrivateEndpointConnectionsImpl {
2306
3046
  * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
2307
3047
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2308
3048
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2309
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
3049
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2310
3050
  * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
2311
3051
  * Cluster.
2312
3052
  * @param properties Parameters of the PrivateEndpointConnection
@@ -2318,14 +3058,14 @@ class CloudHsmClusterPrivateEndpointConnectionsImpl {
2318
3058
  cloudHsmClusterName,
2319
3059
  peConnectionName,
2320
3060
  properties,
2321
- options
3061
+ options,
2322
3062
  }, createOperationSpec);
2323
3063
  }
2324
3064
  /**
2325
3065
  * Deletes the private endpoint connection for the Cloud Hsm Cluster.
2326
3066
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2327
3067
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2328
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
3068
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2329
3069
  * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
2330
3070
  * Cluster.
2331
3071
  * @param options The options parameters.
@@ -2350,8 +3090,8 @@ class CloudHsmClusterPrivateEndpointConnectionsImpl {
2350
3090
  rawResponse: {
2351
3091
  statusCode: currentRawResponse.status,
2352
3092
  body: currentRawResponse.parsedBody,
2353
- headers: currentRawResponse.headers.toJSON()
2354
- }
3093
+ headers: currentRawResponse.headers.toJSON(),
3094
+ },
2355
3095
  };
2356
3096
  });
2357
3097
  const lro = createLroSpec({
@@ -2360,14 +3100,14 @@ class CloudHsmClusterPrivateEndpointConnectionsImpl {
2360
3100
  resourceGroupName,
2361
3101
  cloudHsmClusterName,
2362
3102
  peConnectionName,
2363
- options
3103
+ options,
2364
3104
  },
2365
- spec: deleteOperationSpec$1
3105
+ spec: deleteOperationSpec$1,
2366
3106
  });
2367
3107
  const poller = yield coreLro.createHttpPoller(lro, {
2368
3108
  restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2369
3109
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2370
- resourceLocationConfig: "location"
3110
+ resourceLocationConfig: "location",
2371
3111
  });
2372
3112
  yield poller.poll();
2373
3113
  return poller;
@@ -2377,7 +3117,7 @@ class CloudHsmClusterPrivateEndpointConnectionsImpl {
2377
3117
  * Deletes the private endpoint connection for the Cloud Hsm Cluster.
2378
3118
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2379
3119
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2380
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
3120
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2381
3121
  * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
2382
3122
  * Cluster.
2383
3123
  * @param options The options parameters.
@@ -2392,27 +3132,27 @@ class CloudHsmClusterPrivateEndpointConnectionsImpl {
2392
3132
  * Gets the private endpoint connection for the Cloud Hsm Cluster.
2393
3133
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2394
3134
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2395
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
3135
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2396
3136
  * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
2397
3137
  * Cluster.
2398
3138
  * @param options The options parameters.
2399
3139
  */
2400
3140
  get(resourceGroupName, cloudHsmClusterName, peConnectionName, options) {
2401
- return this.client.sendOperationRequest({ resourceGroupName, cloudHsmClusterName, peConnectionName, options }, getOperationSpec$1);
3141
+ return this.client.sendOperationRequest({ resourceGroupName, cloudHsmClusterName, peConnectionName, options }, getOperationSpec$3);
2402
3142
  }
2403
3143
  }
2404
3144
  // Operation Specifications
2405
- const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3145
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2406
3146
  const createOperationSpec = {
2407
3147
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}",
2408
3148
  httpMethod: "PUT",
2409
3149
  responses: {
2410
3150
  200: {
2411
- bodyMapper: PrivateEndpointConnection
3151
+ bodyMapper: PrivateEndpointConnection,
2412
3152
  },
2413
3153
  default: {
2414
- bodyMapper: CloudHsmClusterError
2415
- }
3154
+ bodyMapper: ErrorResponse,
3155
+ },
2416
3156
  },
2417
3157
  requestBody: properties,
2418
3158
  queryParameters: [apiVersion],
@@ -2421,23 +3161,31 @@ const createOperationSpec = {
2421
3161
  subscriptionId,
2422
3162
  resourceGroupName,
2423
3163
  cloudHsmClusterName,
2424
- peConnectionName
3164
+ peConnectionName,
2425
3165
  ],
2426
3166
  headerParameters: [contentType, accept],
2427
3167
  mediaType: "json",
2428
- serializer: serializer$3
3168
+ serializer: serializer$5,
2429
3169
  };
2430
3170
  const deleteOperationSpec$1 = {
2431
3171
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}",
2432
3172
  httpMethod: "DELETE",
2433
3173
  responses: {
2434
- 200: {},
2435
- 201: {},
2436
- 202: {},
2437
- 204: {},
3174
+ 200: {
3175
+ headersMapper: CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders,
3176
+ },
3177
+ 201: {
3178
+ headersMapper: CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders,
3179
+ },
3180
+ 202: {
3181
+ headersMapper: CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders,
3182
+ },
3183
+ 204: {
3184
+ headersMapper: CloudHsmClusterPrivateEndpointConnectionsDeleteHeaders,
3185
+ },
2438
3186
  default: {
2439
- bodyMapper: CloudHsmClusterError
2440
- }
3187
+ bodyMapper: ErrorResponse,
3188
+ },
2441
3189
  },
2442
3190
  queryParameters: [apiVersion],
2443
3191
  urlParameters: [
@@ -2445,21 +3193,21 @@ const deleteOperationSpec$1 = {
2445
3193
  subscriptionId,
2446
3194
  resourceGroupName,
2447
3195
  cloudHsmClusterName,
2448
- peConnectionName
3196
+ peConnectionName,
2449
3197
  ],
2450
3198
  headerParameters: [accept],
2451
- serializer: serializer$3
3199
+ serializer: serializer$5,
2452
3200
  };
2453
- const getOperationSpec$1 = {
3201
+ const getOperationSpec$3 = {
2454
3202
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}",
2455
3203
  httpMethod: "GET",
2456
3204
  responses: {
2457
3205
  200: {
2458
- bodyMapper: PrivateEndpointConnection
3206
+ bodyMapper: PrivateEndpointConnection,
2459
3207
  },
2460
3208
  default: {
2461
- bodyMapper: CloudHsmClusterError
2462
- }
3209
+ bodyMapper: ErrorResponse,
3210
+ },
2463
3211
  },
2464
3212
  queryParameters: [apiVersion],
2465
3213
  urlParameters: [
@@ -2467,10 +3215,10 @@ const getOperationSpec$1 = {
2467
3215
  subscriptionId,
2468
3216
  resourceGroupName,
2469
3217
  cloudHsmClusterName,
2470
- peConnectionName
3218
+ peConnectionName,
2471
3219
  ],
2472
3220
  headerParameters: [accept],
2473
- serializer: serializer$3
3221
+ serializer: serializer$5,
2474
3222
  };
2475
3223
 
2476
3224
  /*
@@ -2495,7 +3243,7 @@ class PrivateEndpointConnectionsImpl {
2495
3243
  * HSM Cluster
2496
3244
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2497
3245
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2498
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
3246
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2499
3247
  * @param options The options parameters.
2500
3248
  */
2501
3249
  listByCloudHsmCluster(resourceGroupName, cloudHsmClusterName, options) {
@@ -2512,7 +3260,7 @@ class PrivateEndpointConnectionsImpl {
2512
3260
  throw new Error("maxPageSize is not supported by this operation.");
2513
3261
  }
2514
3262
  return this.listByCloudHsmClusterPagingPage(resourceGroupName, cloudHsmClusterName, options, settings);
2515
- }
3263
+ },
2516
3264
  };
2517
3265
  }
2518
3266
  listByCloudHsmClusterPagingPage(resourceGroupName, cloudHsmClusterName, options, settings) {
@@ -2560,7 +3308,7 @@ class PrivateEndpointConnectionsImpl {
2560
3308
  * HSM Cluster
2561
3309
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2562
3310
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2563
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
3311
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2564
3312
  * @param options The options parameters.
2565
3313
  */
2566
3314
  _listByCloudHsmCluster(resourceGroupName, cloudHsmClusterName, options) {
@@ -2570,7 +3318,7 @@ class PrivateEndpointConnectionsImpl {
2570
3318
  * ListByCloudHsmClusterNext
2571
3319
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
2572
3320
  * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
2573
- * Cloud HSM Cluster names must be between 3 and 24 characters in length.
3321
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
2574
3322
  * @param nextLink The nextLink from the previous successful call to the ListByCloudHsmCluster method.
2575
3323
  * @param options The options parameters.
2576
3324
  */
@@ -2579,48 +3327,106 @@ class PrivateEndpointConnectionsImpl {
2579
3327
  }
2580
3328
  }
2581
3329
  // Operation Specifications
2582
- const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3330
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2583
3331
  const listByCloudHsmClusterOperationSpec = {
2584
3332
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections",
2585
3333
  httpMethod: "GET",
2586
3334
  responses: {
2587
3335
  200: {
2588
- bodyMapper: PrivateEndpointConnectionListResult
3336
+ bodyMapper: PrivateEndpointConnectionListResult,
2589
3337
  },
2590
3338
  default: {
2591
- bodyMapper: CloudHsmClusterError
2592
- }
3339
+ bodyMapper: ErrorResponse,
3340
+ },
2593
3341
  },
2594
3342
  queryParameters: [apiVersion],
2595
3343
  urlParameters: [
2596
3344
  $host,
2597
3345
  subscriptionId,
2598
3346
  resourceGroupName,
2599
- cloudHsmClusterName
3347
+ cloudHsmClusterName,
2600
3348
  ],
2601
3349
  headerParameters: [accept],
2602
- serializer: serializer$2
3350
+ serializer: serializer$4,
2603
3351
  };
2604
3352
  const listByCloudHsmClusterNextOperationSpec = {
2605
3353
  path: "{nextLink}",
2606
3354
  httpMethod: "GET",
2607
3355
  responses: {
2608
3356
  200: {
2609
- bodyMapper: PrivateEndpointConnectionListResult
3357
+ bodyMapper: PrivateEndpointConnectionListResult,
3358
+ },
3359
+ default: {
3360
+ bodyMapper: ErrorResponse,
3361
+ },
3362
+ },
3363
+ urlParameters: [
3364
+ $host,
3365
+ subscriptionId,
3366
+ resourceGroupName,
3367
+ cloudHsmClusterName,
3368
+ nextLink,
3369
+ ],
3370
+ headerParameters: [accept],
3371
+ serializer: serializer$4,
3372
+ };
3373
+
3374
+ /*
3375
+ * Copyright (c) Microsoft Corporation.
3376
+ * Licensed under the MIT License.
3377
+ *
3378
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3379
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3380
+ */
3381
+ /** Class containing CloudHsmClusterBackupStatus operations. */
3382
+ class CloudHsmClusterBackupStatusImpl {
3383
+ /**
3384
+ * Initialize a new instance of the class CloudHsmClusterBackupStatus class.
3385
+ * @param client Reference to the service client
3386
+ */
3387
+ constructor(client) {
3388
+ this.client = client;
3389
+ }
3390
+ /**
3391
+ * Gets the backup operation status of the specified Cloud HSM Cluster
3392
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3393
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
3394
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
3395
+ * @param jobId The id returned as part of the backup request
3396
+ * @param options The options parameters.
3397
+ */
3398
+ get(resourceGroupName, cloudHsmClusterName, jobId, options) {
3399
+ return this.client.sendOperationRequest({ resourceGroupName, cloudHsmClusterName, jobId, options }, getOperationSpec$2);
3400
+ }
3401
+ }
3402
+ // Operation Specifications
3403
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3404
+ const getOperationSpec$2 = {
3405
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/backupOperationStatus/{jobId}",
3406
+ httpMethod: "GET",
3407
+ responses: {
3408
+ 200: {
3409
+ bodyMapper: BackupResult,
3410
+ headersMapper: CloudHsmClusterBackupStatusGetHeaders,
3411
+ },
3412
+ 202: {
3413
+ headersMapper: CloudHsmClusterBackupStatusGetHeaders,
2610
3414
  },
2611
3415
  default: {
2612
- bodyMapper: CloudHsmClusterError
2613
- }
3416
+ bodyMapper: ErrorResponse,
3417
+ headersMapper: CloudHsmClusterBackupStatusGetExceptionHeaders,
3418
+ },
2614
3419
  },
3420
+ queryParameters: [apiVersion],
2615
3421
  urlParameters: [
2616
3422
  $host,
2617
3423
  subscriptionId,
2618
3424
  resourceGroupName,
2619
3425
  cloudHsmClusterName,
2620
- nextLink
3426
+ jobId,
2621
3427
  ],
2622
3428
  headerParameters: [accept],
2623
- serializer: serializer$2
3429
+ serializer: serializer$3,
2624
3430
  };
2625
3431
 
2626
3432
  /*
@@ -2630,89 +3436,55 @@ const listByCloudHsmClusterNextOperationSpec = {
2630
3436
  * Code generated by Microsoft (R) AutoRest Code Generator.
2631
3437
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2632
3438
  */
2633
- /// <reference lib="esnext.asynciterable" />
2634
- /** Class containing Operations operations. */
2635
- class OperationsImpl {
3439
+ /** Class containing CloudHsmClusterRestoreStatus operations. */
3440
+ class CloudHsmClusterRestoreStatusImpl {
2636
3441
  /**
2637
- * Initialize a new instance of the class Operations class.
3442
+ * Initialize a new instance of the class CloudHsmClusterRestoreStatus class.
2638
3443
  * @param client Reference to the service client
2639
3444
  */
2640
3445
  constructor(client) {
2641
3446
  this.client = client;
2642
3447
  }
2643
3448
  /**
2644
- * Get a list of Dedicated HSM operations.
2645
- * @param options The options parameters.
2646
- */
2647
- list(options) {
2648
- const iter = this.listPagingAll(options);
2649
- return {
2650
- next() {
2651
- return iter.next();
2652
- },
2653
- [Symbol.asyncIterator]() {
2654
- return this;
2655
- },
2656
- byPage: (settings) => {
2657
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2658
- throw new Error("maxPageSize is not supported by this operation.");
2659
- }
2660
- return this.listPagingPage(options, settings);
2661
- }
2662
- };
2663
- }
2664
- listPagingPage(options, _settings) {
2665
- return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
2666
- let result;
2667
- result = yield tslib.__await(this._list(options));
2668
- yield yield tslib.__await(result.value || []);
2669
- });
2670
- }
2671
- listPagingAll(options) {
2672
- return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
2673
- var _a, e_1, _b, _c;
2674
- try {
2675
- for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
2676
- _c = _f.value;
2677
- _d = false;
2678
- const page = _c;
2679
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2680
- }
2681
- }
2682
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2683
- finally {
2684
- try {
2685
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
2686
- }
2687
- finally { if (e_1) throw e_1.error; }
2688
- }
2689
- });
2690
- }
2691
- /**
2692
- * Get a list of Dedicated HSM operations.
3449
+ * Gets the restore operation status of the specified Cloud HSM Cluster
3450
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3451
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
3452
+ * Cloud HSM Cluster names must be between 3 and 23 characters in length.
3453
+ * @param jobId The id returned as part of the backup request
2693
3454
  * @param options The options parameters.
2694
3455
  */
2695
- _list(options) {
2696
- return this.client.sendOperationRequest({ options }, listOperationSpec);
3456
+ get(resourceGroupName, cloudHsmClusterName, jobId, options) {
3457
+ return this.client.sendOperationRequest({ resourceGroupName, cloudHsmClusterName, jobId, options }, getOperationSpec$1);
2697
3458
  }
2698
3459
  }
2699
3460
  // Operation Specifications
2700
- const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2701
- const listOperationSpec = {
2702
- path: "/providers/Microsoft.HardwareSecurityModules/operations",
3461
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3462
+ const getOperationSpec$1 = {
3463
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/restoreOperationStatus/{jobId}",
2703
3464
  httpMethod: "GET",
2704
3465
  responses: {
2705
3466
  200: {
2706
- bodyMapper: DedicatedHsmOperationListResult
3467
+ bodyMapper: RestoreResult,
3468
+ headersMapper: CloudHsmClusterRestoreStatusGetHeaders,
3469
+ },
3470
+ 202: {
3471
+ headersMapper: CloudHsmClusterRestoreStatusGetHeaders,
2707
3472
  },
2708
3473
  default: {
2709
- bodyMapper: DedicatedHsmError
2710
- }
3474
+ bodyMapper: ErrorResponse,
3475
+ headersMapper: CloudHsmClusterRestoreStatusGetExceptionHeaders,
3476
+ },
2711
3477
  },
2712
- queryParameters: [apiVersion1],
2713
- urlParameters: [$host],
3478
+ queryParameters: [apiVersion],
3479
+ urlParameters: [
3480
+ $host,
3481
+ subscriptionId,
3482
+ resourceGroupName,
3483
+ cloudHsmClusterName,
3484
+ jobId,
3485
+ ],
2714
3486
  headerParameters: [accept],
2715
- serializer: serializer$1
3487
+ serializer: serializer$2,
2716
3488
  };
2717
3489
 
2718
3490
  /*
@@ -2735,7 +3507,7 @@ class DedicatedHsmOperationsImpl {
2735
3507
  /**
2736
3508
  * The List operation gets information about the dedicated hsms associated with the subscription and
2737
3509
  * within the specified resource group.
2738
- * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
3510
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2739
3511
  * @param options The options parameters.
2740
3512
  */
2741
3513
  listByResourceGroup(resourceGroupName, options) {
@@ -2752,7 +3524,7 @@ class DedicatedHsmOperationsImpl {
2752
3524
  throw new Error("maxPageSize is not supported by this operation.");
2753
3525
  }
2754
3526
  return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
2755
- }
3527
+ },
2756
3528
  };
2757
3529
  }
2758
3530
  listByResourceGroupPagingPage(resourceGroupName, options, settings) {
@@ -2813,7 +3585,7 @@ class DedicatedHsmOperationsImpl {
2813
3585
  throw new Error("maxPageSize is not supported by this operation.");
2814
3586
  }
2815
3587
  return this.listBySubscriptionPagingPage(options, settings);
2816
- }
3588
+ },
2817
3589
  };
2818
3590
  }
2819
3591
  listBySubscriptionPagingPage(options, settings) {
@@ -2859,8 +3631,8 @@ class DedicatedHsmOperationsImpl {
2859
3631
  /**
2860
3632
  * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified
2861
3633
  * dedicated hsm resource. The operation returns properties of each egress endpoint.
2862
- * @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
2863
- * @param name The name of the dedicated HSM.
3634
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3635
+ * @param name Name of the dedicated Hsm
2864
3636
  * @param options The options parameters.
2865
3637
  */
2866
3638
  listOutboundNetworkDependenciesEndpoints(resourceGroupName, name, options) {
@@ -2877,7 +3649,7 @@ class DedicatedHsmOperationsImpl {
2877
3649
  throw new Error("maxPageSize is not supported by this operation.");
2878
3650
  }
2879
3651
  return this.listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, name, options, settings);
2880
- }
3652
+ },
2881
3653
  };
2882
3654
  }
2883
3655
  listOutboundNetworkDependenciesEndpointsPagingPage(resourceGroupName, name, options, settings) {
@@ -2922,7 +3694,7 @@ class DedicatedHsmOperationsImpl {
2922
3694
  }
2923
3695
  /**
2924
3696
  * Create or Update a dedicated HSM in the specified subscription.
2925
- * @param resourceGroupName The name of the Resource Group to which the resource belongs.
3697
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2926
3698
  * @param name Name of the dedicated Hsm
2927
3699
  * @param parameters Parameters to create or update the dedicated hsm
2928
3700
  * @param options The options parameters.
@@ -2947,18 +3719,18 @@ class DedicatedHsmOperationsImpl {
2947
3719
  rawResponse: {
2948
3720
  statusCode: currentRawResponse.status,
2949
3721
  body: currentRawResponse.parsedBody,
2950
- headers: currentRawResponse.headers.toJSON()
2951
- }
3722
+ headers: currentRawResponse.headers.toJSON(),
3723
+ },
2952
3724
  };
2953
3725
  });
2954
3726
  const lro = createLroSpec({
2955
3727
  sendOperationFn,
2956
3728
  args: { resourceGroupName, name, parameters, options },
2957
- spec: createOrUpdateOperationSpec
3729
+ spec: createOrUpdateOperationSpec,
2958
3730
  });
2959
3731
  const poller = yield coreLro.createHttpPoller(lro, {
2960
3732
  restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2961
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3733
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2962
3734
  });
2963
3735
  yield poller.poll();
2964
3736
  return poller;
@@ -2966,7 +3738,7 @@ class DedicatedHsmOperationsImpl {
2966
3738
  }
2967
3739
  /**
2968
3740
  * Create or Update a dedicated HSM in the specified subscription.
2969
- * @param resourceGroupName The name of the Resource Group to which the resource belongs.
3741
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2970
3742
  * @param name Name of the dedicated Hsm
2971
3743
  * @param parameters Parameters to create or update the dedicated hsm
2972
3744
  * @param options The options parameters.
@@ -2979,8 +3751,8 @@ class DedicatedHsmOperationsImpl {
2979
3751
  }
2980
3752
  /**
2981
3753
  * Update a dedicated HSM in the specified subscription.
2982
- * @param resourceGroupName The name of the Resource Group to which the server belongs.
2983
- * @param name Name of the dedicated HSM
3754
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3755
+ * @param name Name of the dedicated Hsm
2984
3756
  * @param options The options parameters.
2985
3757
  */
2986
3758
  beginUpdate(resourceGroupName, name, options) {
@@ -3003,18 +3775,18 @@ class DedicatedHsmOperationsImpl {
3003
3775
  rawResponse: {
3004
3776
  statusCode: currentRawResponse.status,
3005
3777
  body: currentRawResponse.parsedBody,
3006
- headers: currentRawResponse.headers.toJSON()
3007
- }
3778
+ headers: currentRawResponse.headers.toJSON(),
3779
+ },
3008
3780
  };
3009
3781
  });
3010
3782
  const lro = createLroSpec({
3011
3783
  sendOperationFn,
3012
3784
  args: { resourceGroupName, name, options },
3013
- spec: updateOperationSpec
3785
+ spec: updateOperationSpec,
3014
3786
  });
3015
3787
  const poller = yield coreLro.createHttpPoller(lro, {
3016
3788
  restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3017
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3789
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3018
3790
  });
3019
3791
  yield poller.poll();
3020
3792
  return poller;
@@ -3022,8 +3794,8 @@ class DedicatedHsmOperationsImpl {
3022
3794
  }
3023
3795
  /**
3024
3796
  * Update a dedicated HSM in the specified subscription.
3025
- * @param resourceGroupName The name of the Resource Group to which the server belongs.
3026
- * @param name Name of the dedicated HSM
3797
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3798
+ * @param name Name of the dedicated Hsm
3027
3799
  * @param options The options parameters.
3028
3800
  */
3029
3801
  beginUpdateAndWait(resourceGroupName, name, options) {
@@ -3034,8 +3806,8 @@ class DedicatedHsmOperationsImpl {
3034
3806
  }
3035
3807
  /**
3036
3808
  * Deletes the specified Azure Dedicated HSM.
3037
- * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
3038
- * @param name The name of the dedicated HSM to delete
3809
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3810
+ * @param name Name of the dedicated Hsm
3039
3811
  * @param options The options parameters.
3040
3812
  */
3041
3813
  beginDelete(resourceGroupName, name, options) {
@@ -3058,18 +3830,18 @@ class DedicatedHsmOperationsImpl {
3058
3830
  rawResponse: {
3059
3831
  statusCode: currentRawResponse.status,
3060
3832
  body: currentRawResponse.parsedBody,
3061
- headers: currentRawResponse.headers.toJSON()
3062
- }
3833
+ headers: currentRawResponse.headers.toJSON(),
3834
+ },
3063
3835
  };
3064
3836
  });
3065
3837
  const lro = createLroSpec({
3066
3838
  sendOperationFn,
3067
3839
  args: { resourceGroupName, name, options },
3068
- spec: deleteOperationSpec
3840
+ spec: deleteOperationSpec,
3069
3841
  });
3070
3842
  const poller = yield coreLro.createHttpPoller(lro, {
3071
3843
  restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3072
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3844
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3073
3845
  });
3074
3846
  yield poller.poll();
3075
3847
  return poller;
@@ -3077,8 +3849,8 @@ class DedicatedHsmOperationsImpl {
3077
3849
  }
3078
3850
  /**
3079
3851
  * Deletes the specified Azure Dedicated HSM.
3080
- * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
3081
- * @param name The name of the dedicated HSM to delete
3852
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3853
+ * @param name Name of the dedicated Hsm
3082
3854
  * @param options The options parameters.
3083
3855
  */
3084
3856
  beginDeleteAndWait(resourceGroupName, name, options) {
@@ -3089,8 +3861,8 @@ class DedicatedHsmOperationsImpl {
3089
3861
  }
3090
3862
  /**
3091
3863
  * Gets the specified Azure dedicated HSM.
3092
- * @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
3093
- * @param name The name of the dedicated HSM.
3864
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3865
+ * @param name Name of the dedicated Hsm
3094
3866
  * @param options The options parameters.
3095
3867
  */
3096
3868
  get(resourceGroupName, name, options) {
@@ -3099,7 +3871,7 @@ class DedicatedHsmOperationsImpl {
3099
3871
  /**
3100
3872
  * The List operation gets information about the dedicated hsms associated with the subscription and
3101
3873
  * within the specified resource group.
3102
- * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
3874
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3103
3875
  * @param options The options parameters.
3104
3876
  */
3105
3877
  _listByResourceGroup(resourceGroupName, options) {
@@ -3115,8 +3887,8 @@ class DedicatedHsmOperationsImpl {
3115
3887
  /**
3116
3888
  * Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified
3117
3889
  * dedicated hsm resource. The operation returns properties of each egress endpoint.
3118
- * @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
3119
- * @param name The name of the dedicated HSM.
3890
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3891
+ * @param name Name of the dedicated Hsm
3120
3892
  * @param options The options parameters.
3121
3893
  */
3122
3894
  _listOutboundNetworkDependenciesEndpoints(resourceGroupName, name, options) {
@@ -3124,7 +3896,7 @@ class DedicatedHsmOperationsImpl {
3124
3896
  }
3125
3897
  /**
3126
3898
  * ListByResourceGroupNext
3127
- * @param resourceGroupName The name of the Resource Group to which the dedicated HSM belongs.
3899
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3128
3900
  * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
3129
3901
  * @param options The options parameters.
3130
3902
  */
@@ -3141,8 +3913,8 @@ class DedicatedHsmOperationsImpl {
3141
3913
  }
3142
3914
  /**
3143
3915
  * ListOutboundNetworkDependenciesEndpointsNext
3144
- * @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
3145
- * @param name The name of the dedicated HSM.
3916
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3917
+ * @param name Name of the dedicated Hsm
3146
3918
  * @param nextLink The nextLink from the previous successful call to the
3147
3919
  * ListOutboundNetworkDependenciesEndpoints method.
3148
3920
  * @param options The options parameters.
@@ -3152,233 +3924,333 @@ class DedicatedHsmOperationsImpl {
3152
3924
  }
3153
3925
  }
3154
3926
  // Operation Specifications
3155
- const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3927
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3156
3928
  const createOrUpdateOperationSpec = {
3157
3929
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}",
3158
3930
  httpMethod: "PUT",
3159
3931
  responses: {
3160
3932
  200: {
3161
- bodyMapper: DedicatedHsm
3933
+ bodyMapper: DedicatedHsm,
3162
3934
  },
3163
3935
  201: {
3164
- bodyMapper: DedicatedHsm
3936
+ bodyMapper: DedicatedHsm,
3165
3937
  },
3166
3938
  202: {
3167
- bodyMapper: DedicatedHsm
3939
+ bodyMapper: DedicatedHsm,
3168
3940
  },
3169
3941
  204: {
3170
- bodyMapper: DedicatedHsm
3942
+ bodyMapper: DedicatedHsm,
3171
3943
  },
3172
3944
  default: {
3173
- bodyMapper: DedicatedHsmError
3174
- }
3945
+ bodyMapper: DedicatedHsmError,
3946
+ },
3175
3947
  },
3176
3948
  requestBody: parameters,
3177
- queryParameters: [apiVersion1],
3949
+ queryParameters: [apiVersion],
3178
3950
  urlParameters: [
3179
3951
  $host,
3180
3952
  subscriptionId,
3181
- resourceGroupName1,
3182
- name
3953
+ resourceGroupName,
3954
+ name,
3183
3955
  ],
3184
3956
  headerParameters: [contentType, accept],
3185
3957
  mediaType: "json",
3186
- serializer
3958
+ serializer: serializer$1,
3187
3959
  };
3188
3960
  const updateOperationSpec = {
3189
3961
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}",
3190
3962
  httpMethod: "PATCH",
3191
3963
  responses: {
3192
3964
  200: {
3193
- bodyMapper: DedicatedHsm
3965
+ bodyMapper: DedicatedHsm,
3194
3966
  },
3195
3967
  201: {
3196
- bodyMapper: DedicatedHsm
3968
+ bodyMapper: DedicatedHsm,
3197
3969
  },
3198
3970
  202: {
3199
- bodyMapper: DedicatedHsm
3971
+ bodyMapper: DedicatedHsm,
3200
3972
  },
3201
3973
  204: {
3202
- bodyMapper: DedicatedHsm
3974
+ bodyMapper: DedicatedHsm,
3203
3975
  },
3204
3976
  default: {
3205
- bodyMapper: DedicatedHsmError
3206
- }
3977
+ bodyMapper: DedicatedHsmError,
3978
+ },
3207
3979
  },
3208
3980
  requestBody: {
3209
3981
  parameterPath: { tags: ["options", "tags"] },
3210
- mapper: Object.assign(Object.assign({}, DedicatedHsmPatchParameters), { required: true })
3982
+ mapper: Object.assign(Object.assign({}, DedicatedHsmPatchParameters), { required: true }),
3211
3983
  },
3212
- queryParameters: [apiVersion1],
3984
+ queryParameters: [apiVersion],
3213
3985
  urlParameters: [
3214
3986
  $host,
3215
3987
  subscriptionId,
3216
- resourceGroupName1,
3217
- name
3988
+ resourceGroupName,
3989
+ name,
3218
3990
  ],
3219
3991
  headerParameters: [contentType, accept],
3220
3992
  mediaType: "json",
3221
- serializer
3993
+ serializer: serializer$1,
3222
3994
  };
3223
3995
  const deleteOperationSpec = {
3224
3996
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}",
3225
3997
  httpMethod: "DELETE",
3226
3998
  responses: {
3227
- 200: {},
3228
- 201: {},
3229
- 202: {},
3230
- 204: {},
3999
+ 200: {
4000
+ headersMapper: DedicatedHsmDeleteHeaders,
4001
+ },
4002
+ 201: {
4003
+ headersMapper: DedicatedHsmDeleteHeaders,
4004
+ },
4005
+ 202: {
4006
+ headersMapper: DedicatedHsmDeleteHeaders,
4007
+ },
4008
+ 204: {
4009
+ headersMapper: DedicatedHsmDeleteHeaders,
4010
+ },
3231
4011
  default: {
3232
- bodyMapper: DedicatedHsmError
3233
- }
4012
+ bodyMapper: DedicatedHsmError,
4013
+ },
3234
4014
  },
3235
- queryParameters: [apiVersion1],
4015
+ queryParameters: [apiVersion],
3236
4016
  urlParameters: [
3237
4017
  $host,
3238
4018
  subscriptionId,
3239
- resourceGroupName1,
3240
- name1
4019
+ resourceGroupName,
4020
+ name,
3241
4021
  ],
3242
4022
  headerParameters: [accept],
3243
- serializer
4023
+ serializer: serializer$1,
3244
4024
  };
3245
4025
  const getOperationSpec = {
3246
4026
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}",
3247
4027
  httpMethod: "GET",
3248
4028
  responses: {
3249
4029
  200: {
3250
- bodyMapper: DedicatedHsm
4030
+ bodyMapper: DedicatedHsm,
3251
4031
  },
3252
4032
  default: {
3253
- bodyMapper: DedicatedHsmError
3254
- }
4033
+ bodyMapper: DedicatedHsmError,
4034
+ },
3255
4035
  },
3256
- queryParameters: [apiVersion1],
4036
+ queryParameters: [apiVersion],
3257
4037
  urlParameters: [
3258
4038
  $host,
3259
4039
  subscriptionId,
3260
- resourceGroupName1,
3261
- name1
4040
+ resourceGroupName,
4041
+ name,
3262
4042
  ],
3263
4043
  headerParameters: [accept],
3264
- serializer
4044
+ serializer: serializer$1,
3265
4045
  };
3266
4046
  const listByResourceGroupOperationSpec = {
3267
4047
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs",
3268
4048
  httpMethod: "GET",
3269
4049
  responses: {
3270
4050
  200: {
3271
- bodyMapper: DedicatedHsmListResult
4051
+ bodyMapper: DedicatedHsmListResult,
3272
4052
  },
3273
4053
  default: {
3274
- bodyMapper: DedicatedHsmError
3275
- }
4054
+ bodyMapper: DedicatedHsmError,
4055
+ },
3276
4056
  },
3277
- queryParameters: [apiVersion1, top],
4057
+ queryParameters: [apiVersion, top],
3278
4058
  urlParameters: [
3279
4059
  $host,
3280
4060
  subscriptionId,
3281
- resourceGroupName1
4061
+ resourceGroupName,
3282
4062
  ],
3283
4063
  headerParameters: [accept],
3284
- serializer
4064
+ serializer: serializer$1,
3285
4065
  };
3286
4066
  const listBySubscriptionOperationSpec = {
3287
4067
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs",
3288
4068
  httpMethod: "GET",
3289
4069
  responses: {
3290
4070
  200: {
3291
- bodyMapper: DedicatedHsmListResult
4071
+ bodyMapper: DedicatedHsmListResult,
3292
4072
  },
3293
4073
  default: {
3294
- bodyMapper: DedicatedHsmError
3295
- }
4074
+ bodyMapper: DedicatedHsmError,
4075
+ },
3296
4076
  },
3297
- queryParameters: [apiVersion1, top],
4077
+ queryParameters: [apiVersion, top],
3298
4078
  urlParameters: [$host, subscriptionId],
3299
4079
  headerParameters: [accept],
3300
- serializer
4080
+ serializer: serializer$1,
3301
4081
  };
3302
4082
  const listOutboundNetworkDependenciesEndpointsOperationSpec = {
3303
4083
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/{name}/outboundNetworkDependenciesEndpoints",
3304
4084
  httpMethod: "GET",
3305
4085
  responses: {
3306
4086
  200: {
3307
- bodyMapper: OutboundEnvironmentEndpointCollection
4087
+ bodyMapper: OutboundEnvironmentEndpointCollection,
3308
4088
  },
3309
4089
  default: {
3310
- bodyMapper: DedicatedHsmError
3311
- }
4090
+ bodyMapper: DedicatedHsmError,
4091
+ },
3312
4092
  },
3313
- queryParameters: [apiVersion1],
4093
+ queryParameters: [apiVersion],
3314
4094
  urlParameters: [
3315
4095
  $host,
3316
4096
  subscriptionId,
3317
- resourceGroupName1,
3318
- name1
4097
+ resourceGroupName,
4098
+ name,
3319
4099
  ],
3320
4100
  headerParameters: [accept],
3321
- serializer
4101
+ serializer: serializer$1,
3322
4102
  };
3323
4103
  const listByResourceGroupNextOperationSpec = {
3324
4104
  path: "{nextLink}",
3325
4105
  httpMethod: "GET",
3326
4106
  responses: {
3327
4107
  200: {
3328
- bodyMapper: DedicatedHsmListResult
4108
+ bodyMapper: DedicatedHsmListResult,
3329
4109
  },
3330
4110
  default: {
3331
- bodyMapper: DedicatedHsmError
3332
- }
4111
+ bodyMapper: DedicatedHsmError,
4112
+ },
3333
4113
  },
3334
4114
  urlParameters: [
3335
4115
  $host,
3336
4116
  subscriptionId,
4117
+ resourceGroupName,
3337
4118
  nextLink,
3338
- resourceGroupName1
3339
4119
  ],
3340
4120
  headerParameters: [accept],
3341
- serializer
4121
+ serializer: serializer$1,
3342
4122
  };
3343
4123
  const listBySubscriptionNextOperationSpec = {
3344
4124
  path: "{nextLink}",
3345
4125
  httpMethod: "GET",
3346
4126
  responses: {
3347
4127
  200: {
3348
- bodyMapper: DedicatedHsmListResult
4128
+ bodyMapper: DedicatedHsmListResult,
3349
4129
  },
3350
4130
  default: {
3351
- bodyMapper: DedicatedHsmError
3352
- }
4131
+ bodyMapper: DedicatedHsmError,
4132
+ },
3353
4133
  },
3354
4134
  urlParameters: [
3355
4135
  $host,
3356
4136
  subscriptionId,
3357
- nextLink
4137
+ nextLink,
3358
4138
  ],
3359
4139
  headerParameters: [accept],
3360
- serializer
4140
+ serializer: serializer$1,
3361
4141
  };
3362
4142
  const listOutboundNetworkDependenciesEndpointsNextOperationSpec = {
3363
4143
  path: "{nextLink}",
3364
4144
  httpMethod: "GET",
3365
4145
  responses: {
3366
4146
  200: {
3367
- bodyMapper: OutboundEnvironmentEndpointCollection
4147
+ bodyMapper: OutboundEnvironmentEndpointCollection,
3368
4148
  },
3369
4149
  default: {
3370
- bodyMapper: DedicatedHsmError
3371
- }
4150
+ bodyMapper: DedicatedHsmError,
4151
+ },
3372
4152
  },
3373
4153
  urlParameters: [
3374
4154
  $host,
3375
4155
  subscriptionId,
4156
+ resourceGroupName,
3376
4157
  nextLink,
3377
- resourceGroupName1,
3378
- name1
4158
+ name,
3379
4159
  ],
3380
4160
  headerParameters: [accept],
3381
- serializer
4161
+ serializer: serializer$1,
4162
+ };
4163
+
4164
+ /*
4165
+ * Copyright (c) Microsoft Corporation.
4166
+ * Licensed under the MIT License.
4167
+ *
4168
+ * Code generated by Microsoft (R) AutoRest Code Generator.
4169
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4170
+ */
4171
+ /// <reference lib="esnext.asynciterable" />
4172
+ /** Class containing Operations operations. */
4173
+ class OperationsImpl {
4174
+ /**
4175
+ * Initialize a new instance of the class Operations class.
4176
+ * @param client Reference to the service client
4177
+ */
4178
+ constructor(client) {
4179
+ this.client = client;
4180
+ }
4181
+ /**
4182
+ * Get a list of Hardware Security Modules operations.
4183
+ * @param options The options parameters.
4184
+ */
4185
+ list(options) {
4186
+ const iter = this.listPagingAll(options);
4187
+ return {
4188
+ next() {
4189
+ return iter.next();
4190
+ },
4191
+ [Symbol.asyncIterator]() {
4192
+ return this;
4193
+ },
4194
+ byPage: (settings) => {
4195
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
4196
+ throw new Error("maxPageSize is not supported by this operation.");
4197
+ }
4198
+ return this.listPagingPage(options, settings);
4199
+ },
4200
+ };
4201
+ }
4202
+ listPagingPage(options, _settings) {
4203
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
4204
+ let result;
4205
+ result = yield tslib.__await(this._list(options));
4206
+ yield yield tslib.__await(result.value || []);
4207
+ });
4208
+ }
4209
+ listPagingAll(options) {
4210
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
4211
+ var _a, e_1, _b, _c;
4212
+ try {
4213
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
4214
+ _c = _f.value;
4215
+ _d = false;
4216
+ const page = _c;
4217
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
4218
+ }
4219
+ }
4220
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
4221
+ finally {
4222
+ try {
4223
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
4224
+ }
4225
+ finally { if (e_1) throw e_1.error; }
4226
+ }
4227
+ });
4228
+ }
4229
+ /**
4230
+ * Get a list of Hardware Security Modules operations.
4231
+ * @param options The options parameters.
4232
+ */
4233
+ _list(options) {
4234
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
4235
+ }
4236
+ }
4237
+ // Operation Specifications
4238
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
4239
+ const listOperationSpec = {
4240
+ path: "/providers/Microsoft.HardwareSecurityModules/operations",
4241
+ httpMethod: "GET",
4242
+ responses: {
4243
+ 200: {
4244
+ bodyMapper: OperationListResult,
4245
+ },
4246
+ default: {
4247
+ bodyMapper: ErrorResponse,
4248
+ },
4249
+ },
4250
+ queryParameters: [apiVersion],
4251
+ urlParameters: [$host],
4252
+ headerParameters: [accept],
4253
+ serializer,
3382
4254
  };
3383
4255
 
3384
4256
  /*
@@ -3409,14 +4281,14 @@ class AzureHSMResourceProvider extends coreClient__namespace.ServiceClient {
3409
4281
  }
3410
4282
  const defaults = {
3411
4283
  requestContentType: "application/json; charset=utf-8",
3412
- credential: credentials
4284
+ credential: credentials,
3413
4285
  };
3414
- const packageDetails = `azsdk-js-arm-hardwaresecuritymodules/2.0.0-beta.1`;
4286
+ const packageDetails = `azsdk-js-arm-hardwaresecuritymodules/2.0.0-beta.2`;
3415
4287
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3416
4288
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3417
4289
  : `${packageDetails}`;
3418
4290
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
3419
- userAgentPrefix
4291
+ userAgentPrefix,
3420
4292
  }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
3421
4293
  super(optionsWithDefaults);
3422
4294
  let bearerTokenAuthenticationPolicyFound = false;
@@ -3430,26 +4302,59 @@ class AzureHSMResourceProvider extends coreClient__namespace.ServiceClient {
3430
4302
  options.pipeline.getOrderedPolicies().length == 0 ||
3431
4303
  !bearerTokenAuthenticationPolicyFound) {
3432
4304
  this.pipeline.removePolicy({
3433
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
4305
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName,
3434
4306
  });
3435
4307
  this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
3436
4308
  credential: credentials,
3437
4309
  scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
3438
4310
  challengeCallbacks: {
3439
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3440
- }
4311
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge,
4312
+ },
3441
4313
  }));
3442
4314
  }
3443
4315
  // Parameter assignments
3444
4316
  this.subscriptionId = subscriptionId;
3445
4317
  // Assigning values to Constant parameters
3446
4318
  this.$host = options.$host || "https://management.azure.com";
4319
+ this.apiVersion = options.apiVersion || "2024-06-30-preview";
3447
4320
  this.cloudHsmClusters = new CloudHsmClustersImpl(this);
3448
- this.cloudHsmClusterPrivateLinkResources = new CloudHsmClusterPrivateLinkResourcesImpl(this);
3449
- this.cloudHsmClusterPrivateEndpointConnections = new CloudHsmClusterPrivateEndpointConnectionsImpl(this);
4321
+ this.cloudHsmClusterPrivateLinkResources =
4322
+ new CloudHsmClusterPrivateLinkResourcesImpl(this);
4323
+ this.cloudHsmClusterPrivateEndpointConnections =
4324
+ new CloudHsmClusterPrivateEndpointConnectionsImpl(this);
3450
4325
  this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
3451
- this.operations = new OperationsImpl(this);
4326
+ this.cloudHsmClusterBackupStatus = new CloudHsmClusterBackupStatusImpl(this);
4327
+ this.cloudHsmClusterRestoreStatus = new CloudHsmClusterRestoreStatusImpl(this);
3452
4328
  this.dedicatedHsmOperations = new DedicatedHsmOperationsImpl(this);
4329
+ this.operations = new OperationsImpl(this);
4330
+ this.addCustomApiVersionPolicy(options.apiVersion);
4331
+ }
4332
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
4333
+ addCustomApiVersionPolicy(apiVersion) {
4334
+ if (!apiVersion) {
4335
+ return;
4336
+ }
4337
+ const apiVersionPolicy = {
4338
+ name: "CustomApiVersionPolicy",
4339
+ sendRequest(request, next) {
4340
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4341
+ const param = request.url.split("?");
4342
+ if (param.length > 1) {
4343
+ const newParams = param[1].split("&").map((item) => {
4344
+ if (item.indexOf("api-version") > -1) {
4345
+ return "api-version=" + apiVersion;
4346
+ }
4347
+ else {
4348
+ return item;
4349
+ }
4350
+ });
4351
+ request.url = param[0] + "?" + newParams.join("&");
4352
+ }
4353
+ return next(request);
4354
+ });
4355
+ },
4356
+ };
4357
+ this.pipeline.addPolicy(apiVersionPolicy);
3453
4358
  }
3454
4359
  }
3455
4360