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
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module EmassClient
|
17
|
-
class
|
17
|
+
class UnauthorizedMeta
|
18
18
|
attr_accessor :code
|
19
19
|
|
20
20
|
attr_accessor :error_message
|
@@ -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.
|
@@ -50,13 +55,14 @@ module EmassClient
|
|
50
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
51
56
|
def initialize(attributes = {})
|
52
57
|
if (!attributes.is_a?(Hash))
|
53
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::UnauthorizedMeta` initialize method"
|
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::
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::UnauthorizedMeta`. 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
|
if !@code.nil? && @code > 401
|
82
89
|
invalid_properties.push('invalid value for "code", must be smaller than or equal to 401.')
|
@@ -92,6 +99,7 @@ module EmassClient
|
|
92
99
|
# Check to see if the all the properties in the model are valid
|
93
100
|
# @return true if the model is valid
|
94
101
|
def valid?
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
95
103
|
return false if !@code.nil? && @code > 401
|
96
104
|
return false if !@code.nil? && @code < 401
|
97
105
|
true
|
@@ -100,11 +108,15 @@ module EmassClient
|
|
100
108
|
# Custom attribute writer method with validation
|
101
109
|
# @param [Object] code Value to be assigned
|
102
110
|
def code=(code)
|
103
|
-
if
|
111
|
+
if code.nil?
|
112
|
+
fail ArgumentError, 'code cannot be nil'
|
113
|
+
end
|
114
|
+
|
115
|
+
if code > 401
|
104
116
|
fail ArgumentError, 'invalid value for "code", must be smaller than or equal to 401.'
|
105
117
|
end
|
106
118
|
|
107
|
-
if
|
119
|
+
if code < 401
|
108
120
|
fail ArgumentError, 'invalid value for "code", must be greater than or equal to 401.'
|
109
121
|
end
|
110
122
|
|
@@ -136,37 +148,30 @@ module EmassClient
|
|
136
148
|
# @param [Hash] attributes Model attributes in the form of hash
|
137
149
|
# @return [Object] Returns the model itself
|
138
150
|
def self.build_from_hash(attributes)
|
139
|
-
new.build_from_hash(attributes)
|
140
|
-
end
|
141
|
-
|
142
|
-
# Builds the object from hash
|
143
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
-
# @return [Object] Returns the model itself
|
145
|
-
def build_from_hash(attributes)
|
146
151
|
return nil unless attributes.is_a?(Hash)
|
147
152
|
attributes = attributes.transform_keys(&:to_sym)
|
148
|
-
|
149
|
-
|
150
|
-
|
153
|
+
transformed_hash = {}
|
154
|
+
openapi_types.each_pair do |key, type|
|
155
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
156
|
+
transformed_hash["#{key}"] = nil
|
151
157
|
elsif type =~ /\AArray<(.*)>/i
|
152
158
|
# check to ensure the input is an array given that the attribute
|
153
159
|
# is documented as an array but the input is not
|
154
|
-
if attributes[
|
155
|
-
|
160
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
161
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
156
162
|
end
|
157
|
-
elsif !attributes[
|
158
|
-
|
163
|
+
elsif !attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
159
165
|
end
|
160
166
|
end
|
161
|
-
|
162
|
-
self
|
167
|
+
new(transformed_hash)
|
163
168
|
end
|
164
169
|
|
165
170
|
# Deserializes the data based on type
|
166
171
|
# @param string type Data type
|
167
172
|
# @param string value Value to be deserialized
|
168
173
|
# @return [Object] Deserialized data
|
169
|
-
def _deserialize(type, value)
|
174
|
+
def self._deserialize(type, value)
|
170
175
|
case type.to_sym
|
171
176
|
when :Time
|
172
177
|
Time.parse(value)
|
@@ -201,7 +206,7 @@ module EmassClient
|
|
201
206
|
else # model
|
202
207
|
# models (e.g. Pet) or oneOf
|
203
208
|
klass = EmassClient.const_get(type)
|
204
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
209
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
210
|
end
|
206
211
|
end
|
207
212
|
|
@@ -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
|
|
@@ -30,9 +30,14 @@ module EmassClient
|
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
33
|
+
# Returns attribute mapping this model knows about
|
34
|
+
def self.acceptable_attribute_map
|
35
|
+
attribute_map
|
36
|
+
end
|
37
|
+
|
33
38
|
# Returns all the JSON keys this model knows about
|
34
39
|
def self.acceptable_attributes
|
35
|
-
|
40
|
+
acceptable_attribute_map.values
|
36
41
|
end
|
37
42
|
|
38
43
|
# Attribute type mapping.
|
@@ -58,9 +63,10 @@ module EmassClient
|
|
58
63
|
end
|
59
64
|
|
60
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
61
67
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
-
if (!
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Users`. Please check the name to make sure it's valid. List of attributes: " +
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::Users`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
64
70
|
end
|
65
71
|
h[k.to_sym] = v
|
66
72
|
}
|
@@ -81,6 +87,7 @@ module EmassClient
|
|
81
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
82
88
|
# @return Array for valid properties with the reasons
|
83
89
|
def list_invalid_properties
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
84
91
|
invalid_properties = Array.new
|
85
92
|
invalid_properties
|
86
93
|
end
|
@@ -88,6 +95,7 @@ module EmassClient
|
|
88
95
|
# Check to see if the all the properties in the model are valid
|
89
96
|
# @return true if the model is valid
|
90
97
|
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
91
99
|
true
|
92
100
|
end
|
93
101
|
|
@@ -117,37 +125,30 @@ module EmassClient
|
|
117
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
118
126
|
# @return [Object] Returns the model itself
|
119
127
|
def self.build_from_hash(attributes)
|
120
|
-
new.build_from_hash(attributes)
|
121
|
-
end
|
122
|
-
|
123
|
-
# Builds the object from hash
|
124
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
-
# @return [Object] Returns the model itself
|
126
|
-
def build_from_hash(attributes)
|
127
128
|
return nil unless attributes.is_a?(Hash)
|
128
129
|
attributes = attributes.transform_keys(&:to_sym)
|
129
|
-
|
130
|
-
|
131
|
-
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
132
134
|
elsif type =~ /\AArray<(.*)>/i
|
133
135
|
# check to ensure the input is an array given that the attribute
|
134
136
|
# is documented as an array but the input is not
|
135
|
-
if attributes[
|
136
|
-
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
137
139
|
end
|
138
|
-
elsif !attributes[
|
139
|
-
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
140
142
|
end
|
141
143
|
end
|
142
|
-
|
143
|
-
self
|
144
|
+
new(transformed_hash)
|
144
145
|
end
|
145
146
|
|
146
147
|
# Deserializes the data based on type
|
147
148
|
# @param string type Data type
|
148
149
|
# @param string value Value to be deserialized
|
149
150
|
# @return [Object] Deserialized data
|
150
|
-
def _deserialize(type, value)
|
151
|
+
def self._deserialize(type, value)
|
151
152
|
case type.to_sym
|
152
153
|
when :Time
|
153
154
|
Time.parse(value)
|
@@ -182,7 +183,7 @@ module EmassClient
|
|
182
183
|
else # model
|
183
184
|
# models (e.g. Pet) or oneOf
|
184
185
|
klass = EmassClient.const_get(type)
|
185
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
187
|
end
|
187
188
|
end
|
188
189
|
|
@@ -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
|
|
@@ -44,9 +44,14 @@ module EmassClient
|
|
44
44
|
}
|
45
45
|
end
|
46
46
|
|
47
|
+
# Returns attribute mapping this model knows about
|
48
|
+
def self.acceptable_attribute_map
|
49
|
+
attribute_map
|
50
|
+
end
|
51
|
+
|
47
52
|
# Returns all the JSON keys this model knows about
|
48
53
|
def self.acceptable_attributes
|
49
|
-
|
54
|
+
acceptable_attribute_map.values
|
50
55
|
end
|
51
56
|
|
52
57
|
# Attribute type mapping.
|
@@ -81,9 +86,10 @@ module EmassClient
|
|
81
86
|
end
|
82
87
|
|
83
88
|
# check to see if the attribute exists and convert string to symbol for hash key
|
89
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
84
90
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
85
|
-
if (!
|
86
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::WorkflowDefinitionGet`. Please check the name to make sure it's valid. List of attributes: " +
|
91
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::WorkflowDefinitionGet`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
87
93
|
end
|
88
94
|
h[k.to_sym] = v
|
89
95
|
}
|
@@ -118,6 +124,7 @@ module EmassClient
|
|
118
124
|
# Show invalid properties with the reasons. Usually used together with valid?
|
119
125
|
# @return Array for valid properties with the reasons
|
120
126
|
def list_invalid_properties
|
127
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
121
128
|
invalid_properties = Array.new
|
122
129
|
invalid_properties
|
123
130
|
end
|
@@ -125,6 +132,7 @@ module EmassClient
|
|
125
132
|
# Check to see if the all the properties in the model are valid
|
126
133
|
# @return true if the model is valid
|
127
134
|
def valid?
|
135
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
128
136
|
true
|
129
137
|
end
|
130
138
|
|
@@ -157,37 +165,30 @@ module EmassClient
|
|
157
165
|
# @param [Hash] attributes Model attributes in the form of hash
|
158
166
|
# @return [Object] Returns the model itself
|
159
167
|
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
168
|
return nil unless attributes.is_a?(Hash)
|
168
169
|
attributes = attributes.transform_keys(&:to_sym)
|
169
|
-
|
170
|
-
|
171
|
-
|
170
|
+
transformed_hash = {}
|
171
|
+
openapi_types.each_pair do |key, type|
|
172
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
173
|
+
transformed_hash["#{key}"] = nil
|
172
174
|
elsif type =~ /\AArray<(.*)>/i
|
173
175
|
# check to ensure the input is an array given that the attribute
|
174
176
|
# is documented as an array but the input is not
|
175
|
-
if attributes[
|
176
|
-
|
177
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
178
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
177
179
|
end
|
178
|
-
elsif !attributes[
|
179
|
-
|
180
|
+
elsif !attributes[attribute_map[key]].nil?
|
181
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
180
182
|
end
|
181
183
|
end
|
182
|
-
|
183
|
-
self
|
184
|
+
new(transformed_hash)
|
184
185
|
end
|
185
186
|
|
186
187
|
# Deserializes the data based on type
|
187
188
|
# @param string type Data type
|
188
189
|
# @param string value Value to be deserialized
|
189
190
|
# @return [Object] Deserialized data
|
190
|
-
def _deserialize(type, value)
|
191
|
+
def self._deserialize(type, value)
|
191
192
|
case type.to_sym
|
192
193
|
when :Time
|
193
194
|
Time.parse(value)
|
@@ -222,7 +223,7 @@ module EmassClient
|
|
222
223
|
else # model
|
223
224
|
# models (e.g. Pet) or oneOf
|
224
225
|
klass = EmassClient.const_get(type)
|
225
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
227
|
end
|
227
228
|
end
|
228
229
|
|
@@ -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::WorkflowDefinitionResponseGet`. 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::WorkflowDefinitionResponseGet`. 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
|
|