emass_client 1.0.1 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +152 -1124
- data/Rakefile +2 -0
- data/lib/emass_client/api/artifacts_api.rb +124 -97
- data/lib/emass_client/api/artifacts_export_api.rb +28 -19
- data/lib/emass_client/api/cac_api.rb +50 -31
- data/lib/emass_client/api/cloud_resources_api.rb +96 -0
- data/lib/emass_client/api/cmmc_assessments_api.rb +20 -11
- data/lib/emass_client/api/containers_api.rb +96 -0
- data/lib/emass_client/api/controls_api.rb +53 -34
- data/lib/emass_client/api/milestones_api.rb +138 -92
- data/lib/emass_client/api/pac_api.rb +50 -31
- data/lib/emass_client/api/poam_api.rb +132 -86
- data/lib/emass_client/api/registration_api.rb +30 -18
- data/lib/emass_client/api/static_code_scans_api.rb +38 -26
- data/lib/emass_client/api/system_roles_api.rb +48 -29
- data/lib/emass_client/api/systems_api.rb +57 -39
- data/lib/emass_client/api/test_api.rb +20 -11
- data/lib/emass_client/api/test_results_api.rb +53 -34
- data/lib/emass_client/api/workflow_definitions_api.rb +23 -14
- data/lib/emass_client/api/workflow_instances_api.rb +58 -53
- data/lib/emass_client/api_client.rb +59 -57
- data/lib/emass_client/api_error.rb +5 -5
- data/lib/emass_client/configuration.rb +93 -16
- data/lib/emass_client/models/artifacts_get.rb +54 -31
- data/lib/emass_client/models/{artifacts_delete_inner.rb → artifacts_request_delete_body_inner.rb} +29 -16
- data/lib/emass_client/models/artifacts_response_del.rb +27 -14
- data/lib/emass_client/models/{artifacts_response_del_data.rb → artifacts_response_del_data_inner.rb} +31 -18
- data/lib/emass_client/models/artifacts_response_get.rb +27 -14
- data/lib/emass_client/models/artifacts_response_put_post.rb +27 -14
- data/lib/emass_client/models/artifacts_response_put_post_data_inner.rb +265 -0
- data/lib/emass_client/models/cac_get.rb +82 -50
- data/lib/emass_client/models/cac_response_get.rb +27 -14
- data/lib/emass_client/models/cac_response_post.rb +27 -14
- data/lib/emass_client/models/{cac_response_post_data.rb → cac_response_post_data_inner.rb} +61 -21
- data/lib/emass_client/models/{pac_request_post_body.rb → cloud_resources_post.rb} +73 -69
- data/lib/emass_client/models/cloud_resources_response_post.rb +230 -0
- data/lib/emass_client/models/cmmc_get.rb +53 -63
- data/lib/emass_client/models/cmmc_response_get.rb +27 -14
- data/lib/emass_client/models/connectivity_ccsd.rb +29 -14
- data/lib/emass_client/models/containers_resources_post.rb +265 -0
- data/lib/emass_client/models/containers_response_post.rb +230 -0
- data/lib/emass_client/models/controls_get.rb +103 -66
- data/lib/emass_client/models/controls_put.rb +58 -18
- data/lib/emass_client/models/controls_response_get.rb +28 -14
- data/lib/emass_client/models/controls_response_put.rb +27 -14
- data/lib/emass_client/models/definition_transitions.rb +32 -62
- data/lib/emass_client/models/instances_transitions.rb +37 -88
- data/lib/emass_client/models/milestone_response_get.rb +27 -14
- data/lib/emass_client/models/milestone_response_get_milestone.rb +228 -0
- data/lib/emass_client/models/milestone_response_post.rb +27 -14
- data/lib/emass_client/models/milestone_response_put.rb +27 -14
- data/lib/emass_client/models/milestones_get.rb +33 -20
- data/lib/emass_client/models/milestones_put_post_delete.rb +60 -20
- data/lib/emass_client/models/{delete_milestone.rb → milestones_request_delete_body_inner.rb} +29 -21
- data/lib/emass_client/models/milestones_required_post.rb +27 -14
- data/lib/emass_client/models/milestones_required_put.rb +28 -15
- data/lib/emass_client/models/pac_get.rb +39 -22
- data/lib/emass_client/models/pac_post.rb +60 -20
- data/lib/emass_client/models/pac_response_get.rb +28 -14
- data/lib/emass_client/models/pac_response_post.rb +27 -14
- data/lib/emass_client/models/poam_get.rb +114 -77
- data/lib/emass_client/models/poam_post_put_del.rb +59 -19
- data/lib/emass_client/models/{delete_poam.rb → poam_request_delete_body_inner.rb} +29 -21
- data/lib/emass_client/models/poam_response_delete.rb +27 -14
- data/lib/emass_client/models/poam_response_get_poams.rb +228 -0
- data/lib/emass_client/models/{static_code_required_post.rb → poam_response_get_systems.rb} +42 -29
- data/lib/emass_client/models/poam_response_post.rb +27 -14
- data/lib/emass_client/models/poam_response_put.rb +27 -14
- data/lib/emass_client/models/register.rb +27 -14
- data/lib/emass_client/models/register_data.rb +26 -13
- data/lib/emass_client/models/register_user_request_post_body.rb +26 -13
- data/lib/emass_client/models/{model_200.rb → response200.rb} +53 -16
- data/lib/emass_client/models/{model_400.rb → response201.rb} +29 -16
- data/lib/emass_client/models/{model_201_meta.rb → response201_meta.rb} +54 -17
- data/lib/emass_client/models/{model_400_response.rb → response400.rb} +29 -16
- data/lib/emass_client/models/{model_400_meta.rb → response400_meta.rb} +54 -17
- data/lib/emass_client/models/{model_401.rb → response401.rb} +29 -16
- data/lib/emass_client/models/{model_401_meta.rb → response401_meta.rb} +54 -17
- data/lib/emass_client/models/{model_201.rb → response403.rb} +29 -16
- data/lib/emass_client/models/{model_403_meta.rb → response403_meta.rb} +54 -17
- data/lib/emass_client/models/{model_404.rb → response404.rb} +54 -17
- data/lib/emass_client/models/response405.rb +219 -0
- data/lib/emass_client/models/{model_405_meta.rb → response405_meta.rb} +54 -17
- data/lib/emass_client/models/response411.rb +219 -0
- data/lib/emass_client/models/{model_411_meta.rb → response411_meta.rb} +54 -17
- data/lib/emass_client/models/response490.rb +219 -0
- data/lib/emass_client/models/{model_490_meta.rb → response490_meta.rb} +54 -17
- data/lib/emass_client/models/response500.rb +219 -0
- data/lib/emass_client/models/{model_500_meta.rb → response500_meta.rb} +54 -17
- data/lib/emass_client/models/role_category.rb +32 -50
- data/lib/emass_client/models/roles.rb +29 -61
- data/lib/emass_client/models/ssps.rb +32 -16
- data/lib/emass_client/models/stage.rb +30 -49
- data/lib/emass_client/models/static_code_application.rb +34 -33
- data/lib/emass_client/models/static_code_post.rb +275 -0
- data/lib/emass_client/models/static_code_request_post_body.rb +47 -14
- data/lib/emass_client/models/{static_code_required_post_application.rb → static_code_request_post_body_application.rb} +30 -17
- data/lib/emass_client/models/static_code_response_post.rb +230 -0
- data/lib/emass_client/models/success200_response.rb +27 -14
- data/lib/emass_client/models/{error.rb → success200_response_data_inner.rb} +57 -36
- data/lib/emass_client/models/system_response.rb +28 -17
- data/lib/emass_client/models/system_roles_category_response.rb +28 -14
- data/lib/emass_client/models/system_roles_response.rb +27 -14
- data/lib/emass_client/models/{system_roles_response_data.rb → system_roles_response_data_inner.rb} +30 -17
- data/lib/emass_client/models/systems.rb +218 -191
- data/lib/emass_client/models/{poam_response_get.rb → systems_response.rb} +30 -17
- data/lib/emass_client/models/test.rb +27 -14
- data/lib/emass_client/models/test_data.rb +26 -13
- data/lib/emass_client/models/test_results_get.rb +39 -35
- data/lib/emass_client/models/test_results_post.rb +58 -18
- data/lib/emass_client/models/test_results_response_get.rb +27 -14
- data/lib/emass_client/models/test_results_response_post.rb +27 -14
- data/lib/emass_client/models/users.rb +28 -15
- data/lib/emass_client/models/workflow_definition_get.rb +63 -68
- data/lib/emass_client/models/workflow_definition_response_get.rb +27 -14
- data/lib/emass_client/models/workflow_instance_get.rb +331 -0
- data/lib/emass_client/models/workflow_instance_response_get.rb +230 -0
- data/lib/emass_client/models/workflow_instances_get.rb +107 -133
- data/lib/emass_client/models/workflow_instances_response_get.rb +39 -17
- data/lib/emass_client/models/workflow_instances_response_get_pagination.rb +246 -0
- data/lib/emass_client/version.rb +6 -5
- data/lib/emass_client.rb +47 -54
- metadata +60 -89
- data/lib/emass_client/models/artifacts_delete.rb +0 -201
- data/lib/emass_client/models/artifacts_request_put_body.rb +0 -363
- data/lib/emass_client/models/cac_request_post_body.rb +0 -217
- data/lib/emass_client/models/controls_request_put_body.rb +0 -606
- data/lib/emass_client/models/empty200_response.rb +0 -197
- data/lib/emass_client/models/milestones_delete.rb +0 -197
- data/lib/emass_client/models/milestones_post.rb +0 -197
- data/lib/emass_client/models/milestones_put.rb +0 -197
- data/lib/emass_client/models/milestones_request_post_body.rb +0 -242
- data/lib/emass_client/models/milestones_request_put_body.rb +0 -242
- data/lib/emass_client/models/model_403.rb +0 -206
- data/lib/emass_client/models/model_404_response.rb +0 -206
- data/lib/emass_client/models/model_405.rb +0 -206
- data/lib/emass_client/models/model_411.rb +0 -206
- data/lib/emass_client/models/model_490.rb +0 -206
- data/lib/emass_client/models/model_500.rb +0 -206
- data/lib/emass_client/models/poam_delete.rb +0 -197
- data/lib/emass_client/models/poam_post.rb +0 -197
- data/lib/emass_client/models/poam_put.rb +0 -197
- data/lib/emass_client/models/poam_request_post_body.rb +0 -197
- data/lib/emass_client/models/poam_request_put_body.rb +0 -197
- data/lib/emass_client/models/poam_required_post.rb +0 -564
- data/lib/emass_client/models/poam_required_put.rb +0 -594
- data/lib/emass_client/models/system_id_artifacts_body.rb +0 -284
- data/lib/emass_client/models/test_results_request_post_body.rb +0 -306
@@ -1,14 +1,17 @@
|
|
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.
|
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:
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: v3.3
|
7
7
|
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
13
|
+
require 'cgi'
|
14
|
+
|
12
15
|
module EmassClient
|
13
16
|
class PACApi
|
14
17
|
attr_accessor :api_client
|
@@ -18,35 +21,35 @@ module EmassClient
|
|
18
21
|
end
|
19
22
|
# Submit system package for review
|
20
23
|
# Adds a Package Approval Chain (PAC) for given `systemId` path parameter
|
21
|
-
# @param
|
22
|
-
# @param
|
24
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
25
|
+
# @param request_body [Array<Object>] Add system package to PAC for review
|
23
26
|
# @param [Hash] opts the optional parameters
|
24
27
|
# @return [PacResponsePost]
|
25
|
-
def add_system_pac(
|
26
|
-
data, _status_code, _headers = add_system_pac_with_http_info(
|
28
|
+
def add_system_pac(system_id, request_body, opts = {})
|
29
|
+
data, _status_code, _headers = add_system_pac_with_http_info(system_id, request_body, opts)
|
27
30
|
data
|
28
31
|
end
|
29
32
|
|
30
33
|
# Submit system package for review
|
31
34
|
# Adds a Package Approval Chain (PAC) for given `systemId` path parameter
|
32
|
-
# @param
|
33
|
-
# @param
|
35
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
36
|
+
# @param request_body [Array<Object>] Add system package to PAC for review
|
34
37
|
# @param [Hash] opts the optional parameters
|
35
38
|
# @return [Array<(PacResponsePost, Integer, Hash)>] PacResponsePost data, response status code and response headers
|
36
|
-
def add_system_pac_with_http_info(
|
39
|
+
def add_system_pac_with_http_info(system_id, request_body, opts = {})
|
37
40
|
if @api_client.config.debugging
|
38
41
|
@api_client.config.logger.debug 'Calling API: PACApi.add_system_pac ...'
|
39
42
|
end
|
40
|
-
# verify the required parameter 'body' is set
|
41
|
-
if @api_client.config.client_side_validation && body.nil?
|
42
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling PACApi.add_system_pac"
|
43
|
-
end
|
44
43
|
# verify the required parameter 'system_id' is set
|
45
44
|
if @api_client.config.client_side_validation && system_id.nil?
|
46
45
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling PACApi.add_system_pac"
|
47
46
|
end
|
47
|
+
# verify the required parameter 'request_body' is set
|
48
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling PACApi.add_system_pac"
|
50
|
+
end
|
48
51
|
# resource path
|
49
|
-
local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', system_id.to_s)
|
52
|
+
local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
50
53
|
|
51
54
|
# query parameters
|
52
55
|
query_params = opts[:query_params] || {}
|
@@ -56,33 +59,43 @@ module EmassClient
|
|
56
59
|
# HTTP header 'Accept' (if needed)
|
57
60
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
58
61
|
# HTTP header 'Content-Type'
|
59
|
-
|
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
|
60
66
|
|
61
67
|
# form parameters
|
62
68
|
form_params = opts[:form_params] || {}
|
63
69
|
|
64
70
|
# http body (model)
|
65
|
-
post_body = opts[:
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
|
72
|
+
|
73
|
+
# return_type
|
74
|
+
return_type = opts[:debug_return_type] || 'PacResponsePost'
|
66
75
|
|
67
|
-
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
68
78
|
|
69
|
-
|
70
|
-
|
79
|
+
new_options = opts.merge(
|
80
|
+
:operation => :"PACApi.add_system_pac",
|
71
81
|
:header_params => header_params,
|
72
82
|
:query_params => query_params,
|
73
83
|
:form_params => form_params,
|
74
84
|
:body => post_body,
|
75
85
|
:auth_names => auth_names,
|
76
|
-
:return_type => return_type
|
86
|
+
:return_type => return_type
|
87
|
+
)
|
77
88
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
90
|
if @api_client.config.debugging
|
79
91
|
@api_client.config.logger.debug "API called: PACApi#add_system_pac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
92
|
end
|
81
93
|
return data, status_code, headers
|
82
94
|
end
|
95
|
+
|
83
96
|
# Get location of system package in PAC
|
84
97
|
# Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter
|
85
|
-
# @param system_id **System Id**: The unique system record identifier.
|
98
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
86
99
|
# @param [Hash] opts the optional parameters
|
87
100
|
# @return [PacResponseGet]
|
88
101
|
def get_system_pac(system_id, opts = {})
|
@@ -91,8 +104,8 @@ module EmassClient
|
|
91
104
|
end
|
92
105
|
|
93
106
|
# Get location of system package in PAC
|
94
|
-
# Returns the location of a system&#
|
95
|
-
# @param system_id **System Id**: The unique system record identifier.
|
107
|
+
# Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter
|
108
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
96
109
|
# @param [Hash] opts the optional parameters
|
97
110
|
# @return [Array<(PacResponseGet, Integer, Hash)>] PacResponseGet data, response status code and response headers
|
98
111
|
def get_system_pac_with_http_info(system_id, opts = {})
|
@@ -104,7 +117,7 @@ module EmassClient
|
|
104
117
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling PACApi.get_system_pac"
|
105
118
|
end
|
106
119
|
# resource path
|
107
|
-
local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', system_id.to_s)
|
120
|
+
local_var_path = '/api/systems/{systemId}/approval/pac'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
108
121
|
|
109
122
|
# query parameters
|
110
123
|
query_params = opts[:query_params] || {}
|
@@ -118,19 +131,25 @@ module EmassClient
|
|
118
131
|
form_params = opts[:form_params] || {}
|
119
132
|
|
120
133
|
# http body (model)
|
121
|
-
post_body = opts[:
|
134
|
+
post_body = opts[:debug_body]
|
135
|
+
|
136
|
+
# return_type
|
137
|
+
return_type = opts[:debug_return_type] || 'PacResponseGet'
|
122
138
|
|
123
|
-
|
139
|
+
# auth_names
|
140
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
124
141
|
|
125
|
-
|
126
|
-
|
142
|
+
new_options = opts.merge(
|
143
|
+
:operation => :"PACApi.get_system_pac",
|
127
144
|
:header_params => header_params,
|
128
145
|
:query_params => query_params,
|
129
146
|
:form_params => form_params,
|
130
147
|
:body => post_body,
|
131
148
|
:auth_names => auth_names,
|
132
|
-
:return_type => return_type
|
149
|
+
:return_type => return_type
|
150
|
+
)
|
133
151
|
|
152
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
134
153
|
if @api_client.config.debugging
|
135
154
|
@api_client.config.logger.debug "API called: PACApi#get_system_pac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
136
155
|
end
|
@@ -1,14 +1,17 @@
|
|
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.
|
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:
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: v3.3
|
7
7
|
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
13
|
+
require 'cgi'
|
14
|
+
|
12
15
|
module EmassClient
|
13
16
|
class POAMApi
|
14
17
|
attr_accessor :api_client
|
@@ -18,35 +21,35 @@ module EmassClient
|
|
18
21
|
end
|
19
22
|
# Add one or many POA&M items in a system
|
20
23
|
# Add a POA&M for given `systemId`<br> **Request Body Required Fields** - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `resources` **Note**<br /> If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.<br> `pocFirstName`, `pocLastName`, `pocPhoneNumber`<br />
|
21
|
-
# @param
|
22
|
-
# @param
|
24
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
25
|
+
# @param request_body [Array<Object>] Add POA&M(s) to a system (systemID)
|
23
26
|
# @param [Hash] opts the optional parameters
|
24
27
|
# @return [PoamResponsePost]
|
25
|
-
def add_poam_by_system_id(
|
26
|
-
data, _status_code, _headers = add_poam_by_system_id_with_http_info(
|
28
|
+
def add_poam_by_system_id(system_id, request_body, opts = {})
|
29
|
+
data, _status_code, _headers = add_poam_by_system_id_with_http_info(system_id, request_body, opts)
|
27
30
|
data
|
28
31
|
end
|
29
32
|
|
30
33
|
# Add one or many POA&M items in a system
|
31
34
|
# Add a POA&M for given `systemId`<br> **Request Body Required Fields** - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `resources` **Note**<br /> If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.<br> `pocFirstName`, `pocLastName`, `pocPhoneNumber`<br />
|
32
|
-
# @param
|
33
|
-
# @param
|
35
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
36
|
+
# @param request_body [Array<Object>] Add POA&M(s) to a system (systemID)
|
34
37
|
# @param [Hash] opts the optional parameters
|
35
38
|
# @return [Array<(PoamResponsePost, Integer, Hash)>] PoamResponsePost data, response status code and response headers
|
36
|
-
def add_poam_by_system_id_with_http_info(
|
39
|
+
def add_poam_by_system_id_with_http_info(system_id, request_body, opts = {})
|
37
40
|
if @api_client.config.debugging
|
38
41
|
@api_client.config.logger.debug 'Calling API: POAMApi.add_poam_by_system_id ...'
|
39
42
|
end
|
40
|
-
# verify the required parameter 'body' is set
|
41
|
-
if @api_client.config.client_side_validation && body.nil?
|
42
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.add_poam_by_system_id"
|
43
|
-
end
|
44
43
|
# verify the required parameter 'system_id' is set
|
45
44
|
if @api_client.config.client_side_validation && system_id.nil?
|
46
45
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.add_poam_by_system_id"
|
47
46
|
end
|
47
|
+
# verify the required parameter 'request_body' is set
|
48
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling POAMApi.add_poam_by_system_id"
|
50
|
+
end
|
48
51
|
# resource path
|
49
|
-
local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)
|
52
|
+
local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
50
53
|
|
51
54
|
# query parameters
|
52
55
|
query_params = opts[:query_params] || {}
|
@@ -56,61 +59,71 @@ module EmassClient
|
|
56
59
|
# HTTP header 'Accept' (if needed)
|
57
60
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
58
61
|
# HTTP header 'Content-Type'
|
59
|
-
|
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
|
60
66
|
|
61
67
|
# form parameters
|
62
68
|
form_params = opts[:form_params] || {}
|
63
69
|
|
64
70
|
# http body (model)
|
65
|
-
post_body = opts[:
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
|
66
72
|
|
67
|
-
|
73
|
+
# return_type
|
74
|
+
return_type = opts[:debug_return_type] || 'PoamResponsePost'
|
68
75
|
|
69
|
-
|
70
|
-
|
76
|
+
# auth_names
|
77
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
78
|
+
|
79
|
+
new_options = opts.merge(
|
80
|
+
:operation => :"POAMApi.add_poam_by_system_id",
|
71
81
|
:header_params => header_params,
|
72
82
|
:query_params => query_params,
|
73
83
|
:form_params => form_params,
|
74
84
|
:body => post_body,
|
75
85
|
:auth_names => auth_names,
|
76
|
-
:return_type => return_type
|
86
|
+
:return_type => return_type
|
87
|
+
)
|
77
88
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
90
|
if @api_client.config.debugging
|
79
91
|
@api_client.config.logger.debug "API called: POAMApi#add_poam_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
92
|
end
|
81
93
|
return data, status_code, headers
|
82
94
|
end
|
95
|
+
|
83
96
|
# Remove one or many POA&M items in a system
|
84
|
-
# Remove the POA&M matching `systemId` path parameter and `poamId`
|
85
|
-
# @param
|
86
|
-
# @param
|
97
|
+
# Remove the POA&M matching `systemId` path parameter and `poamId` Request Body<br>
|
98
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
99
|
+
# @param poam_request_delete_body_inner [Array<PoamRequestDeleteBodyInner>] Delete the given POA&M Id
|
87
100
|
# @param [Hash] opts the optional parameters
|
88
101
|
# @return [PoamResponseDelete]
|
89
|
-
def delete_poam(
|
90
|
-
data, _status_code, _headers = delete_poam_with_http_info(
|
102
|
+
def delete_poam(system_id, poam_request_delete_body_inner, opts = {})
|
103
|
+
data, _status_code, _headers = delete_poam_with_http_info(system_id, poam_request_delete_body_inner, opts)
|
91
104
|
data
|
92
105
|
end
|
93
106
|
|
94
107
|
# Remove one or many POA&M items in a system
|
95
|
-
# Remove the POA&M matching `systemId` path parameter and `poamId`
|
96
|
-
# @param
|
97
|
-
# @param
|
108
|
+
# Remove the POA&M matching `systemId` path parameter and `poamId` Request Body<br>
|
109
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
110
|
+
# @param poam_request_delete_body_inner [Array<PoamRequestDeleteBodyInner>] Delete the given POA&M Id
|
98
111
|
# @param [Hash] opts the optional parameters
|
99
112
|
# @return [Array<(PoamResponseDelete, Integer, Hash)>] PoamResponseDelete data, response status code and response headers
|
100
|
-
def delete_poam_with_http_info(
|
113
|
+
def delete_poam_with_http_info(system_id, poam_request_delete_body_inner, opts = {})
|
101
114
|
if @api_client.config.debugging
|
102
115
|
@api_client.config.logger.debug 'Calling API: POAMApi.delete_poam ...'
|
103
116
|
end
|
104
|
-
# verify the required parameter 'body' is set
|
105
|
-
if @api_client.config.client_side_validation && body.nil?
|
106
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.delete_poam"
|
107
|
-
end
|
108
117
|
# verify the required parameter 'system_id' is set
|
109
118
|
if @api_client.config.client_side_validation && system_id.nil?
|
110
119
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.delete_poam"
|
111
120
|
end
|
121
|
+
# verify the required parameter 'poam_request_delete_body_inner' is set
|
122
|
+
if @api_client.config.client_side_validation && poam_request_delete_body_inner.nil?
|
123
|
+
fail ArgumentError, "Missing the required parameter 'poam_request_delete_body_inner' when calling POAMApi.delete_poam"
|
124
|
+
end
|
112
125
|
# resource path
|
113
|
-
local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)
|
126
|
+
local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
114
127
|
|
115
128
|
# query parameters
|
116
129
|
query_params = opts[:query_params] || {}
|
@@ -120,40 +133,50 @@ module EmassClient
|
|
120
133
|
# HTTP header 'Accept' (if needed)
|
121
134
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
122
135
|
# HTTP header 'Content-Type'
|
123
|
-
|
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
|
124
140
|
|
125
141
|
# form parameters
|
126
142
|
form_params = opts[:form_params] || {}
|
127
143
|
|
128
144
|
# http body (model)
|
129
|
-
post_body = opts[:
|
145
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(poam_request_delete_body_inner)
|
130
146
|
|
131
|
-
|
147
|
+
# return_type
|
148
|
+
return_type = opts[:debug_return_type] || 'PoamResponseDelete'
|
132
149
|
|
133
|
-
|
134
|
-
|
150
|
+
# auth_names
|
151
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
152
|
+
|
153
|
+
new_options = opts.merge(
|
154
|
+
:operation => :"POAMApi.delete_poam",
|
135
155
|
:header_params => header_params,
|
136
156
|
:query_params => query_params,
|
137
157
|
:form_params => form_params,
|
138
158
|
:body => post_body,
|
139
159
|
:auth_names => auth_names,
|
140
|
-
:return_type => return_type
|
160
|
+
:return_type => return_type
|
161
|
+
)
|
141
162
|
|
163
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
142
164
|
if @api_client.config.debugging
|
143
165
|
@api_client.config.logger.debug "API called: POAMApi#delete_poam\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
166
|
end
|
145
167
|
return data, status_code, headers
|
146
168
|
end
|
169
|
+
|
147
170
|
# Get one or many POA&M items in a system
|
148
171
|
# Returns system(s) containing POA&M items for matching parameters.
|
149
|
-
# @param system_id **System Id**: The unique system record identifier.
|
172
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
150
173
|
# @param [Hash] opts the optional parameters
|
151
174
|
# @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format).
|
152
175
|
# @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format).
|
153
176
|
# @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
|
154
|
-
# @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs).
|
155
|
-
# @option opts [
|
156
|
-
# @return [
|
177
|
+
# @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs) (single or comma separated).
|
178
|
+
# @option opts [Boolean] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)
|
179
|
+
# @return [PoamResponseGetSystems]
|
157
180
|
def get_system_poams(system_id, opts = {})
|
158
181
|
data, _status_code, _headers = get_system_poams_with_http_info(system_id, opts)
|
159
182
|
data
|
@@ -161,14 +184,14 @@ module EmassClient
|
|
161
184
|
|
162
185
|
# Get one or many POA&M items in a system
|
163
186
|
# Returns system(s) containing POA&M items for matching parameters.
|
164
|
-
# @param system_id **System Id**: The unique system record identifier.
|
187
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
165
188
|
# @param [Hash] opts the optional parameters
|
166
189
|
# @option opts [String] :scheduled_completion_date_start **Date Started**: Filter query by the scheduled completion start date (Unix date format).
|
167
190
|
# @option opts [String] :scheduled_completion_date_end **Date Ended**: Filter query by the scheduled completion start date (Unix date format).
|
168
191
|
# @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated).
|
169
|
-
# @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs).
|
170
|
-
# @option opts [
|
171
|
-
# @return [Array<(
|
192
|
+
# @option opts [String] :ccis **CCI System**: Filter query by Control Correlation Identifiers (CCIs) (single or comma separated).
|
193
|
+
# @option opts [Boolean] :system_only **Systems Only**: Indicates that only system(s) information is retrieved. (default to true)
|
194
|
+
# @return [Array<(PoamResponseGetSystems, Integer, Hash)>] PoamResponseGetSystems data, response status code and response headers
|
172
195
|
def get_system_poams_with_http_info(system_id, opts = {})
|
173
196
|
if @api_client.config.debugging
|
174
197
|
@api_client.config.logger.debug 'Calling API: POAMApi.get_system_poams ...'
|
@@ -178,7 +201,7 @@ module EmassClient
|
|
178
201
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.get_system_poams"
|
179
202
|
end
|
180
203
|
# resource path
|
181
|
-
local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)
|
204
|
+
local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
182
205
|
|
183
206
|
# query parameters
|
184
207
|
query_params = opts[:query_params] || {}
|
@@ -197,30 +220,37 @@ module EmassClient
|
|
197
220
|
form_params = opts[:form_params] || {}
|
198
221
|
|
199
222
|
# http body (model)
|
200
|
-
post_body = opts[:
|
223
|
+
post_body = opts[:debug_body]
|
224
|
+
|
225
|
+
# return_type
|
226
|
+
return_type = opts[:debug_return_type] || 'PoamResponseGetSystems'
|
201
227
|
|
202
|
-
|
228
|
+
# auth_names
|
229
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
203
230
|
|
204
|
-
|
205
|
-
|
231
|
+
new_options = opts.merge(
|
232
|
+
:operation => :"POAMApi.get_system_poams",
|
206
233
|
:header_params => header_params,
|
207
234
|
:query_params => query_params,
|
208
235
|
:form_params => form_params,
|
209
236
|
:body => post_body,
|
210
237
|
:auth_names => auth_names,
|
211
|
-
:return_type => return_type
|
238
|
+
:return_type => return_type
|
239
|
+
)
|
212
240
|
|
241
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
213
242
|
if @api_client.config.debugging
|
214
243
|
@api_client.config.logger.debug "API called: POAMApi#get_system_poams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
215
244
|
end
|
216
245
|
return data, status_code, headers
|
217
246
|
end
|
247
|
+
|
218
248
|
# Get POA&M item by ID in a system
|
219
249
|
# Returns system(s) containing POA&M items for matching parameters.
|
220
|
-
# @param system_id **System Id**: The unique system record identifier.
|
221
|
-
# @param poam_id **POA&M Id**: The unique POA&M record identifier.
|
250
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
251
|
+
# @param poam_id [Integer] **POA&M Id**: The unique POA&M record identifier.
|
222
252
|
# @param [Hash] opts the optional parameters
|
223
|
-
# @return [
|
253
|
+
# @return [PoamResponseGetPoams]
|
224
254
|
def get_system_poams_by_poam_id(system_id, poam_id, opts = {})
|
225
255
|
data, _status_code, _headers = get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts)
|
226
256
|
data
|
@@ -228,10 +258,10 @@ module EmassClient
|
|
228
258
|
|
229
259
|
# Get POA&M item by ID in a system
|
230
260
|
# Returns system(s) containing POA&M items for matching parameters.
|
231
|
-
# @param system_id **System Id**: The unique system record identifier.
|
232
|
-
# @param poam_id **POA&M Id**: The unique POA&M record identifier.
|
261
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
262
|
+
# @param poam_id [Integer] **POA&M Id**: The unique POA&M record identifier.
|
233
263
|
# @param [Hash] opts the optional parameters
|
234
|
-
# @return [Array<(
|
264
|
+
# @return [Array<(PoamResponseGetPoams, Integer, Hash)>] PoamResponseGetPoams data, response status code and response headers
|
235
265
|
def get_system_poams_by_poam_id_with_http_info(system_id, poam_id, opts = {})
|
236
266
|
if @api_client.config.debugging
|
237
267
|
@api_client.config.logger.debug 'Calling API: POAMApi.get_system_poams_by_poam_id ...'
|
@@ -245,7 +275,7 @@ module EmassClient
|
|
245
275
|
fail ArgumentError, "Missing the required parameter 'poam_id' when calling POAMApi.get_system_poams_by_poam_id"
|
246
276
|
end
|
247
277
|
# resource path
|
248
|
-
local_var_path = '/api/systems/{systemId}/poams/{poamId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'poamId' + '}', poam_id.to_s)
|
278
|
+
local_var_path = '/api/systems/{systemId}/poams/{poamId}'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s)).sub('{' + 'poamId' + '}', CGI.escape(poam_id.to_s))
|
249
279
|
|
250
280
|
# query parameters
|
251
281
|
query_params = opts[:query_params] || {}
|
@@ -259,55 +289,62 @@ module EmassClient
|
|
259
289
|
form_params = opts[:form_params] || {}
|
260
290
|
|
261
291
|
# http body (model)
|
262
|
-
post_body = opts[:
|
292
|
+
post_body = opts[:debug_body]
|
293
|
+
|
294
|
+
# return_type
|
295
|
+
return_type = opts[:debug_return_type] || 'PoamResponseGetPoams'
|
263
296
|
|
264
|
-
|
297
|
+
# auth_names
|
298
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
265
299
|
|
266
|
-
|
267
|
-
|
300
|
+
new_options = opts.merge(
|
301
|
+
:operation => :"POAMApi.get_system_poams_by_poam_id",
|
268
302
|
:header_params => header_params,
|
269
303
|
:query_params => query_params,
|
270
304
|
:form_params => form_params,
|
271
305
|
:body => post_body,
|
272
306
|
:auth_names => auth_names,
|
273
|
-
:return_type => return_type
|
307
|
+
:return_type => return_type
|
308
|
+
)
|
274
309
|
|
310
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
275
311
|
if @api_client.config.debugging
|
276
312
|
@api_client.config.logger.debug "API called: POAMApi#get_system_poams_by_poam_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
277
313
|
end
|
278
314
|
return data, status_code, headers
|
279
315
|
end
|
316
|
+
|
280
317
|
# Update one or many POA&M items in a system
|
281
318
|
# Update a POA&M for given `systemId`<br> **Request Body Required Fields** - `poamId` - `displayPoamId` - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `reviewStatus` **Notes** - If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.<br> `pocOrganization`, `pocFirstName`, `pocLastName`, `pocEmail`, `pocPhoneNumber`<br /> - To delete a milestone through the POA&M PUT the field `isActive` must be set to `false`: `isActive=false`.
|
282
|
-
# @param
|
283
|
-
# @param
|
319
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
320
|
+
# @param request_body [Array<Object>] Update an existing control by Id
|
284
321
|
# @param [Hash] opts the optional parameters
|
285
322
|
# @return [PoamResponsePut]
|
286
|
-
def update_poam_by_system_id(
|
287
|
-
data, _status_code, _headers = update_poam_by_system_id_with_http_info(
|
323
|
+
def update_poam_by_system_id(system_id, request_body, opts = {})
|
324
|
+
data, _status_code, _headers = update_poam_by_system_id_with_http_info(system_id, request_body, opts)
|
288
325
|
data
|
289
326
|
end
|
290
327
|
|
291
328
|
# Update one or many POA&M items in a system
|
292
329
|
# Update a POA&M for given `systemId`<br> **Request Body Required Fields** - `poamId` - `displayPoamId` - `status` - `vulnerabilityDescription` - `sourceIdentVuln` - `pocOrganization` - `reviewStatus` **Notes** - If a POC email is supplied, the application will attempt to locate a user already registered within the application and pre-populate any information not explicitly supplied in the request. If no such user is found, these fields are **required** within the request.<br> `pocOrganization`, `pocFirstName`, `pocLastName`, `pocEmail`, `pocPhoneNumber`<br /> - To delete a milestone through the POA&M PUT the field `isActive` must be set to `false`: `isActive=false`.
|
293
|
-
# @param
|
294
|
-
# @param
|
330
|
+
# @param system_id [Integer] **System Id**: The unique system record identifier.
|
331
|
+
# @param request_body [Array<Object>] Update an existing control by Id
|
295
332
|
# @param [Hash] opts the optional parameters
|
296
333
|
# @return [Array<(PoamResponsePut, Integer, Hash)>] PoamResponsePut data, response status code and response headers
|
297
|
-
def update_poam_by_system_id_with_http_info(
|
334
|
+
def update_poam_by_system_id_with_http_info(system_id, request_body, opts = {})
|
298
335
|
if @api_client.config.debugging
|
299
336
|
@api_client.config.logger.debug 'Calling API: POAMApi.update_poam_by_system_id ...'
|
300
337
|
end
|
301
|
-
# verify the required parameter 'body' is set
|
302
|
-
if @api_client.config.client_side_validation && body.nil?
|
303
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling POAMApi.update_poam_by_system_id"
|
304
|
-
end
|
305
338
|
# verify the required parameter 'system_id' is set
|
306
339
|
if @api_client.config.client_side_validation && system_id.nil?
|
307
340
|
fail ArgumentError, "Missing the required parameter 'system_id' when calling POAMApi.update_poam_by_system_id"
|
308
341
|
end
|
342
|
+
# verify the required parameter 'request_body' is set
|
343
|
+
if @api_client.config.client_side_validation && request_body.nil?
|
344
|
+
fail ArgumentError, "Missing the required parameter 'request_body' when calling POAMApi.update_poam_by_system_id"
|
345
|
+
end
|
309
346
|
# resource path
|
310
|
-
local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', system_id.to_s)
|
347
|
+
local_var_path = '/api/systems/{systemId}/poams'.sub('{' + 'systemId' + '}', CGI.escape(system_id.to_s))
|
311
348
|
|
312
349
|
# query parameters
|
313
350
|
query_params = opts[:query_params] || {}
|
@@ -317,25 +354,34 @@ module EmassClient
|
|
317
354
|
# HTTP header 'Accept' (if needed)
|
318
355
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
319
356
|
# HTTP header 'Content-Type'
|
320
|
-
|
357
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
358
|
+
if !content_type.nil?
|
359
|
+
header_params['Content-Type'] = content_type
|
360
|
+
end
|
321
361
|
|
322
362
|
# form parameters
|
323
363
|
form_params = opts[:form_params] || {}
|
324
364
|
|
325
365
|
# http body (model)
|
326
|
-
post_body = opts[:
|
366
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
|
367
|
+
|
368
|
+
# return_type
|
369
|
+
return_type = opts[:debug_return_type] || 'PoamResponsePut'
|
327
370
|
|
328
|
-
|
371
|
+
# auth_names
|
372
|
+
auth_names = opts[:debug_auth_names] || ['apiKey', 'mockType', 'userId']
|
329
373
|
|
330
|
-
|
331
|
-
|
374
|
+
new_options = opts.merge(
|
375
|
+
:operation => :"POAMApi.update_poam_by_system_id",
|
332
376
|
:header_params => header_params,
|
333
377
|
:query_params => query_params,
|
334
378
|
:form_params => form_params,
|
335
379
|
:body => post_body,
|
336
380
|
:auth_names => auth_names,
|
337
|
-
:return_type => return_type
|
381
|
+
:return_type => return_type
|
382
|
+
)
|
338
383
|
|
384
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
339
385
|
if @api_client.config.debugging
|
340
386
|
@api_client.config.logger.debug "API called: POAMApi#update_poam_by_system_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
341
387
|
end
|