@nutanix-scratch/dataprotection-js-client 4.0.1-alpha.4 → 4.0.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/README.md +35 -28
  2. package/dist/Ntnx-Dataprotection-js-client-prod.js +1 -11
  3. package/dist/Ntnx-Dataprotection-js-client.js +530 -1501
  4. package/dist/es/ApiClient.d.ts +2 -1
  5. package/dist/es/ApiClient.js +401 -246
  6. package/dist/es/Paginable.d.ts +1 -1
  7. package/dist/es/Paginable.js +17 -19
  8. package/dist/es/apis/protectedresources-endpoints.d.ts +52 -0
  9. package/dist/es/apis/protectedresources-endpoints.js +192 -0
  10. package/dist/es/apis/recoverypoints-endpoints.d.ts +126 -0
  11. package/dist/es/apis/recoverypoints-endpoints.js +394 -0
  12. package/dist/es/index.d.ts +55 -87
  13. package/dist/es/index.js +169 -298
  14. package/dist/es/models/common/v1/config/Flag.d.ts +5 -5
  15. package/dist/es/models/common/v1/config/Flag.js +25 -27
  16. package/dist/es/models/common/v1/config/IPv4Address.d.ts +5 -5
  17. package/dist/es/models/common/v1/config/IPv4Address.js +25 -27
  18. package/dist/es/models/common/v1/config/KVPair.d.ts +5 -5
  19. package/dist/es/models/common/v1/config/KVPair.js +28 -30
  20. package/dist/es/models/common/v1/config/Message.d.ts +5 -5
  21. package/dist/es/models/common/v1/config/Message.js +25 -27
  22. package/dist/es/models/common/v1/config/MessageSeverity.js +9 -10
  23. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +8 -8
  24. package/dist/es/models/common/v1/config/TenantAwareModel.js +29 -31
  25. package/dist/es/models/common/v1/response/ApiLink.d.ts +5 -5
  26. package/dist/es/models/common/v1/response/ApiLink.js +26 -28
  27. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +8 -8
  28. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +29 -31
  29. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +5 -5
  30. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +36 -39
  31. package/dist/es/models/dataprotection/v4/common/BaseRecoveryPoint.d.ts +2 -14
  32. package/dist/es/models/dataprotection/v4/common/BaseRecoveryPoint.js +33 -81
  33. package/dist/es/models/dataprotection/v4/common/RecoveryPointStatus.js +3 -4
  34. package/dist/es/models/dataprotection/v4/common/RecoveryPointType.js +3 -4
  35. package/dist/es/models/dataprotection/v4/config/AhvVmOverrideSpec.d.ts +5 -5
  36. package/dist/es/models/dataprotection/v4/config/AhvVmOverrideSpec.js +31 -31
  37. package/dist/es/models/dataprotection/v4/config/AmazonS3Bucket.d.ts +62 -0
  38. package/dist/es/models/{storage/v4/config/Task.js → dataprotection/v4/config/AmazonS3Bucket.js} +101 -72
  39. package/dist/es/models/dataprotection/v4/config/AzureBlobStorageContainer.d.ts +62 -0
  40. package/dist/{lib/models/storage/v4/config/Task.js → es/models/dataprotection/v4/config/AzureBlobStorageContainer.js} +101 -72
  41. package/dist/es/models/dataprotection/v4/config/Category.d.ts +17 -11
  42. package/dist/es/models/dataprotection/v4/config/Category.js +33 -29
  43. package/dist/es/models/dataprotection/v4/config/ClusterReference.d.ts +12 -9
  44. package/dist/es/models/dataprotection/v4/config/ClusterReference.js +29 -28
  45. package/dist/es/models/{storage/v4/config/Task.d.ts → dataprotection/v4/config/ComputeChangedRegionsResponse.d.ts} +17 -19
  46. package/dist/es/models/dataprotection/v4/config/ComputeChangedRegionsResponse.js +262 -0
  47. package/dist/{lib/models/dataprotection/v4/config/ConsistencyGroupMigrateApiResponse.d.ts → es/models/dataprotection/v4/config/ComputeChangedRegionsResponseModel.d.ts} +12 -12
  48. package/dist/es/models/dataprotection/v4/config/{WitnessApiResponse.js → ComputeChangedRegionsResponseModel.js} +57 -60
  49. package/dist/es/models/dataprotection/v4/config/ConsistencyGroup.d.ts +39 -7
  50. package/dist/es/models/dataprotection/v4/config/ConsistencyGroup.js +123 -42
  51. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupMember.d.ts +18 -26
  52. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupMember.js +48 -88
  53. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupMemberType.js +3 -4
  54. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupMigrationSpec.d.ts +15 -22
  55. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupMigrationSpec.js +65 -69
  56. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupProjection.d.ts +5 -1
  57. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupProjection.js +39 -35
  58. package/dist/es/models/dataprotection/v4/config/{VmRecoveryPointRestoreApiResponse.d.ts → CreateConsistencyGroupApiResponse.d.ts} +12 -12
  59. package/dist/{lib/models/dataprotection/v4/config/ConsistencyGroupApiResponse.js → es/models/dataprotection/v4/config/CreateConsistencyGroupApiResponse.js} +54 -57
  60. package/dist/es/models/dataprotection/v4/config/CreateRecoveryPointApiResponse.d.ts +5 -5
  61. package/dist/es/models/dataprotection/v4/config/CreateRecoveryPointApiResponse.js +35 -42
  62. package/dist/es/models/dataprotection/v4/config/DataProtectionSiteReference.d.ts +10 -10
  63. package/dist/es/models/dataprotection/v4/config/DataProtectionSiteReference.js +44 -46
  64. package/dist/es/models/dataprotection/v4/config/DeleteConsistencyGroupApiResponse.d.ts +5 -5
  65. package/dist/es/models/dataprotection/v4/config/DeleteConsistencyGroupApiResponse.js +35 -38
  66. package/dist/es/models/dataprotection/v4/config/DeleteRecoveryPointApiResponse.d.ts +5 -5
  67. package/dist/es/models/dataprotection/v4/config/DeleteRecoveryPointApiResponse.js +35 -42
  68. package/dist/es/models/dataprotection/v4/config/DisasterRecoveryLocation.d.ts +12 -9
  69. package/dist/es/models/dataprotection/v4/config/DisasterRecoveryLocation.js +29 -28
  70. package/dist/es/models/dataprotection/v4/config/DiskRecoveryPoint.d.ts +44 -19
  71. package/dist/es/models/dataprotection/v4/config/DiskRecoveryPoint.js +137 -105
  72. package/dist/es/models/dataprotection/v4/config/EsxiVmOverrideSpec.d.ts +5 -5
  73. package/dist/es/models/dataprotection/v4/config/EsxiVmOverrideSpec.js +31 -31
  74. package/dist/es/models/dataprotection/v4/config/ExpirationTimeSpec.d.ts +60 -0
  75. package/dist/es/models/dataprotection/v4/config/{SetExpirationTimeSpec.js → ExpirationTimeSpec.js} +51 -50
  76. package/dist/es/models/dataprotection/v4/config/{ConsistencyGroupListApiResponse.d.ts → GetProtectedResourceApiResponse.d.ts} +12 -12
  77. package/dist/{lib/models/dataprotection/v4/config/ProtectedResourceApiResponse.js → es/models/dataprotection/v4/config/GetProtectedResourceApiResponse.js} +54 -57
  78. package/dist/{lib/models/dataprotection/v4/config/ConsistencyGroupApiResponse.d.ts → es/models/dataprotection/v4/config/GetRecoveryPointApiResponse.d.ts} +12 -12
  79. package/dist/{lib/models/dataprotection/v4/config/RecoveryPointApiResponse.js → es/models/dataprotection/v4/config/GetRecoveryPointApiResponse.js} +54 -57
  80. package/dist/es/models/dataprotection/v4/config/HostReference.d.ts +2 -2
  81. package/dist/es/models/dataprotection/v4/config/HostReference.js +34 -34
  82. package/dist/es/models/dataprotection/v4/config/HostType.js +3 -4
  83. package/dist/es/models/dataprotection/v4/config/IpAddress.d.ts +12 -9
  84. package/dist/es/models/dataprotection/v4/config/IpAddress.js +29 -28
  85. package/dist/{lib/models/dataprotection/v4/config/ChangedRegionsListApiResponse.d.ts → es/models/dataprotection/v4/config/ListRecoveryPointsApiResponse.d.ts} +12 -12
  86. package/dist/{lib/models/dataprotection/v4/config/RecoveryPointListApiResponse.js → es/models/dataprotection/v4/config/ListRecoveryPointsApiResponse.js} +59 -57
  87. package/dist/es/models/dataprotection/v4/config/LocationReference.d.ts +8 -8
  88. package/dist/es/models/dataprotection/v4/config/LocationReference.js +30 -32
  89. package/dist/es/models/dataprotection/v4/config/{ConsistencyGroupMigrateApiResponse.d.ts → MigrateConsistencyGroupApiResponse.d.ts} +12 -12
  90. package/dist/{lib/models/dataprotection/v4/config/WitnessApiResponse.js → es/models/dataprotection/v4/config/MigrateConsistencyGroupApiResponse.js} +57 -60
  91. package/dist/es/models/dataprotection/v4/config/NutanixObjectsBucket.d.ts +50 -0
  92. package/dist/es/models/dataprotection/v4/config/NutanixObjectsBucket.js +245 -0
  93. package/dist/{lib/models/dataprotection/v4/config/HypervisorType.d.ts → es/models/dataprotection/v4/config/ObjectStorageType.d.ts} +6 -6
  94. package/dist/{lib/models/dataprotection/v4/config/HypervisorType.js → es/models/dataprotection/v4/config/ObjectStorageType.js} +26 -27
  95. package/dist/es/models/dataprotection/v4/config/{ValidationSeverity.d.ts → ProtectedEntityType.d.ts} +6 -6
  96. package/dist/{lib/models/dataprotection/v4/config/ProtectedResourceEntityType.js → es/models/dataprotection/v4/config/ProtectedEntityType.js} +21 -22
  97. package/dist/es/models/dataprotection/v4/config/ProtectedResource.d.ts +21 -9
  98. package/dist/es/models/dataprotection/v4/config/ProtectedResource.js +111 -62
  99. package/dist/es/models/dataprotection/v4/config/ProtectedResourcePromoteApiResponse.d.ts +5 -5
  100. package/dist/es/models/dataprotection/v4/config/ProtectedResourcePromoteApiResponse.js +35 -38
  101. package/dist/es/models/dataprotection/v4/config/ProtectedResourceReplicationStatus.js +11 -24
  102. package/dist/es/models/dataprotection/v4/config/ProtectedResourceRestoreApiResponse.d.ts +5 -5
  103. package/dist/es/models/dataprotection/v4/config/ProtectedResourceRestoreApiResponse.js +35 -38
  104. package/dist/es/models/dataprotection/v4/config/ProtectedResourceRestoreSpec.d.ts +24 -9
  105. package/dist/es/models/dataprotection/v4/config/ProtectedResourceRestoreSpec.js +95 -31
  106. package/dist/es/models/dataprotection/v4/config/RecoveryInfo.d.ts +5 -5
  107. package/dist/es/models/dataprotection/v4/config/RecoveryInfo.js +25 -27
  108. package/dist/es/models/dataprotection/v4/config/RecoveryPoint.d.ts +14 -44
  109. package/dist/es/models/dataprotection/v4/config/RecoveryPoint.js +59 -167
  110. package/dist/es/models/dataprotection/v4/config/RecoveryPointProjection.d.ts +9 -0
  111. package/dist/es/models/dataprotection/v4/config/RecoveryPointProjection.js +132 -0
  112. package/dist/es/models/dataprotection/v4/config/RecoveryPointReplicateApiResponse.d.ts +5 -5
  113. package/dist/es/models/dataprotection/v4/config/RecoveryPointReplicateApiResponse.js +35 -42
  114. package/dist/es/models/dataprotection/v4/config/RecoveryPointReplicationSpec.d.ts +37 -18
  115. package/dist/es/models/dataprotection/v4/config/RecoveryPointReplicationSpec.js +114 -91
  116. package/dist/es/models/dataprotection/v4/config/RecoveryPointRepository.d.ts +52 -0
  117. package/dist/es/models/dataprotection/v4/config/RecoveryPointRepository.js +323 -0
  118. package/dist/es/models/dataprotection/v4/config/RecoveryPointRepositoryProjection.d.ts +9 -0
  119. package/dist/es/models/dataprotection/v4/config/RecoveryPointRepositoryProjection.js +129 -0
  120. package/dist/es/models/dataprotection/v4/config/RecoveryPointRestorationSpec.d.ts +14 -14
  121. package/dist/es/models/dataprotection/v4/config/RecoveryPointRestorationSpec.js +42 -44
  122. package/dist/es/models/dataprotection/v4/config/RecoveryPointRestoreApiResponse.d.ts +5 -5
  123. package/dist/es/models/dataprotection/v4/config/RecoveryPointRestoreApiResponse.js +35 -42
  124. package/dist/es/models/dataprotection/v4/config/RedirectionResponse.d.ts +60 -0
  125. package/dist/es/models/dataprotection/v4/config/RedirectionResponse.js +279 -0
  126. package/dist/es/models/dataprotection/v4/config/Region.d.ts +91 -0
  127. package/dist/{lib/models/dataprotection/v4/config/Regions.js → es/models/dataprotection/v4/config/Region.js} +107 -58
  128. package/dist/es/models/dataprotection/v4/config/RegionResponse.d.ts +60 -0
  129. package/dist/es/models/dataprotection/v4/config/{ChangedRegions.js → RegionResponse.js} +58 -58
  130. package/dist/es/models/dataprotection/v4/config/{PowerState.d.ts → RegionType.d.ts} +6 -6
  131. package/dist/es/models/dataprotection/v4/config/{PowerState.js → RegionType.js} +23 -24
  132. package/dist/es/models/dataprotection/v4/config/ReplicationState.d.ts +19 -17
  133. package/dist/es/models/dataprotection/v4/config/ReplicationState.js +72 -66
  134. package/dist/es/models/dataprotection/v4/config/RestorableTimeRange.d.ts +5 -5
  135. package/dist/es/models/dataprotection/v4/config/RestorableTimeRange.js +25 -27
  136. package/dist/{lib/models/dataprotection/v4/config/DataProtectionInfo.d.ts → es/models/dataprotection/v4/config/SiteProtectionInfo.d.ts} +12 -12
  137. package/dist/{lib/models/dataprotection/v4/config/DataProtectionInfo.js → es/models/dataprotection/v4/config/SiteProtectionInfo.js} +45 -47
  138. package/dist/es/models/dataprotection/v4/config/SiteReference.d.ts +5 -5
  139. package/dist/es/models/dataprotection/v4/config/SiteReference.js +25 -27
  140. package/dist/es/models/dataprotection/v4/config/Subnet.d.ts +5 -5
  141. package/dist/es/models/dataprotection/v4/config/Subnet.js +25 -27
  142. package/dist/es/models/dataprotection/v4/config/SynchronousReplicaPromoteApiResponse.d.ts +5 -5
  143. package/dist/es/models/dataprotection/v4/config/SynchronousReplicaPromoteApiResponse.js +35 -38
  144. package/dist/{lib/models/dataprotection/v4/config/VmRecoveryPointRestoreApiResponse.d.ts → es/models/dataprotection/v4/config/UpdateConsistencyGroupApiResponse.d.ts} +12 -12
  145. package/dist/es/models/dataprotection/v4/config/{VMRecoveryPointListApiResponse.js → UpdateConsistencyGroupApiResponse.js} +57 -60
  146. package/dist/es/models/dataprotection/v4/config/UpdateRecoveryPointExpirationTimeApiResponse.d.ts +5 -5
  147. package/dist/es/models/dataprotection/v4/config/UpdateRecoveryPointExpirationTimeApiResponse.js +35 -38
  148. package/dist/es/models/dataprotection/v4/config/VmRecoveryPoint.d.ts +77 -0
  149. package/dist/es/models/dataprotection/v4/config/VmRecoveryPoint.js +361 -0
  150. package/dist/es/models/dataprotection/v4/config/VmRecoveryPointComputeChangedRegionsRequest.d.ts +98 -0
  151. package/dist/es/models/dataprotection/v4/config/VmRecoveryPointComputeChangedRegionsRequest.js +403 -0
  152. package/dist/es/models/dataprotection/v4/config/VmRecoveryPointRestoreOverride.d.ts +12 -38
  153. package/dist/es/models/dataprotection/v4/config/VmRecoveryPointRestoreOverride.js +49 -125
  154. package/dist/es/models/dataprotection/v4/config/VolumeGroupOverrideSpec.d.ts +5 -5
  155. package/dist/es/models/dataprotection/v4/config/VolumeGroupOverrideSpec.js +29 -29
  156. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPoint.d.ts +40 -22
  157. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPoint.js +126 -108
  158. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointComputeChangedRegionsRequest.d.ts +98 -0
  159. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointComputeChangedRegionsRequest.js +403 -0
  160. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestoreOverride.d.ts +12 -18
  161. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestoreOverride.js +49 -53
  162. package/dist/es/models/dataprotection/v4/config/VolumeGroupSyncContext.d.ts +5 -5
  163. package/dist/es/models/dataprotection/v4/config/VolumeGroupSyncContext.js +27 -31
  164. package/dist/es/models/dataprotection/v4/config/VpcReference.d.ts +13 -10
  165. package/dist/es/models/dataprotection/v4/config/VpcReference.js +30 -29
  166. package/dist/es/models/dataprotection/v4/config/Witness.d.ts +5 -5
  167. package/dist/es/models/dataprotection/v4/config/Witness.js +39 -41
  168. package/dist/es/models/dataprotection/v4/config/WitnessAvailabilityStatus.js +3 -4
  169. package/dist/es/models/dataprotection/v4/error/AppMessage.d.ts +20 -12
  170. package/dist/es/models/dataprotection/v4/error/AppMessage.js +49 -39
  171. package/dist/es/models/dataprotection/v4/error/ErrorResponse.d.ts +5 -5
  172. package/dist/es/models/dataprotection/v4/error/ErrorResponse.js +36 -50
  173. package/dist/es/models/dataprotection/v4/error/SchemaValidationError.d.ts +20 -10
  174. package/dist/es/models/dataprotection/v4/error/SchemaValidationError.js +45 -32
  175. package/dist/es/models/dataprotection/v4/error/SchemaValidationErrorMessage.d.ts +14 -8
  176. package/dist/es/models/dataprotection/v4/error/SchemaValidationErrorMessage.js +37 -30
  177. package/dist/es/models/prism/v4/config/TaskReference.d.ts +5 -5
  178. package/dist/es/models/prism/v4/config/TaskReference.js +27 -32
  179. package/dist/es/models/validation/ValidationError.js +8 -10
  180. package/dist/es/models/validation/ValidationScopes.js +1 -2
  181. package/dist/es/utils/ValidationUtils.js +8 -10
  182. package/dist/lib/ApiClient.d.ts +2 -1
  183. package/dist/lib/ApiClient.js +401 -246
  184. package/dist/lib/Paginable.d.ts +1 -1
  185. package/dist/lib/Paginable.js +17 -19
  186. package/dist/lib/apis/protectedresources-endpoints.d.ts +52 -0
  187. package/dist/lib/apis/protectedresources-endpoints.js +192 -0
  188. package/dist/lib/apis/recoverypoints-endpoints.d.ts +126 -0
  189. package/dist/lib/apis/recoverypoints-endpoints.js +394 -0
  190. package/dist/lib/index.d.ts +55 -87
  191. package/dist/lib/index.js +169 -298
  192. package/dist/lib/models/common/v1/config/Flag.d.ts +5 -5
  193. package/dist/lib/models/common/v1/config/Flag.js +25 -27
  194. package/dist/lib/models/common/v1/config/IPv4Address.d.ts +5 -5
  195. package/dist/lib/models/common/v1/config/IPv4Address.js +25 -27
  196. package/dist/lib/models/common/v1/config/KVPair.d.ts +5 -5
  197. package/dist/lib/models/common/v1/config/KVPair.js +28 -30
  198. package/dist/lib/models/common/v1/config/Message.d.ts +5 -5
  199. package/dist/lib/models/common/v1/config/Message.js +25 -27
  200. package/dist/lib/models/common/v1/config/MessageSeverity.js +9 -10
  201. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +8 -8
  202. package/dist/lib/models/common/v1/config/TenantAwareModel.js +29 -31
  203. package/dist/lib/models/common/v1/response/ApiLink.d.ts +5 -5
  204. package/dist/lib/models/common/v1/response/ApiLink.js +26 -28
  205. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +8 -8
  206. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +29 -31
  207. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +5 -5
  208. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +36 -39
  209. package/dist/lib/models/dataprotection/v4/common/BaseRecoveryPoint.d.ts +2 -14
  210. package/dist/lib/models/dataprotection/v4/common/BaseRecoveryPoint.js +33 -81
  211. package/dist/lib/models/dataprotection/v4/common/RecoveryPointStatus.js +3 -4
  212. package/dist/lib/models/dataprotection/v4/common/RecoveryPointType.js +3 -4
  213. package/dist/lib/models/dataprotection/v4/config/AhvVmOverrideSpec.d.ts +5 -5
  214. package/dist/lib/models/dataprotection/v4/config/AhvVmOverrideSpec.js +31 -31
  215. package/dist/lib/models/dataprotection/v4/config/AmazonS3Bucket.d.ts +62 -0
  216. package/dist/lib/models/dataprotection/v4/config/AmazonS3Bucket.js +283 -0
  217. package/dist/lib/models/dataprotection/v4/config/AzureBlobStorageContainer.d.ts +62 -0
  218. package/dist/lib/models/dataprotection/v4/config/AzureBlobStorageContainer.js +283 -0
  219. package/dist/lib/models/dataprotection/v4/config/Category.d.ts +17 -11
  220. package/dist/lib/models/dataprotection/v4/config/Category.js +33 -29
  221. package/dist/lib/models/dataprotection/v4/config/ClusterReference.d.ts +12 -9
  222. package/dist/lib/models/dataprotection/v4/config/ClusterReference.js +29 -28
  223. package/dist/lib/models/{storage/v4/config/Task.d.ts → dataprotection/v4/config/ComputeChangedRegionsResponse.d.ts} +17 -19
  224. package/dist/lib/models/dataprotection/v4/config/ComputeChangedRegionsResponse.js +262 -0
  225. package/dist/lib/models/dataprotection/v4/config/ComputeChangedRegionsResponseModel.d.ts +59 -0
  226. package/dist/lib/models/dataprotection/v4/config/ComputeChangedRegionsResponseModel.js +311 -0
  227. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroup.d.ts +39 -7
  228. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroup.js +123 -42
  229. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupMember.d.ts +18 -26
  230. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupMember.js +48 -88
  231. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupMemberType.js +3 -4
  232. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupMigrationSpec.d.ts +15 -22
  233. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupMigrationSpec.js +65 -69
  234. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupProjection.d.ts +5 -1
  235. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupProjection.js +39 -35
  236. package/dist/{es/models/dataprotection/v4/config/DiskRecoveryPointApiResponse.d.ts → lib/models/dataprotection/v4/config/CreateConsistencyGroupApiResponse.d.ts} +12 -12
  237. package/dist/{es/models/dataprotection/v4/config/ConsistencyGroupApiResponse.js → lib/models/dataprotection/v4/config/CreateConsistencyGroupApiResponse.js} +54 -57
  238. package/dist/lib/models/dataprotection/v4/config/CreateRecoveryPointApiResponse.d.ts +5 -5
  239. package/dist/lib/models/dataprotection/v4/config/CreateRecoveryPointApiResponse.js +35 -42
  240. package/dist/lib/models/dataprotection/v4/config/DataProtectionSiteReference.d.ts +10 -10
  241. package/dist/lib/models/dataprotection/v4/config/DataProtectionSiteReference.js +44 -46
  242. package/dist/lib/models/dataprotection/v4/config/DeleteConsistencyGroupApiResponse.d.ts +5 -5
  243. package/dist/lib/models/dataprotection/v4/config/DeleteConsistencyGroupApiResponse.js +35 -38
  244. package/dist/lib/models/dataprotection/v4/config/DeleteRecoveryPointApiResponse.d.ts +5 -5
  245. package/dist/lib/models/dataprotection/v4/config/DeleteRecoveryPointApiResponse.js +35 -42
  246. package/dist/lib/models/dataprotection/v4/config/DisasterRecoveryLocation.d.ts +12 -9
  247. package/dist/lib/models/dataprotection/v4/config/DisasterRecoveryLocation.js +29 -28
  248. package/dist/lib/models/dataprotection/v4/config/DiskRecoveryPoint.d.ts +44 -19
  249. package/dist/lib/models/dataprotection/v4/config/DiskRecoveryPoint.js +137 -105
  250. package/dist/lib/models/dataprotection/v4/config/EsxiVmOverrideSpec.d.ts +5 -5
  251. package/dist/lib/models/dataprotection/v4/config/EsxiVmOverrideSpec.js +31 -31
  252. package/dist/lib/models/dataprotection/v4/config/ExpirationTimeSpec.d.ts +60 -0
  253. package/dist/lib/models/dataprotection/v4/config/{SetExpirationTimeSpec.js → ExpirationTimeSpec.js} +51 -50
  254. package/dist/lib/models/dataprotection/v4/config/{ConsistencyGroupListApiResponse.d.ts → GetProtectedResourceApiResponse.d.ts} +12 -12
  255. package/dist/{es/models/dataprotection/v4/config/ProtectedResourceApiResponse.js → lib/models/dataprotection/v4/config/GetProtectedResourceApiResponse.js} +54 -57
  256. package/dist/{es/models/dataprotection/v4/config/ConsistencyGroupApiResponse.d.ts → lib/models/dataprotection/v4/config/GetRecoveryPointApiResponse.d.ts} +12 -12
  257. package/dist/{es/models/dataprotection/v4/config/RecoveryPointApiResponse.js → lib/models/dataprotection/v4/config/GetRecoveryPointApiResponse.js} +54 -57
  258. package/dist/lib/models/dataprotection/v4/config/HostReference.d.ts +2 -2
  259. package/dist/lib/models/dataprotection/v4/config/HostReference.js +34 -34
  260. package/dist/lib/models/dataprotection/v4/config/HostType.js +3 -4
  261. package/dist/lib/models/dataprotection/v4/config/IpAddress.d.ts +12 -9
  262. package/dist/lib/models/dataprotection/v4/config/IpAddress.js +29 -28
  263. package/dist/{es/models/dataprotection/v4/config/ChangedRegionsListApiResponse.d.ts → lib/models/dataprotection/v4/config/ListRecoveryPointsApiResponse.d.ts} +12 -12
  264. package/dist/{es/models/dataprotection/v4/config/RecoveryPointListApiResponse.js → lib/models/dataprotection/v4/config/ListRecoveryPointsApiResponse.js} +59 -57
  265. package/dist/lib/models/dataprotection/v4/config/LocationReference.d.ts +8 -8
  266. package/dist/lib/models/dataprotection/v4/config/LocationReference.js +30 -32
  267. package/dist/lib/models/dataprotection/v4/config/MigrateConsistencyGroupApiResponse.d.ts +59 -0
  268. package/dist/{es/models/dataprotection/v4/config/ConsistencyGroupMigrateApiResponse.js → lib/models/dataprotection/v4/config/MigrateConsistencyGroupApiResponse.js} +54 -61
  269. package/dist/lib/models/dataprotection/v4/config/NutanixObjectsBucket.d.ts +50 -0
  270. package/dist/lib/models/dataprotection/v4/config/NutanixObjectsBucket.js +245 -0
  271. package/dist/{es/models/dataprotection/v4/config/HypervisorType.d.ts → lib/models/dataprotection/v4/config/ObjectStorageType.d.ts} +6 -6
  272. package/dist/{es/models/dataprotection/v4/config/HypervisorType.js → lib/models/dataprotection/v4/config/ObjectStorageType.js} +26 -27
  273. package/dist/lib/models/dataprotection/v4/config/ProtectedEntityType.d.ts +19 -0
  274. package/dist/{es/models/dataprotection/v4/config/ProtectedResourceEntityType.js → lib/models/dataprotection/v4/config/ProtectedEntityType.js} +21 -22
  275. package/dist/lib/models/dataprotection/v4/config/ProtectedResource.d.ts +21 -9
  276. package/dist/lib/models/dataprotection/v4/config/ProtectedResource.js +111 -62
  277. package/dist/lib/models/dataprotection/v4/config/ProtectedResourcePromoteApiResponse.d.ts +5 -5
  278. package/dist/lib/models/dataprotection/v4/config/ProtectedResourcePromoteApiResponse.js +35 -38
  279. package/dist/lib/models/dataprotection/v4/config/ProtectedResourceReplicationStatus.js +11 -24
  280. package/dist/lib/models/dataprotection/v4/config/ProtectedResourceRestoreApiResponse.d.ts +5 -5
  281. package/dist/lib/models/dataprotection/v4/config/ProtectedResourceRestoreApiResponse.js +35 -38
  282. package/dist/lib/models/dataprotection/v4/config/ProtectedResourceRestoreSpec.d.ts +24 -9
  283. package/dist/lib/models/dataprotection/v4/config/ProtectedResourceRestoreSpec.js +95 -31
  284. package/dist/lib/models/dataprotection/v4/config/RecoveryInfo.d.ts +5 -5
  285. package/dist/lib/models/dataprotection/v4/config/RecoveryInfo.js +25 -27
  286. package/dist/lib/models/dataprotection/v4/config/RecoveryPoint.d.ts +14 -44
  287. package/dist/lib/models/dataprotection/v4/config/RecoveryPoint.js +59 -167
  288. package/dist/lib/models/dataprotection/v4/config/RecoveryPointProjection.d.ts +9 -0
  289. package/dist/lib/models/dataprotection/v4/config/RecoveryPointProjection.js +132 -0
  290. package/dist/lib/models/dataprotection/v4/config/RecoveryPointReplicateApiResponse.d.ts +5 -5
  291. package/dist/lib/models/dataprotection/v4/config/RecoveryPointReplicateApiResponse.js +35 -42
  292. package/dist/lib/models/dataprotection/v4/config/RecoveryPointReplicationSpec.d.ts +37 -18
  293. package/dist/lib/models/dataprotection/v4/config/RecoveryPointReplicationSpec.js +114 -91
  294. package/dist/lib/models/dataprotection/v4/config/RecoveryPointRepository.d.ts +52 -0
  295. package/dist/lib/models/dataprotection/v4/config/RecoveryPointRepository.js +323 -0
  296. package/dist/lib/models/dataprotection/v4/config/RecoveryPointRepositoryProjection.d.ts +9 -0
  297. package/dist/lib/models/dataprotection/v4/config/RecoveryPointRepositoryProjection.js +129 -0
  298. package/dist/lib/models/dataprotection/v4/config/RecoveryPointRestorationSpec.d.ts +14 -14
  299. package/dist/lib/models/dataprotection/v4/config/RecoveryPointRestorationSpec.js +42 -44
  300. package/dist/lib/models/dataprotection/v4/config/RecoveryPointRestoreApiResponse.d.ts +5 -5
  301. package/dist/lib/models/dataprotection/v4/config/RecoveryPointRestoreApiResponse.js +35 -42
  302. package/dist/lib/models/dataprotection/v4/config/RedirectionResponse.d.ts +60 -0
  303. package/dist/lib/models/dataprotection/v4/config/RedirectionResponse.js +279 -0
  304. package/dist/lib/models/dataprotection/v4/config/Region.d.ts +91 -0
  305. package/dist/{es/models/dataprotection/v4/config/Regions.js → lib/models/dataprotection/v4/config/Region.js} +107 -58
  306. package/dist/lib/models/dataprotection/v4/config/RegionResponse.d.ts +60 -0
  307. package/dist/lib/models/dataprotection/v4/config/{ChangedRegions.js → RegionResponse.js} +58 -58
  308. package/dist/lib/models/dataprotection/v4/config/{PowerState.d.ts → RegionType.d.ts} +6 -6
  309. package/dist/lib/models/dataprotection/v4/config/{PowerState.js → RegionType.js} +23 -24
  310. package/dist/lib/models/dataprotection/v4/config/ReplicationState.d.ts +19 -17
  311. package/dist/lib/models/dataprotection/v4/config/ReplicationState.js +72 -66
  312. package/dist/lib/models/dataprotection/v4/config/RestorableTimeRange.d.ts +5 -5
  313. package/dist/lib/models/dataprotection/v4/config/RestorableTimeRange.js +25 -27
  314. package/dist/{es/models/dataprotection/v4/config/DataProtectionInfo.d.ts → lib/models/dataprotection/v4/config/SiteProtectionInfo.d.ts} +12 -12
  315. package/dist/{es/models/dataprotection/v4/config/DataProtectionInfo.js → lib/models/dataprotection/v4/config/SiteProtectionInfo.js} +45 -47
  316. package/dist/lib/models/dataprotection/v4/config/SiteReference.d.ts +5 -5
  317. package/dist/lib/models/dataprotection/v4/config/SiteReference.js +25 -27
  318. package/dist/lib/models/dataprotection/v4/config/Subnet.d.ts +5 -5
  319. package/dist/lib/models/dataprotection/v4/config/Subnet.js +25 -27
  320. package/dist/lib/models/dataprotection/v4/config/SynchronousReplicaPromoteApiResponse.d.ts +5 -5
  321. package/dist/lib/models/dataprotection/v4/config/SynchronousReplicaPromoteApiResponse.js +35 -38
  322. package/dist/lib/models/dataprotection/v4/config/UpdateConsistencyGroupApiResponse.d.ts +59 -0
  323. package/dist/lib/models/dataprotection/v4/config/{VMRecoveryPointListApiResponse.js → UpdateConsistencyGroupApiResponse.js} +57 -60
  324. package/dist/lib/models/dataprotection/v4/config/UpdateRecoveryPointExpirationTimeApiResponse.d.ts +5 -5
  325. package/dist/lib/models/dataprotection/v4/config/UpdateRecoveryPointExpirationTimeApiResponse.js +35 -38
  326. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPoint.d.ts +77 -0
  327. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPoint.js +361 -0
  328. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPointComputeChangedRegionsRequest.d.ts +98 -0
  329. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPointComputeChangedRegionsRequest.js +403 -0
  330. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPointRestoreOverride.d.ts +12 -38
  331. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPointRestoreOverride.js +49 -125
  332. package/dist/lib/models/dataprotection/v4/config/VolumeGroupOverrideSpec.d.ts +5 -5
  333. package/dist/lib/models/dataprotection/v4/config/VolumeGroupOverrideSpec.js +29 -29
  334. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPoint.d.ts +40 -22
  335. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPoint.js +126 -108
  336. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointComputeChangedRegionsRequest.d.ts +98 -0
  337. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointComputeChangedRegionsRequest.js +403 -0
  338. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestoreOverride.d.ts +12 -18
  339. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestoreOverride.js +49 -53
  340. package/dist/lib/models/dataprotection/v4/config/VolumeGroupSyncContext.d.ts +5 -5
  341. package/dist/lib/models/dataprotection/v4/config/VolumeGroupSyncContext.js +27 -31
  342. package/dist/lib/models/dataprotection/v4/config/VpcReference.d.ts +13 -10
  343. package/dist/lib/models/dataprotection/v4/config/VpcReference.js +30 -29
  344. package/dist/lib/models/dataprotection/v4/config/Witness.d.ts +5 -5
  345. package/dist/lib/models/dataprotection/v4/config/Witness.js +39 -41
  346. package/dist/lib/models/dataprotection/v4/config/WitnessAvailabilityStatus.js +3 -4
  347. package/dist/lib/models/dataprotection/v4/error/AppMessage.d.ts +20 -12
  348. package/dist/lib/models/dataprotection/v4/error/AppMessage.js +49 -39
  349. package/dist/lib/models/dataprotection/v4/error/ErrorResponse.d.ts +5 -5
  350. package/dist/lib/models/dataprotection/v4/error/ErrorResponse.js +36 -50
  351. package/dist/lib/models/dataprotection/v4/error/SchemaValidationError.d.ts +20 -10
  352. package/dist/lib/models/dataprotection/v4/error/SchemaValidationError.js +45 -32
  353. package/dist/lib/models/dataprotection/v4/error/SchemaValidationErrorMessage.d.ts +14 -8
  354. package/dist/lib/models/dataprotection/v4/error/SchemaValidationErrorMessage.js +37 -30
  355. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +5 -5
  356. package/dist/lib/models/prism/v4/config/TaskReference.js +27 -32
  357. package/dist/lib/models/validation/ValidationError.js +8 -10
  358. package/dist/lib/models/validation/ValidationScopes.js +1 -2
  359. package/dist/lib/utils/ValidationUtils.js +8 -10
  360. package/package.json +3 -2
  361. package/dist/es/apis/consistencygroup-endpoints.d.ts +0 -98
  362. package/dist/es/apis/consistencygroup-endpoints.js +0 -304
  363. package/dist/es/models/dataprotection/v4/common/VendorSpecificProperty.d.ts +0 -70
  364. package/dist/es/models/dataprotection/v4/common/VendorSpecificProperty.js +0 -286
  365. package/dist/es/models/dataprotection/v4/config/ChangedRegions.d.ts +0 -62
  366. package/dist/es/models/dataprotection/v4/config/ChangedRegionsListApiResponse.js +0 -314
  367. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupListApiResponse.js +0 -341
  368. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupRecoveryPointSpec.d.ts +0 -67
  369. package/dist/es/models/dataprotection/v4/config/ConsistencyGroupRecoveryPointSpec.js +0 -285
  370. package/dist/es/models/dataprotection/v4/config/CreateConsistencyGroupRecoveryPointApiResponse.d.ts +0 -59
  371. package/dist/es/models/dataprotection/v4/config/CreateConsistencyGroupRecoveryPointApiResponse.js +0 -318
  372. package/dist/es/models/dataprotection/v4/config/Disk.d.ts +0 -62
  373. package/dist/es/models/dataprotection/v4/config/Disk.js +0 -285
  374. package/dist/es/models/dataprotection/v4/config/DiskRecoveryPointApiResponse.js +0 -314
  375. package/dist/es/models/dataprotection/v4/config/DiskRecoveryPointListApiResponse.d.ts +0 -59
  376. package/dist/es/models/dataprotection/v4/config/DiskRecoveryPointListApiResponse.js +0 -336
  377. package/dist/es/models/dataprotection/v4/config/HardwareArchitecture.d.ts +0 -19
  378. package/dist/es/models/dataprotection/v4/config/HardwareArchitecture.js +0 -86
  379. package/dist/es/models/dataprotection/v4/config/ProtectedResourceApiResponse.d.ts +0 -59
  380. package/dist/es/models/dataprotection/v4/config/ProtectedResourceEntityType.d.ts +0 -19
  381. package/dist/es/models/dataprotection/v4/config/RecoveryPointApiResponse.d.ts +0 -59
  382. package/dist/es/models/dataprotection/v4/config/RecoveryPointListApiResponse.d.ts +0 -59
  383. package/dist/es/models/dataprotection/v4/config/Regions.d.ts +0 -62
  384. package/dist/es/models/dataprotection/v4/config/SetExpirationTimeSpec.d.ts +0 -57
  385. package/dist/es/models/dataprotection/v4/config/SyncedVolumeGroupByIdApiResponse.d.ts +0 -59
  386. package/dist/es/models/dataprotection/v4/config/SyncedVolumeGroupByIdApiResponse.js +0 -314
  387. package/dist/es/models/dataprotection/v4/config/VMRecoveryPoint.d.ts +0 -49
  388. package/dist/es/models/dataprotection/v4/config/VMRecoveryPoint.js +0 -295
  389. package/dist/es/models/dataprotection/v4/config/VMRecoveryPointApiResponse.d.ts +0 -59
  390. package/dist/es/models/dataprotection/v4/config/VMRecoveryPointApiResponse.js +0 -314
  391. package/dist/es/models/dataprotection/v4/config/VMRecoveryPointListApiResponse.d.ts +0 -59
  392. package/dist/es/models/dataprotection/v4/config/ValidateRecoveryPointResult.d.ts +0 -79
  393. package/dist/es/models/dataprotection/v4/config/ValidateRecoveryPointResult.js +0 -320
  394. package/dist/es/models/dataprotection/v4/config/ValidateRestoreVmRecoveryPointApiResponse.d.ts +0 -59
  395. package/dist/es/models/dataprotection/v4/config/ValidateRestoreVmRecoveryPointApiResponse.js +0 -336
  396. package/dist/es/models/dataprotection/v4/config/ValidationSeverity.js +0 -86
  397. package/dist/es/models/dataprotection/v4/config/Vm.d.ts +0 -140
  398. package/dist/es/models/dataprotection/v4/config/Vm.js +0 -545
  399. package/dist/es/models/dataprotection/v4/config/VmRecoveryPointRestorationSpec.d.ts +0 -70
  400. package/dist/es/models/dataprotection/v4/config/VmRecoveryPointRestorationSpec.js +0 -319
  401. package/dist/es/models/dataprotection/v4/config/VmRecoveryPointRestoreApiResponse.js +0 -318
  402. package/dist/es/models/dataprotection/v4/config/VmSubRecoveryPoint.d.ts +0 -98
  403. package/dist/es/models/dataprotection/v4/config/VmSubRecoveryPoint.js +0 -405
  404. package/dist/es/models/dataprotection/v4/config/VmSubRecoveryPointProjection.d.ts +0 -9
  405. package/dist/es/models/dataprotection/v4/config/VmSubRecoveryPointProjection.js +0 -132
  406. package/dist/es/models/dataprotection/v4/config/VolumeGroup.d.ts +0 -62
  407. package/dist/es/models/dataprotection/v4/config/VolumeGroup.js +0 -285
  408. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointApiResponse.d.ts +0 -59
  409. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointApiResponse.js +0 -314
  410. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointListApiResponse.d.ts +0 -59
  411. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointListApiResponse.js +0 -336
  412. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestorationSpec.d.ts +0 -62
  413. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestorationSpec.js +0 -288
  414. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestoreApiResponse.d.ts +0 -59
  415. package/dist/es/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestoreApiResponse.js +0 -318
  416. package/dist/es/models/dataprotection/v4/config/VolumeGroupSubRecoveryPoint.d.ts +0 -98
  417. package/dist/es/models/dataprotection/v4/config/VolumeGroupSubRecoveryPoint.js +0 -407
  418. package/dist/es/models/dataprotection/v4/config/VolumeGroupSubRecoveryPointProjection.d.ts +0 -9
  419. package/dist/es/models/dataprotection/v4/config/VolumeGroupSubRecoveryPointProjection.js +0 -132
  420. package/dist/es/models/dataprotection/v4/config/WitnessApiResponse.d.ts +0 -59
  421. package/dist/lib/apis/consistencygroup-endpoints.d.ts +0 -98
  422. package/dist/lib/apis/consistencygroup-endpoints.js +0 -304
  423. package/dist/lib/models/dataprotection/v4/common/VendorSpecificProperty.d.ts +0 -70
  424. package/dist/lib/models/dataprotection/v4/common/VendorSpecificProperty.js +0 -286
  425. package/dist/lib/models/dataprotection/v4/config/ChangedRegions.d.ts +0 -62
  426. package/dist/lib/models/dataprotection/v4/config/ChangedRegionsListApiResponse.js +0 -314
  427. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupListApiResponse.js +0 -341
  428. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupMigrateApiResponse.js +0 -318
  429. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupRecoveryPointSpec.d.ts +0 -67
  430. package/dist/lib/models/dataprotection/v4/config/ConsistencyGroupRecoveryPointSpec.js +0 -285
  431. package/dist/lib/models/dataprotection/v4/config/CreateConsistencyGroupRecoveryPointApiResponse.d.ts +0 -59
  432. package/dist/lib/models/dataprotection/v4/config/CreateConsistencyGroupRecoveryPointApiResponse.js +0 -318
  433. package/dist/lib/models/dataprotection/v4/config/Disk.d.ts +0 -62
  434. package/dist/lib/models/dataprotection/v4/config/Disk.js +0 -285
  435. package/dist/lib/models/dataprotection/v4/config/DiskRecoveryPointApiResponse.d.ts +0 -59
  436. package/dist/lib/models/dataprotection/v4/config/DiskRecoveryPointApiResponse.js +0 -314
  437. package/dist/lib/models/dataprotection/v4/config/DiskRecoveryPointListApiResponse.d.ts +0 -59
  438. package/dist/lib/models/dataprotection/v4/config/DiskRecoveryPointListApiResponse.js +0 -336
  439. package/dist/lib/models/dataprotection/v4/config/HardwareArchitecture.d.ts +0 -19
  440. package/dist/lib/models/dataprotection/v4/config/HardwareArchitecture.js +0 -86
  441. package/dist/lib/models/dataprotection/v4/config/ProtectedResourceApiResponse.d.ts +0 -59
  442. package/dist/lib/models/dataprotection/v4/config/ProtectedResourceEntityType.d.ts +0 -19
  443. package/dist/lib/models/dataprotection/v4/config/RecoveryPointApiResponse.d.ts +0 -59
  444. package/dist/lib/models/dataprotection/v4/config/RecoveryPointListApiResponse.d.ts +0 -59
  445. package/dist/lib/models/dataprotection/v4/config/Regions.d.ts +0 -62
  446. package/dist/lib/models/dataprotection/v4/config/SetExpirationTimeSpec.d.ts +0 -57
  447. package/dist/lib/models/dataprotection/v4/config/SyncedVolumeGroupByIdApiResponse.d.ts +0 -59
  448. package/dist/lib/models/dataprotection/v4/config/SyncedVolumeGroupByIdApiResponse.js +0 -314
  449. package/dist/lib/models/dataprotection/v4/config/VMRecoveryPoint.d.ts +0 -49
  450. package/dist/lib/models/dataprotection/v4/config/VMRecoveryPoint.js +0 -295
  451. package/dist/lib/models/dataprotection/v4/config/VMRecoveryPointApiResponse.d.ts +0 -59
  452. package/dist/lib/models/dataprotection/v4/config/VMRecoveryPointApiResponse.js +0 -314
  453. package/dist/lib/models/dataprotection/v4/config/VMRecoveryPointListApiResponse.d.ts +0 -59
  454. package/dist/lib/models/dataprotection/v4/config/ValidateRecoveryPointResult.d.ts +0 -79
  455. package/dist/lib/models/dataprotection/v4/config/ValidateRecoveryPointResult.js +0 -320
  456. package/dist/lib/models/dataprotection/v4/config/ValidateRestoreVmRecoveryPointApiResponse.d.ts +0 -59
  457. package/dist/lib/models/dataprotection/v4/config/ValidateRestoreVmRecoveryPointApiResponse.js +0 -336
  458. package/dist/lib/models/dataprotection/v4/config/ValidationSeverity.d.ts +0 -19
  459. package/dist/lib/models/dataprotection/v4/config/ValidationSeverity.js +0 -86
  460. package/dist/lib/models/dataprotection/v4/config/Vm.d.ts +0 -140
  461. package/dist/lib/models/dataprotection/v4/config/Vm.js +0 -545
  462. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPointRestorationSpec.d.ts +0 -70
  463. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPointRestorationSpec.js +0 -319
  464. package/dist/lib/models/dataprotection/v4/config/VmRecoveryPointRestoreApiResponse.js +0 -318
  465. package/dist/lib/models/dataprotection/v4/config/VmSubRecoveryPoint.d.ts +0 -98
  466. package/dist/lib/models/dataprotection/v4/config/VmSubRecoveryPoint.js +0 -405
  467. package/dist/lib/models/dataprotection/v4/config/VmSubRecoveryPointProjection.d.ts +0 -9
  468. package/dist/lib/models/dataprotection/v4/config/VmSubRecoveryPointProjection.js +0 -132
  469. package/dist/lib/models/dataprotection/v4/config/VolumeGroup.d.ts +0 -62
  470. package/dist/lib/models/dataprotection/v4/config/VolumeGroup.js +0 -285
  471. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointApiResponse.d.ts +0 -59
  472. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointApiResponse.js +0 -314
  473. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointListApiResponse.d.ts +0 -59
  474. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointListApiResponse.js +0 -336
  475. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestorationSpec.d.ts +0 -62
  476. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestorationSpec.js +0 -288
  477. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestoreApiResponse.d.ts +0 -59
  478. package/dist/lib/models/dataprotection/v4/config/VolumeGroupRecoveryPointRestoreApiResponse.js +0 -318
  479. package/dist/lib/models/dataprotection/v4/config/VolumeGroupSubRecoveryPoint.d.ts +0 -98
  480. package/dist/lib/models/dataprotection/v4/config/VolumeGroupSubRecoveryPoint.js +0 -407
  481. package/dist/lib/models/dataprotection/v4/config/VolumeGroupSubRecoveryPointProjection.d.ts +0 -9
  482. package/dist/lib/models/dataprotection/v4/config/VolumeGroupSubRecoveryPointProjection.js +0 -132
  483. package/dist/lib/models/dataprotection/v4/config/WitnessApiResponse.d.ts +0 -59
