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 CacResponsePost
|
@@ -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<CacResponsePostDataInner>'
|
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,20 @@
|
|
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
|
-
class
|
17
|
+
class CacResponsePostDataInner
|
16
18
|
# [Required] System acronym name.
|
17
19
|
attr_accessor :control_acronym
|
18
20
|
|
@@ -20,41 +22,51 @@ module EmassClient
|
|
20
22
|
|
21
23
|
attr_accessor :system_id
|
22
24
|
|
25
|
+
attr_accessor :errors
|
26
|
+
|
23
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
28
|
def self.attribute_map
|
25
29
|
{
|
26
30
|
:'control_acronym' => :'controlAcronym',
|
27
31
|
:'success' => :'success',
|
28
|
-
:'system_id' => :'systemId'
|
32
|
+
:'system_id' => :'systemId',
|
33
|
+
:'errors' => :'errors'
|
29
34
|
}
|
30
35
|
end
|
31
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
32
42
|
# Attribute type mapping.
|
33
43
|
def self.openapi_types
|
34
44
|
{
|
35
|
-
:'control_acronym' => :'
|
36
|
-
:'success' => :'
|
37
|
-
:'system_id' => :'
|
45
|
+
:'control_acronym' => :'String',
|
46
|
+
:'success' => :'Boolean',
|
47
|
+
:'system_id' => :'Integer',
|
48
|
+
:'errors' => :'Array<Object>'
|
38
49
|
}
|
39
50
|
end
|
40
51
|
|
41
52
|
# List of attributes with nullable: true
|
42
53
|
def self.openapi_nullable
|
43
54
|
Set.new([
|
55
|
+
:'errors'
|
44
56
|
])
|
45
57
|
end
|
46
|
-
|
58
|
+
|
47
59
|
# Initializes the object
|
48
60
|
# @param [Hash] attributes Model attributes in the form of hash
|
49
61
|
def initialize(attributes = {})
|
50
62
|
if (!attributes.is_a?(Hash))
|
51
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CacResponsePostDataInner` initialize method"
|
52
64
|
end
|
53
65
|
|
54
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
55
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
68
|
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CacResponsePostDataInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
70
|
end
|
59
71
|
h[k.to_sym] = v
|
60
72
|
}
|
@@ -70,21 +82,42 @@ module EmassClient
|
|
70
82
|
if attributes.key?(:'system_id')
|
71
83
|
self.system_id = attributes[:'system_id']
|
72
84
|
end
|
85
|
+
|
86
|
+
if attributes.key?(:'errors')
|
87
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
88
|
+
self.errors = value
|
89
|
+
end
|
90
|
+
end
|
73
91
|
end
|
74
92
|
|
75
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
94
|
# @return Array for valid properties with the reasons
|
77
95
|
def list_invalid_properties
|
78
96
|
invalid_properties = Array.new
|
97
|
+
if !@errors.nil? && @errors.length > 5
|
98
|
+
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 5.')
|
99
|
+
end
|
100
|
+
|
79
101
|
invalid_properties
|
80
102
|
end
|
81
103
|
|
82
104
|
# Check to see if the all the properties in the model are valid
|
83
105
|
# @return true if the model is valid
|
84
106
|
def valid?
|
107
|
+
return false if !@errors.nil? && @errors.length > 5
|
85
108
|
true
|
86
109
|
end
|
87
110
|
|
111
|
+
# Custom attribute writer method with validation
|
112
|
+
# @param [Object] errors Value to be assigned
|
113
|
+
def errors=(errors)
|
114
|
+
if !errors.nil? && errors.length > 5
|
115
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 5.'
|
116
|
+
end
|
117
|
+
|
118
|
+
@errors = errors
|
119
|
+
end
|
120
|
+
|
88
121
|
# Checks equality by comparing each attribute.
|
89
122
|
# @param [Object] Object to be compared
|
90
123
|
def ==(o)
|
@@ -92,7 +125,8 @@ module EmassClient
|
|
92
125
|
self.class == o.class &&
|
93
126
|
control_acronym == o.control_acronym &&
|
94
127
|
success == o.success &&
|
95
|
-
system_id == o.system_id
|
128
|
+
system_id == o.system_id &&
|
129
|
+
errors == o.errors
|
96
130
|
end
|
97
131
|
|
98
132
|
# @see the `==` method
|
@@ -104,7 +138,7 @@ module EmassClient
|
|
104
138
|
# Calculates hash code according to all attributes.
|
105
139
|
# @return [Integer] Hash code
|
106
140
|
def hash
|
107
|
-
[control_acronym, success, system_id].hash
|
141
|
+
[control_acronym, success, system_id, errors].hash
|
108
142
|
end
|
109
143
|
|
110
144
|
# Builds the object from hash
|
@@ -119,8 +153,11 @@ module EmassClient
|
|
119
153
|
# @return [Object] Returns the model itself
|
120
154
|
def build_from_hash(attributes)
|
121
155
|
return nil unless attributes.is_a?(Hash)
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
122
157
|
self.class.openapi_types.each_pair do |key, type|
|
123
|
-
if
|
158
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
159
|
+
self.send("#{key}=", nil)
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
124
161
|
# check to ensure the input is an array given that the attribute
|
125
162
|
# is documented as an array but the input is not
|
126
163
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -128,8 +165,6 @@ module EmassClient
|
|
128
165
|
end
|
129
166
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
167
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
132
|
-
self.send("#{key}=", nil)
|
133
168
|
end
|
134
169
|
end
|
135
170
|
|
@@ -142,8 +177,8 @@ module EmassClient
|
|
142
177
|
# @return [Object] Deserialized data
|
143
178
|
def _deserialize(type, value)
|
144
179
|
case type.to_sym
|
145
|
-
when :
|
146
|
-
|
180
|
+
when :Time
|
181
|
+
Time.parse(value)
|
147
182
|
when :Date
|
148
183
|
Date.parse(value)
|
149
184
|
when :String
|
@@ -173,7 +208,9 @@ module EmassClient
|
|
173
208
|
end
|
174
209
|
end
|
175
210
|
else # model
|
176
|
-
|
211
|
+
# models (e.g. Pet) or oneOf
|
212
|
+
klass = EmassClient.const_get(type)
|
213
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
214
|
end
|
178
215
|
end
|
179
216
|
|
@@ -221,5 +258,8 @@ module EmassClient
|
|
221
258
|
else
|
222
259
|
value
|
223
260
|
end
|
224
|
-
end
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
|
225
265
|
end
|
@@ -1,98 +1,92 @@
|
|
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
|
-
class
|
16
|
-
# [Required]
|
17
|
-
attr_accessor :
|
18
|
-
|
19
|
-
# [Required] Package name. 100 Characters.
|
20
|
-
attr_accessor :name
|
21
|
-
|
22
|
-
# [Required] Character Limit = 4,000.
|
23
|
-
attr_accessor :comments
|
24
|
-
|
25
|
-
class EnumAttributeValidator
|
26
|
-
attr_reader :datatype
|
27
|
-
attr_reader :allowable_values
|
28
|
-
|
29
|
-
def initialize(datatype, allowable_values)
|
30
|
-
@allowable_values = allowable_values.map do |value|
|
31
|
-
case datatype.to_s
|
32
|
-
when /Integer/i
|
33
|
-
value.to_i
|
34
|
-
when /Float/i
|
35
|
-
value.to_f
|
36
|
-
else
|
37
|
-
value
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
17
|
+
class CloudResourcesPost
|
18
|
+
# [Required] Unique identifier/resource namespace for policy compliance result
|
19
|
+
attr_accessor :resource_id
|
41
20
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
21
|
+
attr_accessor :success
|
22
|
+
|
23
|
+
attr_accessor :system_id
|
24
|
+
|
25
|
+
attr_accessor :errors
|
46
26
|
|
47
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
48
28
|
def self.attribute_map
|
49
29
|
{
|
50
|
-
:'
|
51
|
-
:'
|
52
|
-
:'
|
30
|
+
:'resource_id' => :'resourceId',
|
31
|
+
:'success' => :'success',
|
32
|
+
:'system_id' => :'systemId',
|
33
|
+
:'errors' => :'errors'
|
53
34
|
}
|
54
35
|
end
|
55
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
56
42
|
# Attribute type mapping.
|
57
43
|
def self.openapi_types
|
58
44
|
{
|
59
|
-
:'
|
60
|
-
:'
|
61
|
-
:'
|
45
|
+
:'resource_id' => :'String',
|
46
|
+
:'success' => :'Boolean',
|
47
|
+
:'system_id' => :'Integer',
|
48
|
+
:'errors' => :'Array<Object>'
|
62
49
|
}
|
63
50
|
end
|
64
51
|
|
65
52
|
# List of attributes with nullable: true
|
66
53
|
def self.openapi_nullable
|
67
54
|
Set.new([
|
55
|
+
:'errors'
|
68
56
|
])
|
69
57
|
end
|
70
|
-
|
58
|
+
|
71
59
|
# Initializes the object
|
72
60
|
# @param [Hash] attributes Model attributes in the form of hash
|
73
61
|
def initialize(attributes = {})
|
74
62
|
if (!attributes.is_a?(Hash))
|
75
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CloudResourcesPost` initialize method"
|
76
64
|
end
|
77
65
|
|
78
66
|
# check to see if the attribute exists and convert string to symbol for hash key
|
79
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
68
|
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CloudResourcesPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
70
|
end
|
83
71
|
h[k.to_sym] = v
|
84
72
|
}
|
85
73
|
|
86
|
-
if attributes.key?(:'
|
87
|
-
self.
|
74
|
+
if attributes.key?(:'resource_id')
|
75
|
+
self.resource_id = attributes[:'resource_id']
|
88
76
|
end
|
89
77
|
|
90
|
-
if attributes.key?(:'
|
91
|
-
self.
|
78
|
+
if attributes.key?(:'success')
|
79
|
+
self.success = attributes[:'success']
|
92
80
|
end
|
93
81
|
|
94
|
-
if attributes.key?(:'
|
95
|
-
self.
|
82
|
+
if attributes.key?(:'system_id')
|
83
|
+
self.system_id = attributes[:'system_id']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'errors')
|
87
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
88
|
+
self.errors = value
|
89
|
+
end
|
96
90
|
end
|
97
91
|
end
|
98
92
|
|
@@ -100,25 +94,28 @@ module EmassClient
|
|
100
94
|
# @return Array for valid properties with the reasons
|
101
95
|
def list_invalid_properties
|
102
96
|
invalid_properties = Array.new
|
97
|
+
if !@errors.nil? && @errors.length > 5
|
98
|
+
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 5.')
|
99
|
+
end
|
100
|
+
|
103
101
|
invalid_properties
|
104
102
|
end
|
105
103
|
|
106
104
|
# Check to see if the all the properties in the model are valid
|
107
105
|
# @return true if the model is valid
|
108
106
|
def valid?
|
109
|
-
|
110
|
-
return false unless workflow_validator.valid?(@workflow)
|
107
|
+
return false if !@errors.nil? && @errors.length > 5
|
111
108
|
true
|
112
109
|
end
|
113
110
|
|
114
|
-
# Custom attribute writer method
|
115
|
-
# @param [Object]
|
116
|
-
def
|
117
|
-
|
118
|
-
|
119
|
-
fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}."
|
111
|
+
# Custom attribute writer method with validation
|
112
|
+
# @param [Object] errors Value to be assigned
|
113
|
+
def errors=(errors)
|
114
|
+
if !errors.nil? && errors.length > 5
|
115
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 5.'
|
120
116
|
end
|
121
|
-
|
117
|
+
|
118
|
+
@errors = errors
|
122
119
|
end
|
123
120
|
|
124
121
|
# Checks equality by comparing each attribute.
|
@@ -126,9 +123,10 @@ module EmassClient
|
|
126
123
|
def ==(o)
|
127
124
|
return true if self.equal?(o)
|
128
125
|
self.class == o.class &&
|
129
|
-
|
130
|
-
|
131
|
-
|
126
|
+
resource_id == o.resource_id &&
|
127
|
+
success == o.success &&
|
128
|
+
system_id == o.system_id &&
|
129
|
+
errors == o.errors
|
132
130
|
end
|
133
131
|
|
134
132
|
# @see the `==` method
|
@@ -140,7 +138,7 @@ module EmassClient
|
|
140
138
|
# Calculates hash code according to all attributes.
|
141
139
|
# @return [Integer] Hash code
|
142
140
|
def hash
|
143
|
-
[
|
141
|
+
[resource_id, success, system_id, errors].hash
|
144
142
|
end
|
145
143
|
|
146
144
|
# Builds the object from hash
|
@@ -155,8 +153,11 @@ module EmassClient
|
|
155
153
|
# @return [Object] Returns the model itself
|
156
154
|
def build_from_hash(attributes)
|
157
155
|
return nil unless attributes.is_a?(Hash)
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
158
157
|
self.class.openapi_types.each_pair do |key, type|
|
159
|
-
if
|
158
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
159
|
+
self.send("#{key}=", nil)
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
160
161
|
# check to ensure the input is an array given that the attribute
|
161
162
|
# is documented as an array but the input is not
|
162
163
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -164,8 +165,6 @@ module EmassClient
|
|
164
165
|
end
|
165
166
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
166
167
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
167
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
168
|
-
self.send("#{key}=", nil)
|
169
168
|
end
|
170
169
|
end
|
171
170
|
|
@@ -178,8 +177,8 @@ module EmassClient
|
|
178
177
|
# @return [Object] Deserialized data
|
179
178
|
def _deserialize(type, value)
|
180
179
|
case type.to_sym
|
181
|
-
when :
|
182
|
-
|
180
|
+
when :Time
|
181
|
+
Time.parse(value)
|
183
182
|
when :Date
|
184
183
|
Date.parse(value)
|
185
184
|
when :String
|
@@ -209,7 +208,9 @@ module EmassClient
|
|
209
208
|
end
|
210
209
|
end
|
211
210
|
else # model
|
212
|
-
|
211
|
+
# models (e.g. Pet) or oneOf
|
212
|
+
klass = EmassClient.const_get(type)
|
213
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
213
214
|
end
|
214
215
|
end
|
215
216
|
|
@@ -257,5 +258,8 @@ module EmassClient
|
|
257
258
|
else
|
258
259
|
value
|
259
260
|
end
|
260
|
-
end
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
|
261
265
|
end
|