@nexgencloud/hyperstack-sdk-javascript 1.22.0-alpha

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 (392) hide show
  1. package/README.md +640 -0
  2. package/dist/ApiClient.js +710 -0
  3. package/dist/api/AliveApi.js +75 -0
  4. package/dist/api/ApiKeyApi.js +209 -0
  5. package/dist/api/AssigningMemberRoleApi.js +136 -0
  6. package/dist/api/AuthApi.js +79 -0
  7. package/dist/api/BillingApi.js +974 -0
  8. package/dist/api/CalculateApi.js +94 -0
  9. package/dist/api/CallbacksApi.js +318 -0
  10. package/dist/api/ClusterEventsApi.js +85 -0
  11. package/dist/api/ClustersApi.js +269 -0
  12. package/dist/api/ComplianceApi.js +202 -0
  13. package/dist/api/CreditApi.js +77 -0
  14. package/dist/api/CustomerContractApi.js +183 -0
  15. package/dist/api/DashboardApi.js +79 -0
  16. package/dist/api/DeploymentApi.js +195 -0
  17. package/dist/api/EnvironmentApi.js +264 -0
  18. package/dist/api/FirewallAttachmentApi.js +92 -0
  19. package/dist/api/FirewallsApi.js +317 -0
  20. package/dist/api/FlavorApi.js +86 -0
  21. package/dist/api/FloatingIpApi.js +128 -0
  22. package/dist/api/GpuApi.js +79 -0
  23. package/dist/api/ImageApi.js +231 -0
  24. package/dist/api/InviteApi.js +162 -0
  25. package/dist/api/KeypairApi.js +224 -0
  26. package/dist/api/OrganizationApi.js +161 -0
  27. package/dist/api/PaymentApi.js +116 -0
  28. package/dist/api/PermissionApi.js +79 -0
  29. package/dist/api/PolicyApi.js +79 -0
  30. package/dist/api/PricebookApi.js +75 -0
  31. package/dist/api/ProfileApi.js +203 -0
  32. package/dist/api/RbacRoleApi.js +251 -0
  33. package/dist/api/RegionApi.js +79 -0
  34. package/dist/api/SecurityRulesApi.js +79 -0
  35. package/dist/api/SnapshotEventsApi.js +85 -0
  36. package/dist/api/SnapshotsApi.js +316 -0
  37. package/dist/api/StockApi.js +79 -0
  38. package/dist/api/TemplateApi.js +280 -0
  39. package/dist/api/UserApi.js +153 -0
  40. package/dist/api/UserDetailChoiceApi.js +79 -0
  41. package/dist/api/UserPermissionApi.js +120 -0
  42. package/dist/api/VirtualMachineApi.js +861 -0
  43. package/dist/api/VirtualMachineEventsApi.js +87 -0
  44. package/dist/api/VncUrlApi.js +132 -0
  45. package/dist/api/VolumeApi.js +295 -0
  46. package/dist/api/VolumeAttachmentApi.js +143 -0
  47. package/dist/index.js +2729 -0
  48. package/dist/model/AddUpdateFlavorOrganizationPayload.js +242 -0
  49. package/dist/model/AddUserInfoSuccessResponseModel.js +111 -0
  50. package/dist/model/AllocatedGPUCountGraph.js +97 -0
  51. package/dist/model/ApiKeyFields.js +129 -0
  52. package/dist/model/ApiKeyVerifyFields.js +117 -0
  53. package/dist/model/AssignRbacRolePayload.js +108 -0
  54. package/dist/model/AttachCallbackPayload.js +112 -0
  55. package/dist/model/AttachCallbackResponse.js +109 -0
  56. package/dist/model/AttachFirewallWithVM.js +112 -0
  57. package/dist/model/AttachFirewallsToVMPayload.js +113 -0
  58. package/dist/model/AttachVolumeFields.js +121 -0
  59. package/dist/model/AttachVolumes.js +130 -0
  60. package/dist/model/AttachVolumesPayload.js +89 -0
  61. package/dist/model/AuthGetTokenResponseModel.js +119 -0
  62. package/dist/model/AuthRequestLoginFields.js +101 -0
  63. package/dist/model/AuthRequestLoginResponseModel.js +111 -0
  64. package/dist/model/AuthUserFields.js +121 -0
  65. package/dist/model/AuthUserInfoResponseModel.js +111 -0
  66. package/dist/model/BillingImmuneResourcesResponse.js +111 -0
  67. package/dist/model/BillingResponse.js +130 -0
  68. package/dist/model/Billingmetricesfields.js +173 -0
  69. package/dist/model/Billingmetricesresponse.js +130 -0
  70. package/dist/model/ClusterEvents.js +130 -0
  71. package/dist/model/ClusterEventsFields.js +165 -0
  72. package/dist/model/ClusterFields.js +211 -0
  73. package/dist/model/ClusterListResponse.js +130 -0
  74. package/dist/model/ClusterResponse.js +111 -0
  75. package/dist/model/ClusterVersions.js +109 -0
  76. package/dist/model/CommonResponseModel.js +97 -0
  77. package/dist/model/ComplianceFields.js +125 -0
  78. package/dist/model/ComplianceModelFields.js +141 -0
  79. package/dist/model/CompliancePayload.js +166 -0
  80. package/dist/model/ComplianceResponse.js +111 -0
  81. package/dist/model/ContainerOverviewFields.js +117 -0
  82. package/dist/model/Contract.js +158 -0
  83. package/dist/model/ContractBillingHistory.js +105 -0
  84. package/dist/model/ContractBillingHistoryResponseAttributes.js +149 -0
  85. package/dist/model/ContractBillingHistoryResponseModel.js +111 -0
  86. package/dist/model/ContractChangePayload.js +166 -0
  87. package/dist/model/ContractDiscountPlanFields.js +165 -0
  88. package/dist/model/ContractEligibleInstanceFields.js +153 -0
  89. package/dist/model/ContractEligibleInstancesResponse.js +138 -0
  90. package/dist/model/ContractEventCreateModel.js +143 -0
  91. package/dist/model/ContractGPUAllocationGraphResponse.js +111 -0
  92. package/dist/model/ContractInstanceFields.js +153 -0
  93. package/dist/model/ContractInstancesResponse.js +130 -0
  94. package/dist/model/ContractResourcePayload.js +146 -0
  95. package/dist/model/ContractlBillingHistoryResponseMetrics.js +85 -0
  96. package/dist/model/CreateClusterPayload.js +206 -0
  97. package/dist/model/CreateContractFields.js +170 -0
  98. package/dist/model/CreateContractPayload.js +178 -0
  99. package/dist/model/CreateDiscountResponse.js +111 -0
  100. package/dist/model/CreateDiscountsPayload.js +192 -0
  101. package/dist/model/CreateEnvironment.js +128 -0
  102. package/dist/model/CreateFirewallPayload.js +137 -0
  103. package/dist/model/CreateFirewallRulePayload.js +314 -0
  104. package/dist/model/CreateGPU.js +137 -0
  105. package/dist/model/CreateImage.js +105 -0
  106. package/dist/model/CreateImagePayload.js +126 -0
  107. package/dist/model/CreateInstancesPayload.js +320 -0
  108. package/dist/model/CreateInstancesResponse.js +130 -0
  109. package/dist/model/CreateProfilePayload.js +139 -0
  110. package/dist/model/CreateProfileResponse.js +111 -0
  111. package/dist/model/CreateSecurityRulePayload.js +312 -0
  112. package/dist/model/CreateSnapshotPayload.js +152 -0
  113. package/dist/model/CreateSnapshotResponse.js +111 -0
  114. package/dist/model/CreateUpdateComplianceResponse.js +111 -0
  115. package/dist/model/CreateUpdatePermissionPayload.js +154 -0
  116. package/dist/model/CreateUpdatePermissionResponseModel.js +111 -0
  117. package/dist/model/CreateUpdatePolicyPayload.js +150 -0
  118. package/dist/model/CreateUpdatePolicyResponseModel.js +111 -0
  119. package/dist/model/CreateUpdateRbacRolePayload.js +152 -0
  120. package/dist/model/CreateVolumePayload.js +189 -0
  121. package/dist/model/Creditrechargelimitfield.js +109 -0
  122. package/dist/model/Creditrechargelimitresponse.js +130 -0
  123. package/dist/model/Creditrequestresponse.js +130 -0
  124. package/dist/model/Creditrequests.js +125 -0
  125. package/dist/model/CustomerContractDetailResponseModel.js +111 -0
  126. package/dist/model/CustomerContractFields.js +182 -0
  127. package/dist/model/CustomerFields.js +97 -0
  128. package/dist/model/CustomerPayload.js +122 -0
  129. package/dist/model/DashboardInfoResponse.js +111 -0
  130. package/dist/model/Data.js +108 -0
  131. package/dist/model/DeploymentFields.js +141 -0
  132. package/dist/model/DeploymentFieldsforstartdeployments.js +153 -0
  133. package/dist/model/Deployments.js +130 -0
  134. package/dist/model/DetachVolumes.js +130 -0
  135. package/dist/model/DetachVolumesPayload.js +89 -0
  136. package/dist/model/DiscountEntityModel.js +122 -0
  137. package/dist/model/DiscountFields.js +149 -0
  138. package/dist/model/DiscountPlanFields.js +181 -0
  139. package/dist/model/DiscountResourceFields.js +113 -0
  140. package/dist/model/DiscountResourcePayload.js +142 -0
  141. package/dist/model/EditlabelofanexistingVMPayload.js +90 -0
  142. package/dist/model/Environment.js +111 -0
  143. package/dist/model/EnvironmentFeatures.js +85 -0
  144. package/dist/model/EnvironmentFields.js +131 -0
  145. package/dist/model/EnvironmentFieldsforVolume.js +89 -0
  146. package/dist/model/Environments.js +154 -0
  147. package/dist/model/ErrorResponseModel.js +112 -0
  148. package/dist/model/ExcludeBillingPostPayload.js +135 -0
  149. package/dist/model/ExcludeBillingPostResponse.js +91 -0
  150. package/dist/model/ExportBillingDataRequest.js +186 -0
  151. package/dist/model/ExportBillingDataResponse.js +101 -0
  152. package/dist/model/FieldChange.js +116 -0
  153. package/dist/model/FirewallAttachmentModel.js +119 -0
  154. package/dist/model/FirewallAttachmentVMModel.js +141 -0
  155. package/dist/model/FirewallDetailFields.js +206 -0
  156. package/dist/model/FirewallDetailResponse.js +111 -0
  157. package/dist/model/FirewallEnvironmentFields.js +109 -0
  158. package/dist/model/FirewallFields.js +143 -0
  159. package/dist/model/FirewallResponse.js +111 -0
  160. package/dist/model/FirewallRule.js +111 -0
  161. package/dist/model/FirewallsListResponse.js +154 -0
  162. package/dist/model/FlavorFields.js +222 -0
  163. package/dist/model/FlavorItemGetResponse.js +134 -0
  164. package/dist/model/FlavorListResponse.js +130 -0
  165. package/dist/model/FlavorObjectFields.js +121 -0
  166. package/dist/model/FlavorPayload.js +190 -0
  167. package/dist/model/FlavorResponse.js +111 -0
  168. package/dist/model/FlavorVMFields.js +149 -0
  169. package/dist/model/FlavorVMsResponse.js +130 -0
  170. package/dist/model/FutureNodeModel.js +171 -0
  171. package/dist/model/FutureNodeResponseModel.js +122 -0
  172. package/dist/model/FutureNodeStockModel.js +128 -0
  173. package/dist/model/FutureNodeUpdateModel.js +152 -0
  174. package/dist/model/FutureNodesStockModel.js +110 -0
  175. package/dist/model/GPU.js +111 -0
  176. package/dist/model/GPUFields.js +158 -0
  177. package/dist/model/GPUList.js +130 -0
  178. package/dist/model/GPURegionFields.js +97 -0
  179. package/dist/model/GenerateUpdateApiKeyPayload.js +124 -0
  180. package/dist/model/GenerateUpdateApiKeyResponseModel.js +111 -0
  181. package/dist/model/GetAllContractFields.js +137 -0
  182. package/dist/model/GetAllContractsResponseModel.js +130 -0
  183. package/dist/model/GetAllDiscountForAllOrganizationResponse.js +130 -0
  184. package/dist/model/GetAllDiscountsFields.js +158 -0
  185. package/dist/model/GetApiKeysResponseModel.js +130 -0
  186. package/dist/model/GetCustomerContractsListResponseModel.js +138 -0
  187. package/dist/model/GetDiscountDetailResponse.js +111 -0
  188. package/dist/model/GetDiscountResponse.js +130 -0
  189. package/dist/model/GetEntityDiscountDetailResponse.js +159 -0
  190. package/dist/model/GetInvitesResponseModel.js +130 -0
  191. package/dist/model/GetOrganizationResponseModel.js +111 -0
  192. package/dist/model/GetPermissionsResponseModel.js +130 -0
  193. package/dist/model/GetPoliciesResponseModel.js +130 -0
  194. package/dist/model/GetRbacRolesResponseModel.js +130 -0
  195. package/dist/model/GetTokenPayload.js +126 -0
  196. package/dist/model/GetUserPermissionsResponseModel.js +130 -0
  197. package/dist/model/GetVersionResponse.js +109 -0
  198. package/dist/model/Getcreditandthresholdinfo.js +101 -0
  199. package/dist/model/Getcreditandthresholdinfoinresponse.js +111 -0
  200. package/dist/model/GraphDatetimeValueModel.js +97 -0
  201. package/dist/model/HistoricalInstance.js +138 -0
  202. package/dist/model/HistoricalInstancesFields.js +201 -0
  203. package/dist/model/Image.js +91 -0
  204. package/dist/model/ImageFields.js +206 -0
  205. package/dist/model/ImageGetResponse.js +146 -0
  206. package/dist/model/ImageLogos.js +130 -0
  207. package/dist/model/Images.js +130 -0
  208. package/dist/model/ImportKeypairPayload.js +143 -0
  209. package/dist/model/ImportKeypairResponse.js +111 -0
  210. package/dist/model/InfrahubResourceObjectResponse.js +222 -0
  211. package/dist/model/InfrahubResourceObjectResponseForCustomer.js +182 -0
  212. package/dist/model/InsertDiscountPlanFields.js +168 -0
  213. package/dist/model/Instance.js +111 -0
  214. package/dist/model/InstanceEnvironmentFields.js +131 -0
  215. package/dist/model/InstanceEvents.js +130 -0
  216. package/dist/model/InstanceEventsFields.js +157 -0
  217. package/dist/model/InstanceFields.js +368 -0
  218. package/dist/model/InstanceFlavorFields.js +149 -0
  219. package/dist/model/InstanceImageFields.js +89 -0
  220. package/dist/model/InstanceKeypairFields.js +89 -0
  221. package/dist/model/InstanceOverviewFields.js +117 -0
  222. package/dist/model/InstanceResizePayload.js +103 -0
  223. package/dist/model/Instances.js +154 -0
  224. package/dist/model/InstancesSummaryFields.js +249 -0
  225. package/dist/model/InternalEnvironmentFields.js +117 -0
  226. package/dist/model/InternalInstanceFields.js +344 -0
  227. package/dist/model/InternalInstanceFlavorFields.js +161 -0
  228. package/dist/model/InternalInstanceImageFields.js +133 -0
  229. package/dist/model/InternalInstanceKeypairFields.js +141 -0
  230. package/dist/model/InternalInstancesResponse.js +130 -0
  231. package/dist/model/InternalSecurityRulesFieldsForInstance.js +169 -0
  232. package/dist/model/InternalVolumeAttachmentFields.js +123 -0
  233. package/dist/model/InternalVolumeFields.js +129 -0
  234. package/dist/model/InternalVolumesResponse.js +130 -0
  235. package/dist/model/InviteFields.js +117 -0
  236. package/dist/model/InviteUserPayload.js +113 -0
  237. package/dist/model/InviteUserResponseModel.js +111 -0
  238. package/dist/model/KeypairFields.js +141 -0
  239. package/dist/model/Keypairs.js +154 -0
  240. package/dist/model/LableResonse.js +97 -0
  241. package/dist/model/Lastdaycostfields.js +109 -0
  242. package/dist/model/Lastdaycostresponse.js +111 -0
  243. package/dist/model/LogoGetResponse.js +109 -0
  244. package/dist/model/LogoutPayload.js +112 -0
  245. package/dist/model/MetricItemFields.js +113 -0
  246. package/dist/model/MetricsFields.js +156 -0
  247. package/dist/model/NameAvailableModel.js +109 -0
  248. package/dist/model/NewConfigurationsResponse.js +117 -0
  249. package/dist/model/NewModelResponse.js +151 -0
  250. package/dist/model/NewStockResponse.js +134 -0
  251. package/dist/model/NewStockRetriveResponse.js +110 -0
  252. package/dist/model/NewStockUpdateResponseModel.js +97 -0
  253. package/dist/model/NodeModel.js +230 -0
  254. package/dist/model/NodePayloadModel.js +122 -0
  255. package/dist/model/NodePowerUsageModel.js +244 -0
  256. package/dist/model/NodeResponseModel.js +122 -0
  257. package/dist/model/NodeStockPayloadModel.js +110 -0
  258. package/dist/model/NodeStockResponseModel.js +110 -0
  259. package/dist/model/NodeStocksPayload.js +144 -0
  260. package/dist/model/OrganizationFields.js +208 -0
  261. package/dist/model/OrganizationLevelBillingHistory.js +126 -0
  262. package/dist/model/OrganizationLevelBillingHistoryResources.js +105 -0
  263. package/dist/model/OrganizationLevelBillingHistoryResponseAttributes.js +89 -0
  264. package/dist/model/OrganizationLevelBillingHistoryResponseMetrics.js +125 -0
  265. package/dist/model/OrganizationLevelBillingHistoryResponseModel.js +111 -0
  266. package/dist/model/OrganizationObjectResponse.js +118 -0
  267. package/dist/model/OrganizationThresholdfields.js +125 -0
  268. package/dist/model/OrganizationUserResponseModel.js +194 -0
  269. package/dist/model/Organizationcreditrechargelimitresponse.js +111 -0
  270. package/dist/model/Organizationthresholdsresponse.js +130 -0
  271. package/dist/model/Organizationthresholdupdateresponse.js +111 -0
  272. package/dist/model/OverviewInfo.js +119 -0
  273. package/dist/model/PaginationData.js +101 -0
  274. package/dist/model/PaymentDetailsFields.js +185 -0
  275. package/dist/model/PaymentDetailsResponse.js +111 -0
  276. package/dist/model/PaymentInitiateFields.js +89 -0
  277. package/dist/model/PaymentInitiatePayload.js +85 -0
  278. package/dist/model/PaymentInitiateResponse.js +111 -0
  279. package/dist/model/PermissionFields.js +141 -0
  280. package/dist/model/PolicyFields.js +150 -0
  281. package/dist/model/PolicyPermissionFields.js +109 -0
  282. package/dist/model/PowerUsageModel.js +122 -0
  283. package/dist/model/PricebookModel.js +137 -0
  284. package/dist/model/PricebookResourceObjectResponse.js +173 -0
  285. package/dist/model/PricebookResourceObjectResponseForCustomer.js +141 -0
  286. package/dist/model/ProfileFields.js +129 -0
  287. package/dist/model/ProfileListResponse.js +130 -0
  288. package/dist/model/ProfileObjectFields.js +124 -0
  289. package/dist/model/RbacRoleDetailResponseModel.js +111 -0
  290. package/dist/model/RbacRoleDetailResponseModelFixed.js +111 -0
  291. package/dist/model/RbacRoleField.js +89 -0
  292. package/dist/model/RbacRoleFields.js +180 -0
  293. package/dist/model/RefreshTokenPayload.js +126 -0
  294. package/dist/model/RegionFields.js +109 -0
  295. package/dist/model/RegionPayload.js +124 -0
  296. package/dist/model/RegionResponse.js +111 -0
  297. package/dist/model/Regions.js +130 -0
  298. package/dist/model/RemoveMemberFromOrganizationResponseModel.js +97 -0
  299. package/dist/model/RemoveMemberPayload.js +113 -0
  300. package/dist/model/RequestConsole.js +109 -0
  301. package/dist/model/ResourceBillingEventsHistoryMetrics.js +125 -0
  302. package/dist/model/ResourceBillingEventsHistoryResponse.js +130 -0
  303. package/dist/model/ResourceBillingResponseForCustomer.js +111 -0
  304. package/dist/model/ResourceLevelBillingDetailsAttributes.js +109 -0
  305. package/dist/model/ResourceLevelBillingDetailsMetrics.js +141 -0
  306. package/dist/model/ResourceLevelBillingDetailsVM.js +126 -0
  307. package/dist/model/ResourceLevelBillingDetailsVolume.js +126 -0
  308. package/dist/model/ResourceLevelBillingDetailsVolumeAttributes.js +129 -0
  309. package/dist/model/ResourceLevelBillingDetailsVolumeMetrics.js +117 -0
  310. package/dist/model/ResourceLevelBillingHistory.js +140 -0
  311. package/dist/model/ResourceLevelBillingHistoryResources.js +105 -0
  312. package/dist/model/ResourceLevelBillingHistoryResponseAttributes.js +121 -0
  313. package/dist/model/ResourceLevelBillingHistoryResponseMetrics.js +101 -0
  314. package/dist/model/ResourceLevelBillingVMDetailsResources.js +105 -0
  315. package/dist/model/ResourceLevelBillingVolumeDetailsResources.js +105 -0
  316. package/dist/model/ResourceLevelGraphBillingDetailVolume.js +134 -0
  317. package/dist/model/ResourceLevelGraphBillingDetailsAttributes.js +109 -0
  318. package/dist/model/ResourceLevelGraphBillingDetailsMetrics.js +118 -0
  319. package/dist/model/ResourceLevelGraphBillingDetailsVM.js +134 -0
  320. package/dist/model/ResourceLevelGraphBillingVMDetailsResources.js +105 -0
  321. package/dist/model/ResourceLevelGraphBillingVolumeDetailsResources.js +105 -0
  322. package/dist/model/ResourceLevelVMBillingDetailsResponseModel.js +111 -0
  323. package/dist/model/ResourceLevelVmBillingHistoryResponseModel.js +111 -0
  324. package/dist/model/ResourceLevelVmGraphBillingDetailsResponseModel.js +111 -0
  325. package/dist/model/ResourceLevelVolumeBillingDetailsResponseModel.js +111 -0
  326. package/dist/model/ResourceLevelVolumeBillingHistoryResponseModel.js +111 -0
  327. package/dist/model/ResourceLevelVolumeGraphBillingDetailsResponseModel.js +111 -0
  328. package/dist/model/ResourceObjectResponseForCustomer.js +99 -0
  329. package/dist/model/ResponseModel.js +97 -0
  330. package/dist/model/RolePermissionFields.js +109 -0
  331. package/dist/model/RolePolicyFields.js +109 -0
  332. package/dist/model/SecurityGroupRule.js +111 -0
  333. package/dist/model/SecurityGroupRuleFields.js +169 -0
  334. package/dist/model/SecurityRulesFieldsforInstance.js +169 -0
  335. package/dist/model/SecurityRulesProtocolFields.js +109 -0
  336. package/dist/model/SetDefaultsPayload.js +126 -0
  337. package/dist/model/SingleVisibilityUserResponse.js +128 -0
  338. package/dist/model/SnapshotFields.js +220 -0
  339. package/dist/model/SnapshotRestoreRequest.js +122 -0
  340. package/dist/model/SnapshotRetrieve.js +111 -0
  341. package/dist/model/SnapshotRetrieveFields.js +207 -0
  342. package/dist/model/Snapshots.js +154 -0
  343. package/dist/model/StartDeployment.js +111 -0
  344. package/dist/model/StartDeploymentPayload.js +146 -0
  345. package/dist/model/StockVisibilityUserListResponse.js +130 -0
  346. package/dist/model/StockVisibilityUserPayload.js +112 -0
  347. package/dist/model/SubResourceGraphBillingDetailsMetrics.js +303 -0
  348. package/dist/model/SubResourcesCostsResponseModel.js +134 -0
  349. package/dist/model/SubResourcesGraphBillingHistoryFields.js +105 -0
  350. package/dist/model/SubResourcesGraphResponseModel.js +111 -0
  351. package/dist/model/Subscribeorunsubscribeupdatepayload.js +109 -0
  352. package/dist/model/SuccessResponseModel.js +100 -0
  353. package/dist/model/Template.js +111 -0
  354. package/dist/model/TemplateFields.js +137 -0
  355. package/dist/model/Templates.js +130 -0
  356. package/dist/model/TokenFields.js +113 -0
  357. package/dist/model/UpdateContractPayload.js +168 -0
  358. package/dist/model/UpdateDiscountsPayload.js +160 -0
  359. package/dist/model/UpdateDiscountsStatusPayload.js +112 -0
  360. package/dist/model/UpdateEnvironment.js +113 -0
  361. package/dist/model/UpdateGPU.js +114 -0
  362. package/dist/model/UpdateKeypairName.js +113 -0
  363. package/dist/model/UpdateKeypairnameresponse.js +111 -0
  364. package/dist/model/UpdateOrganizationPayload.js +113 -0
  365. package/dist/model/UpdateOrganizationResponseModel.js +97 -0
  366. package/dist/model/UpdateTemplate.js +109 -0
  367. package/dist/model/UserDefaultChoiceForUserFields.js +101 -0
  368. package/dist/model/UserDefaultChoicesForUserResponse.js +130 -0
  369. package/dist/model/UserPermissionFields.js +109 -0
  370. package/dist/model/UserTransferPayload.js +122 -0
  371. package/dist/model/Userinfopostpayload.js +232 -0
  372. package/dist/model/UsersInfoFields.js +229 -0
  373. package/dist/model/UsersInfoListResponse.js +111 -0
  374. package/dist/model/VMUsageRequestPayload.js +113 -0
  375. package/dist/model/VMUsageResponse.js +138 -0
  376. package/dist/model/VNCURL.js +111 -0
  377. package/dist/model/VNCURLFields.js +97 -0
  378. package/dist/model/VerifyApiKeyPayload.js +113 -0
  379. package/dist/model/VerifyApiKeyResponseModel.js +111 -0
  380. package/dist/model/VirtualMachineUsage.js +117 -0
  381. package/dist/model/Volume.js +111 -0
  382. package/dist/model/VolumeAttachmentFields.js +123 -0
  383. package/dist/model/VolumeFields.js +211 -0
  384. package/dist/model/VolumeFieldsforInstance.js +137 -0
  385. package/dist/model/VolumeOverviewFields.js +101 -0
  386. package/dist/model/VolumeStatusChangeFields.js +125 -0
  387. package/dist/model/VolumeTypes.js +109 -0
  388. package/dist/model/Volumes.js +130 -0
  389. package/dist/model/VolumesLastStatusChangeResponse.js +130 -0
  390. package/dist/model/WarningMailLogFields.js +149 -0
  391. package/dist/model/WarningMailLogResponse.js +138 -0
  392. package/package.json +46 -0
