emass_client 3.10.1 → 3.22.0

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 (208) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +174 -131
  3. data/lib/emass_client/api/artifacts_api.rb +47 -52
  4. data/lib/emass_client/api/artifacts_export_api.rb +5 -5
  5. data/lib/emass_client/api/cac_api.rb +12 -12
  6. data/lib/emass_client/api/cloud_resource_results_api.rb +83 -9
  7. data/lib/emass_client/api/cmmc_assessment_dashboards_api.rb +314 -0
  8. data/lib/emass_client/api/cmmc_assessments_api.rb +5 -5
  9. data/lib/emass_client/api/coast_guard_system_fisma_metrics_dashboard_api.rb +95 -0
  10. data/lib/emass_client/api/container_scan_results_api.rb +83 -9
  11. data/lib/emass_client/api/controls_api.rb +17 -17
  12. data/lib/emass_client/api/device_scan_results_api.rb +112 -0
  13. data/lib/emass_client/api/hardware_baseline_api.rb +313 -0
  14. data/lib/emass_client/api/milestones_api.rb +18 -18
  15. data/lib/emass_client/api/organization_migration_status_dashboard_api.rb +95 -0
  16. data/lib/emass_client/api/pac_api.rb +16 -16
  17. data/lib/emass_client/api/poam_api.rb +47 -44
  18. data/lib/emass_client/api/registration_api.rb +5 -5
  19. data/lib/emass_client/api/software_baseline_api.rb +313 -0
  20. data/lib/emass_client/api/static_code_scans_api.rb +9 -9
  21. data/lib/emass_client/api/system_application_findings_dashboards_api.rb +168 -0
  22. data/lib/emass_client/api/system_artifacts_dashboards_api.rb +168 -0
  23. data/lib/emass_client/api/system_associations_dashboard_api.rb +95 -0
  24. data/lib/emass_client/api/system_atciatc_dashboard_api.rb +95 -0
  25. data/lib/emass_client/api/system_conmon_integration_status_dashboard_api.rb +95 -0
  26. data/lib/emass_client/api/system_connectivity_ccsd_dashboards_api.rb +168 -0
  27. data/lib/emass_client/api/system_critical_assets_dashboard_api.rb +95 -0
  28. data/lib/emass_client/api/system_device_findings_dashboards_api.rb +168 -0
  29. data/lib/emass_client/api/system_fisma_metrics_dashboard_api.rb +95 -0
  30. data/lib/emass_client/api/system_hardware_dashboards_api.rb +168 -0
  31. data/lib/emass_client/api/system_migration_status_dashboard_api.rb +95 -0
  32. data/lib/emass_client/api/system_poam_dashboards_api.rb +168 -0
  33. data/lib/emass_client/api/system_ports_protocols_dashboards_api.rb +168 -0
  34. data/lib/emass_client/api/system_privacy_dashboard_api.rb +95 -0
  35. data/lib/emass_client/api/system_questionnaire_dashboards_api.rb +168 -0
  36. data/lib/emass_client/api/system_roles_api.rb +8 -16
  37. data/lib/emass_client/api/system_security_controls_dashboards_api.rb +241 -0
  38. data/lib/emass_client/api/system_sensor_hardware_dashboards_api.rb +168 -0
  39. data/lib/emass_client/api/system_sensor_software_dashboards_api.rb +241 -0
  40. data/lib/emass_client/api/system_software_dashboards_api.rb +168 -0
  41. data/lib/emass_client/api/system_status_dashboard_api.rb +95 -0
  42. data/lib/emass_client/api/system_terms_conditions_dashboards_api.rb +168 -0
  43. data/lib/emass_client/api/system_vulnerability_dashboard_api.rb +95 -0
  44. data/lib/emass_client/api/system_workflows_dashboards_api.rb +241 -0
  45. data/lib/emass_client/api/systems_api.rb +22 -28
  46. data/lib/emass_client/api/test_api.rb +5 -5
  47. data/lib/emass_client/api/test_results_api.rb +19 -16
  48. data/lib/emass_client/api/user_system_assignments_dashboard_api.rb +95 -0
  49. data/lib/emass_client/api/va_system_dashboards_api.rb +679 -0
  50. data/lib/emass_client/api/vaombfisma_dashboard_api.rb +95 -0
  51. data/lib/emass_client/api/workflow_definitions_api.rb +9 -9
  52. data/lib/emass_client/api/workflow_instances_api.rb +17 -14
  53. data/lib/emass_client/api_client.rb +46 -32
  54. data/lib/emass_client/api_error.rb +4 -4
  55. data/lib/emass_client/configuration.rb +42 -12
  56. data/lib/emass_client/models/{response201.rb → api_rule_failed.rb} +29 -28
  57. data/lib/emass_client/models/{response490_meta.rb → api_rule_failed_meta.rb} +34 -29
  58. data/lib/emass_client/models/artifacts_ids.rb +221 -0
  59. data/lib/emass_client/models/artifacts_optional_fields.rb +298 -0
  60. data/lib/emass_client/models/artifacts_read_only_fields.rb +255 -0
  61. data/lib/emass_client/models/artifacts_request_delete_body_inner.rb +26 -25
  62. data/lib/emass_client/models/artifacts_required_fields.rb +252 -0
  63. data/lib/emass_client/models/artifacts_response_del.rb +26 -25
  64. data/lib/emass_client/models/artifacts_response_del_data_inner.rb +26 -25
  65. data/lib/emass_client/models/artifacts_response_get.rb +27 -26
  66. data/lib/emass_client/models/{artifacts_get.rb → artifacts_response_get_data_inner.rb} +91 -70
  67. data/lib/emass_client/models/artifacts_response_put_post.rb +26 -25
  68. data/lib/emass_client/models/artifacts_response_put_post_data_inner.rb +40 -30
  69. data/lib/emass_client/models/{response403.rb → bad_request.rb} +29 -28
  70. data/lib/emass_client/models/{response400_meta.rb → bad_request_meta.rb} +34 -29
  71. data/lib/emass_client/models/cac_get.rb +26 -25
  72. data/lib/emass_client/models/cac_response_get.rb +26 -25
  73. data/lib/emass_client/models/cac_response_post.rb +26 -25
  74. data/lib/emass_client/models/cac_response_post_data_inner.rb +40 -30
  75. data/lib/emass_client/models/{poam_response_post.rb → cloud_resources_delete.rb} +29 -28
  76. data/lib/emass_client/models/cloud_resources_delete_body_inner.rb +221 -0
  77. data/lib/emass_client/models/{cloud_resources_post.rb → cloud_resources_post_delete.rb} +42 -32
  78. data/lib/emass_client/models/cloud_resources_response_post.rb +27 -26
  79. data/lib/emass_client/models/cmmc_get.rb +96 -140
  80. data/lib/emass_client/models/cmmc_response_get.rb +26 -25
  81. data/lib/emass_client/models/connectivity_ccsd.rb +26 -25
  82. data/lib/emass_client/models/container_resources_delete_body_inner.rb +221 -0
  83. data/lib/emass_client/models/{containers_resources_post.rb → containers_resources_post_delete.rb} +42 -32
  84. data/lib/emass_client/models/{poam_response_delete.rb → containers_response_delete.rb} +29 -28
  85. data/lib/emass_client/models/containers_response_post.rb +27 -26
  86. data/lib/emass_client/models/controls_conditional_fields.rb +357 -0
  87. data/lib/emass_client/models/controls_ids.rb +221 -0
  88. data/lib/emass_client/models/controls_optional_fields.rb +471 -0
  89. data/lib/emass_client/models/controls_put.rb +40 -30
  90. data/lib/emass_client/models/controls_read_only_fields.rb +277 -0
  91. data/lib/emass_client/models/controls_required_fields.rb +295 -0
  92. data/lib/emass_client/models/controls_response_get.rb +27 -26
  93. data/lib/emass_client/models/{controls_get.rb → controls_response_get_data_inner.rb} +210 -166
  94. data/lib/emass_client/models/controls_response_put.rb +26 -25
  95. data/lib/emass_client/models/{response400.rb → created.rb} +29 -28
  96. data/lib/emass_client/models/{response201_meta.rb → created_meta.rb} +34 -29
  97. data/lib/emass_client/models/definition_transitions.rb +26 -25
  98. data/lib/emass_client/models/{success200_response.rb → device_scan_results_response_post.rb} +29 -28
  99. data/lib/emass_client/models/{success200_response_data_inner.rb → device_scan_results_response_post_data_inner.rb} +72 -33
  100. data/lib/emass_client/models/{response401.rb → forbidden.rb} +29 -28
  101. data/lib/emass_client/models/{response403_meta.rb → forbidden_meta.rb} +34 -29
  102. data/lib/emass_client/models/get_system_status_details200_response.rb +240 -0
  103. data/lib/emass_client/models/hw_baseline_conditional_fields.rb +244 -0
  104. data/lib/emass_client/models/hw_baseline_ids.rb +221 -0
  105. data/lib/emass_client/models/hw_baseline_optional_fields.rb +354 -0
  106. data/lib/emass_client/models/hw_baseline_read_only_fields.rb +222 -0
  107. data/lib/emass_client/models/hw_baseline_request_delete_body_inner.rb +220 -0
  108. data/lib/emass_client/models/hw_baseline_required_fields.rb +221 -0
  109. data/lib/emass_client/models/hw_baseline_response_delete.rb +231 -0
  110. data/lib/emass_client/models/hw_baseline_response_delete_data_inner.rb +274 -0
  111. data/lib/emass_client/models/{dashboard_mock_response.rb → hw_baseline_response_get.rb} +30 -29
  112. data/lib/emass_client/models/hw_baseline_response_get_data_inner.rb +429 -0
  113. data/lib/emass_client/models/hw_baseline_response_post_put.rb +231 -0
  114. data/lib/emass_client/models/hw_baseline_response_post_put_data_inner.rb +274 -0
  115. data/lib/emass_client/models/{instances_transitions.rb → instance_transitions.rb} +28 -27
  116. data/lib/emass_client/models/internal_server_error.rb +220 -0
  117. data/lib/emass_client/models/{response500_meta.rb → internal_server_error_meta.rb} +34 -29
  118. data/lib/emass_client/models/length_required.rb +220 -0
  119. data/lib/emass_client/models/{response411_meta.rb → length_required_meta.rb} +34 -29
  120. data/lib/emass_client/models/method_not_allowed.rb +220 -0
  121. data/lib/emass_client/models/{response405_meta.rb → method_not_allowed_meta.rb} +34 -29
  122. data/lib/emass_client/models/milestone_response_delete.rb +231 -0
  123. data/lib/emass_client/models/milestone_response_get.rb +26 -25
  124. data/lib/emass_client/models/milestone_response_get_milestone.rb +26 -25
  125. data/lib/emass_client/models/milestone_response_post.rb +26 -25
  126. data/lib/emass_client/models/milestone_response_put.rb +26 -25
  127. data/lib/emass_client/models/milestones_fields.rb +222 -0
  128. data/lib/emass_client/models/milestones_get.rb +55 -32
  129. data/lib/emass_client/models/milestones_put_post_delete.rb +40 -30
  130. data/lib/emass_client/models/milestones_request_delete_body_inner.rb +26 -25
  131. data/lib/emass_client/models/milestones_required_post.rb +35 -53
  132. data/lib/emass_client/models/milestones_required_post_milestones_inner.rb +265 -0
  133. data/lib/emass_client/models/milestones_required_put.rb +35 -68
  134. data/lib/emass_client/models/{ssps.rb → milestones_required_put_milestones_inner.rb} +101 -52
  135. data/lib/emass_client/models/{response404.rb → not_found.rb} +34 -29
  136. data/lib/emass_client/models/pac_get.rb +29 -37
  137. data/lib/emass_client/models/pac_post.rb +40 -30
  138. data/lib/emass_client/models/pac_response_get.rb +26 -25
  139. data/lib/emass_client/models/pac_response_post.rb +26 -25
  140. data/lib/emass_client/models/{dashboard_mock_response_pagination.rb → pagination.rb} +47 -46
  141. data/lib/emass_client/models/poam_conditional_fields.rb +402 -0
  142. data/lib/emass_client/models/poam_ids.rb +241 -0
  143. data/lib/emass_client/models/poam_optional_fields.rb +409 -0
  144. data/lib/emass_client/models/poam_post_put_del.rb +40 -30
  145. data/lib/emass_client/models/poam_read_only_fields.rb +332 -0
  146. data/lib/emass_client/models/poam_request_delete_body_inner.rb +26 -25
  147. data/lib/emass_client/models/poam_required_fields.rb +305 -0
  148. data/lib/emass_client/models/poam_response_get_poams.rb +27 -26
  149. data/lib/emass_client/models/poam_response_get_poams_data.rb +824 -0
  150. data/lib/emass_client/models/poam_response_get_systems.rb +27 -26
  151. data/lib/emass_client/models/poam_response_get_systems_data_inner.rb +824 -0
  152. data/lib/emass_client/models/{poam_response_put.rb → poam_response_post_put_delete.rb} +28 -27
  153. data/lib/emass_client/models/register.rb +26 -25
  154. data/lib/emass_client/models/register_data.rb +26 -25
  155. data/lib/emass_client/models/register_user_request_post_body.rb +38 -25
  156. data/lib/emass_client/models/response200.rb +32 -27
  157. data/lib/emass_client/models/role_category.rb +26 -25
  158. data/lib/emass_client/models/roles.rb +26 -25
  159. data/lib/emass_client/models/stage.rb +26 -25
  160. data/lib/emass_client/models/{static_code_application.rb → static_code_application_post.rb} +28 -27
  161. data/lib/emass_client/models/static_code_post.rb +40 -30
  162. data/lib/emass_client/models/static_code_request_post_body.rb +27 -26
  163. data/lib/emass_client/models/static_code_request_post_body_application.rb +26 -25
  164. data/lib/emass_client/models/static_code_response_post.rb +26 -25
  165. data/lib/emass_client/models/sw_baseline_conditional_fields.rb +222 -0
  166. data/lib/emass_client/models/sw_baseline_ids.rb +221 -0
  167. data/lib/emass_client/models/sw_baseline_optional_fields.rb +563 -0
  168. data/lib/emass_client/models/sw_baseline_read_only_fields.rb +222 -0
  169. data/lib/emass_client/models/sw_baseline_request_delete_body_inner.rb +220 -0
  170. data/lib/emass_client/models/sw_baseline_required_fields.rb +241 -0
  171. data/lib/emass_client/models/sw_baseline_response_delete.rb +231 -0
  172. data/lib/emass_client/models/sw_baseline_response_delete_data_inner.rb +274 -0
  173. data/lib/emass_client/models/sw_baseline_response_get.rb +240 -0
  174. data/lib/emass_client/models/sw_baseline_response_get_data_inner.rb +624 -0
  175. data/lib/emass_client/models/sw_baseline_response_post_put.rb +231 -0
  176. data/lib/emass_client/models/sw_baseline_response_post_put_data_inner.rb +274 -0
  177. data/lib/emass_client/models/system_response.rb +26 -25
  178. data/lib/emass_client/models/system_roles_category_response.rb +26 -25
  179. data/lib/emass_client/models/system_roles_response.rb +26 -25
  180. data/lib/emass_client/models/system_roles_response_data_inner.rb +26 -25
  181. data/lib/emass_client/models/systems.rb +950 -113
  182. data/lib/emass_client/models/systems_response.rb +26 -25
  183. data/lib/emass_client/models/test.rb +26 -25
  184. data/lib/emass_client/models/test_data.rb +26 -25
  185. data/lib/emass_client/models/test_results_get.rb +37 -26
  186. data/lib/emass_client/models/test_results_post.rb +40 -30
  187. data/lib/emass_client/models/test_results_response_get.rb +26 -25
  188. data/lib/emass_client/models/test_results_response_post.rb +26 -25
  189. data/lib/emass_client/models/unauthorized.rb +220 -0
  190. data/lib/emass_client/models/{response401_meta.rb → unauthorized_meta.rb} +34 -29
  191. data/lib/emass_client/models/users.rb +26 -25
  192. data/lib/emass_client/models/workflow_definition_get.rb +26 -25
  193. data/lib/emass_client/models/workflow_definition_response_get.rb +26 -25
  194. data/lib/emass_client/models/workflow_instance_get.rb +40 -28
  195. data/lib/emass_client/models/workflow_instance_response_get.rb +26 -25
  196. data/lib/emass_client/models/workflow_instances_response_get.rb +27 -26
  197. data/lib/emass_client/models/workflow_instances_response_get_pagination.rb +26 -25
  198. data/lib/emass_client/version.rb +5 -5
  199. data/lib/emass_client.rb +112 -39
  200. metadata +116 -43
  201. data/lib/emass_client/api/dashboards_api.rb +0 -2139
  202. data/lib/emass_client/models/mock_object.rb +0 -343
  203. data/lib/emass_client/models/poam_get.rb +0 -683
  204. data/lib/emass_client/models/response405.rb +0 -219
  205. data/lib/emass_client/models/response411.rb +0 -219
  206. data/lib/emass_client/models/response490.rb +0 -219
  207. data/lib/emass_client/models/response500.rb +0 -219
  208. data/lib/emass_client/models/workflow_instances_get.rb +0 -342
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Enterprise Mission Assurance Support Service (eMASS)
3
3
 
