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
 
@@ -14,15 +14,15 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module EmassClient
17
- class DashboardMockResponsePagination
18
- attr_accessor :total_count
19
-
20
- attr_accessor :total_pages
21
-
17
+ class Pagination
22
18
  attr_accessor :page_index
23
19
 
24
20
  attr_accessor :page_size
25
21
 
22
+ attr_accessor :total_count
23
+
24
+ attr_accessor :total_pages
25
+
26
26
  attr_accessor :prev_page_url
27
27
 
28
28
  attr_accessor :next_page_url
@@ -30,27 +30,32 @@ module EmassClient
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
33
- :'total_count' => :'totalCount',
34
- :'total_pages' => :'totalPages',
35
33
  :'page_index' => :'pageIndex',
36
34
  :'page_size' => :'pageSize',
35
+ :'total_count' => :'totalCount',
36
+ :'total_pages' => :'totalPages',
37
37
  :'prev_page_url' => :'prevPageUrl',
38
38
  :'next_page_url' => :'nextPageUrl'
39
39
  }
40
40
  end
41
41
 
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
42
47
  # Returns all the JSON keys this model knows about
43
48
  def self.acceptable_attributes
44
- attribute_map.values
49
+ acceptable_attribute_map.values
45
50
  end
46
51
 
47
52
  # Attribute type mapping.
48
53
  def self.openapi_types
49
54
  {
50
- :'total_count' => :'Integer',
51
- :'total_pages' => :'Integer',
52
55
  :'page_index' => :'Integer',
53
56
  :'page_size' => :'Integer',
57
+ :'total_count' => :'Integer',
58
+ :'total_pages' => :'Integer',
54
59
  :'prev_page_url' => :'String',
55
60
  :'next_page_url' => :'String'
56
61
  }
@@ -66,25 +71,18 @@ module EmassClient
66
71
  # @param [Hash] attributes Model attributes in the form of hash
67
72
  def initialize(attributes = {})
68
73
  if (!attributes.is_a?(Hash))
69
- fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::DashboardMockResponsePagination` initialize method"
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::Pagination` initialize method"
70
75
  end
71
76
 
72
77
  # check to see if the attribute exists and convert string to symbol for hash key