@@ -0,0 +1,230 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _NodeStocksPayload = _interopRequireDefault(require("./NodeStocksPayload"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ 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); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * Infrahub-API
20
+ * Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
21
+ *
22
+ * The version of the OpenAPI document: 1.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The NodeModel model module.
32
+ * @module model/NodeModel
33
+ * @version v1.22.0-alpha
34
+ */
35
+ var NodeModel = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>NodeModel</code>.
38
+ * @alias module:model/NodeModel
39
+ * @param openstackId {String}
40
+ */
41
+ function NodeModel(openstackId) {
42
+ _classCallCheck(this, NodeModel);
43
+ NodeModel.initialize(this, openstackId);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(NodeModel, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, openstackId) {
54
+ obj['openstack_id'] = openstackId;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>NodeModel</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/NodeModel} obj Optional instance to populate.
62
+ * @return {module:model/NodeModel} The populated <code>NodeModel</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new NodeModel();
69
+ if (data.hasOwnProperty('flavors')) {
70
+ obj['flavors'] = _ApiClient["default"].convertToType(data['flavors'], ['String']);
71
+ }
72
+ if (data.hasOwnProperty('nexgen_name')) {
73
+ obj['nexgen_name'] = _ApiClient["default"].convertToType(data['nexgen_name'], 'String');
74
+ }
75
+ if (data.hasOwnProperty('openstack_id')) {
76
+ obj['openstack_id'] = _ApiClient["default"].convertToType(data['openstack_id'], 'String');
77
+ }
78
+ if (data.hasOwnProperty('openstack_name')) {
79
+ obj['openstack_name'] = _ApiClient["default"].convertToType(data['openstack_name'], 'String');
80
+ }
81
+ if (data.hasOwnProperty('organizations')) {
82
+ obj['organizations'] = _ApiClient["default"].convertToType(data['organizations'], ['Number']);
83
+ }
84
+ if (data.hasOwnProperty('projects')) {
85
+ obj['projects'] = _ApiClient["default"].convertToType(data['projects'], ['String']);
86
+ }
87
+ if (data.hasOwnProperty('provision_date')) {
88
+ obj['provision_date'] = _ApiClient["default"].convertToType(data['provision_date'], 'Date');
89
+ }
90
+ if (data.hasOwnProperty('status')) {
91
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
92
+ }
93
+ if (data.hasOwnProperty('stocks')) {
94
+ obj['stocks'] = _ApiClient["default"].convertToType(data['stocks'], [_NodeStocksPayload["default"]]);
95
+ }
96
+ if (data.hasOwnProperty('sunset_date')) {
97
+ obj['sunset_date'] = _ApiClient["default"].convertToType(data['sunset_date'], 'Date');
98
+ }
99
+ }
100
+ return obj;
101
+ }
102
+
103
+ /**
104
+ * Validates the JSON data with respect to <code>NodeModel</code>.
105
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
106
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>NodeModel</code>.
107
+ */
108
+ }, {
109
+ key: "validateJSON",
110
+ value: function validateJSON(data) {
111
+ // check to make sure all required properties are present in the JSON string
112
+ var _iterator = _createForOfIteratorHelper(NodeModel.RequiredProperties),
113
+ _step;
114
+ try {
115
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
116
+ var property = _step.value;
117
+ if (!data.hasOwnProperty(property)) {
118
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
119
+ }
120
+ }
121
+ // ensure the json data is an array
122
+ } catch (err) {
123
+ _iterator.e(err);
124
+ } finally {
125
+ _iterator.f();
126
+ }
127
+ if (!Array.isArray(data['flavors'])) {
128
+ throw new Error("Expected the field `flavors` to be an array in the JSON data but got " + data['flavors']);
129
+ }
130
+ // ensure the json data is a string
131
+ if (data['nexgen_name'] && !(typeof data['nexgen_name'] === 'string' || data['nexgen_name'] instanceof String)) {
132
+ throw new Error("Expected the field `nexgen_name` to be a primitive type in the JSON string but got " + data['nexgen_name']);
133
+ }
134
+ // ensure the json data is a string
135
+ if (data['openstack_id'] && !(typeof data['openstack_id'] === 'string' || data['openstack_id'] instanceof String)) {
136
+ throw new Error("Expected the field `openstack_id` to be a primitive type in the JSON string but got " + data['openstack_id']);
137
+ }
138
+ // ensure the json data is a string
139
+ if (data['openstack_name'] && !(typeof data['openstack_name'] === 'string' || data['openstack_name'] instanceof String)) {
140
+ throw new Error("Expected the field `openstack_name` to be a primitive type in the JSON string but got " + data['openstack_name']);
141
+ }
142
+ // ensure the json data is an array
143
+ if (!Array.isArray(data['organizations'])) {
144
+ throw new Error("Expected the field `organizations` to be an array in the JSON data but got " + data['organizations']);
145
+ }
146
+ // ensure the json data is an array
147
+ if (!Array.isArray(data['projects'])) {
148
+ throw new Error("Expected the field `projects` to be an array in the JSON data but got " + data['projects']);
149
+ }
150
+ // ensure the json data is a string
151
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
152
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
153
+ }
154
+ if (data['stocks']) {
155
+ // data not null
156
+ // ensure the json data is an array
157
+ if (!Array.isArray(data['stocks'])) {
158
+ throw new Error("Expected the field `stocks` to be an array in the JSON data but got " + data['stocks']);
159
+ }
160
+ // validate the optional field `stocks` (array)
161
+ var _iterator2 = _createForOfIteratorHelper(data['stocks']),
162
+ _step2;
163
+ try {
164
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
165
+ var item = _step2.value;
166
+ _NodeStocksPayload["default"].validateJSON(item);
167
+ }
168
+ } catch (err) {
169
+ _iterator2.e(err);
170
+ } finally {
171
+ _iterator2.f();
172
+ }
173
+ ;
174
+ }
175
+ return true;
176
+ }
177
+ }]);
178
+ }();
179
+ NodeModel.RequiredProperties = ["openstack_id"];
180
+
181
+ /**
182
+ * @member {Array.<String>} flavors
183
+ */
184
+ NodeModel.prototype['flavors'] = undefined;
185
+
186
+ /**
187
+ * @member {String} nexgen_name
188
+ */
189
+ NodeModel.prototype['nexgen_name'] = undefined;
190
+
191
+ /**
192
+ * @member {String} openstack_id
193
+ */
194
+ NodeModel.prototype['openstack_id'] = undefined;
195
+
196
+ /**
197
+ * @member {String} openstack_name
198
+ */
199
+ NodeModel.prototype['openstack_name'] = undefined;
200
+
201
+ /**
202
+ * @member {Array.<Number>} organizations
203
+ */
204
+ NodeModel.prototype['organizations'] = undefined;
205
+
206
+ /**
207
+ * @member {Array.<String>} projects
208
+ */
209
+ NodeModel.prototype['projects'] = undefined;
210
+
211
+ /**
212
+ * @member {Date} provision_date
213
+ */
214
+ NodeModel.prototype['provision_date'] = undefined;
215
+
216
+ /**
217
+ * @member {String} status
218
+ */
219
+ NodeModel.prototype['status'] = undefined;
220
+
221
+ /**
222
+ * @member {Array.<module:model/NodeStocksPayload>} stocks
223
+ */
224
+ NodeModel.prototype['stocks'] = undefined;
225
+
226
+ /**
227
+ * @member {Date} sunset_date
228
+ */
229
+ NodeModel.prototype['sunset_date'] = undefined;
230
+ var _default = exports["default"] = NodeModel;
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _NodePowerUsageModel = _interopRequireDefault(require("./NodePowerUsageModel"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ 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); }
11
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
12
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * Infrahub-API
20
+ * Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
21
+ *
22
+ * The version of the OpenAPI document: 1.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The NodePayloadModel model module.
32
+ * @module model/NodePayloadModel
33
+ * @version v1.22.0-alpha
34
+ */
35
+ var NodePayloadModel = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>NodePayloadModel</code>.
38
+ * @alias module:model/NodePayloadModel
39
+ */
40
+ function NodePayloadModel() {
41
+ _classCallCheck(this, NodePayloadModel);
42
+ NodePayloadModel.initialize(this);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(NodePayloadModel, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj) {}
53
+
54
+ /**
55
+ * Constructs a <code>NodePayloadModel</code> from a plain JavaScript object, optionally creating a new instance.
56
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
57
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
58
+ * @param {module:model/NodePayloadModel} obj Optional instance to populate.
59
+ * @return {module:model/NodePayloadModel} The populated <code>NodePayloadModel</code> instance.
60
+ */
61
+ }, {
62
+ key: "constructFromObject",
63
+ value: function constructFromObject(data, obj) {
64
+ if (data) {
65
+ obj = obj || new NodePayloadModel();
66
+ if (data.hasOwnProperty('nodes')) {
67
+ obj['nodes'] = _ApiClient["default"].convertToType(data['nodes'], [_NodePowerUsageModel["default"]]);
68
+ }
69
+ if (data.hasOwnProperty('region')) {
70
+ obj['region'] = _ApiClient["default"].convertToType(data['region'], 'String');
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>NodePayloadModel</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>NodePayloadModel</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ if (data['nodes']) {
85
+ // data not null
86
+ // ensure the json data is an array
87
+ if (!Array.isArray(data['nodes'])) {
88
+ throw new Error("Expected the field `nodes` to be an array in the JSON data but got " + data['nodes']);
89
+ }
90
+ // validate the optional field `nodes` (array)
91
+ var _iterator = _createForOfIteratorHelper(data['nodes']),
92
+ _step;
93
+ try {
94
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
95
+ var item = _step.value;
96
+ _NodePowerUsageModel["default"].validateJSON(item);
97
+ }
98
+ } catch (err) {
99
+ _iterator.e(err);
100
+ } finally {
101
+ _iterator.f();
102
+ }
103
+ ;
104
+ }
105
+ // ensure the json data is a string
106
+ if (data['region'] && !(typeof data['region'] === 'string' || data['region'] instanceof String)) {
107
+ throw new Error("Expected the field `region` to be a primitive type in the JSON string but got " + data['region']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ /**
114
+ * @member {Array.<module:model/NodePowerUsageModel>} nodes
115
+ */
116
+ NodePayloadModel.prototype['nodes'] = undefined;
117
+
118
+ /**
119
+ * @member {String} region
120
+ */
121
+ NodePayloadModel.prototype['region'] = undefined;
122
+ var _default = exports["default"] = NodePayloadModel;
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _NodeStocksPayload = _interopRequireDefault(require("./NodeStocksPayload"));
9
+ var _PowerUsageModel = _interopRequireDefault(require("./PowerUsageModel"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ 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); }
12
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, 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 o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
13
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
14
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ 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); } /**
20
+ * Infrahub-API
21
+ * Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.
22
+ *
23
+ * The version of the OpenAPI document: 1.0
24
+ *
25
+ *
26
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
+ * https://openapi-generator.tech
28
+ * Do not edit the class manually.
29
+ *
30
+ */
31
+ /**
32
+ * The NodePowerUsageModel model module.
33
+ * @module model/NodePowerUsageModel
34
+ * @version v1.22.0-alpha
35
+ */
36
+ var NodePowerUsageModel = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>NodePowerUsageModel</code>.
39
+ * @alias module:model/NodePowerUsageModel
40
+ * @param openstackId {String}
41
+ */
42
+ function NodePowerUsageModel(openstackId) {
43
+ _classCallCheck(this, NodePowerUsageModel);
44
+ NodePowerUsageModel.initialize(this, openstackId);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(NodePowerUsageModel, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, openstackId) {
55
+ obj['openstack_id'] = openstackId;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>NodePowerUsageModel</code> from a plain JavaScript object, optionally creating a new instance.
60
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
62
+ * @param {module:model/NodePowerUsageModel} obj Optional instance to populate.
63
+ * @return {module:model/NodePowerUsageModel} The populated <code>NodePowerUsageModel</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new NodePowerUsageModel();
70
+ if (data.hasOwnProperty('flavors')) {
71
+ obj['flavors'] = _ApiClient["default"].convertToType(data['flavors'], ['String']);
72
+ }
73
+ if (data.hasOwnProperty('nexgen_name')) {
74
+ obj['nexgen_name'] = _ApiClient["default"].convertToType(data['nexgen_name'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('openstack_id')) {
77
+ obj['openstack_id'] = _ApiClient["default"].convertToType(data['openstack_id'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('openstack_name')) {
80
+ obj['openstack_name'] = _ApiClient["default"].convertToType(data['openstack_name'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('organizations')) {
83
+ obj['organizations'] = _ApiClient["default"].convertToType(data['organizations'], ['Number']);
84
+ }
85
+ if (data.hasOwnProperty('power_usages')) {
86
+ obj['power_usages'] = _PowerUsageModel["default"].constructFromObject(data['power_usages']);
87
+ }
88
+ if (data.hasOwnProperty('projects')) {
89
+ obj['projects'] = _ApiClient["default"].convertToType(data['projects'], ['String']);
90
+ }
91
+ if (data.hasOwnProperty('provision_date')) {
92
+ obj['provision_date'] = _ApiClient["default"].convertToType(data['provision_date'], 'Date');
93
+ }
94
+ if (data.hasOwnProperty('status')) {
95
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
96
+ }
97
+ if (data.hasOwnProperty('stocks')) {
98
+ obj['stocks'] = _ApiClient["default"].convertToType(data['stocks'], [_NodeStocksPayload["default"]]);
99
+ }
100
+ if (data.hasOwnProperty('sunset_date')) {
101
+ obj['sunset_date'] = _ApiClient["default"].convertToType(data['sunset_date'], 'Date');
102
+ }
103
+ }
104
+ return obj;
105
+ }
106
+
107
+ /**
108
+ * Validates the JSON data with respect to <code>NodePowerUsageModel</code>.
109
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
110
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>NodePowerUsageModel</code>.
111
+ */
112
+ }, {
113
+ key: "validateJSON",
114
+ value: function validateJSON(data) {
115
+ // check to make sure all required properties are present in the JSON string
116
+ var _iterator = _createForOfIteratorHelper(NodePowerUsageModel.RequiredProperties),
117
+ _step;
118
+ try {
119
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
120
+ var property = _step.value;
121
+ if (!data.hasOwnProperty(property)) {
122
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
123
+ }
124
+ }
125
+ // ensure the json data is an array
126
+ } catch (err) {
127
+ _iterator.e(err);
128
+ } finally {
129
+ _iterator.f();
130
+ }
131
+ if (!Array.isArray(data['flavors'])) {
132
+ throw new Error("Expected the field `flavors` to be an array in the JSON data but got " + data['flavors']);
133
+ }
134
+ // ensure the json data is a string
135
+ if (data['nexgen_name'] && !(typeof data['nexgen_name'] === 'string' || data['nexgen_name'] instanceof String)) {
136
+ throw new Error("Expected the field `nexgen_name` to be a primitive type in the JSON string but got " + data['nexgen_name']);
137
+ }
138
+ // ensure the json data is a string
139
+ if (data['openstack_id'] && !(typeof data['openstack_id'] === 'string' || data['openstack_id'] instanceof String)) {
140
+ throw new Error("Expected the field `openstack_id` to be a primitive type in the JSON string but got " + data['openstack_id']);
141
+ }
142
+ // ensure the json data is a string
143
+ if (data['openstack_name'] && !(typeof data['openstack_name'] === 'string' || data['openstack_name'] instanceof String)) {
144
+ throw new Error("Expected the field `openstack_name` to be a primitive type in the JSON string but got " + data['openstack_name']);
145
+ }
146
+ // ensure the json data is an array
147
+ if (!Array.isArray(data['organizations'])) {
148
+ throw new Error("Expected the field `organizations` to be an array in the JSON data but got " + data['organizations']);
149
+ }
150
+ // validate the optional field `power_usages`
151
+ if (data['power_usages']) {
152
+ // data not null
153
+ _PowerUsageModel["default"].validateJSON(data['power_usages']);
154
+ }
155
+ // ensure the json data is an array
156
+ if (!Array.isArray(data['projects'])) {
157
+ throw new Error("Expected the field `projects` to be an array in the JSON data but got " + data['projects']);
158
+ }
159
+ // ensure the json data is a string
160
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
161
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
162
+ }
163
+ if (data['stocks']) {
164
+ // data not null
165
+ // ensure the json data is an array
166
+ if (!Array.isArray(data['stocks'])) {
167
+ throw new Error("Expected the field `stocks` to be an array in the JSON data but got " + data['stocks']);
168
+ }
169
+ // validate the optional field `stocks` (array)
170
+ var _iterator2 = _createForOfIteratorHelper(data['stocks']),
171
+ _step2;
172
+ try {
173
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
174
+ var item = _step2.value;
175
+ _NodeStocksPayload["default"].validateJSON(item);
176
+ }
177
+ } catch (err) {
178
+ _iterator2.e(err);
179
+ } finally {
180
+ _iterator2.f();
181
+ }
182
+ ;
183
+ }
184
+ return true;
185
+ }
186
+ }]);
187
+ }();
188
+ NodePowerUsageModel.RequiredProperties = ["openstack_id"];
189
+
190
+ /**
191
+ * @member {Array.<String>} flavors
192
+ */
193
+ NodePowerUsageModel.prototype['flavors'] = undefined;
194
+
195
+ /**
196
+ * @member {String} nexgen_name
197
+ */
198
+ NodePowerUsageModel.prototype['nexgen_name'] = undefined;
199
+
200
+ /**
201
+ * @member {String} openstack_id
202
+ */
203
+ NodePowerUsageModel.prototype['openstack_id'] = undefined;
204
+
205
+ /**
206
+ * @member {String} openstack_name
207
+ */
208
+ NodePowerUsageModel.prototype['openstack_name'] = undefined;
209
+
210
+ /**
211
+ * @member {Array.<Number>} organizations
212
+ */
213
+ NodePowerUsageModel.prototype['organizations'] = undefined;
214
+
215
+ /**
216
+ * @member {module:model/PowerUsageModel} power_usages
217
+ */
218
+ NodePowerUsageModel.prototype['power_usages'] = undefined;
219
+
220
+ /**
221
+ * @member {Array.<String>} projects
222
+ */
223
+ NodePowerUsageModel.prototype['projects'] = undefined;
224
+
225
+ /**
226
+ * @member {Date} provision_date
227
+ */
228
+ NodePowerUsageModel.prototype['provision_date'] = undefined;
229
+
230
+ /**
231
+ * @member {String} status
232
+ */
233
+ NodePowerUsageModel.prototype['status'] = undefined;
234
+
235
+ /**
236
+ * @member {Array.<module:model/NodeStocksPayload>} stocks
237
+ */
238
+ NodePowerUsageModel.prototype['stocks'] = undefined;
239
+
240
+ /**
241
+ * @member {Date} sunset_date
242
+ */
243
+ NodePowerUsageModel.prototype['sunset_date'] = undefined;
244
+ var _default = exports["default"] = NodePowerUsageModel;