emass_client 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1284 -0
  3. data/Rakefile +8 -0
  4. data/lib/emass_client/api/artifacts_api.rb +310 -0
  5. data/lib/emass_client/api/artifacts_export_api.rb +86 -0
  6. data/lib/emass_client/api/cac_api.rb +143 -0
  7. data/lib/emass_client/api/cmmc_assessments_api.rb +77 -0
  8. data/lib/emass_client/api/controls_api.rb +143 -0
  9. data/lib/emass_client/api/milestones_api.rb +366 -0
  10. data/lib/emass_client/api/pac_api.rb +140 -0
  11. data/lib/emass_client/api/poam_api.rb +345 -0
  12. data/lib/emass_client/api/registration_api.rb +78 -0
  13. data/lib/emass_client/api/static_code_scans_api.rb +84 -0
  14. data/lib/emass_client/api/system_roles_api.rb +150 -0
  15. data/lib/emass_client/api/systems_api.rb +162 -0
  16. data/lib/emass_client/api/test_api.rb +70 -0
  17. data/lib/emass_client/api/test_results_api.rb +149 -0
  18. data/lib/emass_client/api/workflow_definitions_api.rb +76 -0
  19. data/lib/emass_client/api/workflow_instances_api.rb +153 -0
  20. data/lib/emass_client/api_client.rb +389 -0
  21. data/lib/emass_client/api_error.rb +57 -0
  22. data/lib/emass_client/configuration.rb +224 -0
  23. data/lib/emass_client/models/artifacts_delete.rb +201 -0
  24. data/lib/emass_client/models/artifacts_delete_inner.rb +207 -0
  25. data/lib/emass_client/models/artifacts_get.rb +383 -0
  26. data/lib/emass_client/models/artifacts_request_put_body.rb +363 -0
  27. data/lib/emass_client/models/artifacts_response_del.rb +217 -0
  28. data/lib/emass_client/models/artifacts_response_del_data.rb +225 -0
  29. data/lib/emass_client/models/artifacts_response_get.rb +217 -0
  30. data/lib/emass_client/models/artifacts_response_put_post.rb +217 -0
  31. data/lib/emass_client/models/cac_get.rb +301 -0
  32. data/lib/emass_client/models/cac_request_post_body.rb +217 -0
  33. data/lib/emass_client/models/cac_response_get.rb +217 -0
  34. data/lib/emass_client/models/cac_response_post.rb +217 -0
  35. data/lib/emass_client/models/cac_response_post_data.rb +225 -0
  36. data/lib/emass_client/models/cmmc_get.rb +398 -0
  37. data/lib/emass_client/models/cmmc_response_get.rb +217 -0
  38. data/lib/emass_client/models/connectivity_ccsd.rb +217 -0
  39. data/lib/emass_client/models/controls_get.rb +663 -0
  40. data/lib/emass_client/models/controls_put.rb +227 -0
  41. data/lib/emass_client/models/controls_request_put_body.rb +606 -0
  42. data/lib/emass_client/models/controls_response_get.rb +217 -0
  43. data/lib/emass_client/models/controls_response_put.rb +217 -0
  44. data/lib/emass_client/models/definition_transitions.rb +274 -0
  45. data/lib/emass_client/models/delete_milestone.rb +212 -0
  46. data/lib/emass_client/models/delete_poam.rb +212 -0
  47. data/lib/emass_client/models/empty200_response.rb +197 -0
  48. data/lib/emass_client/models/error.rb +225 -0
  49. data/lib/emass_client/models/instances_transitions.rb +327 -0
  50. data/lib/emass_client/models/milestone_response_get.rb +217 -0
  51. data/lib/emass_client/models/milestone_response_post.rb +217 -0
  52. data/lib/emass_client/models/milestone_response_put.rb +217 -0
  53. data/lib/emass_client/models/milestones_delete.rb +197 -0
  54. data/lib/emass_client/models/milestones_get.rb +291 -0
  55. data/lib/emass_client/models/milestones_post.rb +197 -0
  56. data/lib/emass_client/models/milestones_put.rb +197 -0
  57. data/lib/emass_client/models/milestones_put_post_delete.rb +247 -0
  58. data/lib/emass_client/models/milestones_request_post_body.rb +242 -0
  59. data/lib/emass_client/models/milestones_request_put_body.rb +242 -0
  60. data/lib/emass_client/models/milestones_required_post.rb +227 -0
  61. data/lib/emass_client/models/milestones_required_put.rb +242 -0
  62. data/lib/emass_client/models/model_200.rb +208 -0
  63. data/lib/emass_client/models/model_201.rb +206 -0
  64. data/lib/emass_client/models/model_201_meta.rb +219 -0
  65. data/lib/emass_client/models/model_400.rb +206 -0
  66. data/lib/emass_client/models/model_400_meta.rb +219 -0
  67. data/lib/emass_client/models/model_400_response.rb +206 -0
  68. data/lib/emass_client/models/model_401.rb +206 -0
  69. data/lib/emass_client/models/model_401_meta.rb +219 -0
  70. data/lib/emass_client/models/model_403.rb +206 -0
  71. data/lib/emass_client/models/model_403_meta.rb +219 -0
  72. data/lib/emass_client/models/model_404.rb +219 -0
  73. data/lib/emass_client/models/model_404_response.rb +206 -0
  74. data/lib/emass_client/models/model_405.rb +206 -0
  75. data/lib/emass_client/models/model_405_meta.rb +219 -0
  76. data/lib/emass_client/models/model_411.rb +206 -0
  77. data/lib/emass_client/models/model_411_meta.rb +219 -0
  78. data/lib/emass_client/models/model_490.rb +206 -0
  79. data/lib/emass_client/models/model_490_meta.rb +219 -0
  80. data/lib/emass_client/models/model_500.rb +206 -0
  81. data/lib/emass_client/models/model_500_meta.rb +219 -0
  82. data/lib/emass_client/models/pac_get.rb +311 -0
  83. data/lib/emass_client/models/pac_post.rb +259 -0
  84. data/lib/emass_client/models/pac_request_post_body.rb +261 -0
  85. data/lib/emass_client/models/pac_response_get.rb +217 -0
  86. data/lib/emass_client/models/pac_response_post.rb +217 -0
  87. data/lib/emass_client/models/poam_delete.rb +197 -0
  88. data/lib/emass_client/models/poam_get.rb +646 -0
  89. data/lib/emass_client/models/poam_post.rb +197 -0
  90. data/lib/emass_client/models/poam_post_put_del.rb +237 -0
  91. data/lib/emass_client/models/poam_put.rb +197 -0
  92. data/lib/emass_client/models/poam_request_post_body.rb +197 -0
  93. data/lib/emass_client/models/poam_request_put_body.rb +197 -0
  94. data/lib/emass_client/models/poam_required_post.rb +564 -0
  95. data/lib/emass_client/models/poam_required_put.rb +594 -0
  96. data/lib/emass_client/models/poam_response_delete.rb +217 -0
  97. data/lib/emass_client/models/poam_response_get.rb +217 -0
  98. data/lib/emass_client/models/poam_response_post.rb +217 -0
  99. data/lib/emass_client/models/poam_response_put.rb +217 -0
  100. data/lib/emass_client/models/register.rb +215 -0
  101. data/lib/emass_client/models/register_data.rb +206 -0
  102. data/lib/emass_client/models/register_user_request_post_body.rb +211 -0
  103. data/lib/emass_client/models/role_category.rb +272 -0
  104. data/lib/emass_client/models/roles.rb +274 -0
  105. data/lib/emass_client/models/ssps.rb +227 -0
  106. data/lib/emass_client/models/stage.rb +252 -0
  107. data/lib/emass_client/models/static_code_application.rb +303 -0
  108. data/lib/emass_client/models/static_code_request_post_body.rb +197 -0
  109. data/lib/emass_client/models/static_code_required_post.rb +217 -0
  110. data/lib/emass_client/models/static_code_required_post_application.rb +217 -0
  111. data/lib/emass_client/models/success200_response.rb +217 -0
  112. data/lib/emass_client/models/system_id_artifacts_body.rb +284 -0
  113. data/lib/emass_client/models/system_response.rb +217 -0
  114. data/lib/emass_client/models/system_roles_category_response.rb +217 -0
  115. data/lib/emass_client/models/system_roles_response.rb +217 -0
  116. data/lib/emass_client/models/system_roles_response_data.rb +219 -0
  117. data/lib/emass_client/models/systems.rb +1137 -0
  118. data/lib/emass_client/models/test.rb +215 -0
  119. data/lib/emass_client/models/test_data.rb +206 -0
  120. data/lib/emass_client/models/test_results_get.rb +333 -0
  121. data/lib/emass_client/models/test_results_post.rb +227 -0
  122. data/lib/emass_client/models/test_results_request_post_body.rb +306 -0
  123. data/lib/emass_client/models/test_results_response_get.rb +217 -0
  124. data/lib/emass_client/models/test_results_response_post.rb +217 -0
  125. data/lib/emass_client/models/users.rb +224 -0
  126. data/lib/emass_client/models/workflow_definition_get.rb +282 -0
  127. data/lib/emass_client/models/workflow_definition_response_get.rb +217 -0
  128. data/lib/emass_client/models/workflow_instances_get.rb +368 -0
  129. data/lib/emass_client/models/workflow_instances_response_get.rb +217 -0
  130. data/lib/emass_client/version.rb +14 -0
  131. data/lib/emass_client.rb +161 -0
  132. metadata +259 -0