@@ -10,11 +10,16 @@ var _uuid = require("uuid");
10
10
  var _superagentRetryDelay = _interopRequireDefault(require("superagent-retry-delay"));
11
11
  var _https = _interopRequireDefault(require("https"));
12
12
  var _fs2 = _interopRequireDefault(require("fs"));
13
- var _class;
13
+ var _path = _interopRequireDefault(require("path"));
14
+ var _buffer = require("buffer");
15
+ var _ApiClient;
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
16
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
18
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
19
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
20
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
21
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
23
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
24
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
20
25
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -22,35 +27,32 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
22
27
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
28
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
24
29
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
26
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
30
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
31
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
27
32
  function _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }
28
33
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
29
34
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
30
- function _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError("attempted to get private field on non-instance"); } return fn; }
31
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
32
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
33
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
34
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
35
- function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } } /*
36
- * Nutanix Dataprotection Versioned APIs
37
- *
38
- * OpenAPI spec version: 4.0.1-alpha-4
39
- *
40
- * NOTE: This class is auto generated by the Open API Dev Platform.
41
- *
42
- * Open API Dev Platform Codegen version: 16.8.0.6343-RELEASE
43
- *
44
- * Do not edit the class manually.
45
- *
46
- */
35
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
36
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
37
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } /*
38
+ * Nutanix Dataprotection Versioned APIs
39
+ *
40
+ * OpenAPI spec version: 4.0.1-beta-1
41
+ *
42
+ * NOTE: This class is auto generated by the Open API Dev Platform.
43
+ *
44
+ * Open API Dev Platform Codegen version: 16.8.0.7344-RELEASE
45
+ *
46
+ * Do not edit the class manually.
47
+ *
48
+ */
47
49
  (0, _superagentRetryDelay["default"])(_superagent["default"]);