4
- #The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message. </br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
4
+ #The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
5
5
 
6
- The version of the OpenAPI document: v3.10
7
- Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
6
+ The version of the OpenAPI document: v3.22
7
+ Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.0-SNAPSHOT
9
+ Generator version: 7.12.0-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -54,7 +54,7 @@ module EmassClient
54
54
  # header parameters
55
55
  header_params = opts[:header_params] || {}
56
56
  # HTTP header 'Accept' (if needed)
57
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
58
58
 
59
59
  # form parameters
60
60
  form_params = opts[:form_params] || {}
@@ -86,23 +86,23 @@ module EmassClient
86
86
  end
87
87
 
88
88
  # Update control information in a system for one or many controls
89
- # Update a Control for given `systemId`<br> **Request Body Required Fields** - `acronym` - `responsibleEntities` - `controlDesignation` - `estimatedCompletionDate` - `implementationNarrative` The following optional fields are required based on the Implementation Status `implementationStatus` value<br> | Value | Required Fields |--------------------------|--------------------------------------------------- | Planned or Implemented | `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` | Not Applicable | `naJustification`, `responsibleEntities` | Manually Inherited | `commonControlProvider`, `estimatedCompletionDate`, `responsibleEntities`, `slcmCriticality`, `slcmFrequency`, `slcmMethod`, `slcmReporting`, `slcmTracking`, `slcmComments` If the Implementation Status `implementationStatus` value is `Inherited`, only the following fields can be updated: - `controlDesignation` - `commonnControlProvider`
89
+ # Update a Control for given `systemId`<br> **Request Body Required Fields** - `acronym` - `responsibleEntities` - `controlDesignation` - `estimatedCompletionDate` - `implementationNarrative` <br> **Business Rules** The following **optional fields** (plus the **Request Body Required Fields**) are required based on the Implementation Status (`implementationStatus`) field value:<br> <table> <thead> <tr><th><b>Status</b></th><th><b>Required Fields</b></th></tr> </thead> <tbody> <tr><td><b>Planned</b> or <b>Implemented</b></td><td><code>slcmCriticality, slcmFrequency, slcmMethod, slcmReporting, slcmTracking, slcmComments</code></td></tr> <tr><td><b>Not Applicable</b></td><td><code>naJustification</code></td></tr> <tr><td><b>Manually Inherited</b></td><td><code>commonControlProvider, slcmCriticality, slcmFrequency, slcmMethod, slcmReporting, slcmTracking, slcmComments</code></td></tr> </tbody> </table> **NOTES:** - Risk Assessment information cannot be updated if a Security Control is `Inherited`. - Risk Assessment information cannot be updated for a DIACAP system record. - Implementation Plan information cannot be saved if the these fields exceed 2,000 character limits: - `naJustification`,`responsibleEntities`,`implementationNarrative`,`slcmCriticality` - `slcmFrequency`,`slcmMethod`,`slcmReporting`,`slcmTracking`,`slcmComments` - Implementation Plan or Risk Assessment information cannot be updated if Security Control does not exist in the system record.
90
90
  # @param system_id [Integer] **System Id**: The unique system record identifier.
