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
|
|
@@ -27,9 +27,14 @@ module EmassClient
|
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
30
|
+
# Returns attribute mapping this model knows about
|
31
|
+
def self.acceptable_attribute_map
|
32
|
+
attribute_map
|
33
|
+
end
|
34
|
+
|
30
35
|
# Returns all the JSON keys this model knows about
|
31
36
|
def self.acceptable_attributes
|
32
|
-
|
37
|
+
acceptable_attribute_map.values
|
33
38
|
end
|
34
39
|
|
35
40
|
# Attribute type mapping.
|
@@ -54,9 +59,10 @@ module EmassClient
|
|
54
59
|
end
|
55
60
|
|
56
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
57
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
-
if (!
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemsResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
60
66
|
end
|
61
67
|
h[k.to_sym] = v
|
62
68
|
}
|
@@ -75,6 +81,7 @@ module EmassClient
|
|
75
81
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
82
|
# @return Array for valid properties with the reasons
|
77
83
|
def list_invalid_properties
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
85
|
invalid_properties = Array.new
|
79
86
|
invalid_properties
|
80
87
|
end
|
@@ -82,6 +89,7 @@ module EmassClient
|
|
82
89
|
# Check to see if the all the properties in the model are valid
|
83
90
|
# @return true if the model is valid
|
84
91
|
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
93
|
true
|
86
94
|
end
|
87
95
|
|
@@ -110,37 +118,30 @@ module EmassClient
|
|
110
118
|
# @param [Hash] attributes Model attributes in the form of hash
|
111
119
|
# @return [Object] Returns the model itself
|
112
120
|
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
121
|
return nil unless attributes.is_a?(Hash)
|
121
122
|
attributes = attributes.transform_keys(&:to_sym)
|
122
|
-
|
123
|
-
|
124
|
-
|
123
|
+
transformed_hash = {}
|
124
|
+
openapi_types.each_pair do |key, type|
|
125
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = nil
|
125
127
|
elsif type =~ /\AArray<(.*)>/i
|
126
128
|
# check to ensure the input is an array given that the attribute
|
127
129
|
# is documented as an array but the input is not
|
128
|
-
if attributes[
|
129
|
-
|
130
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
131
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
130
132
|
end
|
131
|
-
elsif !attributes[
|
132
|
-
|
133
|
+
elsif !attributes[attribute_map[key]].nil?
|
134
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
133
135
|
end
|
134
136
|
end
|
135
|
-
|
136
|
-
self
|
137
|
+
new(transformed_hash)
|
137
138
|
end
|
138
139
|
|
139
140
|
# Deserializes the data based on type
|
140
141
|
# @param string type Data type
|
141
142
|
# @param string value Value to be deserialized
|
142
143
|
# @return [Object] Deserialized data
|
143
|
-
def _deserialize(type, value)
|
144
|
+
def self._deserialize(type, value)
|
144
145
|
case type.to_sym
|
145
146
|
when :Time
|
146
147
|
Time.parse(value)
|
@@ -175,7 +176,7 @@ module EmassClient
|
|
175
176
|
else # model
|
176
177
|
# models (e.g. Pet) or oneOf
|
177
178
|
klass = EmassClient.const_get(type)
|
178
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
180
|
end
|
180
181
|
end
|
181
182
|
|
@@ -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
|
|
@@ -27,9 +27,14 @@ module EmassClient
|
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
30
|
+
# Returns attribute mapping this model knows about
|
31
|
+
def self.acceptable_attribute_map
|
32
|
+
attribute_map
|
33
|
+
end
|
34
|
+
|
30
35
|
# Returns all the JSON keys this model knows about
|
31
36
|
def self.acceptable_attributes
|
32
|
-
|
37
|
+
acceptable_attribute_map.values
|
33
38
|
end
|
34
39
|
|
35
40
|
# Attribute type mapping.
|
@@ -54,9 +59,10 @@ module EmassClient
|
|
54
59
|
end
|
55
60
|
|
56
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
57
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
-
if (!
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Test`. Please check the name to make sure it's valid. List of attributes: " +
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Test`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
60
66
|
end
|
61
67
|
h[k.to_sym] = v
|
62
68
|
}
|
@@ -73,6 +79,7 @@ module EmassClient
|
|
73
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
80
|
# @return Array for valid properties with the reasons
|
75
81
|
def list_invalid_properties
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
83
|
invalid_properties = Array.new
|
77
84
|
invalid_properties
|
78
85
|
end
|
@@ -80,6 +87,7 @@ module EmassClient
|
|
80
87
|
# Check to see if the all the properties in the model are valid
|
81
88
|
# @return true if the model is valid
|
82
89
|
def valid?
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
91
|
true
|
84
92
|
end
|
85
93
|
|
@@ -108,37 +116,30 @@ module EmassClient
|
|
108
116
|
# @param [Hash] attributes Model attributes in the form of hash
|
109
117
|
# @return [Object] Returns the model itself
|
110
118
|
def self.build_from_hash(attributes)
|
111
|
-
new.build_from_hash(attributes)
|
112
|
-
end
|
113
|
-
|
114
|
-
# Builds the object from hash
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
-
# @return [Object] Returns the model itself
|
117
|
-
def build_from_hash(attributes)
|
118
119
|
return nil unless attributes.is_a?(Hash)
|
119
120
|
attributes = attributes.transform_keys(&:to_sym)
|
120
|
-
|
121
|
-
|
122
|
-
|
121
|
+
transformed_hash = {}
|
122
|
+
openapi_types.each_pair do |key, type|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
124
|
+
transformed_hash["#{key}"] = nil
|
123
125
|
elsif type =~ /\AArray<(.*)>/i
|
124
126
|
# check to ensure the input is an array given that the attribute
|
125
127
|
# is documented as an array but the input is not
|
126
|
-
if attributes[
|
127
|
-
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
128
130
|
end
|
129
|
-
elsif !attributes[
|
130
|
-
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
131
133
|
end
|
132
134
|
end
|
133
|
-
|
134
|
-
self
|
135
|
+
new(transformed_hash)
|
135
136
|
end
|
136
137
|
|
137
138
|
# Deserializes the data based on type
|
138
139
|
# @param string type Data type
|
139
140
|
# @param string value Value to be deserialized
|
140
141
|
# @return [Object] Deserialized data
|
141
|
-
def _deserialize(type, value)
|
142
|
+
def self._deserialize(type, value)
|
142
143
|
case type.to_sym
|
143
144
|
when :Time
|
144
145
|
Time.parse(value)
|
@@ -173,7 +174,7 @@ module EmassClient
|
|
173
174
|
else # model
|
174
175
|
# models (e.g. Pet) or oneOf
|
175
176
|
klass = EmassClient.const_get(type)
|
176
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
178
|
end
|
178
179
|
end
|
179
180
|
|
@@ -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
|
|
@@ -24,9 +24,14 @@ module EmassClient
|
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
27
|
+
# Returns attribute mapping this model knows about
|
28
|
+
def self.acceptable_attribute_map
|
29
|
+
attribute_map
|
30
|
+
end
|
31
|
+
|
27
32
|
# Returns all the JSON keys this model knows about
|
28
33
|
def self.acceptable_attributes
|
29
|
-
|
34
|
+
acceptable_attribute_map.values
|
30
35
|
end
|
31
36
|
|
32
37
|
# Attribute type mapping.
|
@@ -50,9 +55,10 @@ module EmassClient
|
|
50
55
|
end
|
51
56
|
|
52
57
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
53
59
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
-
if (!
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestData`. Please check the name to make sure it's valid. List of attributes: " +
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
56
62
|
end
|
57
63
|
h[k.to_sym] = v
|
58
64
|
}
|
@@ -65,6 +71,7 @@ module EmassClient
|
|
65
71
|
# Show invalid properties with the reasons. Usually used together with valid?
|
66
72
|
# @return Array for valid properties with the reasons
|
67
73
|
def list_invalid_properties
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
68
75
|
invalid_properties = Array.new
|
69
76
|
invalid_properties
|
70
77
|
end
|
@@ -72,6 +79,7 @@ module EmassClient
|
|
72
79
|
# Check to see if the all the properties in the model are valid
|
73
80
|
# @return true if the model is valid
|
74
81
|
def valid?
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
75
83
|
true
|
76
84
|
end
|
77
85
|
|
@@ -99,37 +107,30 @@ module EmassClient
|
|
99
107
|
# @param [Hash] attributes Model attributes in the form of hash
|
100
108
|
# @return [Object] Returns the model itself
|
101
109
|
def self.build_from_hash(attributes)
|
102
|
-
new.build_from_hash(attributes)
|
103
|
-
end
|
104
|
-
|
105
|
-
# Builds the object from hash
|
106
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
-
# @return [Object] Returns the model itself
|
108
|
-
def build_from_hash(attributes)
|
109
110
|
return nil unless attributes.is_a?(Hash)
|
110
111
|
attributes = attributes.transform_keys(&:to_sym)
|
111
|
-
|
112
|
-
|
113
|
-
|
112
|
+
transformed_hash = {}
|
113
|
+
openapi_types.each_pair do |key, type|
|
114
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
115
|
+
transformed_hash["#{key}"] = nil
|
114
116
|
elsif type =~ /\AArray<(.*)>/i
|
115
117
|
# check to ensure the input is an array given that the attribute
|
116
118
|
# is documented as an array but the input is not
|
117
|
-
if attributes[
|
118
|
-
|
119
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
120
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
119
121
|
end
|
120
|
-
elsif !attributes[
|
121
|
-
|
122
|
+
elsif !attributes[attribute_map[key]].nil?
|
123
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
122
124
|
end
|
123
125
|
end
|
124
|
-
|
125
|
-
self
|
126
|
+
new(transformed_hash)
|
126
127
|
end
|
127
128
|
|
128
129
|
# Deserializes the data based on type
|
129
130
|
# @param string type Data type
|
130
131
|
# @param string value Value to be deserialized
|
131
132
|
# @return [Object] Deserialized data
|
132
|
-
def _deserialize(type, value)
|
133
|
+
def self._deserialize(type, value)
|
133
134
|
case type.to_sym
|
134
135
|
when :Time
|
135
136
|
Time.parse(value)
|
@@ -164,7 +165,7 @@ module EmassClient
|
|
164
165
|
else # model
|
165
166
|
# models (e.g. Pet) or oneOf
|
166
167
|
klass = EmassClient.const_get(type)
|
167
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
169
|
end
|
169
170
|
end
|
170
171
|
|
@@ -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
|
|
@@ -24,6 +24,9 @@ module EmassClient
|
|
24
24
|
# [Required] CCI associated with test result.
|
25
25
|
attr_accessor :cci
|
26
26
|
|
27
|
+
# [Required] The Security Control Assessment Procedure being assessed.
|
28
|
+
attr_accessor :assessment_procedure
|
29
|
+
|
27
30
|
# [Read-only] Indicates whether a test result is inherited.
|
28
31
|
attr_accessor :is_inherited
|
29
32
|
|
@@ -70,6 +73,7 @@ module EmassClient
|
|
70
73
|
:'system_id' => :'systemId',
|
71
74
|
:'control' => :'control',
|
72
75
|
:'cci' => :'cci',
|
76
|
+
:'assessment_procedure' => :'assessmentProcedure',
|
73
77
|
:'is_inherited' => :'isInherited',
|
74
78
|
:'tested_by' => :'testedBy',
|
75
79
|
:'test_date' => :'testDate',
|
@@ -79,9 +83,14 @@ module EmassClient
|
|
79
83
|
}
|
80
84
|
end
|
81
85
|
|
86
|
+
# Returns attribute mapping this model knows about
|
87
|
+
def self.acceptable_attribute_map
|
88
|
+
attribute_map
|
89
|
+
end
|
90
|
+
|
82
91
|
# Returns all the JSON keys this model knows about
|
83
92
|
def self.acceptable_attributes
|
84
|
-
|
93
|
+
acceptable_attribute_map.values
|
85
94
|
end
|
86
95
|
|
87
96
|
# Attribute type mapping.
|
@@ -90,6 +99,7 @@ module EmassClient
|
|
90
99
|
:'system_id' => :'Integer',
|
91
100
|
:'control' => :'String',
|
92
101
|
:'cci' => :'String',
|
102
|
+
:'assessment_procedure' => :'String',
|
93
103
|
:'is_inherited' => :'Boolean',
|
94
104
|
:'tested_by' => :'String',
|
95
105
|
:'test_date' => :'Integer',
|
@@ -116,9 +126,10 @@ module EmassClient
|
|
116
126
|
end
|
117
127
|
|
118
128
|
# check to see if the attribute exists and convert string to symbol for hash key
|
129
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
119
130
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
120
|
-
if (!
|
121
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestResultsGet`. Please check the name to make sure it's valid. List of attributes: " +
|
131
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
132
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::TestResultsGet`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
122
133
|
end
|
123
134
|
h[k.to_sym] = v
|
124
135
|
}
|
@@ -135,6 +146,10 @@ module EmassClient
|
|
135
146
|
self.cci = attributes[:'cci']
|
136
147
|
end
|
137
148
|
|
149
|
+
if attributes.key?(:'assessment_procedure')
|
150
|
+
self.assessment_procedure = attributes[:'assessment_procedure']
|
151
|
+
end
|
152
|
+
|
138
153
|
if attributes.key?(:'is_inherited')
|
139
154
|
self.is_inherited = attributes[:'is_inherited']
|
140
155
|
end
|
@@ -163,6 +178,7 @@ module EmassClient
|
|
163
178
|
# Show invalid properties with the reasons. Usually used together with valid?
|
164
179
|
# @return Array for valid properties with the reasons
|
165
180
|
def list_invalid_properties
|
181
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
166
182
|
invalid_properties = Array.new
|
167
183
|
invalid_properties
|
168
184
|
end
|
@@ -170,6 +186,7 @@ module EmassClient
|
|
170
186
|
# Check to see if the all the properties in the model are valid
|
171
187
|
# @return true if the model is valid
|
172
188
|
def valid?
|
189
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
173
190
|
compliance_status_validator = EnumAttributeValidator.new('String', ["Compliant", "Non-Compliant", "Not Applicable", "unknown_default_open_api"])
|
174
191
|
return false unless compliance_status_validator.valid?(@compliance_status)
|
175
192
|
true
|
@@ -193,6 +210,7 @@ module EmassClient
|
|
193
210
|
system_id == o.system_id &&
|
194
211
|
control == o.control &&
|
195
212
|
cci == o.cci &&
|
213
|
+
assessment_procedure == o.assessment_procedure &&
|
196
214
|
is_inherited == o.is_inherited &&
|
197
215
|
tested_by == o.tested_by &&
|
198
216
|
test_date == o.test_date &&
|
@@ -210,44 +228,37 @@ module EmassClient
|
|
210
228
|
# Calculates hash code according to all attributes.
|
211
229
|
# @return [Integer] Hash code
|
212
230
|
def hash
|
213
|
-
[system_id, control, cci, is_inherited, tested_by, test_date, description, type, compliance_status].hash
|
231
|
+
[system_id, control, cci, assessment_procedure, is_inherited, tested_by, test_date, description, type, compliance_status].hash
|
214
232
|
end
|
215
233
|
|
216
234
|
# Builds the object from hash
|
217
235
|
# @param [Hash] attributes Model attributes in the form of hash
|
218
236
|
# @return [Object] Returns the model itself
|
219
237
|
def self.build_from_hash(attributes)
|
220
|
-
new.build_from_hash(attributes)
|
221
|
-
end
|
222
|
-
|
223
|
-
# Builds the object from hash
|
224
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
225
|
-
# @return [Object] Returns the model itself
|
226
|
-
def build_from_hash(attributes)
|
227
238
|
return nil unless attributes.is_a?(Hash)
|
228
239
|
attributes = attributes.transform_keys(&:to_sym)
|
229
|
-
|
230
|
-
|
231
|
-
|
240
|
+
transformed_hash = {}
|
241
|
+
openapi_types.each_pair do |key, type|
|
242
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
243
|
+
transformed_hash["#{key}"] = nil
|
232
244
|
elsif type =~ /\AArray<(.*)>/i
|
233
245
|
# check to ensure the input is an array given that the attribute
|
234
246
|
# is documented as an array but the input is not
|
235
|
-
if attributes[
|
236
|
-
|
247
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
248
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
237
249
|
end
|
238
|
-
elsif !attributes[
|
239
|
-
|
250
|
+
elsif !attributes[attribute_map[key]].nil?
|
251
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
240
252
|
end
|
241
253
|
end
|
242
|
-
|
243
|
-
self
|
254
|
+
new(transformed_hash)
|
244
255
|
end
|
245
256
|
|
246
257
|
# Deserializes the data based on type
|
247
258
|
# @param string type Data type
|
248
259
|
# @param string value Value to be deserialized
|
249
260
|
# @return [Object] Deserialized data
|
250
|
-
def _deserialize(type, value)
|
261
|
+
def self._deserialize(type, value)
|
251
262
|
case type.to_sym
|
252
263
|
when :Time
|
253
264
|
Time.parse(value)
|
@@ -282,7 +293,7 @@ module EmassClient
|
|
282
293
|
else # model
|
283
294
|
# models (e.g. Pet) or oneOf
|
284
295
|
klass = EmassClient.const_get(type)
|
285
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
296
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
286
297
|
end
|
287
298
|
end
|
288
299
|
|