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 ControlsResponseGet
|
@@ -25,20 +27,26 @@ 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<ControlsGet>'
|
33
40
|
}
|
34
41
|
end
|
35
42
|
|
36
43
|
# List of attributes with nullable: true
|
37
44
|
def self.openapi_nullable
|
38
45
|
Set.new([
|
46
|
+
:'data'
|
39
47
|
])
|
40
48
|
end
|
41
|
-
|
49
|
+
|
42
50
|
# Initializes the object
|
43
51
|
# @param [Hash] attributes Model attributes in the form of hash
|
44
52
|
def initialize(attributes = {})
|
@@ -111,8 +119,11 @@ module EmassClient
|
|
111
119
|
# @return [Object] Returns the model itself
|
112
120
|
def build_from_hash(attributes)
|
113
121
|
return nil unless attributes.is_a?(Hash)
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
114
123
|
self.class.openapi_types.each_pair do |key, type|
|
115
|
-
if
|
124
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
125
|
+
self.send("#{key}=", nil)
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
127
|
# check to ensure the input is an array given that the attribute
|
117
128
|
# is documented as an array but the input is not
|
118
129
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -120,8 +131,6 @@ module EmassClient
|
|
120
131
|
end
|
121
132
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
133
|
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
134
|
end
|
126
135
|
end
|
127
136
|
|
@@ -134,8 +143,8 @@ module EmassClient
|
|
134
143
|
# @return [Object] Deserialized data
|
135
144
|
def _deserialize(type, value)
|
136
145
|
case type.to_sym
|
137
|
-
when :
|
138
|
-
|
146
|
+
when :Time
|
147
|
+
Time.parse(value)
|
139
148
|
when :Date
|
140
149
|
Date.parse(value)
|
141
150
|
when :String
|
@@ -165,7 +174,9 @@ module EmassClient
|
|
165
174
|
end
|
166
175
|
end
|
167
176
|
else # model
|
168
|
-
|
177
|
+
# models (e.g. Pet) or oneOf
|
178
|
+
klass = EmassClient.const_get(type)
|
179
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
180
|
end
|
170
181
|
end
|
171
182
|
|
@@ -213,5 +224,8 @@ module EmassClient
|
|
213
224
|
else
|
214
225
|
value
|
215
226
|
end
|
216
|
-
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
|
217
231
|
end
|
@@ -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 ControlsResponsePut
|
@@ -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<ControlsPut>'
|
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,48 +1,28 @@
|
|
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 DefinitionTransitions
|
16
18
|
# [Read-Only] The landing stage that is active after performing a transition.
|
17
19
|
attr_accessor :end_stage
|
18
20
|
|
19
|
-
# [Read-Only] Description
|
21
|
+
# [Read-Only] Description that matches the action dropdown that appears for PAC users.
|
20
22
|
attr_accessor :description
|
21
23
|
|
22
24
|
attr_accessor :roles
|
23
25
|
|
24
|
-
class EnumAttributeValidator
|
25
|
-
attr_reader :datatype
|
26
|
-
attr_reader :allowable_values
|
27
|
-
|
28
|
-
def initialize(datatype, allowable_values)
|
29
|
-
@allowable_values = allowable_values.map do |value|
|
30
|
-
case datatype.to_s
|
31
|
-
when /Integer/i
|
32
|
-
value.to_i
|
33
|
-
when /Float/i
|
34
|
-
value.to_f
|
35
|
-
else
|
36
|
-
value
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def valid?(value)
|
42
|
-
!value || allowable_values.include?(value)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
47
27
|
def self.attribute_map
|
48
28
|
{
|
@@ -52,21 +32,29 @@ module EmassClient
|
|
52
32
|
}
|
53
33
|
end
|
54
34
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
36
|
+
def self.acceptable_attributes
|
37
|
+
attribute_map.values
|
38
|
+
end
|
39
|
+
|
55
40
|
# Attribute type mapping.
|
56
41
|
def self.openapi_types
|
57
42
|
{
|
58
|
-
:'end_stage' => :'
|
59
|
-
:'description' => :'
|
60
|
-
:'roles' => :'Object'
|
43
|
+
:'end_stage' => :'String',
|
44
|
+
:'description' => :'String',
|
45
|
+
:'roles' => :'Array<Object>'
|
61
46
|
}
|
62
47
|
end
|
63
48
|
|
64
49
|
# List of attributes with nullable: true
|
65
50
|
def self.openapi_nullable
|
66
51
|
Set.new([
|
52
|
+
:'end_stage',
|
53
|
+
:'description',
|
54
|
+
:'roles'
|
67
55
|
])
|
68
56
|
end
|
69
|
-
|
57
|
+
|
70
58
|
# Initializes the object
|
71
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
72
60
|
def initialize(attributes = {})
|
@@ -107,33 +95,9 @@ module EmassClient
|
|
107
95
|
# Check to see if the all the properties in the model are valid
|
108
96
|
# @return true if the model is valid
|
109
97
|
def valid?
|
110
|
-
end_stage_validator = EnumAttributeValidator.new('Object', ['Categorize System', 'Submit Categorization', 'Cancelled', 'Cancel', 'Complete'])
|
111
|
-
return false unless end_stage_validator.valid?(@end_stage)
|
112
|
-
description_validator = EnumAttributeValidator.new('Object', ['Initiate Workflow', 'Approve', 'Disapprove and Move Forward', 'Cancel', 'Deny'])
|
113
|
-
return false unless description_validator.valid?(@description)
|
114
98
|
true
|
115
99
|
end
|
116
100
|
|
117
|
-
# Custom attribute writer method checking allowed values (enum).
|
118
|
-
# @param [Object] end_stage Object to be assigned
|
119
|
-
def end_stage=(end_stage)
|
120
|
-
validator = EnumAttributeValidator.new('Object', ['Categorize System', 'Submit Categorization', 'Cancelled', 'Cancel', 'Complete'])
|
121
|
-
unless validator.valid?(end_stage)
|
122
|
-
fail ArgumentError, "invalid value for \"end_stage\", must be one of #{validator.allowable_values}."
|
123
|
-
end
|
124
|
-
@end_stage = end_stage
|
125
|
-
end
|
126
|
-
|
127
|
-
# Custom attribute writer method checking allowed values (enum).
|
128
|
-
# @param [Object] description Object to be assigned
|
129
|
-
def description=(description)
|
130
|
-
validator = EnumAttributeValidator.new('Object', ['Initiate Workflow', 'Approve', 'Disapprove and Move Forward', 'Cancel', 'Deny'])
|
131
|
-
unless validator.valid?(description)
|
132
|
-
fail ArgumentError, "invalid value for \"description\", must be one of #{validator.allowable_values}."
|
133
|
-
end
|
134
|
-
@description = description
|
135
|
-
end
|
136
|
-
|
137
101
|
# Checks equality by comparing each attribute.
|
138
102
|
# @param [Object] Object to be compared
|
139
103
|
def ==(o)
|
@@ -168,8 +132,11 @@ module EmassClient
|
|
168
132
|
# @return [Object] Returns the model itself
|
169
133
|
def build_from_hash(attributes)
|
170
134
|
return nil unless attributes.is_a?(Hash)
|
135
|
+
attributes = attributes.transform_keys(&:to_sym)
|
171
136
|
self.class.openapi_types.each_pair do |key, type|
|
172
|
-
if
|
137
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
138
|
+
self.send("#{key}=", nil)
|
139
|
+
elsif type =~ /\AArray<(.*)>/i
|
173
140
|
# check to ensure the input is an array given that the attribute
|
174
141
|
# is documented as an array but the input is not
|
175
142
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -177,8 +144,6 @@ module EmassClient
|
|
177
144
|
end
|
178
145
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
179
146
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
180
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
181
|
-
self.send("#{key}=", nil)
|
182
147
|
end
|
183
148
|
end
|
184
149
|
|
@@ -191,8 +156,8 @@ module EmassClient
|
|
191
156
|
# @return [Object] Deserialized data
|
192
157
|
def _deserialize(type, value)
|
193
158
|
case type.to_sym
|
194
|
-
when :
|
195
|
-
|
159
|
+
when :Time
|
160
|
+
Time.parse(value)
|
196
161
|
when :Date
|
197
162
|
Date.parse(value)
|
198
163
|
when :String
|
@@ -222,7 +187,9 @@ module EmassClient
|
|
222
187
|
end
|
223
188
|
end
|
224
189
|
else # model
|
225
|
-
|
190
|
+
# models (e.g. Pet) or oneOf
|
191
|
+
klass = EmassClient.const_get(type)
|
192
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
193
|
end
|
227
194
|
end
|
228
195
|
|
@@ -270,5 +237,8 @@ module EmassClient
|
|
270
237
|
else
|
271
238
|
value
|
272
239
|
end
|
273
|
-
end
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
|
274
244
|
end
|
@@ -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 InstancesTransitions
|
@@ -31,28 +33,6 @@ module EmassClient
|
|
31
33
|
# [Read-Only] The beginning stage that is active before performing a transition.
|
32
34
|
attr_accessor :start_stage
|
33
35
|
|
34
|
-
class EnumAttributeValidator
|
35
|
-
attr_reader :datatype
|
36
|
-
attr_reader :allowable_values
|
37
|
-
|
38
|
-
def initialize(datatype, allowable_values)
|
39
|
-
@allowable_values = allowable_values.map do |value|
|
40
|
-
case datatype.to_s
|
41
|
-
when /Integer/i
|
42
|
-
value.to_i
|
43
|
-
when /Float/i
|
44
|
-
value.to_f
|
45
|
-
else
|
46
|
-
value
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
def valid?(value)
|
52
|
-
!value || allowable_values.include?(value)
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
37
|
def self.attribute_map
|
58
38
|
{
|
@@ -65,24 +45,35 @@ module EmassClient
|
|
65
45
|
}
|
66
46
|
end
|
67
47
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
68
53
|
# Attribute type mapping.
|
69
54
|
def self.openapi_types
|
70
55
|
{
|
71
|
-
:'comments' => :'
|
72
|
-
:'created_by' => :'
|
73
|
-
:'created_date' => :'
|
74
|
-
:'description' => :'
|
75
|
-
:'end_stage' => :'
|
76
|
-
:'start_stage' => :'
|
56
|
+
:'comments' => :'String',
|
57
|
+
:'created_by' => :'String',
|
58
|
+
:'created_date' => :'Integer',
|
59
|
+
:'description' => :'String',
|
60
|
+
:'end_stage' => :'String',
|
61
|
+
:'start_stage' => :'String'
|
77
62
|
}
|
78
63
|
end
|
79
64
|
|
80
65
|
# List of attributes with nullable: true
|
81
66
|
def self.openapi_nullable
|
82
67
|
Set.new([
|
68
|
+
:'comments',
|
69
|
+
:'created_by',
|
70
|
+
:'created_date',
|
71
|
+
:'description',
|
72
|
+
:'end_stage',
|
73
|
+
:'start_stage'
|
83
74
|
])
|
84
75
|
end
|
85
|
-
|
76
|
+
|
86
77
|
# Initializes the object
|
87
78
|
# @param [Hash] attributes Model attributes in the form of hash
|
88
79
|
def initialize(attributes = {})
|
@@ -133,57 +124,9 @@ module EmassClient
|
|
133
124
|
# Check to see if the all the properties in the model are valid
|
134
125
|
# @return true if the model is valid
|
135
126
|
def valid?
|
136
|
-
comments_validator = EnumAttributeValidator.new('Object', ['Approved the categorization', 'Submitted the categorization', 'Categorized the system as HMM', 'Selected POA&M Items'])
|
137
|
-
return false unless comments_validator.valid?(@comments)
|
138
|
-
description_validator = EnumAttributeValidator.new('Object', ['Initiate Workflow', 'Approve', 'Submit New Package', 'Disapprove and Move Forward', 'Cancel', 'Deny'])
|
139
|
-
return false unless description_validator.valid?(@description)
|
140
|
-
end_stage_validator = EnumAttributeValidator.new('Object', ['PM/ISO', 'Echelon I', 'Echelon II', 'Echelon III', 'Categorize System', 'Submit Categorization', 'Approval', 'Complete'])
|
141
|
-
return false unless end_stage_validator.valid?(@end_stage)
|
142
|
-
start_stage_validator = EnumAttributeValidator.new('Object', ['Not Started', 'PM/ISO', 'Categorize System', 'Submit Categorization', 'Approval', 'Deny'])
|
143
|
-
return false unless start_stage_validator.valid?(@start_stage)
|
144
127
|
true
|
145
128
|
end
|
146
129
|
|
147
|
-
# Custom attribute writer method checking allowed values (enum).
|
148
|
-
# @param [Object] comments Object to be assigned
|
149
|
-
def comments=(comments)
|
150
|
-
validator = EnumAttributeValidator.new('Object', ['Approved the categorization', 'Submitted the categorization', 'Categorized the system as HMM', 'Selected POA&M Items'])
|
151
|
-
unless validator.valid?(comments)
|
152
|
-
fail ArgumentError, "invalid value for \"comments\", must be one of #{validator.allowable_values}."
|
153
|
-
end
|
154
|
-
@comments = comments
|
155
|
-
end
|
156
|
-
|
157
|
-
# Custom attribute writer method checking allowed values (enum).
|
158
|
-
# @param [Object] description Object to be assigned
|
159
|
-
def description=(description)
|
160
|
-
validator = EnumAttributeValidator.new('Object', ['Initiate Workflow', 'Approve', 'Submit New Package', 'Disapprove and Move Forward', 'Cancel', 'Deny'])
|
161
|
-
unless validator.valid?(description)
|
162
|
-
fail ArgumentError, "invalid value for \"description\", must be one of #{validator.allowable_values}."
|
163
|
-
end
|
164
|
-
@description = description
|
165
|
-
end
|
166
|
-
|
167
|
-
# Custom attribute writer method checking allowed values (enum).
|
168
|
-
# @param [Object] end_stage Object to be assigned
|
169
|
-
def end_stage=(end_stage)
|
170
|
-
validator = EnumAttributeValidator.new('Object', ['PM/ISO', 'Echelon I', 'Echelon II', 'Echelon III', 'Categorize System', 'Submit Categorization', 'Approval', 'Complete'])
|
171
|
-
unless validator.valid?(end_stage)
|
172
|
-
fail ArgumentError, "invalid value for \"end_stage\", must be one of #{validator.allowable_values}."
|
173
|
-
end
|
174
|
-
@end_stage = end_stage
|
175
|
-
end
|
176
|
-
|
177
|
-
# Custom attribute writer method checking allowed values (enum).
|
178
|
-
# @param [Object] start_stage Object to be assigned
|
179
|
-
def start_stage=(start_stage)
|
180
|
-
validator = EnumAttributeValidator.new('Object', ['Not Started', 'PM/ISO', 'Categorize System', 'Submit Categorization', 'Approval', 'Deny'])
|
181
|
-
unless validator.valid?(start_stage)
|
182
|
-
fail ArgumentError, "invalid value for \"start_stage\", must be one of #{validator.allowable_values}."
|
183
|
-
end
|
184
|
-
@start_stage = start_stage
|
185
|
-
end
|
186
|
-
|
187
130
|
# Checks equality by comparing each attribute.
|
188
131
|
# @param [Object] Object to be compared
|
189
132
|
def ==(o)
|
@@ -221,8 +164,11 @@ module EmassClient
|
|
221
164
|
# @return [Object] Returns the model itself
|
222
165
|
def build_from_hash(attributes)
|
223
166
|
return nil unless attributes.is_a?(Hash)
|
167
|
+
attributes = attributes.transform_keys(&:to_sym)
|
224
168
|
self.class.openapi_types.each_pair do |key, type|
|
225
|
-
if
|
169
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
170
|
+
self.send("#{key}=", nil)
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
226
172
|
# check to ensure the input is an array given that the attribute
|
227
173
|
# is documented as an array but the input is not
|
228
174
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -230,8 +176,6 @@ module EmassClient
|
|
230
176
|
end
|
231
177
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
232
178
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
233
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
234
|
-
self.send("#{key}=", nil)
|
235
179
|
end
|
236
180
|
end
|
237
181
|
|
@@ -244,8 +188,8 @@ module EmassClient
|
|
244
188
|
# @return [Object] Deserialized data
|
245
189
|
def _deserialize(type, value)
|
246
190
|
case type.to_sym
|
247
|
-
when :
|
248
|
-
|
191
|
+
when :Time
|
192
|
+
Time.parse(value)
|
249
193
|
when :Date
|
250
194
|
Date.parse(value)
|
251
195
|
when :String
|
@@ -275,7 +219,9 @@ module EmassClient
|
|
275
219
|
end
|
276
220
|
end
|
277
221
|
else # model
|
278
|
-
|
222
|
+
# models (e.g. Pet) or oneOf
|
223
|
+
klass = EmassClient.const_get(type)
|
224
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
279
225
|
end
|
280
226
|
end
|
281
227
|
|
@@ -323,5 +269,8 @@ module EmassClient
|
|
323
269
|
else
|
324
270
|
value
|
325
271
|
end
|
326
|
-
end
|
272
|
+
end
|
273
|
+
|
274
|
+
end
|
275
|
+
|
327
276
|
end
|