91
- # @param request_body [Array<Object>] Update an existing control by Id
91
+ # @param controls_required_fields [Array<ControlsRequiredFields>] Example request body for updating an existing control for a given system.
92
92
  # @param [Hash] opts the optional parameters
93
93
  # @return [ControlsResponsePut]
94
- def update_control_by_system_id(system_id, request_body, opts = {})
95
- data, _status_code, _headers = update_control_by_system_id_with_http_info(system_id, request_body, opts)
94
+ def update_control_by_system_id(system_id, controls_required_fields, opts = {})
95
+ data, _status_code, _headers = update_control_by_system_id_with_http_info(system_id, controls_required_fields, opts)
96
96
  data
97
97
  end
98
98
 
99
99
  # Update control information in a system for one or many controls
100
- # Update a Control for given &#x60;systemId&#x60;&lt;br&gt; **Request Body Required Fields** - &#x60;acronym&#x60; - &#x60;responsibleEntities&#x60; - &#x60;controlDesignation&#x60; - &#x60;estimatedCompletionDate&#x60; - &#x60;implementationNarrative&#x60; The following optional fields are required based on the Implementation Status &#x60;implementationStatus&#x60; value&lt;br&gt; | Value | Required Fields |--------------------------|--------------------------------------------------- | Planned or Implemented | &#x60;estimatedCompletionDate&#x60;, &#x60;responsibleEntities&#x60;, &#x60;slcmCriticality&#x60;, &#x60;slcmFrequency&#x60;, &#x60;slcmMethod&#x60;, &#x60;slcmReporting&#x60;, &#x60;slcmTracking&#x60;, &#x60;slcmComments&#x60; | Not Applicable | &#x60;naJustification&#x60;, &#x60;responsibleEntities&#x60; | Manually Inherited | &#x60;commonControlProvider&#x60;, &#x60;estimatedCompletionDate&#x60;, &#x60;responsibleEntities&#x60;, &#x60;slcmCriticality&#x60;, &#x60;slcmFrequency&#x60;, &#x60;slcmMethod&#x60;, &#x60;slcmReporting&#x60;, &#x60;slcmTracking&#x60;, &#x60;slcmComments&#x60; If the Implementation Status &#x60;implementationStatus&#x60; value is &#x60;Inherited&#x60;, only the following fields can be updated: - &#x60;controlDesignation&#x60; - &#x60;commonnControlProvider&#x60;
100
+ # Update a Control for given &#x60;systemId&#x60;&lt;br&gt; **Request Body Required Fields** - &#x60;acronym&#x60; - &#x60;responsibleEntities&#x60; - &#x60;controlDesignation&#x60; - &#x60;estimatedCompletionDate&#x60; - &#x60;implementationNarrative&#x60; &lt;br&gt; **Business Rules** The following **optional fields** (plus the **Request Body Required Fields**) are required based on the Implementation Status (&#x60;implementationStatus&#x60;) field value:&lt;br&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt;&lt;th&gt;&lt;b&gt;Status&lt;/b&gt;&lt;/th&gt;&lt;th&gt;&lt;b&gt;Required Fields&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Planned&lt;/b&gt; or &lt;b&gt;Implemented&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;slcmCriticality, slcmFrequency, slcmMethod, slcmReporting, slcmTracking, slcmComments&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Not Applicable&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;naJustification&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;b&gt;Manually Inherited&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;commonControlProvider, slcmCriticality, slcmFrequency, slcmMethod, slcmReporting, slcmTracking, slcmComments&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; **NOTES:** - Risk Assessment information cannot be updated if a Security Control is &#x60;Inherited&#x60;. - Risk Assessment information cannot be updated for a DIACAP system record. - Implementation Plan information cannot be saved if the these fields exceed 2,000 character limits: - &#x60;naJustification&#x60;,&#x60;responsibleEntities&#x60;,&#x60;implementationNarrative&#x60;,&#x60;slcmCriticality&#x60; - &#x60;slcmFrequency&#x60;,&#x60;slcmMethod&#x60;,&#x60;slcmReporting&#x60;,&#x60;slcmTracking&#x60;,&#x60;slcmComments&#x60; - Implementation Plan or Risk Assessment information cannot be updated if Security Control does not exist in the system record.
101
101
  # @param system_id [Integer] **System Id**: The unique system record identifier.