@@ -0,0 +1,143 @@
1
+ =begin
2
+ #Enterprise Mission Assurance Support Service (eMASS)
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. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register 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) where {url}/api/register (POST) is used 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:
5
+
6
+ OpenAPI spec version: v3.2
7
+ Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.26
10
+ =end
11
+
12
+ module EmassClient
13
+ class ControlsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Get control information in a system for one or many controls
20
+ # Returns system control information for matching `systemId` path parameter
21
+ # @param system_id **System Id**: The unique system record identifier.
22
+ # @param [Hash] opts the optional parameters
23
+ # @option opts [String] :acronyms **Acronym**: The system acronym(s) being queried (single value or comma delimited values). (default to PM-6)
24
+ # @return [ControlsResponseGet]
25
+ def get_system_controls(system_id, opts = {})
26
+ data, _status_code, _headers = get_system_controls_with_http_info(system_id, opts)
27
+ data
28
+ end
29
+
30
+ # Get control information in a system for one or many controls
31
+ # Returns system control information for matching &#x60;systemId&#x60; path parameter
32
+ # @param system_id **System Id**: The unique system record identifier.
33
+ # @param [Hash] opts the optional parameters
34
+ # @option opts [String] :acronyms **Acronym**: The system acronym(s) being queried (single value or comma delimited values).
35
+ # @return [Array<(ControlsResponseGet, Integer, Hash)>] ControlsResponseGet data, response status code and response headers
36
+ def get_system_controls_with_http_info(system_id, opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug 'Calling API: ControlsApi.get_system_controls ...'
39
+ end
40
+ # verify the required parameter 'system_id' is set
41
+ if @api_client.config.client_side_validation && system_id.nil?
42
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling ControlsApi.get_system_controls"
43
+ end
44
+ # resource path
45
+ local_var_path = '/api/systems/{systemId}/controls'.sub('{' + 'systemId' + '}', system_id.to_s)
46
+
47
+ # query parameters
48
+ query_params = opts[:query_params] || {}
49
+ query_params[:'acronyms'] = opts[:'acronyms'] if !opts[:'acronyms'].nil?
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:body]
61
+
62
+ return_type = opts[:return_type] || 'ControlsResponseGet'
63
+
64
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
65
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => return_type)
72
+
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: ControlsApi#get_system_controls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ # Update control information in a system for one or many controls
79
+ # 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`
80
+ # @param body Update an existing control by Id
81
+ # @param system_id **System Id**: The unique system record identifier.
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [ControlsResponsePut]
84
+ def update_control_by_system_id(body, system_id, opts = {})
85
+ data, _status_code, _headers = update_control_by_system_id_with_http_info(body, system_id, opts)
86
+ data
87
+ end
88
+
89
+ # Update control information in a system for one or many controls
90
+ # 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 \&quot;Inherited\&quot;, only the following fields can be updated: - &#x60;controlDesignation&#x60; - &#x60;commonnControlProvider&#x60;
91
+ # @param body Update an existing control by Id
92
+ # @param system_id **System Id**: The unique system record identifier.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [Array<(ControlsResponsePut, Integer, Hash)>] ControlsResponsePut data, response status code and response headers
95
+ def update_control_by_system_id_with_http_info(body, system_id, opts = {})
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug 'Calling API: ControlsApi.update_control_by_system_id ...'
98
+ end
99
+ # verify the required parameter 'body' is set
100
+ if @api_client.config.client_side_validation && body.nil?
101
+ fail ArgumentError, "Missing the required parameter 'body' when calling ControlsApi.update_control_by_system_id"
102
+ end
103
+ # verify the required parameter 'system_id' is set
104
+ if @api_client.config.client_side_validation && system_id.nil?
105
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling ControlsApi.update_control_by_system_id"
106
+ end
107
+ # resource path
108
+ local_var_path = '/api/systems/{systemId}/controls'.sub('{' + 'systemId' + '}', system_id.to_s)
109
+
110
+ # query parameters
111
+ query_params = opts[:query_params] || {}
112
+
113
+ # header parameters
114
+ header_params = opts[:header_params] || {}
115
+ # HTTP header 'Accept' (if needed)
116
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
+ # HTTP header 'Content-Type'
118
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
125
+
126
+ return_type = opts[:return_type] || 'ControlsResponsePut'
127
+
128
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
129
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
130
+ :header_params => header_params,
131
+ :query_params => query_params,
132
+ :form_params => form_params,
133
+ :body => post_body,
134
+ :auth_names => auth_names,
135
+ :return_type => return_type)
136
+
137
+ if @api_client.config.debugging
138
+ @api_client.config.logger.debug "API called: ControlsApi#update_control_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
139
+ end
140
+ return data, status_code, headers
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,366 @@
1
+ =begin
2
+ #Enterprise Mission Assurance Support Service (eMASS)
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. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register 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) where {url}/api/register (POST) is used 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:
5
+
6
+ OpenAPI spec version: v3.2
7
+ Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.26
10
+ =end
11
+
12
+ module EmassClient
13
+ class MilestonesApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Add milestones to one or many POA&M items in a system
20
+ # Adds a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `description` - `scheduledCompletionDate`
21
+ # @param body Update an existing milestone
22
+ # @param system_id **System Id**: The unique system record identifier.
23
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [MilestoneResponsePost]
26
+ def add_milestone_by_system_id_and_poam_id(body, system_id, poam_id, opts = {})
27
+ data, _status_code, _headers = add_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts)
28
+ data
29
+ end
30
+
31
+ # Add milestones to one or many POA&amp;M items in a system
32
+ # Adds a milestone for given &#x60;systemId&#x60; and &#x60;poamId&#x60; path parameters **Request Body Required Fields** - &#x60;description&#x60; - &#x60;scheduledCompletionDate&#x60;
33
+ # @param body Update an existing milestone
34
+ # @param system_id **System Id**: The unique system record identifier.
35
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(MilestoneResponsePost, Integer, Hash)>] MilestoneResponsePost data, response status code and response headers
38
+ def add_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug 'Calling API: MilestonesApi.add_milestone_by_system_id_and_poam_id ...'
41
+ end
42
+ # verify the required parameter 'body' is set
43
+ if @api_client.config.client_side_validation && body.nil?
44
+ fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id"
45
+ end
46
+ # verify the required parameter 'system_id' is set
47
+ if @api_client.config.client_side_validation && system_id.nil?
48
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id"
49
+ end
50
+ # verify the required parameter 'poam_id' is set
51
+ if @api_client.config.client_side_validation && poam_id.nil?
52
+ fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.add_milestone_by_system_id_and_poam_id"
53
+ end
54
+ # resource path
55
+ local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s)
56
+
57
+ # query parameters
58
+ query_params = opts[:query_params] || {}
59
+
60
+ # header parameters
61
+ header_params = opts[:header_params] || {}
62
+ # HTTP header 'Accept' (if needed)
63
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
64
+ # HTTP header 'Content-Type'
65
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
72
+
73
+ return_type = opts[:return_type] || 'MilestoneResponsePost'
74
+
75
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type)
83
+
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: MilestonesApi#add_milestone_by_system_id_and_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+ # Remove milestones in a system for one or many POA&M items
90
+ # Remove the POA&M matching `systemId` path parameter<br> **Notes**<br> To delete a milestone the record must be inactive by having the field isActive set to false (`isActive=false`).
91
+ # @param body Delete the given Milestone Id
92
+ # @param system_id **System Id**: The unique system record identifier.
93
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Empty200Response]
96
+ def delete_milestone(body, system_id, poam_id, opts = {})
97
+ data, _status_code, _headers = delete_milestone_with_http_info(body, system_id, poam_id, opts)
98
+ data
99
+ end
100
+
101
+ # Remove milestones in a system for one or many POA&amp;M items
102
+ # Remove the POA&amp;M matching &#x60;systemId&#x60; path parameter&lt;br&gt; **Notes**&lt;br&gt; To delete a milestone the record must be inactive by having the field isActive set to false (&#x60;isActive&#x3D;false&#x60;).
103
+ # @param body Delete the given Milestone Id
104
+ # @param system_id **System Id**: The unique system record identifier.
105
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
106
+ # @param [Hash] opts the optional parameters
107
+ # @return [Array<(Empty200Response, Integer, Hash)>] Empty200Response data, response status code and response headers
108
+ def delete_milestone_with_http_info(body, system_id, poam_id, opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug 'Calling API: MilestonesApi.delete_milestone ...'
111
+ end
112
+ # verify the required parameter 'body' is set
113
+ if @api_client.config.client_side_validation && body.nil?
114
+ fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.delete_milestone"
115
+ end
116
+ # verify the required parameter 'system_id' is set
117
+ if @api_client.config.client_side_validation && system_id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.delete_milestone"
119
+ end
120
+ # verify the required parameter 'poam_id' is set
121
+ if @api_client.config.client_side_validation && poam_id.nil?
122
+ fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.delete_milestone"
123
+ end
124
+ # resource path
125
+ local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s)
126
+
127
+ # query parameters
128
+ query_params = opts[:query_params] || {}
129
+
130
+ # header parameters
131
+ header_params = opts[:header_params] || {}
132
+ # HTTP header 'Accept' (if needed)
133
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
134
+ # HTTP header 'Content-Type'
135
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
136
+
137
+ # form parameters
138
+ form_params = opts[:form_params] || {}
139
+
140
+ # http body (model)
141
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
142
+
143
+ return_type = opts[:return_type] || 'Empty200Response'
144
+
145
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
147
+ :header_params => header_params,
148
+ :query_params => query_params,
149
+ :form_params => form_params,
150
+ :body => post_body,
151
+ :auth_names => auth_names,
152
+ :return_type => return_type)
153
+
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug "API called: MilestonesApi#delete_milestone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
156
+ end
157
+ return data, status_code, headers
158
+ end
159
+ # Get milestones in one or many POA&M items in a system
160
+ # Returns system containing milestones for matching parameters.
161
+ # @param system_id **System Id**: The unique system record identifier.
162
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
163
+ # @param [Hash] opts the optional parameters
164
+ # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format).
165
+ # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format).
166
+ # @return [MilestoneResponseGet]
167
+ def get_system_milestones_by_poam_id(system_id, poam_id, opts = {})
168
+ data, _status_code, _headers = get_system_milestones_by_poam_id_with_http_info(system_id, poam_id, opts)
169
+ data
170
+ end
171
+
172
+ # Get milestones in one or many POA&amp;M items in a system
173
+ # Returns system containing milestones for matching parameters.
174
+ # @param system_id **System Id**: The unique system record identifier.
175
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
176
+ # @param [Hash] opts the optional parameters
177
+ # @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format).
178
+ # @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format).
179
+ # @return [Array<(MilestoneResponseGet, Integer, Hash)>] MilestoneResponseGet data, response status code and response headers
180
+ def get_system_milestones_by_poam_id_with_http_info(system_id, poam_id, opts = {})
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug 'Calling API: MilestonesApi.get_system_milestones_by_poam_id ...'
183
+ end
184
+ # verify the required parameter 'system_id' is set
185
+ if @api_client.config.client_side_validation && system_id.nil?
186
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.get_system_milestones_by_poam_id"
187
+ end
188
+ # verify the required parameter 'poam_id' is set
189
+ if @api_client.config.client_side_validation && poam_id.nil?
190
+ fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.get_system_milestones_by_poam_id"
191
+ end
192
+ # resource path
193
+ local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s)
194
+
195
+ # query parameters
196
+ query_params = opts[:query_params] || {}
197
+ query_params[:'scheduledCompletionDateStart'] = opts[:'scheduled_completion_date_start'] if !opts[:'scheduled_completion_date_start'].nil?
198
+ query_params[:'scheduledCompletionDateEnd'] = opts[:'scheduled_completion_date_end'] if !opts[:'scheduled_completion_date_end'].nil?
199
+
200
+ # header parameters
201
+ header_params = opts[:header_params] || {}
202
+ # HTTP header 'Accept' (if needed)
203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
204
+
205
+ # form parameters
206
+ form_params = opts[:form_params] || {}
207
+
208
+ # http body (model)
209
+ post_body = opts[:body]
210
+
211
+ return_type = opts[:return_type] || 'MilestoneResponseGet'
212
+
213
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
214
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :form_params => form_params,
218
+ :body => post_body,
219
+ :auth_names => auth_names,
220
+ :return_type => return_type)
221
+
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug "API called: MilestonesApi#get_system_milestones_by_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
224
+ end
225
+ return data, status_code, headers
226
+ end
227
+ # Get milestone by ID in POA&M item in a system
228
+ # Returns systems containing milestones for matching parameters.
229
+ # @param system_id **System Id**: The unique system record identifier.
230
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
231
+ # @param milestone_id **Milestone Id**: The unique milestone record identifier.
232
+ # @param [Hash] opts the optional parameters
233
+ # @return [MilestoneResponseGet]
234
+ def get_system_milestones_by_poam_id_and_milestone_id(system_id, poam_id, milestone_id, opts = {})
235
+ data, _status_code, _headers = get_system_milestones_by_poam_id_and_milestone_id_with_http_info(system_id, poam_id, milestone_id, opts)
236
+ data
237
+ end
238
+
239
+ # Get milestone by ID in POA&amp;M item in a system
240
+ # Returns systems containing milestones for matching parameters.
241
+ # @param system_id **System Id**: The unique system record identifier.
242
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
243
+ # @param milestone_id **Milestone Id**: The unique milestone record identifier.
244
+ # @param [Hash] opts the optional parameters
245
+ # @return [Array<(MilestoneResponseGet, Integer, Hash)>] MilestoneResponseGet data, response status code and response headers
246
+ def get_system_milestones_by_poam_id_and_milestone_id_with_http_info(system_id, poam_id, milestone_id, opts = {})
247
+ if @api_client.config.debugging
248
+ @api_client.config.logger.debug 'Calling API: MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id ...'
249
+ end
250
+ # verify the required parameter 'system_id' is set
251
+ if @api_client.config.client_side_validation && system_id.nil?
252
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id"
253
+ end
254
+ # verify the required parameter 'poam_id' is set
255
+ if @api_client.config.client_side_validation && poam_id.nil?
256
+ fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id"
257
+ end
258
+ # verify the required parameter 'milestone_id' is set
259
+ if @api_client.config.client_side_validation && milestone_id.nil?
260
+ fail ArgumentError, "Missing the required parameter 'milestone_id' when calling MilestonesApi.get_system_milestones_by_poam_id_and_milestone_id"
261
+ end
262
+ # resource path
263
+ local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones/{milestoneId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s).sub('{' + 'milestoneId' + '}', milestone_id.to_s)
264
+
265
+ # query parameters
266
+ query_params = opts[:query_params] || {}
267
+
268
+ # header parameters
269
+ header_params = opts[:header_params] || {}
270
+ # HTTP header 'Accept' (if needed)
271
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
272
+
273
+ # form parameters
274
+ form_params = opts[:form_params] || {}
275
+
276
+ # http body (model)
277
+ post_body = opts[:body]
278
+
279
+ return_type = opts[:return_type] || 'MilestoneResponseGet'
280
+
281
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
282
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
283
+ :header_params => header_params,
284
+ :query_params => query_params,
285
+ :form_params => form_params,
286
+ :body => post_body,
287
+ :auth_names => auth_names,
288
+ :return_type => return_type)
289
+
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug "API called: MilestonesApi#get_system_milestones_by_poam_id_and_milestone_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
292
+ end
293
+ return data, status_code, headers
294
+ end
295
+ # Update one or many POA&M items in a system
296
+ # Updates a milestone for given `systemId` and `poamId` path parameters **Request Body Required Fields** - `milestoneId` - `description` - `scheduledCompletionDate`
297
+ # @param body Update an existing control by Id
298
+ # @param system_id **System Id**: The unique system record identifier.
299
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
300
+ # @param [Hash] opts the optional parameters
301
+ # @return [MilestoneResponsePut]
302
+ def update_milestone_by_system_id_and_poam_id(body, system_id, poam_id, opts = {})
303
+ data, _status_code, _headers = update_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts)
304
+ data
305
+ end
306
+
307
+ # Update one or many POA&amp;M items in a system
308
+ # Updates a milestone for given &#x60;systemId&#x60; and &#x60;poamId&#x60; path parameters **Request Body Required Fields** - &#x60;milestoneId&#x60; - &#x60;description&#x60; - &#x60;scheduledCompletionDate&#x60;
309
+ # @param body Update an existing control by Id
310
+ # @param system_id **System Id**: The unique system record identifier.
311
+ # @param poam_id **POA&amp;M Id**: The unique POA&amp;M record identifier.
312
+ # @param [Hash] opts the optional parameters
313
+ # @return [Array<(MilestoneResponsePut, Integer, Hash)>] MilestoneResponsePut data, response status code and response headers
314
+ def update_milestone_by_system_id_and_poam_id_with_http_info(body, system_id, poam_id, opts = {})
315
+ if @api_client.config.debugging
316
+ @api_client.config.logger.debug 'Calling API: MilestonesApi.update_milestone_by_system_id_and_poam_id ...'
317
+ end
318
+ # verify the required parameter 'body' is set
319
+ if @api_client.config.client_side_validation && body.nil?
320
+ fail ArgumentError, "Missing the required parameter 'body' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id"
321
+ end
322
+ # verify the required parameter 'system_id' is set
323
+ if @api_client.config.client_side_validation && system_id.nil?
324
+ fail ArgumentError, "Missing the required parameter 'system_id' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id"
325
+ end
326
+ # verify the required parameter 'poam_id' is set
327
+ if @api_client.config.client_side_validation && poam_id.nil?
328
+ fail ArgumentError, "Missing the required parameter 'poam_id' when calling MilestonesApi.update_milestone_by_system_id_and_poam_id"
329
+ end
330
+ # resource path
331
+ local_var_path = '/api/systems/{systemId}/poams/{poamId}/milestones'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s)
332
+
333
+ # query parameters
334
+ query_params = opts[:query_params] || {}
335
+
336
+ # header parameters
337
+ header_params = opts[:header_params] || {}
338
+ # HTTP header 'Accept' (if needed)
339
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
340
+ # HTTP header 'Content-Type'
341
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
342
+
343
+ # form parameters
344
+ form_params = opts[:form_params] || {}
345
+
346
+ # http body (model)
347
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
348
+
349
+ return_type = opts[:return_type] || 'MilestoneResponsePut'
350
+
351
+ auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
352
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
353
+ :header_params => header_params,
354
+ :query_params => query_params,
355
+ :form_params => form_params,
356
+ :body => post_body,
357
+ :auth_names => auth_names,
358
+ :return_type => return_type)
359
+
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug "API called: MilestonesApi#update_milestone_by_system_id_and_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
362
+ end
363
+ return data, status_code, headers
364
+ end
365
+ end
366
+ end