@nutanix-scratch/security-js-client 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 (333) hide show
  1. package/LICENSE.txt +202 -0
  2. package/README.md +217 -0
  3. package/dist/Ntnx-Security-js-client-prod.js +1 -0
  4. package/dist/Ntnx-Security-js-client.js +1246 -0
  5. package/dist/es/ApiClient.d.ts +166 -0
  6. package/dist/es/ApiClient.js +1271 -0
  7. package/dist/es/Paginable.d.ts +95 -0
  8. package/dist/es/Paginable.js +287 -0
  9. package/dist/es/apis/approvalpolicies-endpoints.d.ts +90 -0
  10. package/dist/es/apis/approvalpolicies-endpoints.js +295 -0
  11. package/dist/es/apis/stigs-endpoints.d.ts +108 -0
  12. package/dist/es/apis/stigs-endpoints.js +202 -0
  13. package/dist/es/index.d.ts +158 -0
  14. package/dist/es/index.js +628 -0
  15. package/dist/es/models/common/v1/config/Flag.d.ts +64 -0
  16. package/dist/es/models/common/v1/config/Flag.js +319 -0
  17. package/dist/es/models/common/v1/config/KVPair.d.ts +71 -0
  18. package/dist/es/models/common/v1/config/KVPair.js +378 -0
  19. package/dist/es/models/common/v1/config/MapOfStringWrapper.d.ts +58 -0
  20. package/dist/es/models/common/v1/config/MapOfStringWrapper.js +275 -0
  21. package/dist/es/models/common/v1/config/Message.d.ts +87 -0
  22. package/dist/es/models/common/v1/config/Message.js +386 -0
  23. package/dist/es/models/common/v1/config/MessageSeverity.d.ts +19 -0
  24. package/dist/es/models/common/v1/config/MessageSeverity.js +91 -0
  25. package/dist/es/models/common/v1/config/TenantAwareModel.d.ts +52 -0
  26. package/dist/es/models/common/v1/config/TenantAwareModel.js +275 -0
  27. package/dist/es/models/common/v1/response/ApiLink.d.ts +64 -0
  28. package/dist/es/models/common/v1/response/ApiLink.js +312 -0
  29. package/dist/es/models/common/v1/response/ApiResponseMetadata.d.ts +133 -0
  30. package/dist/es/models/common/v1/response/ApiResponseMetadata.js +482 -0
  31. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.d.ts +48 -0
  32. package/dist/es/models/common/v1/response/ExternalizableAbstractModel.js +310 -0
  33. package/dist/es/models/iam/v4/authn/BucketsAccessKey.d.ts +166 -0
  34. package/dist/es/models/iam/v4/authn/BucketsAccessKey.js +667 -0
  35. package/dist/es/models/iam/v4/authn/BucketsAccessKeyStatusType.d.ts +19 -0
  36. package/dist/es/models/iam/v4/authn/BucketsAccessKeyStatusType.js +91 -0
  37. package/dist/es/models/iam/v4/authn/CreationType.d.ts +19 -0
  38. package/dist/es/models/iam/v4/authn/CreationType.js +91 -0
  39. package/dist/es/models/iam/v4/authn/User.d.ts +318 -0
  40. package/dist/es/models/iam/v4/authn/User.js +1140 -0
  41. package/dist/es/models/iam/v4/authn/UserStatusType.d.ts +19 -0
  42. package/dist/es/models/iam/v4/authn/UserStatusType.js +85 -0
  43. package/dist/es/models/iam/v4/authn/UserType.d.ts +19 -0
  44. package/dist/es/models/iam/v4/authn/UserType.js +103 -0
  45. package/dist/es/models/prism/v4/config/TaskReference.d.ts +52 -0
  46. package/dist/es/models/prism/v4/config/TaskReference.js +287 -0
  47. package/dist/es/models/security/v4/common/Cluster.d.ts +64 -0
  48. package/dist/es/models/security/v4/common/Cluster.js +311 -0
  49. package/dist/es/models/security/v4/common/ClusterProjection.d.ts +10 -0
  50. package/dist/es/models/security/v4/common/ClusterProjection.js +150 -0
  51. package/dist/es/models/security/v4/common/Timescale.d.ts +19 -0
  52. package/dist/es/models/security/v4/common/Timescale.js +103 -0
  53. package/dist/es/models/security/v4/config/AddPublicKeyApiResponse.d.ts +102 -0
  54. package/dist/es/models/security/v4/config/AddPublicKeyApiResponse.js +343 -0
  55. package/dist/es/models/security/v4/config/ChangePasswordSpec.d.ts +74 -0
  56. package/dist/es/models/security/v4/config/ChangePasswordSpec.js +317 -0
  57. package/dist/es/models/security/v4/config/ChangeSystemUserPasswordApiResponse.d.ts +102 -0
  58. package/dist/es/models/security/v4/config/ChangeSystemUserPasswordApiResponse.js +343 -0
  59. package/dist/es/models/security/v4/config/DeletePublicKeyApiResponse.d.ts +99 -0
  60. package/dist/es/models/security/v4/config/DeletePublicKeyApiResponse.js +343 -0
  61. package/dist/es/models/security/v4/config/HardeningStatus.d.ts +154 -0
  62. package/dist/es/models/security/v4/config/HardeningStatus.js +641 -0
  63. package/dist/es/models/security/v4/config/HardeningStatusProjection.d.ts +53 -0
  64. package/dist/es/models/security/v4/config/HardeningStatusProjection.js +358 -0
  65. package/dist/es/models/security/v4/config/HardeningVisibilitySetting.d.ts +121 -0
  66. package/dist/es/models/security/v4/config/HardeningVisibilitySetting.js +539 -0
  67. package/dist/es/models/security/v4/config/PasswordStatus.d.ts +19 -0
  68. package/dist/es/models/security/v4/config/PasswordStatus.js +97 -0
  69. package/dist/es/models/security/v4/config/PasswordVerificationStatus.d.ts +19 -0
  70. package/dist/es/models/security/v4/config/PasswordVerificationStatus.js +91 -0
  71. package/dist/es/models/security/v4/config/PublicKey.d.ts +80 -0
  72. package/dist/es/models/security/v4/config/PublicKey.js +373 -0
  73. package/dist/es/models/security/v4/config/PublicKeyProjection.d.ts +51 -0
  74. package/dist/es/models/security/v4/config/PublicKeyProjection.js +309 -0
  75. package/dist/es/models/security/v4/config/Schedule.d.ts +19 -0
  76. package/dist/es/models/security/v4/config/Schedule.js +97 -0
  77. package/dist/es/models/security/v4/config/SystemType.d.ts +19 -0
  78. package/dist/es/models/security/v4/config/SystemType.js +97 -0
  79. package/dist/es/models/security/v4/config/SystemUserPassword.d.ts +110 -0
  80. package/dist/es/models/security/v4/config/SystemUserPassword.js +500 -0
  81. package/dist/es/models/security/v4/config/SystemUserPasswordProjection.d.ts +49 -0
  82. package/dist/es/models/security/v4/config/SystemUserPasswordProjection.js +330 -0
  83. package/dist/es/models/security/v4/config/UpdateHardeningStatusesApiResponse.d.ts +99 -0
  84. package/dist/es/models/security/v4/config/UpdateHardeningStatusesApiResponse.js +343 -0
  85. package/dist/es/models/security/v4/config/UpdateHardeningVisibilitySettingApiResponse.d.ts +99 -0
  86. package/dist/es/models/security/v4/config/UpdateHardeningVisibilitySettingApiResponse.js +365 -0
  87. package/dist/es/models/security/v4/config/VerifyPassword.d.ts +36 -0
  88. package/dist/es/models/security/v4/config/VerifyPassword.js +272 -0
  89. package/dist/es/models/security/v4/config/VerifyPasswordSpec.d.ts +62 -0
  90. package/dist/es/models/security/v4/config/VerifyPasswordSpec.js +279 -0
  91. package/dist/es/models/security/v4/config/VerifySystemUserPasswordApiResponse.d.ts +99 -0
  92. package/dist/es/models/security/v4/config/VerifySystemUserPasswordApiResponse.js +343 -0
  93. package/dist/es/models/security/v4/error/AppMessage.d.ts +117 -0
  94. package/dist/es/models/security/v4/error/AppMessage.js +464 -0
  95. package/dist/es/models/security/v4/error/ErrorResponse.d.ts +52 -0
  96. package/dist/es/models/security/v4/error/ErrorResponse.js +330 -0
  97. package/dist/es/models/security/v4/error/SchemaValidationError.d.ts +108 -0
  98. package/dist/es/models/security/v4/error/SchemaValidationError.js +440 -0
  99. package/dist/es/models/security/v4/error/SchemaValidationErrorMessage.d.ts +76 -0
  100. package/dist/es/models/security/v4/error/SchemaValidationErrorMessage.js +350 -0
  101. package/dist/es/models/security/v4/management/ApprovalPolicy.d.ts +204 -0
  102. package/dist/es/models/security/v4/management/ApprovalPolicy.js +543 -0
  103. package/dist/es/models/security/v4/management/ApproverGroup.d.ts +160 -0
  104. package/dist/es/models/security/v4/management/ApproverGroup.js +385 -0
  105. package/dist/es/models/security/v4/management/AssociatePoliciesApiResponse.d.ts +99 -0
  106. package/dist/es/models/security/v4/management/AssociatePoliciesApiResponse.js +343 -0
  107. package/dist/es/models/security/v4/management/CreateApprovalPolicyApiResponse.d.ts +99 -0
  108. package/dist/es/models/security/v4/management/CreateApprovalPolicyApiResponse.js +343 -0
  109. package/dist/es/models/security/v4/management/EventType.d.ts +19 -0
  110. package/dist/es/models/security/v4/management/EventType.js +85 -0
  111. package/dist/es/models/security/v4/management/GetApprovalPolicyApiResponse.d.ts +99 -0
  112. package/dist/es/models/security/v4/management/GetApprovalPolicyApiResponse.js +343 -0
  113. package/dist/es/models/security/v4/management/ListApprovalPoliciesApiResponse.d.ts +99 -0
  114. package/dist/es/models/security/v4/management/ListApprovalPoliciesApiResponse.js +365 -0
  115. package/dist/es/models/security/v4/management/PolicyType.d.ts +19 -0
  116. package/dist/es/models/security/v4/management/PolicyType.js +79 -0
  117. package/dist/es/models/security/v4/management/SecuredEntityType.d.ts +19 -0
  118. package/dist/es/models/security/v4/management/SecuredEntityType.js +85 -0
  119. package/dist/es/models/security/v4/management/SecuredPolicy.d.ts +77 -0
  120. package/dist/es/models/security/v4/management/SecuredPolicy.js +323 -0
  121. package/dist/es/models/security/v4/management/SecurityValidationSpec.d.ts +160 -0
  122. package/dist/es/models/security/v4/management/SecurityValidationSpec.js +582 -0
  123. package/dist/es/models/security/v4/management/TriggerApprovalPolicyValidationApiResponse.d.ts +99 -0
  124. package/dist/es/models/security/v4/management/TriggerApprovalPolicyValidationApiResponse.js +343 -0
  125. package/dist/es/models/security/v4/management/TriggerScanApiResponse.d.ts +99 -0
  126. package/dist/es/models/security/v4/management/TriggerScanApiResponse.js +343 -0
  127. package/dist/es/models/security/v4/management/UpdateApprovalPolicyApiResponse.d.ts +99 -0
  128. package/dist/es/models/security/v4/management/UpdateApprovalPolicyApiResponse.js +343 -0
  129. package/dist/es/models/security/v4/report/IssueSummary.d.ts +71 -0
  130. package/dist/es/models/security/v4/report/IssueSummary.js +326 -0
  131. package/dist/es/models/security/v4/report/ListStigSummariesApiResponse.d.ts +100 -0
  132. package/dist/es/models/security/v4/report/ListStigSummariesApiResponse.js +370 -0
  133. package/dist/es/models/security/v4/report/ListStigsApiResponse.d.ts +100 -0
  134. package/dist/es/models/security/v4/report/ListStigsApiResponse.js +370 -0
  135. package/dist/es/models/security/v4/report/Severity.d.ts +19 -0
  136. package/dist/es/models/security/v4/report/Severity.js +97 -0
  137. package/dist/es/models/security/v4/report/SoftwareType.d.ts +19 -0
  138. package/dist/es/models/security/v4/report/SoftwareType.js +91 -0
  139. package/dist/es/models/security/v4/report/Stig.d.ts +143 -0
  140. package/dist/es/models/security/v4/report/Stig.js +623 -0
  141. package/dist/es/models/security/v4/report/StigProjection.d.ts +10 -0
  142. package/dist/es/models/security/v4/report/StigProjection.js +154 -0
  143. package/dist/es/models/security/v4/report/StigStatus.d.ts +19 -0
  144. package/dist/es/models/security/v4/report/StigStatus.js +91 -0
  145. package/dist/es/models/security/v4/report/StigSummary.d.ts +73 -0
  146. package/dist/es/models/security/v4/report/StigSummary.js +382 -0
  147. package/dist/es/models/security/v4/report/StigSummaryProjection.d.ts +46 -0
  148. package/dist/es/models/security/v4/report/StigSummaryProjection.js +298 -0
  149. package/dist/es/models/security/v4/report/Summary.d.ts +149 -0
  150. package/dist/es/models/security/v4/report/Summary.js +490 -0
  151. package/dist/es/models/security/v4/report/SummaryProjection.d.ts +97 -0
  152. package/dist/es/models/security/v4/report/SummaryProjection.js +329 -0
  153. package/dist/es/models/security/v4/report/TrendValue.d.ts +64 -0
  154. package/dist/es/models/security/v4/report/TrendValue.js +313 -0
  155. package/dist/es/models/security/v4/report/Vulnerability.d.ts +116 -0
  156. package/dist/es/models/security/v4/report/Vulnerability.js +543 -0
  157. package/dist/es/models/security/v4/report/VulnerabilityProjection.d.ts +10 -0
  158. package/dist/es/models/security/v4/report/VulnerabilityProjection.js +153 -0
  159. package/dist/es/models/security/v4/report/VulnerabilitySummary.d.ts +72 -0
  160. package/dist/es/models/security/v4/report/VulnerabilitySummary.js +393 -0
  161. package/dist/es/models/security/v4/report/VulnerabilitySummaryProjection.d.ts +10 -0
  162. package/dist/es/models/security/v4/report/VulnerabilitySummaryProjection.js +153 -0
  163. package/dist/es/models/validation/ValidationError.d.ts +13 -0
  164. package/dist/es/models/validation/ValidationError.js +60 -0
  165. package/dist/es/models/validation/ValidationScopes.d.ts +9 -0
  166. package/dist/es/models/validation/ValidationScopes.js +38 -0
  167. package/dist/es/utils/ValidationUtils.d.ts +13 -0
  168. package/dist/es/utils/ValidationUtils.js +85 -0
  169. package/dist/lib/ApiClient.d.ts +166 -0
  170. package/dist/lib/ApiClient.js +1271 -0
  171. package/dist/lib/Paginable.d.ts +95 -0
  172. package/dist/lib/Paginable.js +287 -0
  173. package/dist/lib/apis/approvalpolicies-endpoints.d.ts +90 -0
  174. package/dist/lib/apis/approvalpolicies-endpoints.js +295 -0
  175. package/dist/lib/apis/stigs-endpoints.d.ts +108 -0
  176. package/dist/lib/apis/stigs-endpoints.js +202 -0
  177. package/dist/lib/index.d.ts +158 -0
  178. package/dist/lib/index.js +628 -0
  179. package/dist/lib/models/common/v1/config/Flag.d.ts +64 -0
  180. package/dist/lib/models/common/v1/config/Flag.js +319 -0
  181. package/dist/lib/models/common/v1/config/KVPair.d.ts +71 -0
  182. package/dist/lib/models/common/v1/config/KVPair.js +378 -0
  183. package/dist/lib/models/common/v1/config/MapOfStringWrapper.d.ts +58 -0
  184. package/dist/lib/models/common/v1/config/MapOfStringWrapper.js +275 -0
  185. package/dist/lib/models/common/v1/config/Message.d.ts +87 -0
  186. package/dist/lib/models/common/v1/config/Message.js +386 -0
  187. package/dist/lib/models/common/v1/config/MessageSeverity.d.ts +19 -0
  188. package/dist/lib/models/common/v1/config/MessageSeverity.js +91 -0
  189. package/dist/lib/models/common/v1/config/TenantAwareModel.d.ts +52 -0
  190. package/dist/lib/models/common/v1/config/TenantAwareModel.js +275 -0
  191. package/dist/lib/models/common/v1/response/ApiLink.d.ts +64 -0
  192. package/dist/lib/models/common/v1/response/ApiLink.js +312 -0
  193. package/dist/lib/models/common/v1/response/ApiResponseMetadata.d.ts +133 -0
  194. package/dist/lib/models/common/v1/response/ApiResponseMetadata.js +482 -0
  195. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.d.ts +48 -0
  196. package/dist/lib/models/common/v1/response/ExternalizableAbstractModel.js +310 -0
  197. package/dist/lib/models/iam/v4/authn/BucketsAccessKey.d.ts +166 -0
  198. package/dist/lib/models/iam/v4/authn/BucketsAccessKey.js +667 -0
  199. package/dist/lib/models/iam/v4/authn/BucketsAccessKeyStatusType.d.ts +19 -0
  200. package/dist/lib/models/iam/v4/authn/BucketsAccessKeyStatusType.js +91 -0
  201. package/dist/lib/models/iam/v4/authn/CreationType.d.ts +19 -0
  202. package/dist/lib/models/iam/v4/authn/CreationType.js +91 -0
  203. package/dist/lib/models/iam/v4/authn/User.d.ts +318 -0
  204. package/dist/lib/models/iam/v4/authn/User.js +1140 -0
  205. package/dist/lib/models/iam/v4/authn/UserStatusType.d.ts +19 -0
  206. package/dist/lib/models/iam/v4/authn/UserStatusType.js +85 -0
  207. package/dist/lib/models/iam/v4/authn/UserType.d.ts +19 -0
  208. package/dist/lib/models/iam/v4/authn/UserType.js +103 -0
  209. package/dist/lib/models/prism/v4/config/TaskReference.d.ts +52 -0
  210. package/dist/lib/models/prism/v4/config/TaskReference.js +287 -0
  211. package/dist/lib/models/security/v4/common/Cluster.d.ts +64 -0
  212. package/dist/lib/models/security/v4/common/Cluster.js +311 -0
  213. package/dist/lib/models/security/v4/common/ClusterProjection.d.ts +10 -0
  214. package/dist/lib/models/security/v4/common/ClusterProjection.js +150 -0
  215. package/dist/lib/models/security/v4/common/Timescale.d.ts +19 -0
  216. package/dist/lib/models/security/v4/common/Timescale.js +103 -0
  217. package/dist/lib/models/security/v4/config/AddPublicKeyApiResponse.d.ts +102 -0
  218. package/dist/lib/models/security/v4/config/AddPublicKeyApiResponse.js +343 -0
  219. package/dist/lib/models/security/v4/config/ChangePasswordSpec.d.ts +74 -0
  220. package/dist/lib/models/security/v4/config/ChangePasswordSpec.js +317 -0
  221. package/dist/lib/models/security/v4/config/ChangeSystemUserPasswordApiResponse.d.ts +102 -0
  222. package/dist/lib/models/security/v4/config/ChangeSystemUserPasswordApiResponse.js +343 -0
  223. package/dist/lib/models/security/v4/config/DeletePublicKeyApiResponse.d.ts +99 -0
  224. package/dist/lib/models/security/v4/config/DeletePublicKeyApiResponse.js +343 -0
  225. package/dist/lib/models/security/v4/config/HardeningStatus.d.ts +154 -0
  226. package/dist/lib/models/security/v4/config/HardeningStatus.js +641 -0
  227. package/dist/lib/models/security/v4/config/HardeningStatusProjection.d.ts +53 -0
  228. package/dist/lib/models/security/v4/config/HardeningStatusProjection.js +358 -0
  229. package/dist/lib/models/security/v4/config/HardeningVisibilitySetting.d.ts +121 -0
  230. package/dist/lib/models/security/v4/config/HardeningVisibilitySetting.js +539 -0
  231. package/dist/lib/models/security/v4/config/PasswordStatus.d.ts +19 -0
  232. package/dist/lib/models/security/v4/config/PasswordStatus.js +97 -0
  233. package/dist/lib/models/security/v4/config/PasswordVerificationStatus.d.ts +19 -0
  234. package/dist/lib/models/security/v4/config/PasswordVerificationStatus.js +91 -0
  235. package/dist/lib/models/security/v4/config/PublicKey.d.ts +80 -0
  236. package/dist/lib/models/security/v4/config/PublicKey.js +373 -0
  237. package/dist/lib/models/security/v4/config/PublicKeyProjection.d.ts +51 -0
  238. package/dist/lib/models/security/v4/config/PublicKeyProjection.js +309 -0
  239. package/dist/lib/models/security/v4/config/Schedule.d.ts +19 -0
  240. package/dist/lib/models/security/v4/config/Schedule.js +97 -0
  241. package/dist/lib/models/security/v4/config/SystemType.d.ts +19 -0
  242. package/dist/lib/models/security/v4/config/SystemType.js +97 -0
  243. package/dist/lib/models/security/v4/config/SystemUserPassword.d.ts +110 -0
  244. package/dist/lib/models/security/v4/config/SystemUserPassword.js +500 -0
  245. package/dist/lib/models/security/v4/config/SystemUserPasswordProjection.d.ts +49 -0
  246. package/dist/lib/models/security/v4/config/SystemUserPasswordProjection.js +330 -0
  247. package/dist/lib/models/security/v4/config/UpdateHardeningStatusesApiResponse.d.ts +99 -0
  248. package/dist/lib/models/security/v4/config/UpdateHardeningStatusesApiResponse.js +343 -0
  249. package/dist/lib/models/security/v4/config/UpdateHardeningVisibilitySettingApiResponse.d.ts +99 -0
  250. package/dist/lib/models/security/v4/config/UpdateHardeningVisibilitySettingApiResponse.js +365 -0
  251. package/dist/lib/models/security/v4/config/VerifyPassword.d.ts +36 -0
  252. package/dist/lib/models/security/v4/config/VerifyPassword.js +272 -0
  253. package/dist/lib/models/security/v4/config/VerifyPasswordSpec.d.ts +62 -0
  254. package/dist/lib/models/security/v4/config/VerifyPasswordSpec.js +279 -0
  255. package/dist/lib/models/security/v4/config/VerifySystemUserPasswordApiResponse.d.ts +99 -0
  256. package/dist/lib/models/security/v4/config/VerifySystemUserPasswordApiResponse.js +343 -0
  257. package/dist/lib/models/security/v4/error/AppMessage.d.ts +117 -0
  258. package/dist/lib/models/security/v4/error/AppMessage.js +464 -0
  259. package/dist/lib/models/security/v4/error/ErrorResponse.d.ts +52 -0
  260. package/dist/lib/models/security/v4/error/ErrorResponse.js +330 -0
  261. package/dist/lib/models/security/v4/error/SchemaValidationError.d.ts +108 -0
  262. package/dist/lib/models/security/v4/error/SchemaValidationError.js +440 -0
  263. package/dist/lib/models/security/v4/error/SchemaValidationErrorMessage.d.ts +76 -0
  264. package/dist/lib/models/security/v4/error/SchemaValidationErrorMessage.js +350 -0
  265. package/dist/lib/models/security/v4/management/ApprovalPolicy.d.ts +204 -0
  266. package/dist/lib/models/security/v4/management/ApprovalPolicy.js +543 -0
  267. package/dist/lib/models/security/v4/management/ApproverGroup.d.ts +160 -0
  268. package/dist/lib/models/security/v4/management/ApproverGroup.js +385 -0
  269. package/dist/lib/models/security/v4/management/AssociatePoliciesApiResponse.d.ts +99 -0
  270. package/dist/lib/models/security/v4/management/AssociatePoliciesApiResponse.js +343 -0
  271. package/dist/lib/models/security/v4/management/CreateApprovalPolicyApiResponse.d.ts +99 -0
  272. package/dist/lib/models/security/v4/management/CreateApprovalPolicyApiResponse.js +343 -0
  273. package/dist/lib/models/security/v4/management/EventType.d.ts +19 -0
  274. package/dist/lib/models/security/v4/management/EventType.js +85 -0
  275. package/dist/lib/models/security/v4/management/GetApprovalPolicyApiResponse.d.ts +99 -0
  276. package/dist/lib/models/security/v4/management/GetApprovalPolicyApiResponse.js +343 -0
  277. package/dist/lib/models/security/v4/management/ListApprovalPoliciesApiResponse.d.ts +99 -0
  278. package/dist/lib/models/security/v4/management/ListApprovalPoliciesApiResponse.js +365 -0
  279. package/dist/lib/models/security/v4/management/PolicyType.d.ts +19 -0
  280. package/dist/lib/models/security/v4/management/PolicyType.js +79 -0
  281. package/dist/lib/models/security/v4/management/SecuredEntityType.d.ts +19 -0
  282. package/dist/lib/models/security/v4/management/SecuredEntityType.js +85 -0
  283. package/dist/lib/models/security/v4/management/SecuredPolicy.d.ts +77 -0
  284. package/dist/lib/models/security/v4/management/SecuredPolicy.js +323 -0
  285. package/dist/lib/models/security/v4/management/SecurityValidationSpec.d.ts +160 -0
  286. package/dist/lib/models/security/v4/management/SecurityValidationSpec.js +582 -0
  287. package/dist/lib/models/security/v4/management/TriggerApprovalPolicyValidationApiResponse.d.ts +99 -0
  288. package/dist/lib/models/security/v4/management/TriggerApprovalPolicyValidationApiResponse.js +343 -0
  289. package/dist/lib/models/security/v4/management/TriggerScanApiResponse.d.ts +99 -0
  290. package/dist/lib/models/security/v4/management/TriggerScanApiResponse.js +343 -0
  291. package/dist/lib/models/security/v4/management/UpdateApprovalPolicyApiResponse.d.ts +99 -0
  292. package/dist/lib/models/security/v4/management/UpdateApprovalPolicyApiResponse.js +343 -0
  293. package/dist/lib/models/security/v4/report/IssueSummary.d.ts +71 -0
  294. package/dist/lib/models/security/v4/report/IssueSummary.js +326 -0
  295. package/dist/lib/models/security/v4/report/ListStigSummariesApiResponse.d.ts +100 -0
  296. package/dist/lib/models/security/v4/report/ListStigSummariesApiResponse.js +370 -0
  297. package/dist/lib/models/security/v4/report/ListStigsApiResponse.d.ts +100 -0
  298. package/dist/lib/models/security/v4/report/ListStigsApiResponse.js +370 -0
  299. package/dist/lib/models/security/v4/report/Severity.d.ts +19 -0
  300. package/dist/lib/models/security/v4/report/Severity.js +97 -0
  301. package/dist/lib/models/security/v4/report/SoftwareType.d.ts +19 -0
  302. package/dist/lib/models/security/v4/report/SoftwareType.js +91 -0
  303. package/dist/lib/models/security/v4/report/Stig.d.ts +143 -0
  304. package/dist/lib/models/security/v4/report/Stig.js +623 -0
  305. package/dist/lib/models/security/v4/report/StigProjection.d.ts +10 -0
  306. package/dist/lib/models/security/v4/report/StigProjection.js +154 -0
  307. package/dist/lib/models/security/v4/report/StigStatus.d.ts +19 -0
  308. package/dist/lib/models/security/v4/report/StigStatus.js +91 -0
  309. package/dist/lib/models/security/v4/report/StigSummary.d.ts +73 -0
  310. package/dist/lib/models/security/v4/report/StigSummary.js +382 -0
  311. package/dist/lib/models/security/v4/report/StigSummaryProjection.d.ts +46 -0
  312. package/dist/lib/models/security/v4/report/StigSummaryProjection.js +298 -0
  313. package/dist/lib/models/security/v4/report/Summary.d.ts +149 -0
  314. package/dist/lib/models/security/v4/report/Summary.js +490 -0
  315. package/dist/lib/models/security/v4/report/SummaryProjection.d.ts +97 -0
  316. package/dist/lib/models/security/v4/report/SummaryProjection.js +329 -0
  317. package/dist/lib/models/security/v4/report/TrendValue.d.ts +64 -0
  318. package/dist/lib/models/security/v4/report/TrendValue.js +313 -0
  319. package/dist/lib/models/security/v4/report/Vulnerability.d.ts +116 -0
  320. package/dist/lib/models/security/v4/report/Vulnerability.js +543 -0
  321. package/dist/lib/models/security/v4/report/VulnerabilityProjection.d.ts +10 -0
  322. package/dist/lib/models/security/v4/report/VulnerabilityProjection.js +153 -0
  323. package/dist/lib/models/security/v4/report/VulnerabilitySummary.d.ts +72 -0
  324. package/dist/lib/models/security/v4/report/VulnerabilitySummary.js +393 -0
  325. package/dist/lib/models/security/v4/report/VulnerabilitySummaryProjection.d.ts +10 -0
  326. package/dist/lib/models/security/v4/report/VulnerabilitySummaryProjection.js +153 -0
  327. package/dist/lib/models/validation/ValidationError.d.ts +13 -0
  328. package/dist/lib/models/validation/ValidationError.js +60 -0
  329. package/dist/lib/models/validation/ValidationScopes.d.ts +9 -0
  330. package/dist/lib/models/validation/ValidationScopes.js +38 -0
  331. package/dist/lib/utils/ValidationUtils.d.ts +13 -0
  332. package/dist/lib/utils/ValidationUtils.js +85 -0
  333. package/package.json +53 -0
