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
@@ -0,0 +1,241 @@
|
|
1
|
+
=begin
|
2
|
+
#Enterprise Mission Assurance Support Service (eMASS)
|
3
|
+
|
4
|
+
#The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3.22
|
7
|
+
Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.12.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module EmassClient
|
17
|
+
class PoamIds
|
18
|
+
# [Required] Unique eMASS system identifier.
|
19
|
+
attr_accessor :system_id
|
20
|
+
|
21
|
+
# [Required] Unique item identifier
|
22
|
+
attr_accessor :poam_id
|
23
|
+
|
24
|
+
# [Required] Globally unique identifier for individual POA&M Items, seen on the front-end as ID.
|
25
|
+
attr_accessor :display_poam_id
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'system_id' => :'systemId',
|
31
|
+
:'poam_id' => :'poamId',
|
32
|
+
:'display_poam_id' => :'displayPoamId'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns attribute mapping this model knows about
|
37
|
+
def self.acceptable_attribute_map
|
38
|
+
attribute_map
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
acceptable_attribute_map.values
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'system_id' => :'Integer',
|
50
|
+
:'poam_id' => :'Integer',
|
51
|
+
:'display_poam_id' => :'Integer'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamIds` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamIds`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'system_id')
|
78
|
+
self.system_id = attributes[:'system_id']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'poam_id')
|
82
|
+
self.poam_id = attributes[:'poam_id']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'display_poam_id')
|
86
|
+
self.display_poam_id = attributes[:'display_poam_id']
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
91
|
+
# @return Array for valid properties with the reasons
|
92
|
+
def list_invalid_properties
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
94
|
+
invalid_properties = Array.new
|
95
|
+
invalid_properties
|
96
|
+
end
|
97
|
+
|
98
|
+
# Check to see if the all the properties in the model are valid
|
99
|
+
# @return true if the model is valid
|
100
|
+
def valid?
|
101
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
102
|
+
true
|
103
|
+
end
|
104
|
+
|
105
|
+
# Checks equality by comparing each attribute.
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def ==(o)
|
108
|
+
return true if self.equal?(o)
|
109
|
+
self.class == o.class &&
|
110
|
+
system_id == o.system_id &&
|
111
|
+
poam_id == o.poam_id &&
|
112
|
+
display_poam_id == o.display_poam_id
|
113
|
+
end
|
114
|
+
|
115
|
+
# @see the `==` method
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def eql?(o)
|
118
|
+
self == o
|
119
|
+
end
|
120
|
+
|
121
|
+
# Calculates hash code according to all attributes.
|
122
|
+
# @return [Integer] Hash code
|
123
|
+
def hash
|
124
|
+
[system_id, poam_id, display_poam_id].hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# Builds the object from hash
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
# @return [Object] Returns the model itself
|
130
|
+
def self.build_from_hash(attributes)
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
133
|
+
transformed_hash = {}
|
134
|
+
openapi_types.each_pair do |key, type|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = nil
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
142
|
+
end
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
145
|
+
end
|
146
|
+
end
|
147
|
+
new(transformed_hash)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Deserializes the data based on type
|
151
|
+
# @param string type Data type
|
152
|
+
# @param string value Value to be deserialized
|
153
|
+
# @return [Object] Deserialized data
|
154
|
+
def self._deserialize(type, value)
|
155
|
+
case type.to_sym
|
156
|
+
when :Time
|
157
|
+
Time.parse(value)
|
158
|
+
when :Date
|
159
|
+
Date.parse(value)
|
160
|
+
when :String
|
161
|
+
value.to_s
|
162
|
+
when :Integer
|
163
|
+
value.to_i
|
164
|
+
when :Float
|
165
|
+
value.to_f
|
166
|
+
when :Boolean
|
167
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
168
|
+
true
|
169
|
+
else
|
170
|
+
false
|
171
|
+
end
|
172
|
+
when :Object
|
173
|
+
# generic object (usually a Hash), return directly
|
174
|
+
value
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
178
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each do |k, v|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
else # model
|
187
|
+
# models (e.g. Pet) or oneOf
|
188
|
+
klass = EmassClient.const_get(type)
|
189
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the string representation of the object
|
194
|
+
# @return [String] String presentation of the object
|
195
|
+
def to_s
|
196
|
+
to_hash.to_s
|
197
|
+
end
|
198
|
+
|
199
|
+
# to_body is an alias to to_hash (backward compatibility)
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_body
|
202
|
+
to_hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the object in the form of hash
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_hash
|
208
|
+
hash = {}
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
210
|
+
value = self.send(attr)
|
211
|
+
if value.nil?
|
212
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
213
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
214
|
+
end
|
215
|
+
|
216
|
+
hash[param] = _to_hash(value)
|
217
|
+
end
|
218
|
+
hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Outputs non-array value in the form of hash
|
222
|
+
# For object, use to_hash. Otherwise, just return the value
|
223
|
+
# @param [Object] value Any valid value
|
224
|
+
# @return [Hash] Returns the value in the form of hash
|
225
|
+
def _to_hash(value)
|
226
|
+
if value.is_a?(Array)
|
227
|
+
value.compact.map { |v| _to_hash(v) }
|
228
|
+
elsif value.is_a?(Hash)
|
229
|
+
{}.tap do |hash|
|
230
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
231
|
+
end
|
232
|
+
elsif value.respond_to? :to_hash
|
233
|
+
value.to_hash
|
234
|
+
else
|
235
|
+
value
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
240
|
+
|
241
|
+
end
|
@@ -0,0 +1,409 @@
|
|
1
|
+
=begin
|
2
|
+
#Enterprise Mission Assurance Support Service (eMASS)
|
3
|
+
|
4
|
+
#The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3.22
|
7
|
+
Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.12.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module EmassClient
|
17
|
+
class PoamOptionalFields
|
18
|
+
# [Optional] Unique identifier external to the eMASS application for use with associating POA&Ms. 100 Characters.
|
19
|
+
attr_accessor :external_uid
|
20
|
+
|
21
|
+
# [Optional] Control acronym associated with the POA&M Item. NIST SP 800-53 Revision 4 defined.
|
22
|
+
attr_accessor :control_acronym
|
23
|
+
|
24
|
+
# [Optional] The Security Control Assessment Procedure being associated with the POA&M Item.
|
25
|
+
attr_accessor :assessment_procedure
|
26
|
+
|
27
|
+
# [Optional] Security Checks that are associated with the POA&M.
|
28
|
+
attr_accessor :security_checks
|
29
|
+
|
30
|
+
# [Optional] Scan vulnerability ratting Values include the following options: (Very Low, Low, Moderate,High,Very High)
|
31
|
+
attr_accessor :raw_severity
|
32
|
+
|
33
|
+
# [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)
|
34
|
+
attr_accessor :relevance_of_threat
|
35
|
+
|
36
|
+
# [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)
|
37
|
+
attr_accessor :likelihood
|
38
|
+
|
39
|
+
# [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)
|
40
|
+
attr_accessor :impact
|
41
|
+
|
42
|
+
# [Optional] Include description of Security Control's impact.
|
43
|
+
attr_accessor :impact_description
|
44
|
+
|
45
|
+
# [Optional] Values include the following options (Very Low, Low, Moderate,High,Very High)
|
46
|
+
attr_accessor :residual_risk_level
|
47
|
+
|
48
|
+
# [Optional] Include recommendations. Character Limit = 2,000.
|
49
|
+
attr_accessor :recommendations
|
50
|
+
|
51
|
+
# [Optional] Include mitigation explanation. 2000 Characters.
|
52
|
+
attr_accessor :mitigations
|
53
|
+
|
54
|
+
# [Optional] Indicate the risk level expected after any proposed mitigations are implemented. Proposed mitigations should be appropriately documented as POA&M milestones. Navy only.
|
55
|
+
attr_accessor :resulting_residual_risk_level_after_proposed_mitigations
|
56
|
+
|
57
|
+
# [Optional] A predisposing condition is a condition existing within an organization, a mission or business process, enterprise architecture, information system/PIT, or environment of operation, which affects (i.e., increases or decreases) the likelihood that threat events, once initiated, result in adverse impacts. Navy only.
|
58
|
+
attr_accessor :predisposing_conditions
|
59
|
+
|
60
|
+
# [Optional] Describe the identified threat(s) and relevance to the information system. Navy only.
|
61
|
+
attr_accessor :threat_description
|
62
|
+
|
63
|
+
# [Optional] List any affected devices by hostname. If all devices in the information system are affected, state 'system' or 'all'. Navy only
|
64
|
+
attr_accessor :devices_affected
|
65
|
+
|
66
|
+
class EnumAttributeValidator
|
67
|
+
attr_reader :datatype
|
68
|
+
attr_reader :allowable_values
|
69
|
+
|
70
|
+
def initialize(datatype, allowable_values)
|
71
|
+
@allowable_values = allowable_values.map do |value|
|
72
|
+
case datatype.to_s
|
73
|
+
when /Integer/i
|
74
|
+
value.to_i
|
75
|
+
when /Float/i
|
76
|
+
value.to_f
|
77
|
+
else
|
78
|
+
value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def valid?(value)
|
84
|
+
!value || allowable_values.include?(value)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
89
|
+
def self.attribute_map
|
90
|
+
{
|
91
|
+
:'external_uid' => :'externalUid',
|
92
|
+
:'control_acronym' => :'controlAcronym',
|
93
|
+
:'assessment_procedure' => :'assessmentProcedure',
|
94
|
+
:'security_checks' => :'securityChecks',
|
95
|
+
:'raw_severity' => :'rawSeverity',
|
96
|
+
:'relevance_of_threat' => :'relevanceOfThreat',
|
97
|
+
:'likelihood' => :'likelihood',
|
98
|
+
:'impact' => :'impact',
|
99
|
+
:'impact_description' => :'impactDescription',
|
100
|
+
:'residual_risk_level' => :'residualRiskLevel',
|
101
|
+
:'recommendations' => :'recommendations',
|
102
|
+
:'mitigations' => :'mitigations',
|
103
|
+
:'resulting_residual_risk_level_after_proposed_mitigations' => :'resultingResidualRiskLevelAfterProposedMitigations',
|
104
|
+
:'predisposing_conditions' => :'predisposingConditions',
|
105
|
+
:'threat_description' => :'threatDescription',
|
106
|
+
:'devices_affected' => :'devicesAffected'
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
# Returns attribute mapping this model knows about
|
111
|
+
def self.acceptable_attribute_map
|
112
|
+
attribute_map
|
113
|
+
end
|
114
|
+
|
115
|
+
# Returns all the JSON keys this model knows about
|
116
|
+
def self.acceptable_attributes
|
117
|
+
acceptable_attribute_map.values
|
118
|
+
end
|
119
|
+
|
120
|
+
# Attribute type mapping.
|
121
|
+
def self.openapi_types
|
122
|
+
{
|
123
|
+
:'external_uid' => :'String',
|
124
|
+
:'control_acronym' => :'String',
|
125
|
+
:'assessment_procedure' => :'String',
|
126
|
+
:'security_checks' => :'String',
|
127
|
+
:'raw_severity' => :'String',
|
128
|
+
:'relevance_of_threat' => :'String',
|
129
|
+
:'likelihood' => :'String',
|
130
|
+
:'impact' => :'String',
|
131
|
+
:'impact_description' => :'String',
|
132
|
+
:'residual_risk_level' => :'String',
|
133
|
+
:'recommendations' => :'String',
|
134
|
+
:'mitigations' => :'String',
|
135
|
+
:'resulting_residual_risk_level_after_proposed_mitigations' => :'String',
|
136
|
+
:'predisposing_conditions' => :'String',
|
137
|
+
:'threat_description' => :'String',
|
138
|
+
:'devices_affected' => :'String'
|
139
|
+
}
|
140
|
+
end
|
141
|
+
|
142
|
+
# List of attributes with nullable: true
|
143
|
+
def self.openapi_nullable
|
144
|
+
Set.new([
|
145
|
+
:'resulting_residual_risk_level_after_proposed_mitigations',
|
146
|
+
:'predisposing_conditions',
|
147
|
+
:'threat_description',
|
148
|
+
:'devices_affected'
|
149
|
+
])
|
150
|
+
end
|
151
|
+
|
152
|
+
# Initializes the object
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
def initialize(attributes = {})
|
155
|
+
if (!attributes.is_a?(Hash))
|
156
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::PoamOptionalFields` initialize method"
|
157
|
+
end
|
158
|
+
|
159
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
160
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
161
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
162
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
163
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::PoamOptionalFields`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
164
|
+
end
|
165
|
+
h[k.to_sym] = v
|
166
|
+
}
|
167
|
+
|
168
|
+
if attributes.key?(:'external_uid')
|
169
|
+
self.external_uid = attributes[:'external_uid']
|
170
|
+
end
|
171
|
+
|
172
|
+
if attributes.key?(:'control_acronym')
|
173
|
+
self.control_acronym = attributes[:'control_acronym']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.key?(:'assessment_procedure')
|
177
|
+
self.assessment_procedure = attributes[:'assessment_procedure']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.key?(:'security_checks')
|
181
|
+
self.security_checks = attributes[:'security_checks']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.key?(:'raw_severity')
|
185
|
+
self.raw_severity = attributes[:'raw_severity']
|
186
|
+
end
|
187
|
+
|
188
|
+
if attributes.key?(:'relevance_of_threat')
|
189
|
+
self.relevance_of_threat = attributes[:'relevance_of_threat']
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.key?(:'likelihood')
|
193
|
+
self.likelihood = attributes[:'likelihood']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.key?(:'impact')
|
197
|
+
self.impact = attributes[:'impact']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.key?(:'impact_description')
|
201
|
+
self.impact_description = attributes[:'impact_description']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.key?(:'residual_risk_level')
|
205
|
+
self.residual_risk_level = attributes[:'residual_risk_level']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.key?(:'recommendations')
|
209
|
+
self.recommendations = attributes[:'recommendations']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.key?(:'mitigations')
|
213
|
+
self.mitigations = attributes[:'mitigations']
|
214
|
+
end
|
215
|
+
|
216
|
+
if attributes.key?(:'resulting_residual_risk_level_after_proposed_mitigations')
|
217
|
+
self.resulting_residual_risk_level_after_proposed_mitigations = attributes[:'resulting_residual_risk_level_after_proposed_mitigations']
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.key?(:'predisposing_conditions')
|
221
|
+
self.predisposing_conditions = attributes[:'predisposing_conditions']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.key?(:'threat_description')
|
225
|
+
self.threat_description = attributes[:'threat_description']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'devices_affected')
|
229
|
+
self.devices_affected = attributes[:'devices_affected']
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
234
|
+
# @return Array for valid properties with the reasons
|
235
|
+
def list_invalid_properties
|
236
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
237
|
+
invalid_properties = Array.new
|
238
|
+
invalid_properties
|
239
|
+
end
|
240
|
+
|
241
|
+
# Check to see if the all the properties in the model are valid
|
242
|
+
# @return true if the model is valid
|
243
|
+
def valid?
|
244
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
245
|
+
resulting_residual_risk_level_after_proposed_mitigations_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
246
|
+
return false unless resulting_residual_risk_level_after_proposed_mitigations_validator.valid?(@resulting_residual_risk_level_after_proposed_mitigations)
|
247
|
+
true
|
248
|
+
end
|
249
|
+
|
250
|
+
# Custom attribute writer method checking allowed values (enum).
|
251
|
+
# @param [Object] resulting_residual_risk_level_after_proposed_mitigations Object to be assigned
|
252
|
+
def resulting_residual_risk_level_after_proposed_mitigations=(resulting_residual_risk_level_after_proposed_mitigations)
|
253
|
+
validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
|
254
|
+
unless validator.valid?(resulting_residual_risk_level_after_proposed_mitigations)
|
255
|
+
fail ArgumentError, "invalid value for \"resulting_residual_risk_level_after_proposed_mitigations\", must be one of #{validator.allowable_values}."
|
256
|
+
end
|
257
|
+
@resulting_residual_risk_level_after_proposed_mitigations = resulting_residual_risk_level_after_proposed_mitigations
|
258
|
+
end
|
259
|
+
|
260
|
+
# Checks equality by comparing each attribute.
|
261
|
+
# @param [Object] Object to be compared
|
262
|
+
def ==(o)
|
263
|
+
return true if self.equal?(o)
|
264
|
+
self.class == o.class &&
|
265
|
+
external_uid == o.external_uid &&
|
266
|
+
control_acronym == o.control_acronym &&
|
267
|
+
assessment_procedure == o.assessment_procedure &&
|
268
|
+
security_checks == o.security_checks &&
|
269
|
+
raw_severity == o.raw_severity &&
|
270
|
+
relevance_of_threat == o.relevance_of_threat &&
|
271
|
+
likelihood == o.likelihood &&
|
272
|
+
impact == o.impact &&
|
273
|
+
impact_description == o.impact_description &&
|
274
|
+
residual_risk_level == o.residual_risk_level &&
|
275
|
+
recommendations == o.recommendations &&
|
276
|
+
mitigations == o.mitigations &&
|
277
|
+
resulting_residual_risk_level_after_proposed_mitigations == o.resulting_residual_risk_level_after_proposed_mitigations &&
|
278
|
+
predisposing_conditions == o.predisposing_conditions &&
|
279
|
+
threat_description == o.threat_description &&
|
280
|
+
devices_affected == o.devices_affected
|
281
|
+
end
|
282
|
+
|
283
|
+
# @see the `==` method
|
284
|
+
# @param [Object] Object to be compared
|
285
|
+
def eql?(o)
|
286
|
+
self == o
|
287
|
+
end
|
288
|
+
|
289
|
+
# Calculates hash code according to all attributes.
|
290
|
+
# @return [Integer] Hash code
|
291
|
+
def hash
|
292
|
+
[external_uid, control_acronym, assessment_procedure, security_checks, raw_severity, relevance_of_threat, likelihood, impact, impact_description, residual_risk_level, recommendations, mitigations, resulting_residual_risk_level_after_proposed_mitigations, predisposing_conditions, threat_description, devices_affected].hash
|
293
|
+
end
|
294
|
+
|
295
|
+
# Builds the object from hash
|
296
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
297
|
+
# @return [Object] Returns the model itself
|
298
|
+
def self.build_from_hash(attributes)
|
299
|
+
return nil unless attributes.is_a?(Hash)
|
300
|
+
attributes = attributes.transform_keys(&:to_sym)
|
301
|
+
transformed_hash = {}
|
302
|
+
openapi_types.each_pair do |key, type|
|
303
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
304
|
+
transformed_hash["#{key}"] = nil
|
305
|
+
elsif type =~ /\AArray<(.*)>/i
|
306
|
+
# check to ensure the input is an array given that the attribute
|
307
|
+
# is documented as an array but the input is not
|
308
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
309
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
310
|
+
end
|
311
|
+
elsif !attributes[attribute_map[key]].nil?
|
312
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
313
|
+
end
|
314
|
+
end
|
315
|
+
new(transformed_hash)
|
316
|
+
end
|
317
|
+
|
318
|
+
# Deserializes the data based on type
|
319
|
+
# @param string type Data type
|
320
|
+
# @param string value Value to be deserialized
|
321
|
+
# @return [Object] Deserialized data
|
322
|
+
def self._deserialize(type, value)
|
323
|
+
case type.to_sym
|
324
|
+
when :Time
|
325
|
+
Time.parse(value)
|
326
|
+
when :Date
|
327
|
+
Date.parse(value)
|
328
|
+
when :String
|
329
|
+
value.to_s
|
330
|
+
when :Integer
|
331
|
+
value.to_i
|
332
|
+
when :Float
|
333
|
+
value.to_f
|
334
|
+
when :Boolean
|
335
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
336
|
+
true
|
337
|
+
else
|
338
|
+
false
|
339
|
+
end
|
340
|
+
when :Object
|
341
|
+
# generic object (usually a Hash), return directly
|
342
|
+
value
|
343
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
344
|
+
inner_type = Regexp.last_match[:inner_type]
|
345
|
+
value.map { |v| _deserialize(inner_type, v) }
|
346
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
347
|
+
k_type = Regexp.last_match[:k_type]
|
348
|
+
v_type = Regexp.last_match[:v_type]
|
349
|
+
{}.tap do |hash|
|
350
|
+
value.each do |k, v|
|
351
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
352
|
+
end
|
353
|
+
end
|
354
|
+
else # model
|
355
|
+
# models (e.g. Pet) or oneOf
|
356
|
+
klass = EmassClient.const_get(type)
|
357
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
# Returns the string representation of the object
|
362
|
+
# @return [String] String presentation of the object
|
363
|
+
def to_s
|
364
|
+
to_hash.to_s
|
365
|
+
end
|
366
|
+
|
367
|
+
# to_body is an alias to to_hash (backward compatibility)
|
368
|
+
# @return [Hash] Returns the object in the form of hash
|
369
|
+
def to_body
|
370
|
+
to_hash
|
371
|
+
end
|
372
|
+
|
373
|
+
# Returns the object in the form of hash
|
374
|
+
# @return [Hash] Returns the object in the form of hash
|
375
|
+
def to_hash
|
376
|
+
hash = {}
|
377
|
+
self.class.attribute_map.each_pair do |attr, param|
|
378
|
+
value = self.send(attr)
|
379
|
+
if value.nil?
|
380
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
381
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
382
|
+
end
|
383
|
+
|
384
|
+
hash[param] = _to_hash(value)
|
385
|
+
end
|
386
|
+
hash
|
387
|
+
end
|
388
|
+
|
389
|
+
# Outputs non-array value in the form of hash
|
390
|
+
# For object, use to_hash. Otherwise, just return the value
|
391
|
+
# @param [Object] value Any valid value
|
392
|
+
# @return [Hash] Returns the value in the form of hash
|
393
|
+
def _to_hash(value)
|
394
|
+
if value.is_a?(Array)
|
395
|
+
value.compact.map { |v| _to_hash(v) }
|
396
|
+
elsif value.is_a?(Hash)
|
397
|
+
{}.tap do |hash|
|
398
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
399
|
+
end
|
400
|
+
elsif value.respond_to? :to_hash
|
401
|
+
value.to_hash
|
402
|
+
else
|
403
|
+
value
|
404
|
+
end
|
405
|
+
end
|
406
|
+
|
407
|
+
end
|
408
|
+
|
409
|
+
end
|