48
50
  /**
49
51
  * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
50
52
  * application to use this class directly - the *Api and model classes provide the public API for the service. The
51
53
  * contents of this file should be regarded as internal but are documented for completeness.
52
54
  * @module ApiClient
53
- * @version 4.0.1-alpha-4
55
+ * @version 4.0.1-beta-1
54
56
  */
55
57
  var _protocol = /*#__PURE__*/new WeakMap();
56
58
  var _cookie = /*#__PURE__*/new WeakMap();
@@ -60,93 +62,14 @@ var _defaultConnectTimeout = /*#__PURE__*/new WeakMap();
60
62
  var _defaultReadTimeout = /*#__PURE__*/new WeakMap();
61
63
  var _defaultMaxTimeout = /*#__PURE__*/new WeakMap();
62
64
  var _LOG_LEVEL = /*#__PURE__*/new WeakMap();
63
- var _isJsonMime = /*#__PURE__*/new WeakSet();
64
- var _jsonPreferredMime = /*#__PURE__*/new WeakSet();
65
- var _isFileParam = /*#__PURE__*/new WeakSet();
66
- var _normalizeParams = /*#__PURE__*/new WeakSet();
67
- var _applyAuthToRequest = /*#__PURE__*/new WeakSet();
68
- var _wrapErrorInResponse = /*#__PURE__*/new WeakSet();
69
- var _deserialize = /*#__PURE__*/new WeakSet();
70
- var _paginateIfNeeded = /*#__PURE__*/new WeakSet();
71
- var _getValidTimeout = /*#__PURE__*/new WeakSet();
72
- var _updateCookies = /*#__PURE__*/new WeakSet();
73
- var _attachCookies = /*#__PURE__*/new WeakSet();
74
- var _log = /*#__PURE__*/new WeakSet();
75
- var _skipLogging = /*#__PURE__*/new WeakSet();
76
- var _getLocalDateTime = /*#__PURE__*/new WeakSet();
77
- var _flatten = /*#__PURE__*/new WeakSet();
78
- var ApiClient = /*#__PURE__*/function () {
65
+ var _ApiClient_brand = /*#__PURE__*/new WeakSet();
66
+ var ApiClient = exports.ApiClient = /*#__PURE__*/function () {
79
67
  /**
80
68
  * @alias module:ApiClient
81
69
  * @class
82
70
  */
83
71
  function ApiClient() {
84
72
  _classCallCheck(this, ApiClient);
85
- // A mapper function to flatten a simple non-nested (key:value) object to string
86
- _classPrivateMethodInitSpec(this, _flatten);
87
- _classPrivateMethodInitSpec(this, _getLocalDateTime);
88
- _classPrivateMethodInitSpec(this, _skipLogging);
89
- _classPrivateMethodInitSpec(this, _log);
90
- // If enabled, attach saved cookies to request
91
- _classPrivateMethodInitSpec(this, _attachCookies);
92
- // If enabled, update cookie information to reuse in subsequent requests for a valid response
93
- _classPrivateMethodInitSpec(this, _updateCookies);
94
- // Gets a valid timeout
95
- // 1. Sets to provided default timeout in case invalid value is passed
96
- // 2. Sets to default max value of 30 minutes in case a value of more than 30 minutes is passed
97
- _classPrivateMethodInitSpec(this, _getValidTimeout);
98
- /**
99
- * Set pagination data if response is a Paginable object
100
- * @param {Object} data The response data already passed through deserialize
101
- * @param {String} path The path given to callApi method
102
- * @param {Object.<String, Object>} queryParams The queryParams given to callApi method
103
- */
104
- _classPrivateMethodInitSpec(this, _paginateIfNeeded);
105
- /**
106
- * Deserializes an HTTP response body into a value of the specified type.
107
- * @param {Object} response A SuperAgent response object.
108
- * @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
109
- * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
110
- * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
111
- * all properties on <code>data<code> will be converted to this type.
112
- * @returns A value of the specified type.
113
- */
114
- _classPrivateMethodInitSpec(this, _deserialize);
115
- /**
116
- * Wraps errors in generic response format.
117
- * @param {Object} error object encountered during request.
118
- * @returns an error object with wrapped response within error.data .
119
- */
120
- _classPrivateMethodInitSpec(this, _wrapErrorInResponse);
121
- /*
122
- * Applies authentication headers to the request.
123
- * @param {Object} request The request object created by a <code>superagent()</code> call.
124
- * @param {Array.<String>} authNames An array of authentication method names.
125
- */
126
- _classPrivateMethodInitSpec(this, _applyAuthToRequest);
127
- /*
128
- * Normalizes parameter values:
129
- * <ul>
130
- * <li>remove nils</li>
131
- * <li>keep files and arrays</li>
132
- * <li>format to string with `paramToString` for other cases</li>
133
- * </ul>
134
- * @param {Object.<String, Object>} params The parameters as object properties.
135
- * @returns {Object.<String, Object>} normalized parameters.
136
- */
137
- _classPrivateMethodInitSpec(this, _normalizeParams);
138
- /*
139
- * Checks whether the given parameter value represents file-like content.
140
- * @param param The parameter to check.
141
- * @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
142
- */
143
- _classPrivateMethodInitSpec(this, _isFileParam);
144
- /*
145
- * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
146
- * @param {Array.<String>} contentTypes
147
- * @returns {String} The chosen content type, preferring JSON.
148
- */
149
- _classPrivateMethodInitSpec(this, _jsonPreferredMime);
150
73
  /*
151
74
  * Checks whether the given content type represents JSON.<br>
152
75
  * JSON content type examples:<br>
@@ -158,41 +81,17 @@ var ApiClient = /*#__PURE__*/function () {
158
81
  * @param {String} contentType The MIME content type to check.
159
82
  * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
160
83
  */
161
- _classPrivateMethodInitSpec(this, _isJsonMime);
84
+ _classPrivateMethodInitSpec(this, _ApiClient_brand);
162
85
  // PRIVATE VARIABLES
163
- _classPrivateFieldInitSpec(this, _protocol, {
164
- writable: true,
165
- value: void 0
166
- });
167
- _classPrivateFieldInitSpec(this, _cookie, {
168
- writable: true,
169
- value: void 0
170
- });
171
- _classPrivateFieldInitSpec(this, _logger, {
172
- writable: true,
173
- value: void 0
174
- });
175
- _classPrivateFieldInitSpec(this, _verifySslFlag, {
176
- writable: true,
177
- value: void 0
178
- });
179
- _classPrivateFieldInitSpec(this, _defaultConnectTimeout, {
180
- writable: true,
181
- value: void 0
182
- });
183
- _classPrivateFieldInitSpec(this, _defaultReadTimeout, {
184
- writable: true,
185
- value: void 0
186
- });
187
- _classPrivateFieldInitSpec(this, _defaultMaxTimeout, {
188
- writable: true,
189
- value: void 0
190
- });
191
- _classPrivateFieldInitSpec(this, _LOG_LEVEL, {
192
- writable: true,
193
- value: void 0
194
- });
195
- _classPrivateFieldSet(this, _LOG_LEVEL, Object.freeze({
86
+ _classPrivateFieldInitSpec(this, _protocol, void 0);
87
+ _classPrivateFieldInitSpec(this, _cookie, void 0);
88
+ _classPrivateFieldInitSpec(this, _logger, void 0);
89
+ _classPrivateFieldInitSpec(this, _verifySslFlag, void 0);
90
+ _classPrivateFieldInitSpec(this, _defaultConnectTimeout, void 0);
91
+ _classPrivateFieldInitSpec(this, _defaultReadTimeout, void 0);
92
+ _classPrivateFieldInitSpec(this, _defaultMaxTimeout, void 0);
93
+ _classPrivateFieldInitSpec(this, _LOG_LEVEL, void 0);
94
+ _classPrivateFieldSet(_LOG_LEVEL, this, Object.freeze({
196
95
  DEBUG: {
197
96
  key: "DEBUG",
198
97
  value: Symbol(0)
@@ -248,23 +147,23 @@ var ApiClient = /*#__PURE__*/function () {
248
147
  * @default {}
249
148
  */
250
149
  this.defaultHeaders = {};
251
- _classPrivateFieldSet(this, _defaultConnectTimeout, 30000);
252
- _classPrivateFieldSet(this, _defaultReadTimeout, 30000);
253
- _classPrivateFieldSet(this, _defaultMaxTimeout, 1800000);
150
+ _classPrivateFieldSet(_defaultConnectTimeout, this, 30000);
151
+ _classPrivateFieldSet(_defaultReadTimeout, this, 30000);
152
+ _classPrivateFieldSet(_defaultMaxTimeout, this, 1800000);
254
153
 
255
154
  /**
256
155
  * The default HTTP read timeout in milliseconds for all API calls.
257
156
  * @type {Number}
258
157
  * @default 30000
259
158
  */
260
- this.readTimeout = _classPrivateFieldGet(this, _defaultReadTimeout);
159
+ this.readTimeout = _classPrivateFieldGet(_defaultReadTimeout, this);
261
160
 
262
161
  /**
263
162
  * The default HTTP connection timeout in milliseconds for all API calls.
264
163
  * @type {Number}
265
164
  * @default 30000
266
165
  */
267
- this.connectTimeout = _classPrivateFieldGet(this, _defaultConnectTimeout);
166
+ this.connectTimeout = _classPrivateFieldGet(_defaultConnectTimeout, this);
268
167
 
269
168
  /**
270
169
  * If set to false an additional timestamp parameter is added to all API GET calls to
@@ -278,7 +177,7 @@ var ApiClient = /*#__PURE__*/function () {
278
177
  * Saved Cookies
279
178
  * @default null
280
179
  */
281
- _classPrivateFieldSet(this, _cookie, null);
180
+ _classPrivateFieldSet(_cookie, this, null);
282
181
 
283
182
  /**
284
183
  * The maximum number of retry attempts to be made by the client
@@ -307,7 +206,7 @@ var ApiClient = /*#__PURE__*/function () {
307
206
  * Allow SDK to print debug logs
308
207
  */
309
208
  this.debug = false;
310
- _classPrivateFieldSet(this, _logger, null);
209
+ _classPrivateFieldSet(_logger, this, null);
311
210
 
312
211
  /**
313
212
  * Username for basic auth
@@ -318,7 +217,13 @@ var ApiClient = /*#__PURE__*/function () {
318
217
  * Password for basic auth
319
218
  */
320
219
  this.password = null;
321
- _classPrivateFieldSet(this, _verifySslFlag, true);
220
+ _classPrivateFieldSet(_verifySslFlag, this, true);
221
+
222
+ /*
223
+ * Non Browser Environment : path to directory where downloaded files will be stored
224
+ * Browser Environment : WritableStream to pipe downloaded file to
225
+ */
226
+ this.downloadDestination = null;
322
227
 
323
228
  /*
324
229
  * Log file to write activity logs
@@ -330,10 +235,10 @@ var ApiClient = /*#__PURE__*/function () {
330
235
  * Enable/Disable SSL Verification
331
236
  * @param verifySsl (boolean)
332
237
  */
333
- _createClass(ApiClient, [{
238
+ return _createClass(ApiClient, [{
334
239
  key: "verifySsl",
335
240
  get: function get() {
336
- return _classPrivateFieldGet(this, _verifySslFlag);
241
+ return _classPrivateFieldGet(_verifySslFlag, this);
337
242
  }
338
243
 
339
244
  /**
@@ -348,7 +253,7 @@ var ApiClient = /*#__PURE__*/function () {
348
253
  rejectUnauthorized: false
349
254
  });
350
255
  }
351
- _classPrivateFieldSet(this, _verifySslFlag, verifySsl);
256
+ _classPrivateFieldSet(_verifySslFlag, this, verifySsl);
352
257
  }
353
258
  }, {
354
259
  key: "loggerFile",
@@ -359,7 +264,7 @@ var ApiClient = /*#__PURE__*/function () {
359
264
  flags: 'a'
360
265
  });
361
266
  }
362
- _classPrivateFieldSet(this, _logger, new console.Console({
267
+ _classPrivateFieldSet(_logger, this, new console.Console({
363
268
  stdout: logfile,
364
269
  stderr: logfile
365
270
  }));
@@ -375,7 +280,7 @@ var ApiClient = /*#__PURE__*/function () {
375
280
  key: "addDefaultHeader",
376
281
  value: function addDefaultHeader(key, value) {
377
282
  if (key === "Authorization") {
378
- _classPrivateFieldSet(this, _cookie, null);
283
+ _classPrivateFieldSet(_cookie, this, null);
379
284
  }
380
285
  this.defaultHeaders[key] = value;
381
286
  }
@@ -405,10 +310,10 @@ var ApiClient = /*#__PURE__*/function () {
405
310
  }
406
311
 
407
312
  // The protocol of the base URL, including the colon (:).
408
- _classPrivateFieldSet(this, _protocol, typeof self === 'undefined' ? this.scheme + ':' : self.location.protocol);
313
+ _classPrivateFieldSet(_protocol, this, typeof self === 'undefined' ? this.scheme + ':' : self.location.protocol);
409
314
  var basePath = ''; //default
410
- if (_classPrivateFieldGet(this, _protocol) !== '' && this.host !== '' && this.port !== '') {
411
- basePath = _classPrivateFieldGet(this, _protocol) + '\/\/' + this.host + ':' + this.port;
315
+ if (_classPrivateFieldGet(_protocol, this) !== '' && this.host !== '' && this.port !== '') {
316
+ basePath = _classPrivateFieldGet(_protocol, this) + '\/\/' + this.host + ':' + this.port;
412
317
  } else if (typeof self !== "undefined") {
413
318
  basePath = self.origin;
414
319
  }
@@ -454,6 +359,12 @@ var ApiClient = /*#__PURE__*/function () {
454
359
  throw new Error('Unknown collection format: ' + collectionFormat);
455
360
  }
456
361
  }
362
+
363
+ /*
364
+ * Applies authentication headers to the request.
365
+ * @param {Object} request The request object created by a <code>superagent()</code> call.
366
+ * @param {Array.<String>} authNames An array of authentication method names.
367
+ */
457
368
  }, {
458
369
  key: "addEtagToReservedMap",
459
370
  value: function addEtagToReservedMap(response, data) {
@@ -532,19 +443,19 @@ var ApiClient = /*#__PURE__*/function () {
532
443
  };
533
444
 
534
445
  // apply authentications
535
- _classPrivateMethodGet(this, _applyAuthToRequest, _applyAuthToRequest2).call(this, request, authNames);
446
+ _assertClassBrand(_ApiClient_brand, this, _applyAuthToRequest).call(this, request, authNames);
536
447
 
537
448
  // set query parameters
538
449
  if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
539
450
  queryParams['_'] = new Date().getTime();
540
451
  }
541
- request.query(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, queryParams));
452
+ request.query(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, queryParams));
542
453
 
543
454
  // set header parameters
544
- request.set(this.defaultHeaders).set(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, headerParams));
455
+ request.set(this.defaultHeaders).set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, headerParams));
545
456
  if ((this.defaultHeaders['NTNX-Request-Id'] === null || this.defaultHeaders['NTNX-Request-Id'] === undefined) && (headerParams['NTNX-Request-Id'] === null || headerParams['NTNX-Request-Id'] === undefined)) {
546
457
  var requestId = (0, _uuid.v4)();
547
- request.set(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, {
458
+ request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {
548
459
  'NTNX-Request-Id': requestId
549
460
  }));
550
461
  }
@@ -552,8 +463,8 @@ var ApiClient = /*#__PURE__*/function () {
552
463
  // Set User-Agent header only if it is not a browser environment
553
464
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
554
465
  if (!isBrowser) {
555
- request.set(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, {
556
- 'User-Agent': 'Nutanix-dataprotection-js-client/4.0.1-alpha.4'
466
+ request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {
467
+ 'User-Agent': 'Nutanix-dataprotection-js-client/4.0.1-beta.1'
557
468
  }));
558
469
  }
559
470
 
@@ -564,10 +475,10 @@ var ApiClient = /*#__PURE__*/function () {
564
475
 
565
476
  // set request timeouts
566
477
  var timeoutOptions = {};
567
- timeoutOptions["response"] = _classPrivateMethodGet(this, _getValidTimeout, _getValidTimeout2).call(this, this.connectTimeout, _classPrivateFieldGet(this, _defaultConnectTimeout));
568
- timeoutOptions["deadline"] = _classPrivateMethodGet(this, _getValidTimeout, _getValidTimeout2).call(this, this.readTimeout, _classPrivateFieldGet(this, _defaultReadTimeout));
478
+ timeoutOptions["response"] = _assertClassBrand(_ApiClient_brand, this, _getValidTimeout).call(this, this.connectTimeout, _classPrivateFieldGet(_defaultConnectTimeout, this));
479
+ timeoutOptions["deadline"] = _assertClassBrand(_ApiClient_brand, this, _getValidTimeout).call(this, this.readTimeout, _classPrivateFieldGet(_defaultReadTimeout, this));
569
480
  request.timeout(timeoutOptions);
570
- var contentType = _classPrivateMethodGet(this, _jsonPreferredMime, _jsonPreferredMime2).call(this, contentTypes);
481
+ var contentType = headerParams.hasOwnProperty("Content-Type") ? headerParams["Content-Type"] : _assertClassBrand(_ApiClient_brand, this, _jsonPreferredMime).call(this, contentTypes);
571
482
  if (contentType) {
572
483
  // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
573
484
  if (contentType != 'multipart/form-data') {
@@ -576,13 +487,15 @@ var ApiClient = /*#__PURE__*/function () {
576
487
  } else if (!request.header['Content-Type']) {
577
488
  request.type('application/json');
578
489
  }
490
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Request URL :", httpMethod, url);
491
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), "Request Headers :", typeof request.header === "undefined" ? "" : request.header);
579
492
  if (contentType === 'application/x-www-form-urlencoded') {
580
- request.send(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, formParams));
493
+ request.send(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, formParams));
581
494
  } else if (contentType == 'multipart/form-data') {
582
- var _formParams = _classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, formParams);
495
+ var _formParams = _assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, formParams);
583
496
  for (var key in _formParams) {
584
497
  if (_formParams.hasOwnProperty(key)) {
585
- if (_classPrivateMethodGet(this, _isFileParam, _isFileParam2).call(this, _formParams[key])) {
498
+ if (_assertClassBrand(_ApiClient_brand, this, _isFileParam).call(this, _formParams[key])) {
586
499
  // file field
587
500
  request.attach(key, _formParams[key]);
588
501
  } else {
@@ -590,58 +503,227 @@ var ApiClient = /*#__PURE__*/function () {
590
503
  }
591
504
  }
592
505
  }
506
+ } else if (contentType === 'application/octet-stream' && bodyParam !== null && typeof bodyParam !== 'undefined' && typeof bodyParam.pipe === 'function') {
507
+ // FILE UPLOAD SUPPORT
508
+
509
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Piping octet-stream request");
510
+ if (typeof bodyParam.pipe === 'function') {
511
+ bodyParam.pipe(request);
512
+ } else if (typeof require === 'function') {
513
+ var webstream;
514
+ try {
515
+ webstream = require('stream/web');
516
+ } catch (err) {
517
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, "Error fetching steam/web");
518
+ }
519
+ if (bodyParam instanceof webstream.ReadableStream) {
520
+ bodyParam.pipeTo(new webstream.WritableStream({
521
+ write: function write(chunk) {
522
+ request.write(chunk);
523
+ },
524
+ close: function close() {
525
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "READABLE STREAM CLOSED");
526
+ },
527
+ abort: function abort(err) {
528
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, "READABLE STREAM ABORTED");
529
+ }
530
+ }));
531
+ } else {
532
+ request.send(bodyParam);
533
+ }
534
+ } else {
535
+ request.send(bodyParam);
536
+ }
537
+ return new Promise(function (resolve, reject) {
538
+ request.on('error', function (err) {
539
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught the following error :", err);
540
+ reject(err);
541
+ }).on('response', function (response) {
542
+ _assertClassBrand(_ApiClient_brand, _this2, _handleApiResponseForPromise).call(_this2, response, path, queryParams, returnType, resolve, reject);
543
+ });
544
+ });
593
545
  } else if (bodyParam) {
594
546
  request.send(bodyParam);
595
547
  }
596
- var accept = _classPrivateMethodGet(this, _jsonPreferredMime, _jsonPreferredMime2).call(this, accepts);
597
- if (accept) {
598
- request.accept(accept);
599
- }
600
- if (returnType === 'Blob') {
548
+ if (typeof returnType === 'Blob') {
601
549
  request.responseType('blob');
602
550
  } else if (returnType === 'String') {
603
551
  request.responseType('string');
604
552
  }
605
- _classPrivateMethodGet(this, _attachCookies, _attachCookies2).call(this, request);
606
- _classPrivateMethodGet(this, _log, _log2).call(this, _classPrivateFieldGet(this, _LOG_LEVEL).INFO, null, "Request URL :", httpMethod, url);
607
- _classPrivateMethodGet(this, _log, _log2).call(this, _classPrivateFieldGet(this, _LOG_LEVEL).DEBUG, _classPrivateMethodGet(this, _flatten, _flatten2), "Request Headers :", typeof request.header === "undefined" ? "" : request.header);
608
- _classPrivateMethodGet(this, _log, _log2).call(this, _classPrivateFieldGet(this, _LOG_LEVEL).DEBUG, null, "Request Body :", typeof request._data === "undefined" ? "" : request._data);
553
+ _assertClassBrand(_ApiClient_brand, this, _attachCookies).call(this, request);
554
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Request Body :", typeof request._data === "undefined" ? "" : request._data);
555
+ var accept = headerParams.hasOwnProperty("Accept") ? headerParams["Accept"] : _assertClassBrand(_ApiClient_brand, this, _jsonPreferredMime).call(this, accepts);
556
+ var fetchStream = headerParams.hasOwnProperty("Accept") && headerParams["Accept"] === "application/octet-stream" || accepts.length == 1 && accepts[0] === "application/octet-stream";
557
+
558
+ /*
559
+ * 4xx 5xx auto generated responses always append 'application/json' to accepts array
560
+ * octet-stream will be overlooked during jsonPreferredMime call, therefore additional check added
561
+ */
562
+ if (fetchStream) {
563
+ // FILE DOWNLOAD SUPPORT
564
+
565
+ request.accept('application/octet-stream');
566
+ request.buffer(false);
567
+ return new Promise(function (resolve, reject) {
568
+ var tempFilename = null;
569
+
570
+ /*
571
+ * Browser environment :
572
+ * uses Web Streams, downloadDestination expected to be a WritableStream (i.e. sink for response to be streamed to)
573
+ * Node.js environment :
574
+ * uses File System, downloadDestination expected to be a directory path, file is downloaded to this directory
575
+ */
576
+
577
+ if (isBrowser) {
578
+ /*
579
+ * Browser environment :
580
+ * - fetch webstream module
581
+ * - write file to WritableStream downloadDestination
582
+ * - if webstream if not available or downloadDestination is not instance of WritableStream
583
+ * code flow goes to main request.then execution
584
+ */
585
+
586
+ if (typeof require === 'function') {
587
+ var _webstream;
588
+ try {
589
+ _webstream = require('stream/web');
590
+ } catch (err) {
591
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Error fetching steam/web");
592
+ }
593
+ if (_this2.downloadDestination instanceof _webstream.WritableStream) {
594
+ // Piping Data
595
+ var writer = _this2.downloadDestination.getWriter();
596
+ try {
597
+ request.on('data', function (chunk) {
598
+ writer.write(chunk);
599
+ });
600
+ } catch (err) {
601
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Issue while downloading file", err);
602
+ }
603
+
604
+ // Receiving Response in case of 4xx 5xx
605
+ request.on('response', function (response) {
606
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Response Status :", response.status);
607
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, _assertClassBrand(_ApiClient_brand, _this2, _flatten), "Response Headers :", response.headers);
608
+ var data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, response, returnType);
609
+ resolve({
610
+ data: data,
611
+ response: response
612
+ });
613
+ }).on('error', function (err) {
614
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Caught the following error :", err);
615
+ reject(err);
616
+ });
617
+ } else {
618
+ var errMsg = "Incompatible downloadDestination for Browser Environment, must be WritableStream";
619
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, errMsg);
620
+ reject(errMsg);
621
+ }
622
+ }
623
+ } else {
624
+ /*
625
+ * Non Browser environment :
626
+ * - stream data to file
627
+ * - fetch response headers and body (if exists)
628
+ * - return in case of error or after stream finish
629
+ *
630
+ * NOTE :
631
+ * superagent does not provide access to headers before pipe, therefore response is piped to
632
+ * file with temporary name, which is renamed to proper filename after Content-Disposition header is available
633
+ */
634
+
635
+ // Sanitizing downloadDestination
636
+ if (_this2.downloadDestination === null || typeof _this2.downloadDestination === 'undefined' || typeof _this2.downloadDestination !== 'string') {
637
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Incompatible downloadDestination must be string, is", _this2.downloadDestination);
638
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Downloading file to base directory");
639
+ _this2.downloadDestination = ".";
640
+ }
641
+
642
+ // Piping data to temporary file
643
+ tempFilename = _this2.downloadDestination + '/downloaded_file_' + Date.now() + '.txt'; // temporary filename
644
+ var stream = _fs2["default"].createWriteStream(tempFilename);
645
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Streaming response to : ", tempFilename);
646
+ request.pipe(stream);
647
+
648
+ // Receiving response (json response for 4xx 5xx, or Component-Disposition header for successful pipe)
649
+ request.on('response', function (response) {
650
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Response Status :", response.status);
651
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, _assertClassBrand(_ApiClient_brand, _this2, _flatten), "Response Headers :", response.headers);
652
+
653
+ // deserialize response if any
654
+ var data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, response, returnType);
655
+ if (!response.ok) {
656
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, data);
657
+ reject(_objectSpread(_objectSpread({}, response.error), {}, {
658
+ data: data
659
+ }));
660
+ }
661
+
662
+ // Fetch filename
663
+ var filename = "";
664
+ if (typeof response.headers['content-disposition'] !== 'undefined' && response.headers['content-disposition'] !== null) {
665
+ var match = response.headers['content-disposition'].match( /*#__PURE__*/_wrapRegExp(/.*filename="(.*)".*/, {
666
+ filename: 1
667
+ }));
668
+ var filepath = _path["default"].parse(match.groups['filename']);
669
+ filename = _this2.downloadDestination + '/' + filepath.name + '_' + Date.now() + filepath.ext;
670
+ if (typeof data === 'undefined') {
671
+ data = new returnType();
672
+ data.data = {
673
+ "path": _path["default"].parse(filename),
674
+ $objectType: "Path"
675
+ };
676
+ }
677
+ }
678
+ stream.on('finish', function () {
679
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Finished streaming response");
680
+ if (filename.length !== 0) {
681
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).INFO, null, "Content-Disposition header found [", filename, "] is final filename");
682
+ stream.close();
683
+ _fs2["default"].rename(tempFilename, filename, function () {
684
+ resolve({
685
+ data: data,
686
+ response: response
687
+ });
688
+ });
689
+ } else {
690
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Content-Disposition header not found [", tempFilename, "] is final filename");
691
+ resolve({
692
+ data: data,
693
+ response: response
694
+ });
695
+ }
696
+ }).on('error', function (err) {
697
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Caught the following error :", err);
698
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, error);
699
+ reject(err);
700
+ });
701
+ }).on('error', function (error) {
702
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, "Caught the following error :", err);
703
+ if (error.response !== null && typeof error.response !== 'undefined') {
704
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, error.response, returnType);
705
+ } else {
706
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, error);
707
+ }
708
+ reject(error);
709
+ });
710
+ }
711
+ });
712
+ } else if (accept) {
713
+ request.accept(accept);
714
+ }
609
715
  return new Promise(function (resolve, reject) {
610
716
  request.on('error', function (err) {
611
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).DEBUG, null, "Caught the following error :", err);
717
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught the following error :", err);
612
718
  }).retry(_this2.maxRetryAttempts, _this2.retryInterval, []).then(function (response) {
613
- try {
614
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).INFO, null, "Response Status :", response.status);
615
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).DEBUG, _classPrivateMethodGet(_this2, _flatten, _flatten2), "Response Headers :", response.headers);
616
- _classPrivateMethodGet(_this2, _updateCookies, _updateCookies2).call(_this2, response || {});
617
- var data = _classPrivateMethodGet(_this2, _deserialize, _deserialize2).call(_this2, response, returnType);
618
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).DEBUG, null, "Response Body :", data);
619
- if (response.ok) {
620
- _this2.addEtagToReservedMap(response, data);
621
- _classPrivateMethodGet(_this2, _paginateIfNeeded, _paginateIfNeeded2).call(_this2, data, path, queryParams);
622
- resolve({
623
- data: data,
624
- response: response
625
- });
626
- } else {
627
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).ERROR, null, data);
628
- reject(_objectSpread(_objectSpread({}, response.error), {}, {
629
- data: data
630
- }));
631
- }
632
- } catch (err) {
633
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).DEBUG, null, "Caught error while processing response!");
634
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).ERROR, null, err);
635
- err.data = _classPrivateMethodGet(_this2, _wrapErrorInResponse, _wrapErrorInResponse2).call(_this2, err);
636
- reject(err);
637
- }
719
+ _assertClassBrand(_ApiClient_brand, _this2, _handleApiResponseForPromise).call(_this2, response, path, queryParams, returnType, resolve, reject);
638
720
  })["catch"](function (error) {
639
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).DEBUG, null, "Caught error during the request!");
640
- _classPrivateMethodGet(_this2, _log, _log2).call(_this2, _classPrivateFieldGet(_this2, _LOG_LEVEL).ERROR, null, error);
721
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).DEBUG, null, "Caught error during the request!");
722
+ _assertClassBrand(_ApiClient_brand, _this2, _log).call(_this2, _classPrivateFieldGet(_LOG_LEVEL, _this2).ERROR, null, error);
641
723
  if (error.response !== null && typeof error.response !== 'undefined') {
642
- error.data = _classPrivateMethodGet(_this2, _deserialize, _deserialize2).call(_this2, error.response, returnType);
724
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _deserialize).call(_this2, error.response, returnType);
643
725
  } else {
644
- error.data = _classPrivateMethodGet(_this2, _wrapErrorInResponse, _wrapErrorInResponse2).call(_this2, error);
726
+ error.data = _assertClassBrand(_ApiClient_brand, _this2, _wrapErrorInResponse).call(_this2, error);
645
727
  }
