emass_client 3.10.1 → 3.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +174 -131
- data/lib/emass_client/api/artifacts_api.rb +47 -52
- data/lib/emass_client/api/artifacts_export_api.rb +5 -5
- data/lib/emass_client/api/cac_api.rb +12 -12
- data/lib/emass_client/api/cloud_resource_results_api.rb +83 -9
- data/lib/emass_client/api/cmmc_assessment_dashboards_api.rb +314 -0
- data/lib/emass_client/api/cmmc_assessments_api.rb +5 -5
- data/lib/emass_client/api/coast_guard_system_fisma_metrics_dashboard_api.rb +95 -0
- data/lib/emass_client/api/container_scan_results_api.rb +83 -9
- data/lib/emass_client/api/controls_api.rb +17 -17
- data/lib/emass_client/api/device_scan_results_api.rb +112 -0
- data/lib/emass_client/api/hardware_baseline_api.rb +313 -0
- data/lib/emass_client/api/milestones_api.rb +18 -18
- data/lib/emass_client/api/organization_migration_status_dashboard_api.rb +95 -0
- data/lib/emass_client/api/pac_api.rb +16 -16
- data/lib/emass_client/api/poam_api.rb +47 -44
- data/lib/emass_client/api/registration_api.rb +5 -5
- data/lib/emass_client/api/software_baseline_api.rb +313 -0
- data/lib/emass_client/api/static_code_scans_api.rb +9 -9
- data/lib/emass_client/api/system_application_findings_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_artifacts_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_associations_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_atciatc_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_conmon_integration_status_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_connectivity_ccsd_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_critical_assets_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_device_findings_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_fisma_metrics_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_hardware_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_migration_status_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_poam_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_ports_protocols_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_privacy_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_questionnaire_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_roles_api.rb +8 -16
- data/lib/emass_client/api/system_security_controls_dashboards_api.rb +241 -0
- data/lib/emass_client/api/system_sensor_hardware_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_sensor_software_dashboards_api.rb +241 -0
- data/lib/emass_client/api/system_software_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_status_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_terms_conditions_dashboards_api.rb +168 -0
- data/lib/emass_client/api/system_vulnerability_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_workflows_dashboards_api.rb +241 -0
- data/lib/emass_client/api/systems_api.rb +22 -28
- data/lib/emass_client/api/test_api.rb +5 -5
- data/lib/emass_client/api/test_results_api.rb +19 -16
- data/lib/emass_client/api/user_system_assignments_dashboard_api.rb +95 -0
- data/lib/emass_client/api/va_system_dashboards_api.rb +679 -0
- data/lib/emass_client/api/vaombfisma_dashboard_api.rb +95 -0
- data/lib/emass_client/api/workflow_definitions_api.rb +9 -9
- data/lib/emass_client/api/workflow_instances_api.rb +17 -14
- data/lib/emass_client/api_client.rb +46 -32
- data/lib/emass_client/api_error.rb +4 -4
- data/lib/emass_client/configuration.rb +42 -12
- data/lib/emass_client/models/{response201.rb → api_rule_failed.rb} +29 -28
- data/lib/emass_client/models/{response490_meta.rb → api_rule_failed_meta.rb} +34 -29
- data/lib/emass_client/models/artifacts_ids.rb +221 -0
- data/lib/emass_client/models/artifacts_optional_fields.rb +298 -0
- data/lib/emass_client/models/artifacts_read_only_fields.rb +255 -0
- data/lib/emass_client/models/artifacts_request_delete_body_inner.rb +26 -25
- data/lib/emass_client/models/artifacts_required_fields.rb +252 -0
- data/lib/emass_client/models/artifacts_response_del.rb +26 -25
- data/lib/emass_client/models/artifacts_response_del_data_inner.rb +26 -25
- data/lib/emass_client/models/artifacts_response_get.rb +27 -26
- data/lib/emass_client/models/{artifacts_get.rb → artifacts_response_get_data_inner.rb} +91 -70
- data/lib/emass_client/models/artifacts_response_put_post.rb +26 -25
- data/lib/emass_client/models/artifacts_response_put_post_data_inner.rb +40 -30
- data/lib/emass_client/models/{response403.rb → bad_request.rb} +29 -28
- data/lib/emass_client/models/{response400_meta.rb → bad_request_meta.rb} +34 -29
- data/lib/emass_client/models/cac_get.rb +26 -25
- data/lib/emass_client/models/cac_response_get.rb +26 -25
- data/lib/emass_client/models/cac_response_post.rb +26 -25
- data/lib/emass_client/models/cac_response_post_data_inner.rb +40 -30
- data/lib/emass_client/models/{poam_response_post.rb → cloud_resources_delete.rb} +29 -28
- data/lib/emass_client/models/cloud_resources_delete_body_inner.rb +221 -0
- data/lib/emass_client/models/{cloud_resources_post.rb → cloud_resources_post_delete.rb} +42 -32
- data/lib/emass_client/models/cloud_resources_response_post.rb +27 -26
- data/lib/emass_client/models/cmmc_get.rb +96 -140
- data/lib/emass_client/models/cmmc_response_get.rb +26 -25
- data/lib/emass_client/models/connectivity_ccsd.rb +26 -25
- data/lib/emass_client/models/container_resources_delete_body_inner.rb +221 -0
- data/lib/emass_client/models/{containers_resources_post.rb → containers_resources_post_delete.rb} +42 -32
- data/lib/emass_client/models/{poam_response_delete.rb → containers_response_delete.rb} +29 -28
- data/lib/emass_client/models/containers_response_post.rb +27 -26
- data/lib/emass_client/models/controls_conditional_fields.rb +357 -0
- data/lib/emass_client/models/controls_ids.rb +221 -0
- data/lib/emass_client/models/controls_optional_fields.rb +471 -0
- data/lib/emass_client/models/controls_put.rb +40 -30
- data/lib/emass_client/models/controls_read_only_fields.rb +277 -0
- data/lib/emass_client/models/controls_required_fields.rb +295 -0
- data/lib/emass_client/models/controls_response_get.rb +27 -26
- data/lib/emass_client/models/{controls_get.rb → controls_response_get_data_inner.rb} +210 -166
- data/lib/emass_client/models/controls_response_put.rb +26 -25
- data/lib/emass_client/models/{response400.rb → created.rb} +29 -28
- data/lib/emass_client/models/{response201_meta.rb → created_meta.rb} +34 -29
- data/lib/emass_client/models/definition_transitions.rb +26 -25
- data/lib/emass_client/models/{success200_response.rb → device_scan_results_response_post.rb} +29 -28
- data/lib/emass_client/models/{success200_response_data_inner.rb → device_scan_results_response_post_data_inner.rb} +72 -33
- data/lib/emass_client/models/{response401.rb → forbidden.rb} +29 -28
- data/lib/emass_client/models/{response403_meta.rb → forbidden_meta.rb} +34 -29
- data/lib/emass_client/models/get_system_status_details200_response.rb +240 -0
- data/lib/emass_client/models/hw_baseline_conditional_fields.rb +244 -0
- data/lib/emass_client/models/hw_baseline_ids.rb +221 -0
- data/lib/emass_client/models/hw_baseline_optional_fields.rb +354 -0
- data/lib/emass_client/models/hw_baseline_read_only_fields.rb +222 -0
- data/lib/emass_client/models/hw_baseline_request_delete_body_inner.rb +220 -0
- data/lib/emass_client/models/hw_baseline_required_fields.rb +221 -0
- data/lib/emass_client/models/hw_baseline_response_delete.rb +231 -0
- data/lib/emass_client/models/hw_baseline_response_delete_data_inner.rb +274 -0
- data/lib/emass_client/models/{dashboard_mock_response.rb → hw_baseline_response_get.rb} +30 -29
- data/lib/emass_client/models/hw_baseline_response_get_data_inner.rb +429 -0
- data/lib/emass_client/models/hw_baseline_response_post_put.rb +231 -0
- data/lib/emass_client/models/hw_baseline_response_post_put_data_inner.rb +274 -0
- data/lib/emass_client/models/{instances_transitions.rb → instance_transitions.rb} +28 -27
- data/lib/emass_client/models/internal_server_error.rb +220 -0
- data/lib/emass_client/models/{response500_meta.rb → internal_server_error_meta.rb} +34 -29
- data/lib/emass_client/models/length_required.rb +220 -0
- data/lib/emass_client/models/{response411_meta.rb → length_required_meta.rb} +34 -29
- data/lib/emass_client/models/method_not_allowed.rb +220 -0
- data/lib/emass_client/models/{response405_meta.rb → method_not_allowed_meta.rb} +34 -29
- data/lib/emass_client/models/milestone_response_delete.rb +231 -0
- data/lib/emass_client/models/milestone_response_get.rb +26 -25
- data/lib/emass_client/models/milestone_response_get_milestone.rb +26 -25
- data/lib/emass_client/models/milestone_response_post.rb +26 -25
- data/lib/emass_client/models/milestone_response_put.rb +26 -25
- data/lib/emass_client/models/milestones_fields.rb +222 -0
- data/lib/emass_client/models/milestones_get.rb +55 -32
- data/lib/emass_client/models/milestones_put_post_delete.rb +40 -30
- data/lib/emass_client/models/milestones_request_delete_body_inner.rb +26 -25
- data/lib/emass_client/models/milestones_required_post.rb +35 -53
- data/lib/emass_client/models/milestones_required_post_milestones_inner.rb +265 -0
- data/lib/emass_client/models/milestones_required_put.rb +35 -68
- data/lib/emass_client/models/{ssps.rb → milestones_required_put_milestones_inner.rb} +101 -52
- data/lib/emass_client/models/{response404.rb → not_found.rb} +34 -29
- data/lib/emass_client/models/pac_get.rb +29 -37
- data/lib/emass_client/models/pac_post.rb +40 -30
- data/lib/emass_client/models/pac_response_get.rb +26 -25
- data/lib/emass_client/models/pac_response_post.rb +26 -25
- data/lib/emass_client/models/{dashboard_mock_response_pagination.rb → pagination.rb} +47 -46
- data/lib/emass_client/models/poam_conditional_fields.rb +402 -0
- data/lib/emass_client/models/poam_ids.rb +241 -0
- data/lib/emass_client/models/poam_optional_fields.rb +409 -0
- data/lib/emass_client/models/poam_post_put_del.rb +40 -30
- data/lib/emass_client/models/poam_read_only_fields.rb +332 -0
- data/lib/emass_client/models/poam_request_delete_body_inner.rb +26 -25
- data/lib/emass_client/models/poam_required_fields.rb +305 -0
- data/lib/emass_client/models/poam_response_get_poams.rb +27 -26
- data/lib/emass_client/models/poam_response_get_poams_data.rb +824 -0
- data/lib/emass_client/models/poam_response_get_systems.rb +27 -26
- data/lib/emass_client/models/poam_response_get_systems_data_inner.rb +824 -0
- data/lib/emass_client/models/{poam_response_put.rb → poam_response_post_put_delete.rb} +28 -27
- data/lib/emass_client/models/register.rb +26 -25
- data/lib/emass_client/models/register_data.rb +26 -25
- data/lib/emass_client/models/register_user_request_post_body.rb +38 -25
- data/lib/emass_client/models/response200.rb +32 -27
- data/lib/emass_client/models/role_category.rb +26 -25
- data/lib/emass_client/models/roles.rb +26 -25
- data/lib/emass_client/models/stage.rb +26 -25
- data/lib/emass_client/models/{static_code_application.rb → static_code_application_post.rb} +28 -27
- data/lib/emass_client/models/static_code_post.rb +40 -30
- data/lib/emass_client/models/static_code_request_post_body.rb +27 -26
- data/lib/emass_client/models/static_code_request_post_body_application.rb +26 -25
- data/lib/emass_client/models/static_code_response_post.rb +26 -25
- data/lib/emass_client/models/sw_baseline_conditional_fields.rb +222 -0
- data/lib/emass_client/models/sw_baseline_ids.rb +221 -0
- data/lib/emass_client/models/sw_baseline_optional_fields.rb +563 -0
- data/lib/emass_client/models/sw_baseline_read_only_fields.rb +222 -0
- data/lib/emass_client/models/sw_baseline_request_delete_body_inner.rb +220 -0
- data/lib/emass_client/models/sw_baseline_required_fields.rb +241 -0
- data/lib/emass_client/models/sw_baseline_response_delete.rb +231 -0
- data/lib/emass_client/models/sw_baseline_response_delete_data_inner.rb +274 -0
- data/lib/emass_client/models/sw_baseline_response_get.rb +240 -0
- data/lib/emass_client/models/sw_baseline_response_get_data_inner.rb +624 -0
- data/lib/emass_client/models/sw_baseline_response_post_put.rb +231 -0
- data/lib/emass_client/models/sw_baseline_response_post_put_data_inner.rb +274 -0
- data/lib/emass_client/models/system_response.rb +26 -25
- data/lib/emass_client/models/system_roles_category_response.rb +26 -25
- data/lib/emass_client/models/system_roles_response.rb +26 -25
- data/lib/emass_client/models/system_roles_response_data_inner.rb +26 -25
- data/lib/emass_client/models/systems.rb +950 -113
- data/lib/emass_client/models/systems_response.rb +26 -25
- data/lib/emass_client/models/test.rb +26 -25
- data/lib/emass_client/models/test_data.rb +26 -25
- data/lib/emass_client/models/test_results_get.rb +37 -26
- data/lib/emass_client/models/test_results_post.rb +40 -30
- data/lib/emass_client/models/test_results_response_get.rb +26 -25
- data/lib/emass_client/models/test_results_response_post.rb +26 -25
- data/lib/emass_client/models/unauthorized.rb +220 -0
- data/lib/emass_client/models/{response401_meta.rb → unauthorized_meta.rb} +34 -29
- data/lib/emass_client/models/users.rb +26 -25
- data/lib/emass_client/models/workflow_definition_get.rb +26 -25
- data/lib/emass_client/models/workflow_definition_response_get.rb +26 -25
- data/lib/emass_client/models/workflow_instance_get.rb +40 -28
- data/lib/emass_client/models/workflow_instance_response_get.rb +26 -25
- data/lib/emass_client/models/workflow_instances_response_get.rb +27 -26
- data/lib/emass_client/models/workflow_instances_response_get_pagination.rb +26 -25
- data/lib/emass_client/version.rb +5 -5
- data/lib/emass_client.rb +112 -39
- metadata +116 -43
- data/lib/emass_client/api/dashboards_api.rb +0 -2139
- data/lib/emass_client/models/mock_object.rb +0 -343
- data/lib/emass_client/models/poam_get.rb +0 -683
- data/lib/emass_client/models/response405.rb +0 -219
- data/lib/emass_client/models/response411.rb +0 -219
- data/lib/emass_client/models/response490.rb +0 -219
- data/lib/emass_client/models/response500.rb +0 -219
- data/lib/emass_client/models/workflow_instances_get.rb +0 -342
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The
|
4
|
+
#The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
7
|
-
Contact: disa.
|
6
|
+
The version of the OpenAPI document: v3.22
|
7
|
+
Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -40,9 +40,14 @@ module EmassClient
|
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
43
|
+
# Returns attribute mapping this model knows about
|
44
|
+
def self.acceptable_attribute_map
|
45
|
+
attribute_map
|
46
|
+
end
|
47
|
+
|
43
48
|
# Returns all the JSON keys this model knows about
|
44
49
|
def self.acceptable_attributes
|
45
|
-
|
50
|
+
acceptable_attribute_map.values
|
46
51
|
end
|
47
52
|
|
48
53
|
# Attribute type mapping.
|
@@ -71,9 +76,10 @@ module EmassClient
|
|
71
76
|
end
|
72
77
|
|
73
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
74
80
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
|
-
if (!
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamPostPutDel`. Please check the name to make sure it's valid. List of attributes: " +
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamPostPutDel`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
77
83
|
end
|
78
84
|
h[k.to_sym] = v
|
79
85
|
}
|
@@ -104,9 +110,14 @@ module EmassClient
|
|
104
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
105
111
|
# @return Array for valid properties with the reasons
|
106
112
|
def list_invalid_properties
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
107
114
|
invalid_properties = Array.new
|
108
|
-
if !@errors.nil? && @errors.length >
|
109
|
-
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to
|
115
|
+
if !@errors.nil? && @errors.length > 25
|
116
|
+
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 25.')
|
117
|
+
end
|
118
|
+
|
119
|
+
if !@errors.nil? && @errors.length < 1
|
120
|
+
invalid_properties.push('invalid value for "errors", number of items must be greater than or equal to 1.')
|
110
121
|
end
|
111
122
|
|
112
123
|
invalid_properties
|
@@ -115,15 +126,21 @@ module EmassClient
|
|
115
126
|
# Check to see if the all the properties in the model are valid
|
116
127
|
# @return true if the model is valid
|
117
128
|
def valid?
|
118
|
-
|
129
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
130
|
+
return false if !@errors.nil? && @errors.length > 25
|
131
|
+
return false if !@errors.nil? && @errors.length < 1
|
119
132
|
true
|
120
133
|
end
|
121
134
|
|
122
135
|
# Custom attribute writer method with validation
|
123
136
|
# @param [Object] errors Value to be assigned
|
124
137
|
def errors=(errors)
|
125
|
-
if !errors.nil? && errors.length >
|
126
|
-
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to
|
138
|
+
if !errors.nil? && errors.length > 25
|
139
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 25.'
|
140
|
+
end
|
141
|
+
|
142
|
+
if !errors.nil? && errors.length < 1
|
143
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be greater than or equal to 1.'
|
127
144
|
end
|
128
145
|
|
129
146
|
@errors = errors
|
@@ -157,37 +174,30 @@ module EmassClient
|
|
157
174
|
# @param [Hash] attributes Model attributes in the form of hash
|
158
175
|
# @return [Object] Returns the model itself
|
159
176
|
def self.build_from_hash(attributes)
|
160
|
-
new.build_from_hash(attributes)
|
161
|
-
end
|
162
|
-
|
163
|
-
# Builds the object from hash
|
164
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
165
|
-
# @return [Object] Returns the model itself
|
166
|
-
def build_from_hash(attributes)
|
167
177
|
return nil unless attributes.is_a?(Hash)
|
168
178
|
attributes = attributes.transform_keys(&:to_sym)
|
169
|
-
|
170
|
-
|
171
|
-
|
179
|
+
transformed_hash = {}
|
180
|
+
openapi_types.each_pair do |key, type|
|
181
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
182
|
+
transformed_hash["#{key}"] = nil
|
172
183
|
elsif type =~ /\AArray<(.*)>/i
|
173
184
|
# check to ensure the input is an array given that the attribute
|
174
185
|
# is documented as an array but the input is not
|
175
|
-
if attributes[
|
176
|
-
|
186
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
187
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
177
188
|
end
|
178
|
-
elsif !attributes[
|
179
|
-
|
189
|
+
elsif !attributes[attribute_map[key]].nil?
|
190
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
180
191
|
end
|
181
192
|
end
|
182
|
-
|
183
|
-
self
|
193
|
+
new(transformed_hash)
|
184
194
|
end
|
185
195
|
|
186
196
|
# Deserializes the data based on type
|
187
197
|
# @param string type Data type
|
188
198
|
# @param string value Value to be deserialized
|
189
199
|
# @return [Object] Deserialized data
|
190
|
-
def _deserialize(type, value)
|
200
|
+
def self._deserialize(type, value)
|
191
201
|
case type.to_sym
|
192
202
|
when :Time
|
193
203
|
Time.parse(value)
|
@@ -222,7 +232,7 @@ module EmassClient
|
|
222
232
|
else # model
|
223
233
|
# models (e.g. Pet) or oneOf
|
224
234
|
klass = EmassClient.const_get(type)
|
225
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
235
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
236
|
end
|
227
237
|
end
|
228
238
|
|
@@ -0,0 +1,332 @@
|
|
1
|
+
=begin
|
2
|
+
#Enterprise Mission Assurance Support Service (eMASS)
|
3
|
+
|
4
|
+
#The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3.22
|
7
|
+
Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.12.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module EmassClient
|
17
|
+
class PoamReadOnlyFields
|
18
|
+
# [Read-Only] Unique identifier of the authorization term/condition linked to the POA&M Item.
|
19
|
+
attr_accessor :condition_id
|
20
|
+
|
21
|
+
# [Read-only] Indicates whether a test result is inherited.
|
22
|
+
attr_accessor :is_inherited
|
23
|
+
|
24
|
+
# [Read-Only] CCI associated with POA&M Item.
|
25
|
+
attr_accessor :cci
|
26
|
+
|
27
|
+
# [Read-Only] Values include the following options: (Not Approved,Under Review,Approved)
|
28
|
+
attr_accessor :review_status
|
29
|
+
|
30
|
+
# [Read-Only] Timestamp representing when the POA&M Item was entered into the database.
|
31
|
+
attr_accessor :created_date
|
32
|
+
|
33
|
+
# [Read-Only] Value returned for a POA&M Item with review status \"Approved\" and has a milestone with a scheduled completion date that extends beyond the POA&M Item's scheduled completion date.
|
34
|
+
attr_accessor :extension_date
|
35
|
+
|
36
|
+
# [Read-Only] Value returned for a POA&M Item with a review status of \"Approved\" and an unapproved milestone with a scheduled completion date that extends beyond the POA&M Item's scheduled completion date.
|
37
|
+
attr_accessor :pending_extension_date
|
38
|
+
|
39
|
+
# [Read-Only] Lists the filenames of any artifact files attached to the POA&M Item. Multiple values are separated by “; ”.
|
40
|
+
attr_accessor :artifacts
|
41
|
+
|
42
|
+
class EnumAttributeValidator
|
43
|
+
attr_reader :datatype
|
44
|
+
attr_reader :allowable_values
|
45
|
+
|
46
|
+
def initialize(datatype, allowable_values)
|
47
|
+
@allowable_values = allowable_values.map do |value|
|
48
|
+
case datatype.to_s
|
49
|
+
when /Integer/i
|
50
|
+
value.to_i
|
51
|
+
when /Float/i
|
52
|
+
value.to_f
|
53
|
+
else
|
54
|
+
value
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def valid?(value)
|
60
|
+
!value || allowable_values.include?(value)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
65
|
+
def self.attribute_map
|
66
|
+
{
|
67
|
+
:'condition_id' => :'conditionId',
|
68
|
+
:'is_inherited' => :'isInherited',
|
69
|
+
:'cci' => :'cci',
|
70
|
+
:'review_status' => :'reviewStatus',
|
71
|
+
:'created_date' => :'createdDate',
|
72
|
+
:'extension_date' => :'extensionDate',
|
73
|
+
:'pending_extension_date' => :'pendingExtensionDate',
|
74
|
+
:'artifacts' => :'artifacts'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Returns attribute mapping this model knows about
|
79
|
+
def self.acceptable_attribute_map
|
80
|
+
attribute_map
|
81
|
+
end
|
82
|
+
|
83
|
+
# Returns all the JSON keys this model knows about
|
84
|
+
def self.acceptable_attributes
|
85
|
+
acceptable_attribute_map.values
|
86
|
+
end
|
87
|
+
|
88
|
+
# Attribute type mapping.
|
89
|
+
def self.openapi_types
|
90
|
+
{
|
91
|
+
:'condition_id' => :'String',
|
92
|
+
:'is_inherited' => :'Boolean',
|
93
|
+
:'cci' => :'String',
|
94
|
+
:'review_status' => :'String',
|
95
|
+
:'created_date' => :'Integer',
|
96
|
+
:'extension_date' => :'Integer',
|
97
|
+
:'pending_extension_date' => :'Integer',
|
98
|
+
:'artifacts' => :'String'
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# List of attributes with nullable: true
|
103
|
+
def self.openapi_nullable
|
104
|
+
Set.new([
|
105
|
+
:'condition_id',
|
106
|
+
:'is_inherited',
|
107
|
+
:'cci',
|
108
|
+
:'review_status',
|
109
|
+
:'extension_date',
|
110
|
+
:'pending_extension_date',
|
111
|
+
:'artifacts'
|
112
|
+
])
|
113
|
+
end
|
114
|
+
|
115
|
+
# Initializes the object
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
117
|
+
def initialize(attributes = {})
|
118
|
+
if (!attributes.is_a?(Hash))
|
119
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamReadOnlyFields` initialize method"
|
120
|
+
end
|
121
|
+
|
122
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
123
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
124
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
125
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
126
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamReadOnlyFields`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
127
|
+
end
|
128
|
+
h[k.to_sym] = v
|
129
|
+
}
|
130
|
+
|
131
|
+
if attributes.key?(:'condition_id')
|
132
|
+
self.condition_id = attributes[:'condition_id']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'is_inherited')
|
136
|
+
self.is_inherited = attributes[:'is_inherited']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'cci')
|
140
|
+
self.cci = attributes[:'cci']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'review_status')
|
144
|
+
self.review_status = attributes[:'review_status']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'created_date')
|
148
|
+
self.created_date = attributes[:'created_date']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'extension_date')
|
152
|
+
self.extension_date = attributes[:'extension_date']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'pending_extension_date')
|
156
|
+
self.pending_extension_date = attributes[:'pending_extension_date']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'artifacts')
|
160
|
+
self.artifacts = attributes[:'artifacts']
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
165
|
+
# @return Array for valid properties with the reasons
|
166
|
+
def list_invalid_properties
|
167
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
168
|
+
invalid_properties = Array.new
|
169
|
+
invalid_properties
|
170
|
+
end
|
171
|
+
|
172
|
+
# Check to see if the all the properties in the model are valid
|
173
|
+
# @return true if the model is valid
|
174
|
+
def valid?
|
175
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
176
|
+
review_status_validator = EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved", "unknown_default_open_api"])
|
177
|
+
return false unless review_status_validator.valid?(@review_status)
|
178
|
+
true
|
179
|
+
end
|
180
|
+
|
181
|
+
# Custom attribute writer method checking allowed values (enum).
|
182
|
+
# @param [Object] review_status Object to be assigned
|
183
|
+
def review_status=(review_status)
|
184
|
+
validator = EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved", "unknown_default_open_api"])
|
185
|
+
unless validator.valid?(review_status)
|
186
|
+
fail ArgumentError, "invalid value for \"review_status\", must be one of #{validator.allowable_values}."
|
187
|
+
end
|
188
|
+
@review_status = review_status
|
189
|
+
end
|
190
|
+
|
191
|
+
# Checks equality by comparing each attribute.
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def ==(o)
|
194
|
+
return true if self.equal?(o)
|
195
|
+
self.class == o.class &&
|
196
|
+
condition_id == o.condition_id &&
|
197
|
+
is_inherited == o.is_inherited &&
|
198
|
+
cci == o.cci &&
|
199
|
+
review_status == o.review_status &&
|
200
|
+
created_date == o.created_date &&
|
201
|
+
extension_date == o.extension_date &&
|
202
|
+
pending_extension_date == o.pending_extension_date &&
|
203
|
+
artifacts == o.artifacts
|
204
|
+
end
|
205
|
+
|
206
|
+
# @see the `==` method
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def eql?(o)
|
209
|
+
self == o
|
210
|
+
end
|
211
|
+
|
212
|
+
# Calculates hash code according to all attributes.
|
213
|
+
# @return [Integer] Hash code
|
214
|
+
def hash
|
215
|
+
[condition_id, is_inherited, cci, review_status, created_date, extension_date, pending_extension_date, artifacts].hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Builds the object from hash
|
219
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
220
|
+
# @return [Object] Returns the model itself
|
221
|
+
def self.build_from_hash(attributes)
|
222
|
+
return nil unless attributes.is_a?(Hash)
|
223
|
+
attributes = attributes.transform_keys(&:to_sym)
|
224
|
+
transformed_hash = {}
|
225
|
+
openapi_types.each_pair do |key, type|
|
226
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
227
|
+
transformed_hash["#{key}"] = nil
|
228
|
+
elsif type =~ /\AArray<(.*)>/i
|
229
|
+
# check to ensure the input is an array given that the attribute
|
230
|
+
# is documented as an array but the input is not
|
231
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
232
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
233
|
+
end
|
234
|
+
elsif !attributes[attribute_map[key]].nil?
|
235
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
236
|
+
end
|
237
|
+
end
|
238
|
+
new(transformed_hash)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Deserializes the data based on type
|
242
|
+
# @param string type Data type
|
243
|
+
# @param string value Value to be deserialized
|
244
|
+
# @return [Object] Deserialized data
|
245
|
+
def self._deserialize(type, value)
|
246
|
+
case type.to_sym
|
247
|
+
when :Time
|
248
|
+
Time.parse(value)
|
249
|
+
when :Date
|
250
|
+
Date.parse(value)
|
251
|
+
when :String
|
252
|
+
value.to_s
|
253
|
+
when :Integer
|
254
|
+
value.to_i
|
255
|
+
when :Float
|
256
|
+
value.to_f
|
257
|
+
when :Boolean
|
258
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
259
|
+
true
|
260
|
+
else
|
261
|
+
false
|
262
|
+
end
|
263
|
+
when :Object
|
264
|
+
# generic object (usually a Hash), return directly
|
265
|
+
value
|
266
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
267
|
+
inner_type = Regexp.last_match[:inner_type]
|
268
|
+
value.map { |v| _deserialize(inner_type, v) }
|
269
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
270
|
+
k_type = Regexp.last_match[:k_type]
|
271
|
+
v_type = Regexp.last_match[:v_type]
|
272
|
+
{}.tap do |hash|
|
273
|
+
value.each do |k, v|
|
274
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
275
|
+
end
|
276
|
+
end
|
277
|
+
else # model
|
278
|
+
# models (e.g. Pet) or oneOf
|
279
|
+
klass = EmassClient.const_get(type)
|
280
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
# Returns the string representation of the object
|
285
|
+
# @return [String] String presentation of the object
|
286
|
+
def to_s
|
287
|
+
to_hash.to_s
|
288
|
+
end
|
289
|
+
|
290
|
+
# to_body is an alias to to_hash (backward compatibility)
|
291
|
+
# @return [Hash] Returns the object in the form of hash
|
292
|
+
def to_body
|
293
|
+
to_hash
|
294
|
+
end
|
295
|
+
|
296
|
+
# Returns the object in the form of hash
|
297
|
+
# @return [Hash] Returns the object in the form of hash
|
298
|
+
def to_hash
|
299
|
+
hash = {}
|
300
|
+
self.class.attribute_map.each_pair do |attr, param|
|
301
|
+
value = self.send(attr)
|
302
|
+
if value.nil?
|
303
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
304
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
305
|
+
end
|
306
|
+
|
307
|
+
hash[param] = _to_hash(value)
|
308
|
+
end
|
309
|
+
hash
|
310
|
+
end
|
311
|
+
|
312
|
+
# Outputs non-array value in the form of hash
|
313
|
+
# For object, use to_hash. Otherwise, just return the value
|
314
|
+
# @param [Object] value Any valid value
|
315
|
+
# @return [Hash] Returns the value in the form of hash
|
316
|
+
def _to_hash(value)
|
317
|
+
if value.is_a?(Array)
|
318
|
+
value.compact.map { |v| _to_hash(v) }
|
319
|
+
elsif value.is_a?(Hash)
|
320
|
+
{}.tap do |hash|
|
321
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
322
|
+
end
|
323
|
+
elsif value.respond_to? :to_hash
|
324
|
+
value.to_hash
|
325
|
+
else
|
326
|
+
value
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
end
|
331
|
+
|
332
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The
|
4
|
+
#The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
7
|
-
Contact: disa.
|
6
|
+
The version of the OpenAPI document: v3.22
|
7
|
+
Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -25,9 +25,14 @@ module EmassClient
|
|
25
25
|
}
|
26
26
|
end
|
27
27
|
|
28
|
+
# Returns attribute mapping this model knows about
|
29
|
+
def self.acceptable_attribute_map
|
30
|
+
attribute_map
|
31
|
+
end
|
32
|
+
|
28
33
|
# Returns all the JSON keys this model knows about
|
29
34
|
def self.acceptable_attributes
|
30
|
-
|
35
|
+
acceptable_attribute_map.values
|
31
36
|
end
|
32
37
|
|
33
38
|
# Attribute type mapping.
|
@@ -51,9 +56,10 @@ module EmassClient
|
|
51
56
|
end
|
52
57
|
|
53
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
54
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
-
if (!
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamRequestDeleteBodyInner`. Please check the name to make sure it's valid. List of attributes: " +
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamRequestDeleteBodyInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
57
63
|
end
|
58
64
|
h[k.to_sym] = v
|
59
65
|
}
|
@@ -66,6 +72,7 @@ module EmassClient
|
|
66
72
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
73
|
# @return Array for valid properties with the reasons
|
68
74
|
def list_invalid_properties
|
75
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
69
76
|
invalid_properties = Array.new
|
70
77
|
invalid_properties
|
71
78
|
end
|
@@ -73,6 +80,7 @@ module EmassClient
|
|
73
80
|
# Check to see if the all the properties in the model are valid
|
74
81
|
# @return true if the model is valid
|
75
82
|
def valid?
|
83
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
76
84
|
true
|
77
85
|
end
|
78
86
|
|
@@ -100,37 +108,30 @@ module EmassClient
|
|
100
108
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
109
|
# @return [Object] Returns the model itself
|
102
110
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
111
|
return nil unless attributes.is_a?(Hash)
|
111
112
|
attributes = attributes.transform_keys(&:to_sym)
|
112
|
-
|
113
|
-
|
114
|
-
|
113
|
+
transformed_hash = {}
|
114
|
+
openapi_types.each_pair do |key, type|
|
115
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
116
|
+
transformed_hash["#{key}"] = nil
|
115
117
|
elsif type =~ /\AArray<(.*)>/i
|
116
118
|
# check to ensure the input is an array given that the attribute
|
117
119
|
# is documented as an array but the input is not
|
118
|
-
if attributes[
|
119
|
-
|
120
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
121
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
120
122
|
end
|
121
|
-
elsif !attributes[
|
122
|
-
|
123
|
+
elsif !attributes[attribute_map[key]].nil?
|
124
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
123
125
|
end
|
124
126
|
end
|
125
|
-
|
126
|
-
self
|
127
|
+
new(transformed_hash)
|
127
128
|
end
|
128
129
|
|
129
130
|
# Deserializes the data based on type
|
130
131
|
# @param string type Data type
|
131
132
|
# @param string value Value to be deserialized
|
132
133
|
# @return [Object] Deserialized data
|
133
|
-
def _deserialize(type, value)
|
134
|
+
def self._deserialize(type, value)
|
134
135
|
case type.to_sym
|
135
136
|
when :Time
|
136
137
|
Time.parse(value)
|
@@ -165,7 +166,7 @@ module EmassClient
|
|
165
166
|
else # model
|
166
167
|
# models (e.g. Pet) or oneOf
|
167
168
|
klass = EmassClient.const_get(type)
|
168
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
169
170
|
end
|
170
171
|
end
|
171
172
|
|