102
- # @param request_body [Array<Object>] Update an existing control by Id
102
+ # @param controls_required_fields [Array<ControlsRequiredFields>] Example request body for updating an existing control for a given system.
103
103
  # @param [Hash] opts the optional parameters
104
104
  # @return [Array<(ControlsResponsePut, Integer, Hash)>] ControlsResponsePut data, response status code and response headers
105
- def update_control_by_system_id_with_http_info(system_id, request_body, opts = {})
105
+ def update_control_by_system_id_with_http_info(system_id, controls_required_fields, opts = {})
106
106
  if @api_client.config.debugging
107
107
  @api_client.config.logger.debug 'Calling API: ControlsApi.update_control_by_system_id ...'
108
108
  end
@@ -110,9 +110,9 @@ module EmassClient
110
110
  if @api_client.config.client_side_validation && system_id.nil?
111
111
  fail ArgumentError, "Missing the required parameter 'system_id' when calling ControlsApi.update_control_by_system_id"
112
112
  end
113
- # verify the required parameter 'request_body' is set
114
- if @api_client.config.client_side_validation && request_body.nil?
115
- fail ArgumentError, "Missing the required parameter 'request_body' when calling ControlsApi.update_control_by_system_id"
113
+ # verify the required parameter 'controls_required_fields' is set
114
+ if @api_client.config.client_side_validation && controls_required_fields.nil?
115
+ fail ArgumentError, "Missing the required parameter 'controls_required_fields' when calling ControlsApi.update_control_by_system_id"
116
116
  end