646
728
  reject(error);
647
729
  });
@@ -673,6 +755,10 @@ var ApiClient = /*#__PURE__*/function () {
673
755
  }
674
756
  return null;
675
757
  }
758
+
759
+ // Gets a valid timeout
760
+ // 1. Sets to provided default timeout in case invalid value is passed
761
+ // 2. Sets to default max value of 30 minutes in case a value of more than 30 minutes is passed
676
762
  }, {
677
763
  key: "addEtagReferenceToHeader",
678
764
  value: function addEtagReferenceToHeader(bodyParam, headerParams) {
@@ -810,27 +896,35 @@ var ApiClient = /*#__PURE__*/function () {
810
896
  }
811
897
  }
812
898
  }]);
813
- return ApiClient;
814
899
  }();
815
900
  /**
816
901
  * The default API client implementation.
817
902
  * @type {ApiClient}
818
903
  * @memberOf ApiClient
819
904
  */
820
- exports.ApiClient = ApiClient;
821
- _class = ApiClient;
822
- function _isJsonMime2(contentType) {
905
+ _ApiClient = ApiClient;
906
+ function _isJsonMime(contentType) {
823
907
  return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
824
908
  }
825
- function _jsonPreferredMime2(contentTypes) {
909
+ /*
910
+ * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
911
+ * @param {Array.<String>} contentTypes
912
+ * @returns {String} The chosen content type, preferring JSON.
913
+ */
914
+ function _jsonPreferredMime(contentTypes) {
826
915
  for (var i = 0; i < contentTypes.length; i++) {
827
- if (_classPrivateMethodGet(this, _isJsonMime, _isJsonMime2).call(this, contentTypes[i])) {
916
+ if (_assertClassBrand(_ApiClient_brand, this, _isJsonMime).call(this, contentTypes[i])) {
828
917
  return contentTypes[i];
829
918
  }
830
919
  }
831
920
  return contentTypes[0];
832
921
  }
833
- function _isFileParam2(param) {
922
+ /*
923
+ * Checks whether the given parameter value represents file-like content.
924
+ * @param param The parameter to check.
925
+ * @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
926
+ */
927
+ function _isFileParam(param) {
834
928
  // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
835
929
  if (typeof require === 'function') {
836
930
  var _fs;
@@ -848,7 +942,7 @@ function _isFileParam2(param) {
848
942
  }
849
943
 
850
944
  // Blob in browser
851
- if (typeof Blob === 'function' && param instanceof Blob) {
945
+ if (typeof _buffer.Blob === 'function' && param instanceof _buffer.Blob) {
852
946
  return true;
853
947
  }
854
948
 
@@ -858,12 +952,22 @@ function _isFileParam2(param) {
858
952
  }
859
953
  return false;
860
954
  }
861
- function _normalizeParams2(params) {
955
+ /*
956
+ * Normalizes parameter values:
957
+ * <ul>
958
+ * <li>remove nils</li>
959
+ * <li>keep files and arrays</li>
960
+ * <li>format to string with `paramToString` for other cases</li>
961
+ * </ul>
962
+ * @param {Object.<String, Object>} params The parameters as object properties.
963
+ * @returns {Object.<String, Object>} normalized parameters.
964
+ */
965
+ function _normalizeParams(params) {
862
966
  var newParams = {};
863
967
  for (var key in params) {
864
968
  if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
865
969
  var value = params[key];
866
- if (_classPrivateMethodGet(this, _isFileParam, _isFileParam2).call(this, value) || Array.isArray(value)) {
970
+ if (_assertClassBrand(_ApiClient_brand, this, _isFileParam).call(this, value) || Array.isArray(value)) {
867
971
  newParams[key] = value;
868
972
  } else {
869
973
  newParams[key] = this.paramToString(value);
@@ -872,7 +976,7 @@ function _normalizeParams2(params) {
872
976
  }
873
977
  return newParams;
874
978
  }
875
- function _applyAuthToRequest2(request, authNames) {
979
+ function _applyAuthToRequest(request, authNames) {
876
980
  var _this3 = this;
877
981
  authNames.forEach(function (authName) {
878
982
  var auth = _this3.authentications[authName];
@@ -883,7 +987,7 @@ function _applyAuthToRequest2(request, authNames) {
883
987
  } else if (_this3.username || _this3.password) {
884
988
  request.auth(_this3.username || '', _this3.password || '');
885
989
  }
886
- _classPrivateMethodGet(_this3, _log, _log2).call(_this3, _classPrivateFieldGet(_this3, _LOG_LEVEL).DEBUG, null, "Basic Auth applied to request");
990
+ _assertClassBrand(_ApiClient_brand, _this3, _log).call(_this3, _classPrivateFieldGet(_LOG_LEVEL, _this3).DEBUG, null, "Basic Auth applied to request");
887
991
  break;
888
992
  case 'apiKey':
889
993
  if (auth.apiKey) {
@@ -899,7 +1003,7 @@ function _applyAuthToRequest2(request, authNames) {
899
1003
  request.query(data);
900
1004
  }
901
1005
  }
902
- _classPrivateMethodGet(_this3, _log, _log2).call(_this3, _classPrivateFieldGet(_this3, _LOG_LEVEL).DEBUG, null, "apiKey applied to request");
1006
+ _assertClassBrand(_ApiClient_brand, _this3, _log).call(_this3, _classPrivateFieldGet(_LOG_LEVEL, _this3).DEBUG, null, "apiKey applied to request");
903
1007
  break;
904
1008
  case 'oauth2':
905
1009
  if (auth.accessToken) {
@@ -907,15 +1011,20 @@ function _applyAuthToRequest2(request, authNames) {
907
1011
  'Authorization': 'Bearer ' + auth.accessToken
908
1012
  });
909
1013
  }
910
- _classPrivateMethodGet(_this3, _log, _log2).call(_this3, _classPrivateFieldGet(_this3, _LOG_LEVEL).DEBUG, null, "oauth2 applied to request");
1014
+ _assertClassBrand(_ApiClient_brand, _this3, _log).call(_this3, _classPrivateFieldGet(_LOG_LEVEL, _this3).DEBUG, null, "oauth2 applied to request");
911
1015
  break;
912
1016
  default:
913
- _classPrivateMethodGet(_this3, _log, _log2).call(_this3, _classPrivateFieldGet(_this3, _LOG_LEVEL).ERROR, null, "Unknown authentication type:", auth.type);
1017
+ _assertClassBrand(_ApiClient_brand, _this3, _log).call(_this3, _classPrivateFieldGet(_LOG_LEVEL, _this3).ERROR, null, "Unknown authentication type:", auth.type);
914
1018
  throw new Error('Unknown authentication type: ' + auth.type);
915
1019
  }
916
1020
  });
917
1021
  }
918
- function _wrapErrorInResponse2(error) {
1022
+ /**
1023
+ * Wraps errors in generic response format.
1024
+ * @param {Object} error object encountered during request.
1025
+ * @returns an error object with wrapped response within error.data .
1026
+ */
1027
+ function _wrapErrorInResponse(error) {
919
1028
  var response = {
920
1029
  data: {},
921
1030
  metadata: {}
@@ -923,7 +1032,16 @@ function _wrapErrorInResponse2(error) {
923
1032
  response.data.status = error.status;
924
1033
  response.data.message = error.message;
925
1034
  }
926
- function _deserialize2(response, returnType) {
1035
+ /**
1036
+ * Deserializes an HTTP response body into a value of the specified type.
1037
+ * @param {Object} response A SuperAgent response object.
1038
+ * @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
1039
+ * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
1040
+ * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
1041
+ * all properties on <code>data<code> will be converted to this type.
1042
+ * @returns A value of the specified type.
1043
+ */
1044
+ function _deserialize(response, returnType) {
927
1045
  if (response == null || returnType == null || response.status == 204) {
928
1046
  return null;
929
1047
  }
@@ -935,9 +1053,15 @@ function _deserialize2(response, returnType) {
935
1053
  // SuperAgent does not always produce a body; use the unparsed response as a fallback
936
1054
  data = response.text;
937
1055
  }
938
- return _class.convertToType(data, returnType);
1056
+ return _ApiClient.convertToType(data, returnType);
939
1057
  }
940
- function _paginateIfNeeded2(data, path, queryParams) {
1058
+ /**
1059
+ * Set pagination data if response is a Paginable object
1060
+ * @param {Object} data The response data already passed through deserialize
1061
+ * @param {String} path The path given to callApi method
1062
+ * @param {Object.<String, Object>} queryParams The queryParams given to callApi method
1063
+ */
1064
+ function _paginateIfNeeded(data, path, queryParams) {
941
1065
  // If response is not a Paginable instance, nothing to do
942
1066
  if (!(data instanceof _Paginable["default"])) {
943
1067
  return;
@@ -952,15 +1076,16 @@ function _paginateIfNeeded2(data, path, queryParams) {
952
1076
  // current ApiClient instance
953
1077
  page, resultsPerPage);
954
1078
  }
955
- function _getValidTimeout2(timeout, defaultTimeout) {
1079
+ function _getValidTimeout(timeout, defaultTimeout) {
956
1080
  if (timeout <= 0) {
957
1081
  timeout = defaultTimeout;
958
- } else if (timeout > _classPrivateFieldGet(this, _defaultMaxTimeout)) {
959
- timeout = _classPrivateFieldGet(this, _defaultMaxTimeout);
1082
+ } else if (timeout > _classPrivateFieldGet(_defaultMaxTimeout, this)) {
1083
+ timeout = _classPrivateFieldGet(_defaultMaxTimeout, this);
960
1084
  }
961
1085
  return timeout;
962
1086
  }
963
- function _updateCookies2(response) {
1087
+ // If enabled, update cookie information to reuse in subsequent requests for a valid response
1088
+ function _updateCookies(response) {
964
1089
  if (response.hasOwnProperty("headers") && response.headers.hasOwnProperty("set-cookie")) {
965
1090
  var finalCookie = "";
966
1091
  var cookieList = response.headers["set-cookie"];
@@ -987,46 +1112,47 @@ function _updateCookies2(response) {
987
1112
  finalCookie = finalCookie.substr(0, finalCookie.length - 1);
988
1113
  }
989
1114
  }
990
- _classPrivateFieldSet(this, _cookie, finalCookie);
991
- _classPrivateMethodGet(this, _log, _log2).call(this, _classPrivateFieldGet(this, _LOG_LEVEL).DEBUG, null, "Retained cookie :", finalCookie);
1115
+ _classPrivateFieldSet(_cookie, this, finalCookie);
1116
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Retained cookie :", finalCookie);
992
1117
  } else {
993
- _classPrivateFieldSet(this, _cookie, null);
1118
+ _classPrivateFieldSet(_cookie, this, null);
994
1119
  }
995
1120
  }
996
- function _attachCookies2(request) {
997
- if (_classPrivateFieldGet(this, _cookie) != null) {
998
- request.set(_classPrivateMethodGet(this, _normalizeParams, _normalizeParams2).call(this, {
999
- 'Cookie': _classPrivateFieldGet(this, _cookie)
1121
+ // If enabled, attach saved cookies to request
1122
+ function _attachCookies(request) {
1123
+ if (_classPrivateFieldGet(_cookie, this) != null) {
1124
+ request.set(_assertClassBrand(_ApiClient_brand, this, _normalizeParams).call(this, {
1125
+ 'Cookie': _classPrivateFieldGet(_cookie, this)
1000
1126
  }));
1001
1127
  }
1002
1128
  }
1003
- function _log2(level, mapper) {
1129
+ function _log(level, mapper) {
1004
1130
  for (var _len = arguments.length, messages = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1005
1131
  messages[_key - 2] = arguments[_key];
1006
1132
  }
1007
1133
  // Set default log level to INFO
1008
1134
  if (_typeof(level) !== "object" || !("key" in level) || !("value" in level) || _typeof(level["value"]) !== "symbol") {
1009
- level = _classPrivateFieldGet(this, _LOG_LEVEL).INFO;
1135
+ level = _classPrivateFieldGet(_LOG_LEVEL, this).INFO;
1010
1136
  }
1011
- if (!_classPrivateMethodGet(this, _skipLogging, _skipLogging2).call(this, level)) {
1137
+ if (!_assertClassBrand(_ApiClient_brand, this, _skipLogging).call(this, level)) {
1012
1138
  // Preprocess message to prefix with timestamp and log level
1013
1139
  messages = messages.map(function (message) {
1014
1140
  return typeof message === "string" ? message : mapper ? mapper(message) : JSON.stringify(message);
1015
1141
  });
1016
1142
  var message = messages.join(' ');
1017
- message = _classPrivateMethodGet(this, _getLocalDateTime, _getLocalDateTime2).call(this) + ' ' + level.key + ' - ' + message;
1018
- if (typeof _classPrivateFieldGet(this, _logger) !== "undefined" && _classPrivateFieldGet(this, _logger) !== null && typeof _classPrivateFieldGet(this, _logger).log === 'function') {
1019
- _classPrivateFieldGet(this, _logger).log(message);
1143
+ message = _assertClassBrand(_ApiClient_brand, this, _getLocalDateTime).call(this) + ' ' + level.key + ' - ' + message;
1144
+ if (typeof _classPrivateFieldGet(_logger, this) !== "undefined" && _classPrivateFieldGet(_logger, this) !== null && typeof _classPrivateFieldGet(_logger, this).log === 'function') {
1145
+ _classPrivateFieldGet(_logger, this).log(message);
1020
1146
  } else {
1021
1147
  console.log(message);
1022
1148
  }
1023
1149
  }
1024
1150
  }
1025
- function _skipLogging2(level) {
1151
+ function _skipLogging(level) {
1026
1152
  // Skip logging if log level is DEBUG but debug is not enabled.
1027
- return !this.debug && level === _classPrivateFieldGet(this, _LOG_LEVEL).DEBUG;
1153
+ return !this.debug && level === _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG;
1028
1154
  }
1029
- function _getLocalDateTime2() {
1155
+ function _getLocalDateTime() {
1030
1156
  // Current epoch UTC time in milliseconds
1031
1157
  var epochTime = Date.now();
1032
1158
 
@@ -1041,7 +1167,8 @@ function _getLocalDateTime2() {
1041
1167
  var date = new Date(epochTime - timezoneOffsetInMilliseconds);
1042
1168
  return date.toISOString().slice(0, 23);
1043
1169
  }
1044
- function _flatten2(obj) {
1170
+ // A mapper function to flatten a simple non-nested (key:value) object to string
1171
+ function _flatten(obj) {
1045
1172
  if (_typeof(obj) !== "object") {
1046
1173
  return obj;
1047
1174
  }
@@ -1053,4 +1180,32 @@ function _flatten2(obj) {
1053
1180
  }
1054
1181
  return output === '\n' ? obj : output;
1055
1182
  }
1183
+ // handle and deserialize received response
1184
+ function _handleApiResponseForPromise(response, path, queryParams, returnType, resolve, reject) {
1185
+ try {
1186
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).INFO, null, "Response Status :", response.status);
1187
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, _assertClassBrand(_ApiClient_brand, this, _flatten), "Response Headers :", response.headers);
1188
+ _assertClassBrand(_ApiClient_brand, this, _updateCookies).call(this, response || {});
1189
+ var data = _assertClassBrand(_ApiClient_brand, this, _deserialize).call(this, response, returnType);
1190
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Response Body :", data);
1191
+ if (response.ok) {
1192
+ this.addEtagToReservedMap(response, data);
1193
+ _assertClassBrand(_ApiClient_brand, this, _paginateIfNeeded).call(this, data, path, queryParams);
1194
+ resolve({
1195
+ data: data,
1196
+ response: response
1197
+ });
1198
+ } else {
1199
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, data);
1200
+ reject(_objectSpread(_objectSpread({}, response.error), {}, {
1201
+ data: data
1202
+ }));
1203
+ }
1204
+ } catch (err) {
1205
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).DEBUG, null, "Caught error while processing response!");
1206
+ _assertClassBrand(_ApiClient_brand, this, _log).call(this, _classPrivateFieldGet(_LOG_LEVEL, this).ERROR, null, err);
1207
+ err.data = _assertClassBrand(_ApiClient_brand, this, _wrapErrorInResponse).call(this, err);
1208
+ reject(err);
1209
+ }
1210
+ }
1056
1211
  ApiClient.instance = new ApiClient();