emass_client 1.0.1 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +152 -1124
- data/Rakefile +2 -0
- data/lib/emass_client/api/artifacts_api.rb +124 -97
- data/lib/emass_client/api/artifacts_export_api.rb +28 -19
- data/lib/emass_client/api/cac_api.rb +50 -31
- data/lib/emass_client/api/cloud_resources_api.rb +96 -0
- data/lib/emass_client/api/cmmc_assessments_api.rb +20 -11
- data/lib/emass_client/api/containers_api.rb +96 -0
- data/lib/emass_client/api/controls_api.rb +53 -34
- data/lib/emass_client/api/milestones_api.rb +138 -92
- data/lib/emass_client/api/pac_api.rb +50 -31
- data/lib/emass_client/api/poam_api.rb +132 -86
- data/lib/emass_client/api/registration_api.rb +30 -18
- data/lib/emass_client/api/static_code_scans_api.rb +38 -26
- data/lib/emass_client/api/system_roles_api.rb +48 -29
- data/lib/emass_client/api/systems_api.rb +57 -39
- data/lib/emass_client/api/test_api.rb +20 -11
- data/lib/emass_client/api/test_results_api.rb +53 -34
- data/lib/emass_client/api/workflow_definitions_api.rb +23 -14
- data/lib/emass_client/api/workflow_instances_api.rb +58 -53
- data/lib/emass_client/api_client.rb +59 -57
- data/lib/emass_client/api_error.rb +5 -5
- data/lib/emass_client/configuration.rb +93 -16
- data/lib/emass_client/models/artifacts_get.rb +54 -31
- data/lib/emass_client/models/{artifacts_delete_inner.rb → artifacts_request_delete_body_inner.rb} +29 -16
- data/lib/emass_client/models/artifacts_response_del.rb +27 -14
- data/lib/emass_client/models/{artifacts_response_del_data.rb → artifacts_response_del_data_inner.rb} +31 -18
- data/lib/emass_client/models/artifacts_response_get.rb +27 -14
- data/lib/emass_client/models/artifacts_response_put_post.rb +27 -14
- data/lib/emass_client/models/artifacts_response_put_post_data_inner.rb +265 -0
- data/lib/emass_client/models/cac_get.rb +82 -50
- data/lib/emass_client/models/cac_response_get.rb +27 -14
- data/lib/emass_client/models/cac_response_post.rb +27 -14
- data/lib/emass_client/models/{cac_response_post_data.rb → cac_response_post_data_inner.rb} +61 -21
- data/lib/emass_client/models/{pac_request_post_body.rb → cloud_resources_post.rb} +73 -69
- data/lib/emass_client/models/cloud_resources_response_post.rb +230 -0
- data/lib/emass_client/models/cmmc_get.rb +53 -63
- data/lib/emass_client/models/cmmc_response_get.rb +27 -14
- data/lib/emass_client/models/connectivity_ccsd.rb +29 -14
- data/lib/emass_client/models/containers_resources_post.rb +265 -0
- data/lib/emass_client/models/containers_response_post.rb +230 -0
- data/lib/emass_client/models/controls_get.rb +103 -66
- data/lib/emass_client/models/controls_put.rb +58 -18
- data/lib/emass_client/models/controls_response_get.rb +28 -14
- data/lib/emass_client/models/controls_response_put.rb +27 -14
- data/lib/emass_client/models/definition_transitions.rb +32 -62
- data/lib/emass_client/models/instances_transitions.rb +37 -88
- data/lib/emass_client/models/milestone_response_get.rb +27 -14
- data/lib/emass_client/models/milestone_response_get_milestone.rb +228 -0
- data/lib/emass_client/models/milestone_response_post.rb +27 -14
- data/lib/emass_client/models/milestone_response_put.rb +27 -14
- data/lib/emass_client/models/milestones_get.rb +33 -20
- data/lib/emass_client/models/milestones_put_post_delete.rb +60 -20
- data/lib/emass_client/models/{delete_milestone.rb → milestones_request_delete_body_inner.rb} +29 -21
- data/lib/emass_client/models/milestones_required_post.rb +27 -14
- data/lib/emass_client/models/milestones_required_put.rb +28 -15
- data/lib/emass_client/models/pac_get.rb +39 -22
- data/lib/emass_client/models/pac_post.rb +60 -20
- data/lib/emass_client/models/pac_response_get.rb +28 -14
- data/lib/emass_client/models/pac_response_post.rb +27 -14
- data/lib/emass_client/models/poam_get.rb +114 -77
- data/lib/emass_client/models/poam_post_put_del.rb +59 -19
- data/lib/emass_client/models/{delete_poam.rb → poam_request_delete_body_inner.rb} +29 -21
- data/lib/emass_client/models/poam_response_delete.rb +27 -14
- data/lib/emass_client/models/poam_response_get_poams.rb +228 -0
- data/lib/emass_client/models/{static_code_required_post.rb → poam_response_get_systems.rb} +42 -29
- data/lib/emass_client/models/poam_response_post.rb +27 -14
- data/lib/emass_client/models/poam_response_put.rb +27 -14
- data/lib/emass_client/models/register.rb +27 -14
- data/lib/emass_client/models/register_data.rb +26 -13
- data/lib/emass_client/models/register_user_request_post_body.rb +26 -13
- data/lib/emass_client/models/{model_200.rb → response200.rb} +53 -16
- data/lib/emass_client/models/{model_400.rb → response201.rb} +29 -16
- data/lib/emass_client/models/{model_201_meta.rb → response201_meta.rb} +54 -17
- data/lib/emass_client/models/{model_400_response.rb → response400.rb} +29 -16
- data/lib/emass_client/models/{model_400_meta.rb → response400_meta.rb} +54 -17
- data/lib/emass_client/models/{model_401.rb → response401.rb} +29 -16
- data/lib/emass_client/models/{model_401_meta.rb → response401_meta.rb} +54 -17
- data/lib/emass_client/models/{model_201.rb → response403.rb} +29 -16
- data/lib/emass_client/models/{model_403_meta.rb → response403_meta.rb} +54 -17
- data/lib/emass_client/models/{model_404.rb → response404.rb} +54 -17
- data/lib/emass_client/models/response405.rb +219 -0
- data/lib/emass_client/models/{model_405_meta.rb → response405_meta.rb} +54 -17
- data/lib/emass_client/models/response411.rb +219 -0
- data/lib/emass_client/models/{model_411_meta.rb → response411_meta.rb} +54 -17
- data/lib/emass_client/models/response490.rb +219 -0
- data/lib/emass_client/models/{model_490_meta.rb → response490_meta.rb} +54 -17
- data/lib/emass_client/models/response500.rb +219 -0
- data/lib/emass_client/models/{model_500_meta.rb → response500_meta.rb} +54 -17
- data/lib/emass_client/models/role_category.rb +32 -50
- data/lib/emass_client/models/roles.rb +29 -61
- data/lib/emass_client/models/ssps.rb +32 -16
- data/lib/emass_client/models/stage.rb +30 -49
- data/lib/emass_client/models/static_code_application.rb +34 -33
- data/lib/emass_client/models/static_code_post.rb +275 -0
- data/lib/emass_client/models/static_code_request_post_body.rb +47 -14
- data/lib/emass_client/models/{static_code_required_post_application.rb → static_code_request_post_body_application.rb} +30 -17
- data/lib/emass_client/models/static_code_response_post.rb +230 -0
- data/lib/emass_client/models/success200_response.rb +27 -14
- data/lib/emass_client/models/{error.rb → success200_response_data_inner.rb} +57 -36
- data/lib/emass_client/models/system_response.rb +28 -17
- data/lib/emass_client/models/system_roles_category_response.rb +28 -14
- data/lib/emass_client/models/system_roles_response.rb +27 -14
- data/lib/emass_client/models/{system_roles_response_data.rb → system_roles_response_data_inner.rb} +30 -17
- data/lib/emass_client/models/systems.rb +218 -191
- data/lib/emass_client/models/{poam_response_get.rb → systems_response.rb} +30 -17
- data/lib/emass_client/models/test.rb +27 -14
- data/lib/emass_client/models/test_data.rb +26 -13
- data/lib/emass_client/models/test_results_get.rb +39 -35
- data/lib/emass_client/models/test_results_post.rb +58 -18
- data/lib/emass_client/models/test_results_response_get.rb +27 -14
- data/lib/emass_client/models/test_results_response_post.rb +27 -14
- data/lib/emass_client/models/users.rb +28 -15
- data/lib/emass_client/models/workflow_definition_get.rb +63 -68
- data/lib/emass_client/models/workflow_definition_response_get.rb +27 -14
- data/lib/emass_client/models/workflow_instance_get.rb +331 -0
- data/lib/emass_client/models/workflow_instance_response_get.rb +230 -0
- data/lib/emass_client/models/workflow_instances_get.rb +107 -133
- data/lib/emass_client/models/workflow_instances_response_get.rb +39 -17
- data/lib/emass_client/models/workflow_instances_response_get_pagination.rb +246 -0
- data/lib/emass_client/version.rb +6 -5
- data/lib/emass_client.rb +47 -54
- metadata +60 -89
- data/lib/emass_client/models/artifacts_delete.rb +0 -201
- data/lib/emass_client/models/artifacts_request_put_body.rb +0 -363
- data/lib/emass_client/models/cac_request_post_body.rb +0 -217
- data/lib/emass_client/models/controls_request_put_body.rb +0 -606
- data/lib/emass_client/models/empty200_response.rb +0 -197
- data/lib/emass_client/models/milestones_delete.rb +0 -197
- data/lib/emass_client/models/milestones_post.rb +0 -197
- data/lib/emass_client/models/milestones_put.rb +0 -197
- data/lib/emass_client/models/milestones_request_post_body.rb +0 -242
- data/lib/emass_client/models/milestones_request_put_body.rb +0 -242
- data/lib/emass_client/models/model_403.rb +0 -206
- data/lib/emass_client/models/model_404_response.rb +0 -206
- data/lib/emass_client/models/model_405.rb +0 -206
- data/lib/emass_client/models/model_411.rb +0 -206
- data/lib/emass_client/models/model_490.rb +0 -206
- data/lib/emass_client/models/model_500.rb +0 -206
- data/lib/emass_client/models/poam_delete.rb +0 -197
- data/lib/emass_client/models/poam_post.rb +0 -197
- data/lib/emass_client/models/poam_put.rb +0 -197
- data/lib/emass_client/models/poam_request_post_body.rb +0 -197
- data/lib/emass_client/models/poam_request_put_body.rb +0 -197
- data/lib/emass_client/models/poam_required_post.rb +0 -564
- data/lib/emass_client/models/poam_required_put.rb +0 -594
- data/lib/emass_client/models/system_id_artifacts_body.rb +0 -284
- data/lib/emass_client/models/test_results_request_post_body.rb +0 -306
@@ -0,0 +1,230 @@
|
|
1
|
+
=begin
|
2
|
+
#Enterprise Mission Assurance Support Service (eMASS)
|
3
|
+
|
4
|
+
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <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
|
+
|
6
|
+
The version of the OpenAPI document: v3.3
|
7
|
+
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module EmassClient
|
17
|
+
class CloudResourcesResponsePost
|
18
|
+
attr_accessor :meta
|
19
|
+
|
20
|
+
attr_accessor :data
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'meta' => :'meta',
|
26
|
+
:'data' => :'data'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'meta' => :'Response200',
|
39
|
+
:'data' => :'Array<CloudResourcesPost>'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::CloudResourcesResponsePost` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::CloudResourcesResponsePost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'meta')
|
65
|
+
self.meta = attributes[:'meta']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'data')
|
69
|
+
if (value = attributes[:'data']).is_a?(Array)
|
70
|
+
self.data = value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
meta == o.meta &&
|
94
|
+
data == o.data
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
def hash
|
106
|
+
[meta, data].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def self.build_from_hash(attributes)
|
113
|
+
new.build_from_hash(attributes)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
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
|
126
|
+
# check to ensure the input is an array given that the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :Boolean
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
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)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
if value.nil?
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
+
end
|
204
|
+
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
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.1-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module EmassClient
|
15
17
|
class CmmcGet
|
@@ -92,31 +94,49 @@ module EmassClient
|
|
92
94
|
}
|
93
95
|
end
|
94
96
|
|
97
|
+
# Returns all the JSON keys this model knows about
|
98
|
+
def self.acceptable_attributes
|
99
|
+
attribute_map.values
|
100
|
+
end
|
101
|
+
|
95
102
|
# Attribute type mapping.
|
96
103
|
def self.openapi_types
|
97
104
|
{
|
98
|
-
:'operation' => :'
|
99
|
-
:'hq_organization_name' => :'
|
100
|
-
:'duns' => :'
|
101
|
-
:'unique_entity_identifier' => :'
|
102
|
-
:'cage_codes' => :'
|
103
|
-
:'osc_name' => :'
|
104
|
-
:'scope' => :'
|
105
|
-
:'scope_description' => :'
|
106
|
-
:'awarded_cmmc_level' => :'
|
107
|
-
:'expiration_date' => :'
|
108
|
-
:'certificate_id' => :'
|
109
|
-
:'model_version' => :'
|
110
|
-
:'ssps' => :'
|
105
|
+
:'operation' => :'String',
|
106
|
+
:'hq_organization_name' => :'String',
|
107
|
+
:'duns' => :'String',
|
108
|
+
:'unique_entity_identifier' => :'String',
|
109
|
+
:'cage_codes' => :'String',
|
110
|
+
:'osc_name' => :'String',
|
111
|
+
:'scope' => :'String',
|
112
|
+
:'scope_description' => :'String',
|
113
|
+
:'awarded_cmmc_level' => :'String',
|
114
|
+
:'expiration_date' => :'Integer',
|
115
|
+
:'certificate_id' => :'String',
|
116
|
+
:'model_version' => :'String',
|
117
|
+
:'ssps' => :'Array<Ssps>'
|
111
118
|
}
|
112
119
|
end
|
113
120
|
|
114
121
|
# List of attributes with nullable: true
|
115
122
|
def self.openapi_nullable
|
116
123
|
Set.new([
|
124
|
+
:'operation',
|
125
|
+
:'hq_organization_name',
|
126
|
+
:'duns',
|
127
|
+
:'unique_entity_identifier',
|
128
|
+
:'cage_codes',
|
129
|
+
:'osc_name',
|
130
|
+
:'scope',
|
131
|
+
:'scope_description',
|
132
|
+
:'awarded_cmmc_level',
|
133
|
+
:'expiration_date',
|
134
|
+
:'certificate_id',
|
135
|
+
:'model_version',
|
136
|
+
:'ssps'
|
117
137
|
])
|
118
138
|
end
|
119
|
-
|
139
|
+
|
120
140
|
# Initializes the object
|
121
141
|
# @param [Hash] attributes Model attributes in the form of hash
|
122
142
|
def initialize(attributes = {})
|
@@ -197,57 +217,21 @@ module EmassClient
|
|
197
217
|
# Check to see if the all the properties in the model are valid
|
198
218
|
# @return true if the model is valid
|
199
219
|
def valid?
|
200
|
-
operation_validator = EnumAttributeValidator.new('
|
220
|
+
operation_validator = EnumAttributeValidator.new('String', ["ADDED", "UPDATED", "DELETED", "unknown_default_open_api"])
|
201
221
|
return false unless operation_validator.valid?(@operation)
|
202
|
-
cage_codes_validator = EnumAttributeValidator.new('Object', ['89ED9; 99D8B', '34TH5; 23YH6', '75F8H; 2GH5I', '45RF9', '58H9L; 45UH8; 75F8H; 2GH5I'])
|
203
|
-
return false unless cage_codes_validator.valid?(@cage_codes)
|
204
|
-
scope_validator = EnumAttributeValidator.new('Object', ['Enterprise', 'Non-Enterprise'])
|
205
|
-
return false unless scope_validator.valid?(@scope)
|
206
|
-
awarded_cmmc_level_validator = EnumAttributeValidator.new('Object', ['Not Certified', 'Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5'])
|
207
|
-
return false unless awarded_cmmc_level_validator.valid?(@awarded_cmmc_level)
|
208
222
|
true
|
209
223
|
end
|
210
224
|
|
211
225
|
# Custom attribute writer method checking allowed values (enum).
|
212
226
|
# @param [Object] operation Object to be assigned
|
213
227
|
def operation=(operation)
|
214
|
-
validator = EnumAttributeValidator.new('
|
228
|
+
validator = EnumAttributeValidator.new('String', ["ADDED", "UPDATED", "DELETED", "unknown_default_open_api"])
|
215
229
|
unless validator.valid?(operation)
|
216
230
|
fail ArgumentError, "invalid value for \"operation\", must be one of #{validator.allowable_values}."
|
217
231
|
end
|
218
232
|
@operation = operation
|
219
233
|
end
|
220
234
|
|
221
|
-
# Custom attribute writer method checking allowed values (enum).
|
222
|
-
# @param [Object] cage_codes Object to be assigned
|
223
|
-
def cage_codes=(cage_codes)
|
224
|
-
validator = EnumAttributeValidator.new('Object', ['89ED9; 99D8B', '34TH5; 23YH6', '75F8H; 2GH5I', '45RF9', '58H9L; 45UH8; 75F8H; 2GH5I'])
|
225
|
-
unless validator.valid?(cage_codes)
|
226
|
-
fail ArgumentError, "invalid value for \"cage_codes\", must be one of #{validator.allowable_values}."
|
227
|
-
end
|
228
|
-
@cage_codes = cage_codes
|
229
|
-
end
|
230
|
-
|
231
|
-
# Custom attribute writer method checking allowed values (enum).
|
232
|
-
# @param [Object] scope Object to be assigned
|
233
|
-
def scope=(scope)
|
234
|
-
validator = EnumAttributeValidator.new('Object', ['Enterprise', 'Non-Enterprise'])
|
235
|
-
unless validator.valid?(scope)
|
236
|
-
fail ArgumentError, "invalid value for \"scope\", must be one of #{validator.allowable_values}."
|
237
|
-
end
|
238
|
-
@scope = scope
|
239
|
-
end
|
240
|
-
|
241
|
-
# Custom attribute writer method checking allowed values (enum).
|
242
|
-
# @param [Object] awarded_cmmc_level Object to be assigned
|
243
|
-
def awarded_cmmc_level=(awarded_cmmc_level)
|
244
|
-
validator = EnumAttributeValidator.new('Object', ['Not Certified', 'Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5'])
|
245
|
-
unless validator.valid?(awarded_cmmc_level)
|
246
|
-
fail ArgumentError, "invalid value for \"awarded_cmmc_level\", must be one of #{validator.allowable_values}."
|
247
|
-
end
|
248
|
-
@awarded_cmmc_level = awarded_cmmc_level
|
249
|
-
end
|
250
|
-
|
251
235
|
# Checks equality by comparing each attribute.
|
252
236
|
# @param [Object] Object to be compared
|
253
237
|
def ==(o)
|
@@ -292,8 +276,11 @@ module EmassClient
|
|
292
276
|
# @return [Object] Returns the model itself
|
293
277
|
def build_from_hash(attributes)
|
294
278
|
return nil unless attributes.is_a?(Hash)
|
279
|
+
attributes = attributes.transform_keys(&:to_sym)
|
295
280
|
self.class.openapi_types.each_pair do |key, type|
|
296
|
-
if
|
281
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
282
|
+
self.send("#{key}=", nil)
|
283
|
+
elsif type =~ /\AArray<(.*)>/i
|
297
284
|
# check to ensure the input is an array given that the attribute
|
298
285
|
# is documented as an array but the input is not
|
299
286
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -301,8 +288,6 @@ module EmassClient
|
|
301
288
|
end
|
302
289
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
303
290
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
304
|
-
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
305
|
-
self.send("#{key}=", nil)
|
306
291
|
end
|
307
292
|
end
|
308
293
|
|
@@ -315,8 +300,8 @@ module EmassClient
|
|
315
300
|
# @return [Object] Deserialized data
|
316
301
|
def _deserialize(type, value)
|
317
302
|
case type.to_sym
|
318
|
-
when :
|
319
|
-
|
303
|
+
when :Time
|
304
|
+
Time.parse(value)
|
320
305
|
when :Date
|
321
306
|
Date.parse(value)
|
322
307
|
when :String
|
@@ -346,7 +331,9 @@ module EmassClient
|
|
346
331
|
end
|
347
332
|
end
|
348
333
|
else # model
|
349
|
-
|
334
|
+
# models (e.g. Pet) or oneOf
|
335
|
+
klass = EmassClient.const_get(type)
|
336
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
350
337
|
end
|
351
338
|
end
|
352
339
|
|
@@ -394,5 +381,8 @@ module EmassClient
|
|
394
381
|
else
|
395
382
|
value
|
396
383
|
end
|
397
|
-
end
|
384
|
+
end
|
385
|
+
|
386
|
+
end
|
387
|
+
|
398
388
|
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.1-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module EmassClient
|
15
17
|
class CmmcResponseGet
|
@@ -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<CmmcGet>'
|
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,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.1-SNAPSHOT
|
10
|
+
|
10
11
|
=end
|
11
12
|
|
12
13
|
require 'date'
|
14
|
+
require 'time'
|
13
15
|
|
14
16
|
module EmassClient
|
15
17
|
class ConnectivityCcsd
|
@@ -27,20 +29,27 @@ module EmassClient
|
|
27
29
|
}
|
28
30
|
end
|
29
31
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
30
37
|
# Attribute type mapping.
|
31
38
|
def self.openapi_types
|
32
39
|
{
|
33
|
-
:'ccsd_number' => :'
|
34
|
-
:'connectivity' => :'
|
40
|
+
:'ccsd_number' => :'String',
|
41
|
+
:'connectivity' => :'String'
|
35
42
|
}
|
36
43
|
end
|
37
44
|
|
38
45
|
# List of attributes with nullable: true
|
39
46
|
def self.openapi_nullable
|
40
47
|
Set.new([
|
48
|
+
:'ccsd_number',
|
49
|
+
:'connectivity'
|
41
50
|
])
|
42
51
|
end
|
43
|
-
|
52
|
+
|
44
53
|
# Initializes the object
|
45
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
46
55
|
def initialize(attributes = {})
|
@@ -111,8 +120,11 @@ module EmassClient
|
|
111
120
|
# @return [Object] Returns the model itself
|
112
121
|
def build_from_hash(attributes)
|
113
122
|
return nil unless attributes.is_a?(Hash)
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
114
124
|
self.class.openapi_types.each_pair do |key, type|
|
115
|
-
if
|
125
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
126
|
+
self.send("#{key}=", nil)
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
116
128
|
# check to ensure the input is an array given that the attribute
|
117
129
|
# is documented as an array but the input is not
|
118
130
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -120,8 +132,6 @@ module EmassClient
|
|
120
132
|
end
|
121
133
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
134
|
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
135
|
end
|
126
136
|
end
|
127
137
|
|
@@ -134,8 +144,8 @@ module EmassClient
|
|
134
144
|
# @return [Object] Deserialized data
|
135
145
|
def _deserialize(type, value)
|
136
146
|
case type.to_sym
|
137
|
-
when :
|
138
|
-
|
147
|
+
when :Time
|
148
|
+
Time.parse(value)
|
139
149
|
when :Date
|
140
150
|
Date.parse(value)
|
141
151
|
when :String
|
@@ -165,7 +175,9 @@ module EmassClient
|
|
165
175
|
end
|
166
176
|
end
|
167
177
|
else # model
|
168
|
-
|
178
|
+
# models (e.g. Pet) or oneOf
|
179
|
+
klass = EmassClient.const_get(type)
|
180
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
181
|
end
|
170
182
|
end
|
171
183
|
|
@@ -213,5 +225,8 @@ module EmassClient
|
|
213
225
|
else
|
214
226
|
value
|
215
227
|
end
|
216
|
-
end
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
231
|
+
|
217
232
|
end
|