emass_client 1.0.3 → 1.0.5
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 +18 -9
- 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,15 +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.0-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module EmassClient
|
15
17
|
class PacResponsePost
|
@@ -25,11 +27,16 @@ module EmassClient
|
|
25
27
|
}
|
26
28
|
end
|
27
29
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
28
35
|
# Attribute type mapping.
|
29
36
|
def self.openapi_types
|
30
37
|
{
|
31
|
-
:'meta' => :'
|
32
|
-
:'data' => :'
|
38
|
+
:'meta' => :'Response200',
|
39
|
+
:'data' => :'Array<PacPost>'
|
33
40
|
}
|
34
41
|
end
|
35
42
|
|
@@ -38,7 +45,7 @@ module EmassClient
|
|
38
45
|
Set.new([
|
39
46
|
])
|
40
47
|
end
|
41
|
-
|
48
|
+
|
42
49
|
# Initializes the object
|
43
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
44
51
|
def initialize(attributes = {})
|
@@ -111,8 +118,11 @@ module EmassClient
|
|
111
118
|
# @return [Object] Returns the model itself
|
112
119
|
def build_from_hash(attributes)
|
113
120
|
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
114
122
|
self.class.openapi_types.each_pair do |key, type|
|
115
|
-
if
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
126
|
# check to ensure the input is an array given that the attribute
|
117
127
|
# is documented as an array but the input is not
|
118
128
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -120,8 +130,6 @@ module EmassClient
|
|
120
130
|
end
|
121
131
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
132
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
123
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
-
self.send("#{key}=", nil)
|
125
133
|
end
|
126
134
|
end
|
127
135
|
|
@@ -134,8 +142,8 @@ module EmassClient
|
|
134
142
|
# @return [Object] Deserialized data
|
135
143
|
def _deserialize(type, value)
|
136
144
|
case type.to_sym
|
137
|
-
when :
|
138
|
-
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
139
147
|
when :Date
|
140
148
|
Date.parse(value)
|
141
149
|
when :String
|
@@ -165,7 +173,9 @@ module EmassClient
|
|
165
173
|
end
|
166
174
|
end
|
167
175
|
else # model
|
168
|
-
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = EmassClient.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
179
|
end
|
170
180
|
end
|
171
181
|
|
@@ -213,5 +223,8 @@ module EmassClient
|
|
213
223
|
else
|
214
224
|
value
|
215
225
|
end
|
216
|
-
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
217
230
|
end
|
@@ -1,18 +1,23 @@
|
|
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.0-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module EmassClient
|
15
17
|
class PoamGet
|
18
|
+
# [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters.
|
19
|
+
attr_accessor :external_uid
|
20
|
+
|
16
21
|
# [Required] Unique eMASS system identifier.
|
17
22
|
attr_accessor :system_id
|
18
23
|
|
@@ -25,11 +30,8 @@ module EmassClient
|
|
25
30
|
# [Read-only] Indicates whether a test result is inherited.
|
26
31
|
attr_accessor :is_inherited
|
27
32
|
|
28
|
-
# [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters.
|
29
|
-
attr_accessor :external_uid
|
30
|
-
|
31
33
|
# [Optional] System acronym name.
|
32
|
-
attr_accessor :
|
34
|
+
attr_accessor :control_acronym
|
33
35
|
|
34
36
|
# [Optional] CCI associated with POA&M Item..
|
35
37
|
attr_accessor :cci
|
@@ -63,7 +65,7 @@ module EmassClient
|
|
63
65
|
# [Conditional] Email address of POC. 100 Characters.
|
64
66
|
attr_accessor :poc_email
|
65
67
|
|
66
|
-
# [Conditional] Phone number of POC
|
68
|
+
# [Conditional] Phone number of POC. 100 Characters.
|
67
69
|
attr_accessor :poc_phone_number
|
68
70
|
|
69
71
|
# [Conditional] Required for approved items. Values include the following options (Very Low,Low,Moderate,High,Very High)
|
@@ -136,12 +138,12 @@ module EmassClient
|
|
136
138
|
# Attribute mapping from ruby-style variable name to JSON key.
|
137
139
|
def self.attribute_map
|
138
140
|
{
|
141
|
+
:'external_uid' => :'externalUid',
|
139
142
|
:'system_id' => :'systemId',
|
140
143
|
:'poam_id' => :'poamId',
|
141
144
|
:'display_poam_id' => :'displayPoamId',
|
142
145
|
:'is_inherited' => :'isInherited',
|
143
|
-
:'
|
144
|
-
:'control_acronyms' => :'controlAcronyms',
|
146
|
+
:'control_acronym' => :'controlAcronym',
|
145
147
|
:'cci' => :'cci',
|
146
148
|
:'status' => :'status',
|
147
149
|
:'review_status' => :'reviewStatus',
|
@@ -172,51 +174,80 @@ module EmassClient
|
|
172
174
|
}
|
173
175
|
end
|
174
176
|
|
177
|
+
# Returns all the JSON keys this model knows about
|
178
|
+
def self.acceptable_attributes
|
179
|
+
attribute_map.values
|
180
|
+
end
|
181
|
+
|
175
182
|
# Attribute type mapping.
|
176
183
|
def self.openapi_types
|
177
184
|
{
|
178
|
-
:'
|
179
|
-
:'
|
180
|
-
:'
|
181
|
-
:'
|
182
|
-
:'
|
183
|
-
:'
|
184
|
-
:'cci' => :'
|
185
|
-
:'status' => :'
|
186
|
-
:'review_status' => :'
|
187
|
-
:'vulnerability_description' => :'
|
188
|
-
:'source_ident_vuln' => :'
|
189
|
-
:'security_checks' => :'
|
190
|
-
:'milestones' => :'
|
191
|
-
:'poc_organization' => :'
|
192
|
-
:'poc_first_name' => :'
|
193
|
-
:'poc_last_name' => :'
|
194
|
-
:'poc_email' => :'
|
195
|
-
:'poc_phone_number' => :'
|
196
|
-
:'severity' => :'
|
197
|
-
:'raw_severity' => :'
|
198
|
-
:'relevance_of_threat' => :'
|
199
|
-
:'likelihood' => :'
|
200
|
-
:'impact' => :'
|
201
|
-
:'impact_description' => :'
|
202
|
-
:'residual_risk_level' => :'
|
203
|
-
:'recommendations' => :'
|
204
|
-
:'resources' => :'
|
205
|
-
:'scheduled_completion_date' => :'
|
206
|
-
:'completion_date' => :'
|
207
|
-
:'extension_date' => :'
|
208
|
-
:'comments' => :'
|
209
|
-
:'mitigation' => :'
|
210
|
-
:'is_active' => :'
|
185
|
+
:'external_uid' => :'String',
|
186
|
+
:'system_id' => :'Integer',
|
187
|
+
:'poam_id' => :'Integer',
|
188
|
+
:'display_poam_id' => :'Integer',
|
189
|
+
:'is_inherited' => :'Boolean',
|
190
|
+
:'control_acronym' => :'String',
|
191
|
+
:'cci' => :'String',
|
192
|
+
:'status' => :'String',
|
193
|
+
:'review_status' => :'String',
|
194
|
+
:'vulnerability_description' => :'String',
|
195
|
+
:'source_ident_vuln' => :'String',
|
196
|
+
:'security_checks' => :'String',
|
197
|
+
:'milestones' => :'Array<MilestonesGet>',
|
198
|
+
:'poc_organization' => :'String',
|
199
|
+
:'poc_first_name' => :'String',
|
200
|
+
:'poc_last_name' => :'String',
|
201
|
+
:'poc_email' => :'String',
|
202
|
+
:'poc_phone_number' => :'String',
|
203
|
+
:'severity' => :'String',
|
204
|
+
:'raw_severity' => :'String',
|
205
|
+
:'relevance_of_threat' => :'String',
|
206
|
+
:'likelihood' => :'String',
|
207
|
+
:'impact' => :'String',
|
208
|
+
:'impact_description' => :'String',
|
209
|
+
:'residual_risk_level' => :'String',
|
210
|
+
:'recommendations' => :'String',
|
211
|
+
:'resources' => :'String',
|
212
|
+
:'scheduled_completion_date' => :'Integer',
|
213
|
+
:'completion_date' => :'Integer',
|
214
|
+
:'extension_date' => :'Integer',
|
215
|
+
:'comments' => :'String',
|
216
|
+
:'mitigation' => :'String',
|
217
|
+
:'is_active' => :'Boolean'
|
211
218
|
}
|
212
219
|
end
|
213
220
|
|
214
221
|
# List of attributes with nullable: true
|
215
222
|
def self.openapi_nullable
|
216
223
|
Set.new([
|
224
|
+
:'external_uid',
|
225
|
+
:'is_inherited',
|
226
|
+
:'control_acronym',
|
227
|
+
:'cci',
|
228
|
+
:'review_status',
|
229
|
+
:'security_checks',
|
230
|
+
:'poc_first_name',
|
231
|
+
:'poc_last_name',
|
232
|
+
:'poc_email',
|
233
|
+
:'poc_phone_number',
|
234
|
+
:'severity',
|
235
|
+
:'raw_severity',
|
236
|
+
:'relevance_of_threat',
|
237
|
+
:'likelihood',
|
238
|
+
:'impact',
|
239
|
+
:'impact_description',
|
240
|
+
:'residual_risk_level',
|
241
|
+
:'recommendations',
|
242
|
+
:'scheduled_completion_date',
|
243
|
+
:'completion_date',
|
244
|
+
:'extension_date',
|
245
|
+
:'comments',
|
246
|
+
:'mitigation',
|
247
|
+
:'is_active'
|
217
248
|
])
|
218
249
|
end
|
219
|
-
|
250
|
+
|
220
251
|
# Initializes the object
|
221
252
|
# @param [Hash] attributes Model attributes in the form of hash
|
222
253
|
def initialize(attributes = {})
|
@@ -232,6 +263,10 @@ module EmassClient
|
|
232
263
|
h[k.to_sym] = v
|
233
264
|
}
|
234
265
|
|
266
|
+
if attributes.key?(:'external_uid')
|
267
|
+
self.external_uid = attributes[:'external_uid']
|
268
|
+
end
|
269
|
+
|
235
270
|
if attributes.key?(:'system_id')
|
236
271
|
self.system_id = attributes[:'system_id']
|
237
272
|
end
|
@@ -248,12 +283,8 @@ module EmassClient
|
|
248
283
|
self.is_inherited = attributes[:'is_inherited']
|
249
284
|
end
|
250
285
|
|
251
|
-
if attributes.key?(:'
|
252
|
-
self.
|
253
|
-
end
|
254
|
-
|
255
|
-
if attributes.key?(:'control_acronyms')
|
256
|
-
self.control_acronyms = attributes[:'control_acronyms']
|
286
|
+
if attributes.key?(:'control_acronym')
|
287
|
+
self.control_acronym = attributes[:'control_acronym']
|
257
288
|
end
|
258
289
|
|
259
290
|
if attributes.key?(:'cci')
|
@@ -377,21 +408,21 @@ module EmassClient
|
|
377
408
|
# Check to see if the all the properties in the model are valid
|
378
409
|
# @return true if the model is valid
|
379
410
|
def valid?
|
380
|
-
status_validator = EnumAttributeValidator.new('
|
411
|
+
status_validator = EnumAttributeValidator.new('String', ["Ongoing", "Risk Accepted", "Completed", "Not Applicable", "Archived", "unknown_default_open_api"])
|
381
412
|
return false unless status_validator.valid?(@status)
|
382
|
-
review_status_validator = EnumAttributeValidator.new('
|
413
|
+
review_status_validator = EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved", "unknown_default_open_api"])
|
383
414
|
return false unless review_status_validator.valid?(@review_status)
|
384
|
-
severity_validator = EnumAttributeValidator.new('
|
415
|
+
severity_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
385
416
|
return false unless severity_validator.valid?(@severity)
|
386
|
-
raw_severity_validator = EnumAttributeValidator.new('
|
417
|
+
raw_severity_validator = EnumAttributeValidator.new('String', ["I", "II", "III", "unknown_default_open_api"])
|
387
418
|
return false unless raw_severity_validator.valid?(@raw_severity)
|
388
|
-
relevance_of_threat_validator = EnumAttributeValidator.new('
|
419
|
+
relevance_of_threat_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
389
420
|
return false unless relevance_of_threat_validator.valid?(@relevance_of_threat)
|
390
|
-
likelihood_validator = EnumAttributeValidator.new('
|
421
|
+
likelihood_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
391
422
|
return false unless likelihood_validator.valid?(@likelihood)
|
392
|
-
impact_validator = EnumAttributeValidator.new('
|
423
|
+
impact_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
393
424
|
return false unless impact_validator.valid?(@impact)
|
394
|
-
residual_risk_level_validator = EnumAttributeValidator.new('
|
425
|
+
residual_risk_level_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
395
426
|
return false unless residual_risk_level_validator.valid?(@residual_risk_level)
|
396
427
|
true
|
397
428
|
end
|
@@ -399,7 +430,7 @@ module EmassClient
|
|
399
430
|
# Custom attribute writer method checking allowed values (enum).
|
400
431
|
# @param [Object] status Object to be assigned
|
401
432
|
def status=(status)
|
402
|
-
validator = EnumAttributeValidator.new('
|
433
|
+
validator = EnumAttributeValidator.new('String', ["Ongoing", "Risk Accepted", "Completed", "Not Applicable", "Archived", "unknown_default_open_api"])
|
403
434
|
unless validator.valid?(status)
|
404
435
|
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
405
436
|
end
|
@@ -409,7 +440,7 @@ module EmassClient
|
|
409
440
|
# Custom attribute writer method checking allowed values (enum).
|
410
441
|
# @param [Object] review_status Object to be assigned
|
411
442
|
def review_status=(review_status)
|
412
|
-
validator = EnumAttributeValidator.new('
|
443
|
+
validator = EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved", "unknown_default_open_api"])
|
413
444
|
unless validator.valid?(review_status)
|
414
445
|
fail ArgumentError, "invalid value for \"review_status\", must be one of #{validator.allowable_values}."
|
415
446
|
end
|
@@ -419,7 +450,7 @@ module EmassClient
|
|
419
450
|
# Custom attribute writer method checking allowed values (enum).
|
420
451
|
# @param [Object] severity Object to be assigned
|
421
452
|
def severity=(severity)
|
422
|
-
validator = EnumAttributeValidator.new('
|
453
|
+
validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
423
454
|
unless validator.valid?(severity)
|
424
455
|
fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}."
|
425
456
|
end
|
@@ -429,7 +460,7 @@ module EmassClient
|
|
429
460
|
# Custom attribute writer method checking allowed values (enum).
|
430
461
|
# @param [Object] raw_severity Object to be assigned
|
431
462
|
def raw_severity=(raw_severity)
|
432
|
-
validator = EnumAttributeValidator.new('
|
463
|
+
validator = EnumAttributeValidator.new('String', ["I", "II", "III", "unknown_default_open_api"])
|
433
464
|
unless validator.valid?(raw_severity)
|
434
465
|
fail ArgumentError, "invalid value for \"raw_severity\", must be one of #{validator.allowable_values}."
|
435
466
|
end
|
@@ -439,7 +470,7 @@ module EmassClient
|
|
439
470
|
# Custom attribute writer method checking allowed values (enum).
|
440
471
|
# @param [Object] relevance_of_threat Object to be assigned
|
441
472
|
def relevance_of_threat=(relevance_of_threat)
|
442
|
-
validator = EnumAttributeValidator.new('
|
473
|
+
validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
443
474
|
unless validator.valid?(relevance_of_threat)
|
444
475
|
fail ArgumentError, "invalid value for \"relevance_of_threat\", must be one of #{validator.allowable_values}."
|
445
476
|
end
|
@@ -449,7 +480,7 @@ module EmassClient
|
|
449
480
|
# Custom attribute writer method checking allowed values (enum).
|
450
481
|
# @param [Object] likelihood Object to be assigned
|
451
482
|
def likelihood=(likelihood)
|
452
|
-
validator = EnumAttributeValidator.new('
|
483
|
+
validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
453
484
|
unless validator.valid?(likelihood)
|
454
485
|
fail ArgumentError, "invalid value for \"likelihood\", must be one of #{validator.allowable_values}."
|
455
486
|
end
|
@@ -459,7 +490,7 @@ module EmassClient
|
|
459
490
|
# Custom attribute writer method checking allowed values (enum).
|
460
491
|
# @param [Object] impact Object to be assigned
|
461
492
|
def impact=(impact)
|
462
|
-
validator = EnumAttributeValidator.new('
|
493
|
+
validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
463
494
|
unless validator.valid?(impact)
|
464
495
|
fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}."
|
465
496
|
end
|
@@ -469,7 +500,7 @@ module EmassClient
|
|
469
500
|
# Custom attribute writer method checking allowed values (enum).
|
470
501
|
# @param [Object] residual_risk_level Object to be assigned
|
471
502
|
def residual_risk_level=(residual_risk_level)
|
472
|
-
validator = EnumAttributeValidator.new('
|
503
|
+
validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
473
504
|
unless validator.valid?(residual_risk_level)
|
474
505
|
fail ArgumentError, "invalid value for \"residual_risk_level\", must be one of #{validator.allowable_values}."
|
475
506
|
end
|
@@ -481,12 +512,12 @@ module EmassClient
|
|
481
512
|
def ==(o)
|
482
513
|
return true if self.equal?(o)
|
483
514
|
self.class == o.class &&
|
515
|
+
external_uid == o.external_uid &&
|
484
516
|
system_id == o.system_id &&
|
485
517
|
poam_id == o.poam_id &&
|
486
518
|
display_poam_id == o.display_poam_id &&
|
487
519
|
is_inherited == o.is_inherited &&
|
488
|
-
|
489
|
-
control_acronyms == o.control_acronyms &&
|
520
|
+
control_acronym == o.control_acronym &&
|
490
521
|
cci == o.cci &&
|
491
522
|
status == o.status &&
|
492
523
|
review_status == o.review_status &&
|
@@ -525,7 +556,7 @@ module EmassClient
|
|
525
556
|
# Calculates hash code according to all attributes.
|
526
557
|
# @return [Integer] Hash code
|
527
558
|
def hash
|
528
|
-
[system_id, poam_id, display_poam_id, is_inherited,
|
559
|
+
[external_uid, system_id, poam_id, display_poam_id, is_inherited, control_acronym, cci, status, review_status, vulnerability_description, source_ident_vuln, security_checks, milestones, poc_organization, poc_first_name, poc_last_name, poc_email, poc_phone_number, severity, raw_severity, relevance_of_threat, likelihood, impact, impact_description, residual_risk_level, recommendations, resources, scheduled_completion_date, completion_date, extension_date, comments, mitigation, is_active].hash
|
529
560
|
end
|
530
561
|
|
531
562
|
# Builds the object from hash
|
@@ -540,8 +571,11 @@ module EmassClient
|
|
540
571
|
# @return [Object] Returns the model itself
|
541
572
|
def build_from_hash(attributes)
|
542
573
|
return nil unless attributes.is_a?(Hash)
|
574
|
+
attributes = attributes.transform_keys(&:to_sym)
|
543
575
|
self.class.openapi_types.each_pair do |key, type|
|
544
|
-
if
|
576
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
577
|
+
self.send("#{key}=", nil)
|
578
|
+
elsif type =~ /\AArray<(.*)>/i
|
545
579
|
# check to ensure the input is an array given that the attribute
|
546
580
|
# is documented as an array but the input is not
|
547
581
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -549,8 +583,6 @@ module EmassClient
|
|
549
583
|
end
|
550
584
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
551
585
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
552
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
553
|
-
self.send("#{key}=", nil)
|
554
586
|
end
|
555
587
|
end
|
556
588
|
|
@@ -563,8 +595,8 @@ module EmassClient
|
|
563
595
|
# @return [Object] Deserialized data
|
564
596
|
def _deserialize(type, value)
|
565
597
|
case type.to_sym
|
566
|
-
when :
|
567
|
-
|
598
|
+
when :Time
|
599
|
+
Time.parse(value)
|
568
600
|
when :Date
|
569
601
|
Date.parse(value)
|
570
602
|
when :String
|
@@ -594,7 +626,9 @@ module EmassClient
|
|
594
626
|
end
|
595
627
|
end
|
596
628
|
else # model
|
597
|
-
|
629
|
+
# models (e.g. Pet) or oneOf
|
630
|
+
klass = EmassClient.const_get(type)
|
631
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
598
632
|
end
|
599
633
|
end
|
600
634
|
|
@@ -642,5 +676,8 @@ module EmassClient
|
|
642
676
|
else
|
643
677
|
value
|
644
678
|
end
|
645
|
-
end
|
679
|
+
end
|
680
|
+
|
681
|
+
end
|
682
|
+
|
646
683
|
end
|