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.
|
@@ -55,9 +60,10 @@ module EmassClient
|
|
55
60
|
end
|
56
61
|
|
57
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
58
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
-
if (!
|
60
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemRolesCategoryResponse`. Please check the name to make sure it's valid. List of attributes: " +
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::SystemRolesCategoryResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
61
67
|
end
|
62
68
|
h[k.to_sym] = v
|
63
69
|
}
|
@@ -76,6 +82,7 @@ module EmassClient
|
|
76
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
83
|
# @return Array for valid properties with the reasons
|
78
84
|
def list_invalid_properties
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
86
|
invalid_properties = Array.new
|
80
87
|
invalid_properties
|
81
88
|
end
|
@@ -83,6 +90,7 @@ module EmassClient
|
|
83
90
|
# Check to see if the all the properties in the model are valid
|
84
91
|
# @return true if the model is valid
|
85
92
|
def valid?
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
86
94
|
true
|
87
95
|
end
|
88
96
|
|
@@ -111,37 +119,30 @@ module EmassClient
|
|
111
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
112
120
|
# @return [Object] Returns the model itself
|
113
121
|
def self.build_from_hash(attributes)
|
114
|
-
new.build_from_hash(attributes)
|
115
|
-
end
|
116
|
-
|
117
|
-
# Builds the object from hash
|
118
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
-
# @return [Object] Returns the model itself
|
120
|
-
def build_from_hash(attributes)
|
121
122
|
return nil unless attributes.is_a?(Hash)
|
122
123
|
attributes = attributes.transform_keys(&:to_sym)
|
123
|
-
|
124
|
-
|
125
|
-
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
126
128
|
elsif type =~ /\AArray<(.*)>/i
|
127
129
|
# check to ensure the input is an array given that the attribute
|
128
130
|
# is documented as an array but the input is not
|
129
|
-
if attributes[
|
130
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
131
133
|
end
|
132
|
-
elsif !attributes[
|
133
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
134
136
|
end
|
135
137
|
end
|
136
|
-
|
137
|
-
self
|
138
|
+
new(transformed_hash)
|
138
139
|
end
|
139
140
|
|
140
141
|
# Deserializes the data based on type
|
141
142
|
# @param string type Data type
|
142
143
|
# @param string value Value to be deserialized
|
143
144
|
# @return [Object] Deserialized data
|
144
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
145
146
|
case type.to_sym
|
146
147
|
when :Time
|
147
148
|
Time.parse(value)
|
@@ -176,7 +177,7 @@ module EmassClient
|
|
176
177
|
else # model
|
177
178
|
# models (e.g. Pet) or oneOf
|
178
179
|
klass = EmassClient.const_get(type)
|
179
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
181
|
end
|
181
182
|
end
|
182
183
|
|
@@ -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::SystemRolesResponse`. 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::SystemRolesResponse`. 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::SystemRolesResponseDataInner`. 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::SystemRolesResponseDataInner`. 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
|
}
|
@@ -77,6 +83,7 @@ module EmassClient
|
|
77
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
78
84
|
# @return Array for valid properties with the reasons
|
79
85
|
def list_invalid_properties
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
80
87
|
invalid_properties = Array.new
|
81
88
|
invalid_properties
|
82
89
|
end
|
@@ -84,6 +91,7 @@ module EmassClient
|
|
84
91
|
# Check to see if the all the properties in the model are valid
|
85
92
|
# @return true if the model is valid
|
86
93
|
def valid?
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
87
95
|
true
|
88
96
|
end
|
89
97
|
|
@@ -112,37 +120,30 @@ module EmassClient
|
|
112
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
113
121
|
# @return [Object] Returns the model itself
|
114
122
|
def self.build_from_hash(attributes)
|
115
|
-
new.build_from_hash(attributes)
|
116
|
-
end
|
117
|
-
|
118
|
-
# Builds the object from hash
|
119
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
-
# @return [Object] Returns the model itself
|
121
|
-
def build_from_hash(attributes)
|
122
123
|
return nil unless attributes.is_a?(Hash)
|
123
124
|
attributes = attributes.transform_keys(&:to_sym)
|
124
|
-
|
125
|
-
|
126
|
-
|
125
|
+
transformed_hash = {}
|
126
|
+
openapi_types.each_pair do |key, type|
|
127
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = nil
|
127
129
|
elsif type =~ /\AArray<(.*)>/i
|
128
130
|
# check to ensure the input is an array given that the attribute
|
129
131
|
# is documented as an array but the input is not
|
130
|
-
if attributes[
|
131
|
-
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
132
134
|
end
|
133
|
-
elsif !attributes[
|
134
|
-
|
135
|
+
elsif !attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
135
137
|
end
|
136
138
|
end
|
137
|
-
|
138
|
-
self
|
139
|
+
new(transformed_hash)
|
139
140
|
end
|
140
141
|
|
141
142
|
# Deserializes the data based on type
|
142
143
|
# @param string type Data type
|
143
144
|
# @param string value Value to be deserialized
|
144
145
|
# @return [Object] Deserialized data
|
145
|
-
def _deserialize(type, value)
|
146
|
+
def self._deserialize(type, value)
|
146
147
|
case type.to_sym
|
147
148
|
when :Time
|
148
149
|
Time.parse(value)
|
@@ -177,7 +178,7 @@ module EmassClient
|
|
177
178
|
else # model
|
178
179
|
# models (e.g. Pet) or oneOf
|
179
180
|
klass = EmassClient.const_get(type)
|
180
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
182
|
end
|
182
183
|
end
|
183
184
|
|