78
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
79
  attributes = attributes.each_with_object({}) { |(k, v), h|
74
- if (!self.class.attribute_map.key?(k.to_sym))
75
- fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::DashboardMockResponsePagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ if (!acceptable_attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Pagination`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
82
  end
77
83
  h[k.to_sym] = v
78
84
  }
79
85
 
80
- if attributes.key?(:'total_count')
81
- self.total_count = attributes[:'total_count']
82
- end
83
-
84
- if attributes.key?(:'total_pages')
85
- self.total_pages = attributes[:'total_pages']
86
- end
87
-
88
86
  if attributes.key?(:'page_index')
89
87
  self.page_index = attributes[:'page_index']
90
88
  end
@@ -93,6 +91,14 @@ module EmassClient
93
91
  self.page_size = attributes[:'page_size']
94
92
  end
95
93
 
94
+ if attributes.key?(:'total_count')
95
+ self.total_count = attributes[:'total_count']
96
+ end
97
+
98
+ if attributes.key?(:'total_pages')
99
+ self.total_pages = attributes[:'total_pages']
100
+ end
101
+
96
102
  if attributes.key?(:'prev_page_url')
97
103
  self.prev_page_url = attributes[:'prev_page_url']
98
104
  end
@@ -105,6 +111,7 @@ module EmassClient
105
111
  # Show invalid properties with the reasons. Usually used together with valid?
106
112
  # @return Array for valid properties with the reasons
107
113
  def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
108
115
  invalid_properties = Array.new
109
116
  invalid_properties
110
117
  end
@@ -112,6 +119,7 @@ module EmassClient
112
119
  # Check to see if the all the properties in the model are valid
113
120
  # @return true if the model is valid
114
121
  def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
123
  true
116
124
  end
117
125
 
@@ -120,10 +128,10 @@ module EmassClient
120
128
  def ==(o)
121
129
  return true if self.equal?(o)
122
130
  self.class == o.class &&
123
- total_count == o.total_count &&
124
- total_pages == o.total_pages &&
125
131
  page_index == o.page_index &&
126
132
  page_size == o.page_size &&
133
+ total_count == o.total_count &&
134
+ total_pages == o.total_pages &&
127
135
  prev_page_url == o.prev_page_url &&
128
136
  next_page_url == o.next_page_url
129
137
  end
@@ -137,44 +145,37 @@ module EmassClient
137
145
  # Calculates hash code according to all attributes.
138
146
  # @return [Integer] Hash code
139
147
  def hash
140
- [total_count, total_pages, page_index, page_size, prev_page_url, next_page_url].hash
148
+ [page_index, page_size, total_count, total_pages, prev_page_url, next_page_url].hash
141
149
  end
142
150
 
143
151
  # Builds the object from hash
144
152
  # @param [Hash] attributes Model attributes in the form of hash
145
153
  # @return [Object] Returns the model itself
146
154
  def self.build_from_hash(attributes)
147
- new.build_from_hash(attributes)
148
- end
149
-
150
- # Builds the object from hash
151
- # @param [Hash] attributes Model attributes in the form of hash
152
- # @return [Object] Returns the model itself
153
- def build_from_hash(attributes)
154
155
  return nil unless attributes.is_a?(Hash)
155
156
  attributes = attributes.transform_keys(&:to_sym)
156
- self.class.openapi_types.each_pair do |key, type|
157
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
158
- self.send("#{key}=", nil)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
159
161
  elsif type =~ /\AArray<(.*)>/i
160
162
  # check to ensure the input is an array given that the attribute
161
163
  # is documented as an array but the input is not
162
- if attributes[self.class.attribute_map[key]].is_a?(Array)
163
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
166
  end
165
- elsif !attributes[self.class.attribute_map[key]].nil?
166
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
169
  end
168
170
  end
169
-
170
- self
171
+ new(transformed_hash)
171
172
  end
172
173
 
173
174
  # Deserializes the data based on type
174
175
  # @param string type Data type
175
176
  # @param string value Value to be deserialized
176
177
  # @return [Object] Deserialized data
177
- def _deserialize(type, value)
178
+ def self._deserialize(type, value)
178
179
  case type.to_sym
179
180
  when :Time
180
181
  Time.parse(value)
@@ -209,7 +210,7 @@ module EmassClient
209
210
  else # model
210
211
  # models (e.g. Pet) or oneOf
211
212
  klass = EmassClient.const_get(type)
212
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
213
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
213
214
  end
214
215
  end
215
216
 
@@ -0,0 +1,402 @@
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 'date'
14
+ require 'time'
15
+
16
+ module EmassClient
17
+ class PoamConditionalFields
18
+ # [Conditional] First name of POC. 100 Characters.
19
+ attr_accessor :poc_first_name
20
+
21
+ # [Conditional] Last name of POC. 100 Characters.
22
+ attr_accessor :poc_last_name
23
+
24
+ # [Conditional] Email address of POC. 100 Characters.
25
+ attr_accessor :poc_email
26
+
27
+ # [Conditional] Phone number of POC (area code) ***-**** format. 100 Characters.
28
+ attr_accessor :poc_phone_number
29
+
30
+ # [Conditional] Required for approved items. Values include the following options: (Very Low, Low, Moderate,High,Very High)
31
+ attr_accessor :severity
32
+
33
+ # [Conditional] Required for ongoing and completed POA&M items. Unix time format.
34
+ attr_accessor :scheduled_completion_date
35
+
36
+ # [Conditional] Field is required for completed POA&M items. Unix time format.
37
+ attr_accessor :completion_date
38
+
39
+ # [Conditional] Field is required for completed and risk accepted POA&M items. 2000 Characters
40
+ attr_accessor :comments
41
+
42
+ # [Conditional] At least one of the following is required and must be completed for each POA&M Item: Personnel Resources-> Funded Base Hours Personnel Resources-> Unfunded Base Hours Non-Personnel Resources-> Funded Amount Non-Personnel Resources-> Unfunded Amount Displays numbers to the second decimal point (e.g., 100.00). VA only.
43
+ attr_accessor :personnel_resources_funded_base_hours
44
+
45
+ # [Conditional] Required if Personnel Resources: Funded Base Hours is populated. Only accepts values present in the field's lookup table (modifiable by eMASS System Admins). VA only.
46
+ attr_accessor :personnel_resources_cost_code
47
+
48
+ # [Conditional] At least one of the following is required and must be completed for each POA&M Item: Personnel Resources-> Funded Base Hours Personnel Resources-> Unfunded Base Hours Non-Personnel Resources-> Funded Amount Non-Personnel Resources-> Unfunded Amount Displays numbers to the second decimal point (e.g., 100.00). VA only.
49
+ attr_accessor :personnel_resources_unfunded_base_hours
50
+
51
+ # [Conditional] Required if Personnel Resources: Unfunded Base Hours is populated. Only accepts values present in the field's lookup table (modifiable by eMASS System Admins). VA only.
52
+ attr_accessor :personnel_resources_nonfunding_obstacle
53
+
54
+ # [Conditional] Required if the value \"Other\" is populated for the field Personnel Resources: Non-Funding Obstacle. VA only.
55
+ attr_accessor :personnel_resources_nonfunding_obstacle_other_reason
56
+
57
+ # [Conditional] At least one of the following is required and must be completed for each POA&M Item: Personnel Resources-> Funded Base Hours Personnel Resources-> Unfunded Base Hours Non-Personnel Resources-> Funded Amount Non-Personnel Resources-> Unfunded Amount Displays numbers to the second decimal point (e.g., 100.00). VA only.
58
+ attr_accessor :non_personnel_resources_funded_amount
59
+
60
+ # [Conditional] Required if Non-Personnel Resources: Funded Amount is populated. Only accepts values present in the field's lookup table (modifiable by eMASS System Admins). VA only.
61
+ attr_accessor :non_personnel_resources_cost_code
62
+
63
+ # [Conditional] At least one of the following is required and must be completed for each POA&M Item: Personnel Resources-> Funded Base Hours Personnel Resources-> Unfunded Base Hours Non-Personnel Resources-> Funded Amount Non-Personnel Resources-> Unfunded Amount Displays numbers to the second decimal point (e.g., 100.00). VA only.
64
+ attr_accessor :non_personnel_resources_unfunded_amount
65
+
66
+ # [Conditional] Required if Non-Personnel Resources: Unfunded Amount is populated. Only accepts values present in the field's lookup table (modifiable by eMASS System Admins). VA only.
67
+ attr_accessor :non_personnel_resources_nonfunding_obstacle
68
+
69
+ # [Conditional] Required if the value \"Other\" is populated for the field Non-Personnel Resources: Non-Funding Obstacle. VA only.
70
+ attr_accessor :non_personnel_resources_nonfunding_obstacle_other_reason
71
+
72
+ # Attribute mapping from ruby-style variable name to JSON key.
73
+ def self.attribute_map
74
+ {
75
+ :'poc_first_name' => :'pocFirstName',
76
+ :'poc_last_name' => :'pocLastName',
77
+ :'poc_email' => :'pocEmail',
78
+ :'poc_phone_number' => :'pocPhoneNumber',
79
+ :'severity' => :'severity',
80
+ :'scheduled_completion_date' => :'scheduledCompletionDate',
81
+ :'completion_date' => :'completionDate',
82
+ :'comments' => :'comments',
83
+ :'personnel_resources_funded_base_hours' => :'personnelResourcesFundedBaseHours',
84
+ :'personnel_resources_cost_code' => :'personnelResourcesCostCode',
85
+ :'personnel_resources_unfunded_base_hours' => :'personnelResourcesUnfundedBaseHours',
86
+ :'personnel_resources_nonfunding_obstacle' => :'personnelResourcesNonfundingObstacle',
87
+ :'personnel_resources_nonfunding_obstacle_other_reason' => :'personnelResourcesNonfundingObstacleOtherReason',
88
+ :'non_personnel_resources_funded_amount' => :'nonPersonnelResourcesFundedAmount',
89
+ :'non_personnel_resources_cost_code' => :'nonPersonnelResourcesCostCode',
90
+ :'non_personnel_resources_unfunded_amount' => :'nonPersonnelResourcesUnfundedAmount',
91
+ :'non_personnel_resources_nonfunding_obstacle' => :'nonPersonnelResourcesNonfundingObstacle',
92
+ :'non_personnel_resources_nonfunding_obstacle_other_reason' => :'nonPersonnelResourcesNonfundingObstacleOtherReason'
93
+ }
94
+ end
95
+
96
+ # Returns attribute mapping this model knows about
97
+ def self.acceptable_attribute_map
98
+ attribute_map
99
+ end
100
+
101
+ # Returns all the JSON keys this model knows about
102
+ def self.acceptable_attributes
103
+ acceptable_attribute_map.values
104
+ end
105
+
106
+ # Attribute type mapping.
107
+ def self.openapi_types
108
+ {
109
+ :'poc_first_name' => :'String',
110
+ :'poc_last_name' => :'String',
111
+ :'poc_email' => :'String',
112
+ :'poc_phone_number' => :'String',
113
+ :'severity' => :'String',
114
+ :'scheduled_completion_date' => :'Integer',
115
+ :'completion_date' => :'Integer',
116
+ :'comments' => :'String',
117
+ :'personnel_resources_funded_base_hours' => :'Float',
118
+ :'personnel_resources_cost_code' => :'String',
119
+ :'personnel_resources_unfunded_base_hours' => :'Float',
120
+ :'personnel_resources_nonfunding_obstacle' => :'String',
121
+ :'personnel_resources_nonfunding_obstacle_other_reason' => :'String',
122
+ :'non_personnel_resources_funded_amount' => :'Float',
123
+ :'non_personnel_resources_cost_code' => :'String',
124
+ :'non_personnel_resources_unfunded_amount' => :'Float',
125
+ :'non_personnel_resources_nonfunding_obstacle' => :'String',
126
+ :'non_personnel_resources_nonfunding_obstacle_other_reason' => :'String'
127
+ }
128
+ end
129
+
130
+ # List of attributes with nullable: true
131
+ def self.openapi_nullable
132
+ Set.new([
133
+ :'scheduled_completion_date',
134
+ :'personnel_resources_funded_base_hours',
135
+ :'personnel_resources_cost_code',
136
+ :'personnel_resources_unfunded_base_hours',
137
+ :'personnel_resources_nonfunding_obstacle',
138
+ :'personnel_resources_nonfunding_obstacle_other_reason',
139
+ :'non_personnel_resources_funded_amount',
140
+ :'non_personnel_resources_cost_code',
141
+ :'non_personnel_resources_unfunded_amount',
142
+ :'non_personnel_resources_nonfunding_obstacle',
143
+ :'non_personnel_resources_nonfunding_obstacle_other_reason'
144
+ ])
145
+ end
146
+
147
+ # Initializes the object
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ def initialize(attributes = {})
150
+ if (!attributes.is_a?(Hash))
151
+ fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamConditionalFields` initialize method"
152
+ end
153
+
154
+ # check to see if the attribute exists and convert string to symbol for hash key
155
+ acceptable_attribute_map = self.class.acceptable_attribute_map
156
+ attributes = attributes.each_with_object({}) { |(k, v), h|
157
+ if (!acceptable_attribute_map.key?(k.to_sym))
158
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamConditionalFields`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
159
+ end
160
+ h[k.to_sym] = v
161
+ }
162
+
163
+ if attributes.key?(:'poc_first_name')
164
+ self.poc_first_name = attributes[:'poc_first_name']
165
+ end
166
+
167
+ if attributes.key?(:'poc_last_name')
168
+ self.poc_last_name = attributes[:'poc_last_name']
169
+ end
170
+
171
+ if attributes.key?(:'poc_email')
172
+ self.poc_email = attributes[:'poc_email']
173
+ end
174
+
175
+ if attributes.key?(:'poc_phone_number')
176
+ self.poc_phone_number = attributes[:'poc_phone_number']
177
+ end
178
+
179
+ if attributes.key?(:'severity')
180
+ self.severity = attributes[:'severity']
181
+ end
182
+
183
+ if attributes.key?(:'scheduled_completion_date')
184
+ self.scheduled_completion_date = attributes[:'scheduled_completion_date']
185
+ end
186
+
187
+ if attributes.key?(:'completion_date')
188
+ self.completion_date = attributes[:'completion_date']
189
+ end
190
+
191
+ if attributes.key?(:'comments')
192
+ self.comments = attributes[:'comments']
193
+ end
194
+
195
+ if attributes.key?(:'personnel_resources_funded_base_hours')
196
+ self.personnel_resources_funded_base_hours = attributes[:'personnel_resources_funded_base_hours']
197
+ end
198
+
199
+ if attributes.key?(:'personnel_resources_cost_code')
200
+ self.personnel_resources_cost_code = attributes[:'personnel_resources_cost_code']
201
+ end
202
+
203
+ if attributes.key?(:'personnel_resources_unfunded_base_hours')
204
+ self.personnel_resources_unfunded_base_hours = attributes[:'personnel_resources_unfunded_base_hours']
205
+ end
206
+
207
+ if attributes.key?(:'personnel_resources_nonfunding_obstacle')
208
+ self.personnel_resources_nonfunding_obstacle = attributes[:'personnel_resources_nonfunding_obstacle']
209
+ end
210
+
211
+ if attributes.key?(:'personnel_resources_nonfunding_obstacle_other_reason')
212
+ self.personnel_resources_nonfunding_obstacle_other_reason = attributes[:'personnel_resources_nonfunding_obstacle_other_reason']
213
+ end
214
+
215
+ if attributes.key?(:'non_personnel_resources_funded_amount')
216
+ self.non_personnel_resources_funded_amount = attributes[:'non_personnel_resources_funded_amount']
217
+ end
218
+
219
+ if attributes.key?(:'non_personnel_resources_cost_code')
220
+ self.non_personnel_resources_cost_code = attributes[:'non_personnel_resources_cost_code']
221
+ end
222
+
223
+ if attributes.key?(:'non_personnel_resources_unfunded_amount')
224
+ self.non_personnel_resources_unfunded_amount = attributes[:'non_personnel_resources_unfunded_amount']
225
+ end
226
+
227
+ if attributes.key?(:'non_personnel_resources_nonfunding_obstacle')
228
+ self.non_personnel_resources_nonfunding_obstacle = attributes[:'non_personnel_resources_nonfunding_obstacle']
229
+ end
230
+
231
+ if attributes.key?(:'non_personnel_resources_nonfunding_obstacle_other_reason')
232
+ self.non_personnel_resources_nonfunding_obstacle_other_reason = attributes[:'non_personnel_resources_nonfunding_obstacle_other_reason']
233
+ end
234
+ end
235
+
236
+ # Show invalid properties with the reasons. Usually used together with valid?
237
+ # @return Array for valid properties with the reasons
238
+ def list_invalid_properties
239
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
240
+ invalid_properties = Array.new
241
+ invalid_properties
242
+ end
243
+
244
+ # Check to see if the all the properties in the model are valid
245
+ # @return true if the model is valid
246
+ def valid?
247
+ warn '[DEPRECATED] the `valid?` method is obsolete'
248
+ true
249
+ end
250
+
251
+ # Checks equality by comparing each attribute.
252
+ # @param [Object] Object to be compared
253
+ def ==(o)
254
+ return true if self.equal?(o)
255
+ self.class == o.class &&
256
+ poc_first_name == o.poc_first_name &&
257
+ poc_last_name == o.poc_last_name &&
258
+ poc_email == o.poc_email &&
259
+ poc_phone_number == o.poc_phone_number &&
260
+ severity == o.severity &&
261
+ scheduled_completion_date == o.scheduled_completion_date &&
262
+ completion_date == o.completion_date &&
263
+ comments == o.comments &&
264
+ personnel_resources_funded_base_hours == o.personnel_resources_funded_base_hours &&
265
+ personnel_resources_cost_code == o.personnel_resources_cost_code &&
266
+ personnel_resources_unfunded_base_hours == o.personnel_resources_unfunded_base_hours &&
267
+ personnel_resources_nonfunding_obstacle == o.personnel_resources_nonfunding_obstacle &&
268
+ personnel_resources_nonfunding_obstacle_other_reason == o.personnel_resources_nonfunding_obstacle_other_reason &&
269
+ non_personnel_resources_funded_amount == o.non_personnel_resources_funded_amount &&
270
+ non_personnel_resources_cost_code == o.non_personnel_resources_cost_code &&
271
+ non_personnel_resources_unfunded_amount == o.non_personnel_resources_unfunded_amount &&
272
+ non_personnel_resources_nonfunding_obstacle == o.non_personnel_resources_nonfunding_obstacle &&
273
+ non_personnel_resources_nonfunding_obstacle_other_reason == o.non_personnel_resources_nonfunding_obstacle_other_reason
274
+ end
275
+
276
+ # @see the `==` method
277
+ # @param [Object] Object to be compared
278
+ def eql?(o)
279
+ self == o
280
+ end
281
+
282
+ # Calculates hash code according to all attributes.
283
+ # @return [Integer] Hash code
284
+ def hash
285
+ [poc_first_name, poc_last_name, poc_email, poc_phone_number, severity, scheduled_completion_date, completion_date, comments, personnel_resources_funded_base_hours, personnel_resources_cost_code, personnel_resources_unfunded_base_hours, personnel_resources_nonfunding_obstacle, personnel_resources_nonfunding_obstacle_other_reason, non_personnel_resources_funded_amount, non_personnel_resources_cost_code, non_personnel_resources_unfunded_amount, non_personnel_resources_nonfunding_obstacle, non_personnel_resources_nonfunding_obstacle_other_reason].hash
286
+ end
287
+
288
+ # Builds the object from hash
289
+ # @param [Hash] attributes Model attributes in the form of hash
290
+ # @return [Object] Returns the model itself
291
+ def self.build_from_hash(attributes)
292
+ return nil unless attributes.is_a?(Hash)
293
+ attributes = attributes.transform_keys(&:to_sym)
294
+ transformed_hash = {}
295
+ openapi_types.each_pair do |key, type|
296
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
297
+ transformed_hash["#{key}"] = nil
298
+ elsif type =~ /\AArray<(.*)>/i
299
+ # check to ensure the input is an array given that the attribute
300
+ # is documented as an array but the input is not
301
+ if attributes[attribute_map[key]].is_a?(Array)
302
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
303
+ end
304
+ elsif !attributes[attribute_map[key]].nil?
305
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
306
+ end
307
+ end
308
+ new(transformed_hash)
309
+ end
310
+
311
+ # Deserializes the data based on type
312
+ # @param string type Data type
313
+ # @param string value Value to be deserialized
314
+ # @return [Object] Deserialized data
315
+ def self._deserialize(type, value)
316
+ case type.to_sym
317
+ when :Time
318
+ Time.parse(value)
319
+ when :Date
320
+ Date.parse(value)
321
+ when :String
322
+ value.to_s
323
+ when :Integer
324
+ value.to_i
325
+ when :Float
326
+ value.to_f
327
+ when :Boolean
328
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
329
+ true
330
+ else
331
+ false
332
+ end
333
+ when :Object
334
+ # generic object (usually a Hash), return directly
335
+ value
336
+ when /\AArray<(?<inner_type>.+)>\z/
337
+ inner_type = Regexp.last_match[:inner_type]
338
+ value.map { |v| _deserialize(inner_type, v) }
339
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
340
+ k_type = Regexp.last_match[:k_type]
341
+ v_type = Regexp.last_match[:v_type]
342
+ {}.tap do |hash|
343
+ value.each do |k, v|
344
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
345
+ end
346
+ end
347
+ else # model
348
+ # models (e.g. Pet) or oneOf
349
+ klass = EmassClient.const_get(type)
350
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
351
+ end
352
+ end
353
+
354
+ # Returns the string representation of the object
355
+ # @return [String] String presentation of the object
356
+ def to_s
357
+ to_hash.to_s
358
+ end
359
+
360
+ # to_body is an alias to to_hash (backward compatibility)
361
+ # @return [Hash] Returns the object in the form of hash
362
+ def to_body
363
+ to_hash
364
+ end
365
+
366
+ # Returns the object in the form of hash
367
+ # @return [Hash] Returns the object in the form of hash
368
+ def to_hash
369
+ hash = {}
370
+ self.class.attribute_map.each_pair do |attr, param|
371
+ value = self.send(attr)
372
+ if value.nil?
373
+ is_nullable = self.class.openapi_nullable.include?(attr)
374
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
375
+ end
376
+
377
+ hash[param] = _to_hash(value)
378
+ end
379
+ hash
380
+ end
381
+
382
+ # Outputs non-array value in the form of hash
383
+ # For object, use to_hash. Otherwise, just return the value
384
+ # @param [Object] value Any valid value
385
+ # @return [Hash] Returns the value in the form of hash
386
+ def _to_hash(value)
387
+ if value.is_a?(Array)
388
+ value.compact.map { |v| _to_hash(v) }
389
+ elsif value.is_a?(Hash)
390
+ {}.tap do |hash|
391
+ value.each { |k, v| hash[k] = _to_hash(v) }
392
+ end
393
+ elsif value.respond_to? :to_hash
394
+ value.to_hash
395
+ else
396
+ value
397
+ end
398
+ end
399
+
400
+ end
401
+
402
+ end