@@ -0,0 +1,623 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _TenantAwareModel = _interopRequireDefault(require("../../../common/v1/config/TenantAwareModel"));
8
+ var _ApiLink = _interopRequireDefault(require("../../../common/v1/response/ApiLink"));
9
+ var _ExternalizableAbstractModel = _interopRequireDefault(require("../../../common/v1/response/ExternalizableAbstractModel"));
10
+ var _Severity = _interopRequireDefault(require("./Severity"));
11
+ var _StigStatus = _interopRequireDefault(require("./StigStatus"));
12
+ var _ValidationScopes = _interopRequireDefault(require("../../../validation/ValidationScopes"));
13
+ var _ValidationUtils = _interopRequireDefault(require("../../../../utils/ValidationUtils"));
14
+ var _ValidationError = _interopRequireDefault(require("../../../validation/ValidationError"));
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
16
+ 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); }
17
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
18
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
+ 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; } }
20
+ 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; }
21
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
22
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
23
+ 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; }
24
+ 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; }
25
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
26
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
27
+ 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); } }
28
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
29
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
30
+ 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); }
31
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
32
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
33
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
34
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
35
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
36
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
37
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
38
+ function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
39
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } /*
40
+ * Nutanix Security APIs
41
+ *
42
+ * OpenAPI spec version: 4.0.1-beta-1
43
+ *
44
+ * NOTE: This class is auto generated by the Open API Dev Platform.
45
+ *
46
+ * Open API Dev Platform Codegen version: 16.9.0.8546-RELEASE
47
+ *
48
+ * Do not edit the class manually.
49
+ *
50
+ */
51
+ /**
52
+ * The Stig model module.
53
+ * @module Ntnx/Stig
54
+ * @version 4.0.1-beta-1
55
+ * @class Stig
56
+ * @extends ExternalizableAbstractModel
57
+ */
58
+ var _Stig_brand = /*#__PURE__*/new WeakSet();
59
+ var Stig = exports["default"] = /*#__PURE__*/function (_ExternalizableAbstra) {
60
+ /**
61
+ * Constructs a new <code>Stig</code>.
62
+ * Contains information of a specific STIG.
63
+ * @alias module:Ntnx/Stig
64
+ * @extends module:Ntnx/ExternalizableAbstractModel
65
+ */
66
+ function Stig() {
67
+ var _this;
68
+ _classCallCheck(this, Stig);
69
+ _this = _callSuper(this, Stig);
70
+ /*
71
+ * toJson method for a map type which supports map with primitive keys and values of object types
72
+ * @param {Object} obj
73
+ * @returns {Object|Map} Returns a new transofrmed Map by calling toJson on the values if applicable.
74
+ * Otherwise, just returns the input object.
75
+ */
76
+ _classPrivateMethodInitSpec(_this, _Stig_brand);
77
+ _this.$objectType = "security.v4.report.Stig";
78
+ /** @type {object<string, any>} */
79
+ _this.$reserved = {
80
+ '$fv': "v4.r0.b1"
81
+ };
82
+ /** @type {object<string, any>} */
83
+ _this.$unknownFields = {};
84
+ return _this;
85
+ }
86
+
87
+ /**
88
+ * Constructs a <code>Stig</code> from a plain JavaScript object, optionally creating a new instance.
89
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
90
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
91
+ * @param {module:Ntnx/Stig} obj Optional instance to populate.
92
+ * @param callFromChild {Boolean} Flag to recognise calling instance
93
+ * @return {module:Ntnx/Stig} The populated <code>Stig</code> instance.
94
+ */
95
+ _inherits(Stig, _ExternalizableAbstra);
96
+ return _createClass(Stig, [{
97
+ key: "getTitle",
98
+ value:
99
+ /**
100
+ * Returns Title of the STIG control.
101
+ * @return {string}
102
+ */
103
+ function getTitle() {
104
+ return this.title;
105
+ }
106
+
107
+ /**
108
+ * Sets Title of the STIG control.
109
+ * @param {string} title Title of the STIG control.
110
+ */
111
+ }, {
112
+ key: "setTitle",
113
+ value: function setTitle(title) {
114
+ this.title = title;
115
+ }
116
+
117
+ /**
118
+ * Returns Rule ID of the STIG control.
119
+ * @return {string}
120
+ */
121
+ }, {
122
+ key: "getRuleId",
123
+ value: function getRuleId() {
124
+ return this.ruleId;
125
+ }
126
+
127
+ /**
128
+ * Sets Rule ID of the STIG control.
129
+ * @param {string} ruleId Rule ID of the STIG control.
130
+ */
131
+ }, {
132
+ key: "setRuleId",
133
+ value: function setRuleId(ruleId) {
134
+ this.ruleId = ruleId;
135
+ }
136
+
137
+ /**
138
+ * Returns STIG ID of the control.
139
+ * @return {string}
140
+ */
141
+ }, {
142
+ key: "getStigVersion",
143
+ value: function getStigVersion() {
144
+ return this.stigVersion;
145
+ }
146
+
147
+ /**
148
+ * Sets STIG ID of the control.
149
+ * @param {string} stigVersion STIG ID of the control.
150
+ */
151
+ }, {
152
+ key: "setStigVersion",
153
+ value: function setStigVersion(stigVersion) {
154
+ this.stigVersion = stigVersion;
155
+ }
156
+
157
+ /**
158
+ * Returns Additional identifiers used to describe this control.
159
+ * @return {string[]}
160
+ */
161
+ }, {
162
+ key: "getIdentifiers",
163
+ value: function getIdentifiers() {
164
+ return this.identifiers;
165
+ }
166
+
167
+ /**
168
+ * Sets Additional identifiers used to describe this control.
169
+ * @param {string[]} identifiers Additional identifiers used to describe this control.
170
+ */
171
+ }, {
172
+ key: "setIdentifiers",
173
+ value: function setIdentifiers(identifiers) {
174
+ this.identifiers = identifiers;
175
+ }
176
+
177
+ /**
178
+ * Returns List of clusters that failed the STIG control.
179
+ * @return {string[]}
180
+ */
181
+ }, {
182
+ key: "getAffectedClusters",
183
+ value: function getAffectedClusters() {
184
+ return this.affectedClusters;
185
+ }
186
+
187
+ /**
188
+ * Sets List of clusters that failed the STIG control.
189
+ * @param {string[]} affectedClusters List of clusters that failed the STIG control.
190
+ */
191
+ }, {
192
+ key: "setAffectedClusters",
193
+ value: function setAffectedClusters(affectedClusters) {
194
+ this.affectedClusters = affectedClusters;
195
+ }
196
+
197
+ /**
198
+ * @return {Severity}
199
+ */
200
+ }, {
201
+ key: "getSeverity",
202
+ value: function getSeverity() {
203
+ return this.severity;
204
+ }
205
+
206
+ /**
207
+ * @param {Severity} severity
208
+ */
209
+ }, {
210
+ key: "setSeverity",
211
+ value: function setSeverity(severity) {
212
+ this.severity = severity;
213
+ }
214
+
215
+ /**
216
+ * @return {StigStatus}
217
+ */
218
+ }, {
219
+ key: "getStatus",
220
+ value: function getStatus() {
221
+ return this.status;
222
+ }
223
+
224
+ /**
225
+ * @param {StigStatus} status
226
+ */
227
+ }, {
228
+ key: "setStatus",
229
+ value: function setStatus(status) {
230
+ this.status = status;
231
+ }
232
+
233
+ /**
234
+ * Returns The comments to explain why a STIG rule applies or does not apply to the cluster.
235
+ * @return {string}
236
+ */
237
+ }, {
238
+ key: "getComments",
239
+ value: function getComments() {
240
+ return this.comments;
241
+ }
242
+
243
+ /**
244
+ * Sets The comments to explain why a STIG rule applies or does not apply to the cluster.
245
+ * @param {string} comments The comments to explain why a STIG rule applies or does not apply to the cluster.
246
+ */
247
+ }, {
248
+ key: "setComments",
249
+ value: function setComments(comments) {
250
+ this.comments = comments;
251
+ }
252
+
253
+ /**
254
+ * Returns The command/steps to fix the STIG rule failure.
255
+ * @return {string}
256
+ */
257
+ }, {
258
+ key: "getFixText",
259
+ value: function getFixText() {
260
+ return this.fixText;
261
+ }
262
+
263
+ /**
264
+ * Sets The command/steps to fix the STIG rule failure.
265
+ * @param {string} fixText The command/steps to fix the STIG rule failure.
266
+ */
267
+ }, {
268
+ key: "setFixText",
269
+ value: function setFixText(fixText) {
270
+ this.fixText = fixText;
271
+ }
272
+
273
+ /**
274
+ * Returns Benchmark ID of the STIG rules.
275
+ * @return {string}
276
+ */
277
+ }, {
278
+ key: "getBenchmarkId",
279
+ value: function getBenchmarkId() {
280
+ return this.benchmarkId;
281
+ }
282
+
283
+ /**
284
+ * Sets Benchmark ID of the STIG rules.
285
+ * @param {string} benchmarkId Benchmark ID of the STIG rules.
286
+ */
287
+ }, {
288
+ key: "setBenchmarkId",
289
+ value: function setBenchmarkId(benchmarkId) {
290
+ this.benchmarkId = benchmarkId;
291
+ }
292
+ }, {
293
+ key: "toJson",
294
+ value: function toJson(forMutation) {
295
+ if (forMutation === false) {
296
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, typeof this.getTitle() !== 'undefined' && this.getTitle() !== null ? {
297
+ 'title': this.getTitle()
298
+ } : {}), typeof this.getRuleId() !== 'undefined' && this.getRuleId() !== null ? {
299
+ 'ruleId': this.getRuleId()
300
+ } : {}), typeof this.getStigVersion() !== 'undefined' && this.getStigVersion() !== null ? {
301
+ 'stigVersion': this.getStigVersion()
302
+ } : {}), typeof this.getIdentifiers() !== 'undefined' && this.getIdentifiers() !== null ? {
303
+ 'identifiers': this.getIdentifiers()
304
+ } : {}), typeof this.getAffectedClusters() !== 'undefined' && this.getAffectedClusters() !== null ? {
305
+ 'affectedClusters': this.getAffectedClusters()
306
+ } : {}), typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {
307
+ 'severity': this.getSeverity()
308
+ } : {}), typeof this.getStatus() !== 'undefined' && this.getStatus() !== null ? {
309
+ 'status': this.getStatus()
310
+ } : {}), typeof this.getComments() !== 'undefined' && this.getComments() !== null ? {
311
+ 'comments': this.getComments()
312
+ } : {}), typeof this.getFixText() !== 'undefined' && this.getFixText() !== null ? {
313
+ 'fixText': this.getFixText()
314
+ } : {}), typeof this.getBenchmarkId() !== 'undefined' && this.getBenchmarkId() !== null ? {
315
+ 'benchmarkId': this.getBenchmarkId()
316
+ } : {}), typeof this.getExtId() !== 'undefined' && this.getExtId() !== null ? {
317
+ 'extId': this.getExtId()
318
+ } : {}), typeof this.getLinks() !== 'undefined' && this.getLinks() !== null ? {
319
+ 'links': this.getLinks().map(function (item) {
320
+ return item.toJson(false);
321
+ })
322
+ } : {}), typeof this.getTenantId() !== 'undefined' && this.getTenantId() !== null ? {
323
+ 'tenantId': this.getTenantId()
324
+ } : {}), {}, {
325
+ '$reserved': this.get$Reserved(),
326
+ '$objectType': this.get$ObjectType(),
327
+ '$unknownFields': this.get$UnknownFields()
328
+ });
329
+ }
330
+ return _objectSpread(_objectSpread(_objectSpread({}, typeof this.getSeverity() !== 'undefined' && this.getSeverity() !== null ? {
331
+ 'severity': this.getSeverity()
332
+ } : {}), typeof this.getStatus() !== 'undefined' && this.getStatus() !== null ? {
333
+ 'status': this.getStatus()
334
+ } : {}), {}, {
335
+ '$reserved': this.get$Reserved(),
336
+ '$objectType': this.get$ObjectType(),
337
+ '$unknownFields': this.get$UnknownFields()
338
+ });
339
+ }
340
+ }, {
341
+ key: "validate",
342
+ value: function validate(scope, properties) {
343
+ var _this2 = this;
344
+ var propList = [];
345
+ if (arguments.length === 0 || arguments.length === 1 && arguments[0] instanceof _ValidationScopes["default"]) {
346
+ //cases validate() and validate(scope)
347
+ propList = [];
348
+ } else if (arguments.length === 1) {
349
+ //case validate(properties)
350
+ propList = arguments[0];
351
+ scope = null;
352
+ } else {
353
+ //case validate(scope, properties)
354
+ propList = arguments[1];
355
+ }
356
+ var res = [];
357
+ var err = null;
358
+ propList.forEach(function (property) {
359
+ err = _this2.validateProperty(property, scope);
360
+ if (err) {
361
+ res.push(err);
362
+ }
363
+ });
364
+ return new Promise(function (resolve, reject) {
365
+ if (res.length !== 0) {
366
+ reject(err);
367
+ } else {
368
+ resolve();
369
+ }
370
+ });
371
+ }
372
+ }, {
373
+ key: "validateProperty",
374
+ value: function validateProperty(scope, property) {
375
+ if (property === "title") {
376
+ if (typeof this.title === 'undefined' || this.title === null) {
377
+ return new _ValidationError["default"]("title", "undefined or null");
378
+ }
379
+ if (!_ValidationUtils["default"].validateMaxLength(this.title, 199)) {
380
+ return new _ValidationError["default"]("title", "does not satisfy required maxLength constraint: 199");
381
+ }
382
+ }
383
+ if (property === "ruleId") {
384
+ if (typeof this.ruleId === 'undefined' || this.ruleId === null) {
385
+ return new _ValidationError["default"]("ruleId", "undefined or null");
386
+ }
387
+ if (!_ValidationUtils["default"].validatePattern(this.ruleId, /^SV-\\d{6}r\\d{6}_rule$/)) {
388
+ return new _ValidationError["default"]("ruleId", "does not satisfy required pattern: /^SV-\\d{6}r\\d{6}_rule$/");
389
+ }
390
+ }
391
+ if (property === "stigVersion") {
392
+ if (typeof this.stigVersion === 'undefined' || this.stigVersion === null) {
393
+ return new _ValidationError["default"]("stigVersion", "undefined or null");
394
+ }
395
+ if (!_ValidationUtils["default"].validatePattern(this.stigVersion, /^RHEL-\\d{2}-\\d{6}$/)) {
396
+ return new _ValidationError["default"]("stigVersion", "does not satisfy required pattern: /^RHEL-\\d{2}-\\d{6}$/");
397
+ }
398
+ }
399
+ if (property === "identifiers") {
400
+ if (typeof this.identifiers === 'undefined' || this.identifiers === null) {
401
+ return new _ValidationError["default"]("identifiers", "undefined or null");
402
+ }
403
+ }
404
+ if (property === "affectedClusters") {
405
+ if (typeof this.affectedClusters === 'undefined' || this.affectedClusters === null) {
406
+ return new _ValidationError["default"]("affectedClusters", "undefined or null");
407
+ }
408
+ }
409
+ if (property === "severity") {
410
+ if (typeof this.severity === 'undefined' || this.severity === null) {
411
+ return new _ValidationError["default"]("severity", "undefined or null");
412
+ }
413
+ }
414
+ if (property === "status") {
415
+ if (typeof this.status === 'undefined' || this.status === null) {
416
+ return new _ValidationError["default"]("status", "undefined or null");
417
+ }
418
+ }
419
+ if (property === "comments") {
420
+ if (typeof this.comments === 'undefined' || this.comments === null) {
421
+ return new _ValidationError["default"]("comments", "undefined or null");
422
+ }
423
+ if (!_ValidationUtils["default"].validateMaxLength(this.comments, 499)) {
424
+ return new _ValidationError["default"]("comments", "does not satisfy required maxLength constraint: 499");
425
+ }
426
+ }
427
+ if (property === "fixText") {
428
+ if (typeof this.fixText === 'undefined' || this.fixText === null) {
429
+ return new _ValidationError["default"]("fixText", "undefined or null");
430
+ }
431
+ if (!_ValidationUtils["default"].validateMaxLength(this.fixText, 499)) {
432
+ return new _ValidationError["default"]("fixText", "does not satisfy required maxLength constraint: 499");
433
+ }
434
+ }
435
+ if (property === "benchmarkId") {
436
+ if (typeof this.benchmarkId === 'undefined' || this.benchmarkId === null) {
437
+ return new _ValidationError["default"]("benchmarkId", "undefined or null");
438
+ }
439
+ if (!_ValidationUtils["default"].validatePattern(this.benchmarkId, /^RHEL_\\d+_V\\d+R\\d+$/)) {
440
+ return new _ValidationError["default"]("benchmarkId", "does not satisfy required pattern: /^RHEL_\\d+_V\\d+R\\d+$/");
441
+ }
442
+ }
443
+ return new _ValidationError["default"](property, "no such property exists");
444
+ }
445
+ }], [{
446
+ key: "constructFromObject",
447
+ value: function constructFromObject(data) {
448
+ var obj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
449
+ var callFromChild = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
450
+ var items, item, i, itemArr, discriminator;
451
+ if (data) {
452
+ obj = obj || new Stig();
453
+ _ExternalizableAbstractModel["default"].constructFromObject(data, obj, true);
454
+ if (data.hasOwnProperty('title') && data.title !== null && data.title !== undefined) {
455
+ obj.setTitle(data['title']);
456
+ }
457
+ if (data.hasOwnProperty('ruleId') && data.ruleId !== null && data.ruleId !== undefined) {
458
+ obj.setRuleId(data['ruleId']);
459
+ }
460
+ if (data.hasOwnProperty('stigVersion') && data.stigVersion !== null && data.stigVersion !== undefined) {
461
+ obj.setStigVersion(data['stigVersion']);
462
+ }
463
+ if (data.hasOwnProperty('identifiers') && data.identifiers !== null && data.identifiers !== undefined) {
464
+ itemArr = [];
465
+ items = data.identifiers;
466
+ for (i = 0; i < items.length; i++) {
467
+ itemArr.push(items[i]);
468
+ }
469
+ obj.setIdentifiers(itemArr);
470
+ }
471
+ if (data.hasOwnProperty('affectedClusters') && data.affectedClusters !== null && data.affectedClusters !== undefined) {
472
+ itemArr = [];
473
+ items = data.affectedClusters;
474
+ for (i = 0; i < items.length; i++) {
475
+ itemArr.push(items[i]);
476
+ }
477
+ obj.setAffectedClusters(itemArr);
478
+ }
479
+ if (data.hasOwnProperty('severity') && data.severity !== null && data.severity !== undefined) {
480
+ obj.setSeverity(_Severity["default"].constructFromObject(data['severity']));
481
+ }
482
+ if (data.hasOwnProperty('status') && data.status !== null && data.status !== undefined) {
483
+ obj.setStatus(_StigStatus["default"].constructFromObject(data['status']));
484
+ }
485
+ if (data.hasOwnProperty('comments') && data.comments !== null && data.comments !== undefined) {
486
+ obj.setComments(data['comments']);
487
+ }
488
+ if (data.hasOwnProperty('fixText') && data.fixText !== null && data.fixText !== undefined) {
489
+ obj.setFixText(data['fixText']);
490
+ }
491
+ if (data.hasOwnProperty('benchmarkId') && data.benchmarkId !== null && data.benchmarkId !== undefined) {
492
+ obj.setBenchmarkId(data['benchmarkId']);
493
+ }
494
+ if (!callFromChild) {
495
+ obj.$unknownFields = _objectSpread({}, data.$unknownFields);
496
+ for (var property in data) {
497
+ // Check if the `property` is not already present in `obj` keys, either in snake_case or camelCase,
498
+ // as the model's fields are generated in camelCase, but the server might return snake_case (e.g., due to standards like OIDC).
499
+ // Also, ensure the `property` does not start with '$' and end with 'ItemDiscriminator'.
500
+ // If all conditions are true, add the `property` from `data` to `obj.$unknownFields` as an unknown field.
501
+ if (!Object.keys(obj).includes(property) && !Object.keys(obj).includes(this.snakeToCamel(property)) && !(property[0] === "$" && property.endsWith("ItemDiscriminator"))) {
502
+ obj.$unknownFields[property] = data[property];
503
+ }
504
+ }
505
+ }
506
+ }
507
+ return obj;
508
+ }
509
+
510
+ /**
511
+ * Converts a given snake_case string to camelCase.
512
+ * @param {string} snakeStr - The input string in snake_case format.
513
+ * @returns {string} - The converted string in camelCase format.
514
+ */
515
+ }, {
516
+ key: "snakeToCamel",
517
+ value: function snakeToCamel(snakeStr) {
518
+ return snakeStr.replace(/(_\w)/g, function (match) {
519
+ return match[1].toUpperCase();
520
+ });
521
+ }
522
+ }]);
523
+ }(_ExternalizableAbstractModel["default"]);
524
+ /**
525
+ * Title of the STIG control.
526
+ * @memberof Stig
527
+ */
528
+ function _toJsonMapType(obj, forMutation) {
529
+ if (obj instanceof Map) {
530
+ return Object.fromEntries(Array.from(obj, function (_ref) {
531
+ var _ref2 = _slicedToArray(_ref, 2),
532
+ k = _ref2[0],
533
+ v = _ref2[1];
534
+ return [k, typeof v.toJson !== "undefined" ? v.toJson(forMutation) : v];
535
+ }));
536
+ } else if (_typeof(obj) === 'object' && obj != null && obj.constructor === Object) {
537
+ return Object.fromEntries(Array.from(Object.entries(obj), function (entry) {
538
+ return [entry[0], typeof entry[1].toJson !== "undefined" ? entry[1].toJson(forMutation) : entry[1]];
539
+ }));
540
+ }
541
+ return obj;
542
+ }
543
+ /*
544
+ * toJson method for a date type which serializes a Date object to proper Date or DateTime formatting
545
+ * @param {Object} obj Object to serialize
546
+ * @param {boolean} isDateOnly Boolean variable to identify Date or DateTime format for serialization
547
+ * @returns {Object|string} Returns serialized date object or original input object
548
+ */
549
+ function _handleDateType(obj, isDateOnly) {
550
+ if (obj instanceof Date && isDateOnly !== undefined) {
551
+ return isDateOnly ? obj.toISOString().slice(0, 10) : obj.toISOString();
552
+ }
553
+ return obj;
554
+ }
555
+ Stig.prototype.title = undefined;
556
+
557
+ /**
558
+ * Rule ID of the STIG control.
559
+ * @memberof Stig
560
+ */
561
+ Stig.prototype.ruleId = undefined;
562
+
563
+ /**
564
+ * STIG ID of the control.
565
+ * @memberof Stig
566
+ */
567
+ Stig.prototype.stigVersion = undefined;
568
+
569
+ /**
570
+ * Additional identifiers used to describe this control.
571
+ * @memberof Stig
572
+ */
573
+ Stig.prototype.identifiers = undefined;
574
+
575
+ /**
576
+ * List of clusters that failed the STIG control.
577
+ * @memberof Stig
578
+ */
579
+ Stig.prototype.affectedClusters = undefined;
580
+
581
+ /**
582
+ * @memberof Stig
583
+ */
584
+ Stig.prototype.severity = undefined;
585
+
586
+ /**
587
+ * @memberof Stig
588
+ */
589
+ Stig.prototype.status = undefined;
590
+
591
+ /**
592
+ * The comments to explain why a STIG rule applies or does not apply to the cluster.
593
+ * @memberof Stig
594
+ */
595
+ Stig.prototype.comments = undefined;
596
+
597
+ /**
598
+ * The command/steps to fix the STIG rule failure.
599
+ * @memberof Stig
600
+ */
601
+ Stig.prototype.fixText = undefined;
602
+
603
+ /**
604
+ * Benchmark ID of the STIG rules.
605
+ * @memberof Stig
606
+ */
607
+ Stig.prototype.benchmarkId = undefined;
608
+
609
+ /**
610
+ * A globally unique identifier of an instance that is suitable for external consumption.
611
+ * @memberof Stig
612
+ */
613
+ _ExternalizableAbstractModel["default"].prototype.extId = undefined;
614
+ /**
615
+ * A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
616
+ * @memberof Stig
617
+ */
618
+ _ExternalizableAbstractModel["default"].prototype.links = undefined;
619
+ /**
620
+ * A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).
621
+ * @memberof Stig
622
+ */
623
+ _TenantAwareModel["default"].prototype.tenantId = undefined;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The StigProjection model module.
3
+ * @module Ntnx/StigProjection
4
+ * @version 4.0.1-beta-1
5
+ * @class StigProjection
6
+ * @extends Stig
7
+ */
8
+ export default class StigProjection extends Stig {
9
+ }
10
+ import Stig from "./Stig";