117
117
  # resource path
118
118
  local_var_path = '/api/systems/{systemId}/controls'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
@@ -123,7 +123,7 @@ module EmassClient
123
123
  # header parameters
124
124
  header_params = opts[:header_params] || {}
125
125
  # HTTP header 'Accept' (if needed)
126
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
127
127
  # HTTP header 'Content-Type'
128
128
  content_type = @api_client.select_header_content_type(['application/json'])
129
129
  if !content_type.nil?
@@ -134,7 +134,7 @@ module EmassClient
134
134
  form_params = opts[:form_params] || {}
135
135
 
136
136
  # http body (model)
137
- post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
137
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(controls_required_fields)
138
138
 
139
139
  # return_type
140
140
  return_type = opts[:debug_return_type] || 'ControlsResponsePut'
@@ -0,0 +1,112 @@
1
+ =begin
2
+ #Enterprise Mission Assurance Support Service (eMASS)
3
+
4
+ #The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
5
+
6
+ The version of the OpenAPI document: v3.22
7
+ Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module EmassClient
16
+ class DeviceScanResultsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add device scans in a system
23
+ # **Request Body Required Field** - `scanType` Scan Type Allow Values: <ul> <li>acasAsrArf (.zip)</li> <li>acasNessus</li> <li>disaStigViewerCklCklb (.ckl or .cklb)</li> <li>disaStigViewerCmrs</li> <li>policyAuditor (.zip)</li> <li>scapComplianceChecker</li> </ul> <strong>Business Rules</strong><br> The body of a request through the Device Scan Results POST endpoint accepts a single binary file. Specific file extensions are expected depending upon the scanType parameter. For example, .ckl or .cklb files are accepted when using scanType is set to disaStigViewerCklCklb. When set to acasAsrArf or policyAuditor, a .zip file is expected which should contain a single scan result (for example, a single pair of .asr and .arf files). Single files are expected for all other scan types as this endpoint requires files to be uploaded consecutively as opposed to in bulk. Current scan types that are supported: <ul> <li>ACAS: ASR/ARF</li> <li>ACAS: NESSUS</li> <li>DISA STIG Viewer: CKL/CKLB</li> <li>DISA STIG Viewer: CMRS</li> <li>Policy Auditor</li> <li>SCAP Compliance Checker</li> </ul>
24
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
25
+ # @param scan_type [String] **Scan Type**: The file scan type to upload
26
+ # @param filename [File] The file to upload. Can be a single file or a .zip file.
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [Boolean] :is_baseline **Is Baseline**: Indicates that the imported file represents a baseline scan that includes all findings and results. Importing as a baseline scan, which assumes a common set of scan policies are used when conducting a scan, will replace a device&#39;s findings for a specific Benchmark. Applicable to ASR/ARF scans only. (default to false)
29
+ # @return [DeviceScanResultsResponsePost]
30
+ def add_scan_results_by_system_id(system_id, scan_type, filename, opts = {})
31
+ data, _status_code, _headers = add_scan_results_by_system_id_with_http_info(system_id, scan_type, filename, opts)
32
+ data
33
+ end
34
+
35
+ # Add device scans in a system
36
+ # **Request Body Required Field** - &#x60;scanType&#x60; Scan Type Allow Values: &lt;ul&gt; &lt;li&gt;acasAsrArf (.zip)&lt;/li&gt; &lt;li&gt;acasNessus&lt;/li&gt; &lt;li&gt;disaStigViewerCklCklb (.ckl or .cklb)&lt;/li&gt; &lt;li&gt;disaStigViewerCmrs&lt;/li&gt; &lt;li&gt;policyAuditor (.zip)&lt;/li&gt; &lt;li&gt;scapComplianceChecker&lt;/li&gt; &lt;/ul&gt; &lt;strong&gt;Business Rules&lt;/strong&gt;&lt;br&gt; The body of a request through the Device Scan Results POST endpoint accepts a single binary file. Specific file extensions are expected depending upon the scanType parameter. For example, .ckl or .cklb files are accepted when using scanType is set to disaStigViewerCklCklb. When set to acasAsrArf or policyAuditor, a .zip file is expected which should contain a single scan result (for example, a single pair of .asr and .arf files). Single files are expected for all other scan types as this endpoint requires files to be uploaded consecutively as opposed to in bulk. Current scan types that are supported: &lt;ul&gt; &lt;li&gt;ACAS: ASR/ARF&lt;/li&gt; &lt;li&gt;ACAS: NESSUS&lt;/li&gt; &lt;li&gt;DISA STIG Viewer: CKL/CKLB&lt;/li&gt; &lt;li&gt;DISA STIG Viewer: CMRS&lt;/li&gt; &lt;li&gt;Policy Auditor&lt;/li&gt; &lt;li&gt;SCAP Compliance Checker&lt;/li&gt; &lt;/ul&gt;
37
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
38
+ # @param scan_type [String] **Scan Type**: The file scan type to upload
39
+ # @param filename [File] The file to upload. Can be a single file or a .zip file.
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [Boolean] :is_baseline **Is Baseline**: Indicates that the imported file represents a baseline scan that includes all findings and results. Importing as a baseline scan, which assumes a common set of scan policies are used when conducting a scan, will replace a device&#39;s findings for a specific Benchmark. Applicable to ASR/ARF scans only. (default to false)
42
+ # @return [Array<(DeviceScanResultsResponsePost, Integer, Hash)>] DeviceScanResultsResponsePost data, response status code and response headers
43
+ def add_scan_results_by_system_id_with_http_info(system_id, scan_type, filename, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: DeviceScanResultsApi.add_scan_results_by_system_id ...'
46
+ end
47
+ # verify the required parameter 'system_id' is set
48
+ if @api_client.config.client_side_validation && system_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling DeviceScanResultsApi.add_scan_results_by_system_id"
50
+ end
51
+ # verify the required parameter 'scan_type' is set
52
+ if @api_client.config.client_side_validation && scan_type.nil?
53
+ fail ArgumentError, "Missing the required parameter 'scan_type' when calling DeviceScanResultsApi.add_scan_results_by_system_id"
54
+ end
55
+ # verify enum value
56
+ allowable_values = ["acasAsrArf", "acasNessus", "disaStigViewerCklCklb", "disaStigViewerCmrs", "policyAuditor", "scapComplianceChecker", "unknown_default_open_api"]
57
+ if @api_client.config.client_side_validation && !allowable_values.include?(scan_type)
58
+ fail ArgumentError, "invalid value for \"scan_type\", must be one of #{allowable_values}"
59
+ end
60
+ # verify the required parameter 'filename' is set
61
+ if @api_client.config.client_side_validation && filename.nil?
62
+ fail ArgumentError, "Missing the required parameter 'filename' when calling DeviceScanResultsApi.add_scan_results_by_system_id"
63
+ end
64
+ # resource path
65
+ local_var_path = '/api/systems/{systemId}/device-scan-results'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
66
+
67
+ # query parameters
68
+ query_params = opts[:query_params] || {}
69
+ query_params[:'scanType'] = scan_type
70
+ query_params[:'isBaseline'] = opts[:'is_baseline'] if !opts[:'is_baseline'].nil?
71
+
72
+ # header parameters
73
+ header_params = opts[:header_params] || {}
74
+ # HTTP header 'Accept' (if needed)
75
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
76
+ # HTTP header 'Content-Type'
77
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
78
+ if !content_type.nil?
79
+ header_params['Content-Type'] = content_type
80
+ end
81
+
82
+ # form parameters
83
+ form_params = opts[:form_params] || {}
84
+ form_params['filename'] = filename
85
+
86
+ # http body (model)
87
+ post_body = opts[:debug_body]
88
+
89
+ # return_type
90
+ return_type = opts[:debug_return_type] || 'DeviceScanResultsResponsePost'
91
+
92
+ # auth_names
93
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
94
+
95
+ new_options = opts.merge(
96
+ :operation => :"DeviceScanResultsApi.add_scan_results_by_system_id",
97
+ :header_params => header_params,
98
+ :query_params => query_params,
99
+ :form_params => form_params,
100
+ :body => post_body,
101
+ :auth_names => auth_names,
102
+ :return_type => return_type
103
+ )
104
+
105
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "API called: DeviceScanResultsApi#add_scan_results_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
108
+ end
109
+ return data, status_code, headers
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,313 @@
1
+ =begin
2
+ #Enterprise Mission Assurance Support Service (eMASS)
3
+
4
+ #The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
5
+
6
+ The version of the OpenAPI document: v3.22
7
+ Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module EmassClient
16
+ class HardwareBaselineApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add one or many hardware assets in a system
23
+ # Adds assets to the Hardware Baseline for given `systemId` **Request Body Required Fields** - `assetName`
24
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
25
+ # @param hw_baseline_required_fields [Array<HwBaselineRequiredFields>] Example request body for adding hardware baseline assets to an existing System (systemId)
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [HwBaselineResponsePostPut]
28
+ def add_hw_baseline_assets(system_id, hw_baseline_required_fields, opts = {})
29
+ data, _status_code, _headers = add_hw_baseline_assets_with_http_info(system_id, hw_baseline_required_fields, opts)
30
+ data
31
+ end
32
+
33
+ # Add one or many hardware assets in a system
34
+ # Adds assets to the Hardware Baseline for given &#x60;systemId&#x60; **Request Body Required Fields** - &#x60;assetName&#x60;
35
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
36
+ # @param hw_baseline_required_fields [Array<HwBaselineRequiredFields>] Example request body for adding hardware baseline assets to an existing System (systemId)
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(HwBaselineResponsePostPut, Integer, Hash)>] HwBaselineResponsePostPut data, response status code and response headers
39
+ def add_hw_baseline_assets_with_http_info(system_id, hw_baseline_required_fields, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: HardwareBaselineApi.add_hw_baseline_assets ...'
42
+ end
43
+ # verify the required parameter 'system_id' is set
44
+ if @api_client.config.client_side_validation && system_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling HardwareBaselineApi.add_hw_baseline_assets"
46
+ end
47
+ # verify the required parameter 'hw_baseline_required_fields' is set
48
+ if @api_client.config.client_side_validation && hw_baseline_required_fields.nil?
49
+ fail ArgumentError, "Missing the required parameter 'hw_baseline_required_fields' when calling HardwareBaselineApi.add_hw_baseline_assets"
50
+ end
51
+ # resource path
52
+ local_var_path = '/api/systems/{systemId}/hw-baseline'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
61
+ # HTTP header 'Content-Type'
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(hw_baseline_required_fields)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'HwBaselineResponsePostPut'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"HardwareBaselineApi.add_hw_baseline_assets",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: HardwareBaselineApi#add_hw_baseline_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # Delete one or many hardware assets in a system
97
+ # Remove (delete) one or multiple assets from a system Hardware Baseline
98
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
99
+ # @param hw_baseline_request_delete_body_inner [Array<HwBaselineRequestDeleteBodyInner>] Example request body for deleting one or many Hardware Baseline assets
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [HwBaselineResponseDelete]
102
+ def delete_hw_baseline_assets(system_id, hw_baseline_request_delete_body_inner, opts = {})
103
+ data, _status_code, _headers = delete_hw_baseline_assets_with_http_info(system_id, hw_baseline_request_delete_body_inner, opts)
104
+ data
105
+ end
106
+
107
+ # Delete one or many hardware assets in a system
108
+ # Remove (delete) one or multiple assets from a system Hardware Baseline
109
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
110
+ # @param hw_baseline_request_delete_body_inner [Array<HwBaselineRequestDeleteBodyInner>] Example request body for deleting one or many Hardware Baseline assets
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(HwBaselineResponseDelete, Integer, Hash)>] HwBaselineResponseDelete data, response status code and response headers
113
+ def delete_hw_baseline_assets_with_http_info(system_id, hw_baseline_request_delete_body_inner, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: HardwareBaselineApi.delete_hw_baseline_assets ...'
116
+ end
117
+ # verify the required parameter 'system_id' is set
118
+ if @api_client.config.client_side_validation && system_id.nil?
119
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling HardwareBaselineApi.delete_hw_baseline_assets"
120
+ end
121
+ # verify the required parameter 'hw_baseline_request_delete_body_inner' is set
122
+ if @api_client.config.client_side_validation && hw_baseline_request_delete_body_inner.nil?
123
+ fail ArgumentError, "Missing the required parameter 'hw_baseline_request_delete_body_inner' when calling HardwareBaselineApi.delete_hw_baseline_assets"
124
+ end
125
+ # resource path
126
+ local_var_path = '/api/systems/{systemId}/hw-baseline'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
127
+
128
+ # query parameters
129
+ query_params = opts[:query_params] || {}
130
+
131
+ # header parameters
132
+ header_params = opts[:header_params] || {}
133
+ # HTTP header 'Accept' (if needed)
134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
135
+ # HTTP header 'Content-Type'
136
+ content_type = @api_client.select_header_content_type(['application/json'])
137
+ if !content_type.nil?
138
+ header_params['Content-Type'] = content_type
139
+ end
140
+
141
+ # form parameters
142
+ form_params = opts[:form_params] || {}
143
+
144
+ # http body (model)
145
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(hw_baseline_request_delete_body_inner)
146
+
147
+ # return_type
148
+ return_type = opts[:debug_return_type] || 'HwBaselineResponseDelete'
149
+
150
+ # auth_names
151
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
152
+
153
+ new_options = opts.merge(
154
+ :operation => :"HardwareBaselineApi.delete_hw_baseline_assets",
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: HardwareBaselineApi#delete_hw_baseline_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
170
+ # Get hardware baseline for a system
171
+ # Returns the hardware baseline for a system matching the `systemId` path parameter
172
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [Integer] :page_index **Page Index**: If no value is specified, the default returns results from the first page with an index of 0. (default to 0)
175
+ # @option opts [Integer] :page_size **Page Size**: If no value is specified, the default returns 20000 per page. (default to 20000)
176
+ # @return [HwBaselineResponseGet]
177
+ def get_system_hw_baseline(system_id, opts = {})
178
+ data, _status_code, _headers = get_system_hw_baseline_with_http_info(system_id, opts)
179
+ data
180
+ end
181
+
182
+ # Get hardware baseline for a system
183
+ # Returns the hardware baseline for a system matching the &#x60;systemId&#x60; path parameter
184
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
185
+ # @param [Hash] opts the optional parameters
186
+ # @option opts [Integer] :page_index **Page Index**: If no value is specified, the default returns results from the first page with an index of 0. (default to 0)
187
+ # @option opts [Integer] :page_size **Page Size**: If no value is specified, the default returns 20000 per page. (default to 20000)
188
+ # @return [Array<(HwBaselineResponseGet, Integer, Hash)>] HwBaselineResponseGet data, response status code and response headers
189
+ def get_system_hw_baseline_with_http_info(system_id, opts = {})
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug 'Calling API: HardwareBaselineApi.get_system_hw_baseline ...'
192
+ end
193
+ # verify the required parameter 'system_id' is set
194
+ if @api_client.config.client_side_validation && system_id.nil?
195
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling HardwareBaselineApi.get_system_hw_baseline"
196
+ end
197
+ # resource path
198
+ local_var_path = '/api/systems/{systemId}/hw-baseline'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
199
+
200
+ # query parameters
201
+ query_params = opts[:query_params] || {}
202
+ query_params[:'pageIndex'] = opts[:'page_index'] if !opts[:'page_index'].nil?
203
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
204
+
205
+ # header parameters
206
+ header_params = opts[:header_params] || {}
207
+ # HTTP header 'Accept' (if needed)
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
209
+
210
+ # form parameters
211
+ form_params = opts[:form_params] || {}
212
+
213
+ # http body (model)
214
+ post_body = opts[:debug_body]
215
+
216
+ # return_type
217
+ return_type = opts[:debug_return_type] || 'HwBaselineResponseGet'
218
+
219
+ # auth_names
220
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
221
+
222
+ new_options = opts.merge(
223
+ :operation => :"HardwareBaselineApi.get_system_hw_baseline",
224
+ :header_params => header_params,
225
+ :query_params => query_params,
226
+ :form_params => form_params,
227
+ :body => post_body,
228
+ :auth_names => auth_names,
229
+ :return_type => return_type
230
+ )
231
+
232
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug "API called: HardwareBaselineApi#get_system_hw_baseline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
+ end
236
+ return data, status_code, headers
237
+ end
238
+
239
+ # Update one or many hardware assets in a system
240
+ # Updates assets in the Hardware Baseline for given `systemId` **Request Body Required Fields** - `assetName` - `hardwareId`
241
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
242
+ # @param hw_baseline_read_only_fields [Array<HwBaselineReadOnlyFields>] Example request body for updating hardware baseline assets to an existing System (systemId)
243
+ # @param [Hash] opts the optional parameters
244
+ # @return [HwBaselineResponsePostPut]
245
+ def update_hw_baseline_assets(system_id, hw_baseline_read_only_fields, opts = {})
246
+ data, _status_code, _headers = update_hw_baseline_assets_with_http_info(system_id, hw_baseline_read_only_fields, opts)
247
+ data
248
+ end
249
+
250
+ # Update one or many hardware assets in a system
251
+ # Updates assets in the Hardware Baseline for given &#x60;systemId&#x60; **Request Body Required Fields** - &#x60;assetName&#x60; - &#x60;hardwareId&#x60;
252
+ # @param system_id [Integer] **System Id**: The unique system record identifier.
253
+ # @param hw_baseline_read_only_fields [Array<HwBaselineReadOnlyFields>] Example request body for updating hardware baseline assets to an existing System (systemId)
254
+ # @param [Hash] opts the optional parameters
255
+ # @return [Array<(HwBaselineResponsePostPut, Integer, Hash)>] HwBaselineResponsePostPut data, response status code and response headers
256
+ def update_hw_baseline_assets_with_http_info(system_id, hw_baseline_read_only_fields, opts = {})
257
+ if @api_client.config.debugging
258
+ @api_client.config.logger.debug 'Calling API: HardwareBaselineApi.update_hw_baseline_assets ...'
259
+ end
260
+ # verify the required parameter 'system_id' is set
261
+ if @api_client.config.client_side_validation && system_id.nil?
262
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling HardwareBaselineApi.update_hw_baseline_assets"
263
+ end
264
+ # verify the required parameter 'hw_baseline_read_only_fields' is set
265
+ if @api_client.config.client_side_validation && hw_baseline_read_only_fields.nil?
266
+ fail ArgumentError, "Missing the required parameter 'hw_baseline_read_only_fields' when calling HardwareBaselineApi.update_hw_baseline_assets"
267
+ end
268
+ # resource path
269
+ local_var_path = '/api/systems/{systemId}/hw-baseline'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
270
+
271
+ # query parameters
272
+ query_params = opts[:query_params] || {}
273
+
274
+ # header parameters
275
+ header_params = opts[:header_params] || {}
276
+ # HTTP header 'Accept' (if needed)
277
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
278
+ # HTTP header 'Content-Type'
279
+ content_type = @api_client.select_header_content_type(['application/json'])
280
+ if !content_type.nil?
281
+ header_params['Content-Type'] = content_type
282
+ end
283
+
284
+ # form parameters
285
+ form_params = opts[:form_params] || {}
286
+
287
+ # http body (model)
288
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(hw_baseline_read_only_fields)
289
+
290
+ # return_type
291
+ return_type = opts[:debug_return_type] || 'HwBaselineResponsePostPut'
292
+
293
+ # auth_names
294
+ auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
295
+
296
+ new_options = opts.merge(
297
+ :operation => :"HardwareBaselineApi.update_hw_baseline_assets",
298
+ :header_params => header_params,
299
+ :query_params => query_params,
300
+ :form_params => form_params,
301
+ :body => post_body,
302
+ :auth_names => auth_names,
303
+ :return_type => return_type
304
+ )
305
+
306
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug "API called: HardwareBaselineApi#update_hw_baseline_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
309
+ end
310
+ return data, status_code, headers
311
+ end
312
+ end
313
+ end