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,222 @@
|
|
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 MilestonesFields
|
18
|
+
attr_accessor :milestones
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'milestones' => :'milestones'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns attribute mapping this model knows about
|
28
|
+
def self.acceptable_attribute_map
|
29
|
+
attribute_map
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
acceptable_attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'milestones' => :'Array<MilestonesGet>'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# List of attributes with nullable: true
|
45
|
+
def self.openapi_nullable
|
46
|
+
Set.new([
|
47
|
+
])
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
if (!attributes.is_a?(Hash))
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesFields` initialize method"
|
55
|
+
end
|
56
|
+
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesFields`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'milestones')
|
67
|
+
if (value = attributes[:'milestones']).is_a?(Array)
|
68
|
+
self.milestones = value
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
77
|
+
invalid_properties = Array.new
|
78
|
+
invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
milestones == o.milestones
|
94
|
+
end
|
95
|
+
|
96
|
+
# @see the `==` method
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def eql?(o)
|
99
|
+
self == o
|
100
|
+
end
|
101
|
+
|
102
|
+
# Calculates hash code according to all attributes.
|
103
|
+
# @return [Integer] Hash code
|
104
|
+
def hash
|
105
|
+
[milestones].hash
|
106
|
+
end
|
107
|
+
|
108
|
+
# Builds the object from hash
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @return [Object] Returns the model itself
|
111
|
+
def self.build_from_hash(attributes)
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
114
|
+
transformed_hash = {}
|
115
|
+
openapi_types.each_pair do |key, type|
|
116
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
117
|
+
transformed_hash["#{key}"] = nil
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
122
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
123
|
+
end
|
124
|
+
elsif !attributes[attribute_map[key]].nil?
|
125
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
126
|
+
end
|
127
|
+
end
|
128
|
+
new(transformed_hash)
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserializes the data based on type
|
132
|
+
# @param string type Data type
|
133
|
+
# @param string value Value to be deserialized
|
134
|
+
# @return [Object] Deserialized data
|
135
|
+
def self._deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :Time
|
138
|
+
Time.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :Boolean
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
# generic object (usually a Hash), return directly
|
155
|
+
value
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
162
|
+
{}.tap do |hash|
|
163
|
+
value.each do |k, v|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else # model
|
168
|
+
# models (e.g. Pet) or oneOf
|
169
|
+
klass = EmassClient.const_get(type)
|
170
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the string representation of the object
|
175
|
+
# @return [String] String presentation of the object
|
176
|
+
def to_s
|
177
|
+
to_hash.to_s
|
178
|
+
end
|
179
|
+
|
180
|
+
# to_body is an alias to to_hash (backward compatibility)
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
182
|
+
def to_body
|
183
|
+
to_hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the object in the form of hash
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_hash
|
189
|
+
hash = {}
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
191
|
+
value = self.send(attr)
|
192
|
+
if value.nil?
|
193
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
195
|
+
end
|
196
|
+
|
197
|
+
hash[param] = _to_hash(value)
|
198
|
+
end
|
199
|
+
hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Outputs non-array value in the form of hash
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
204
|
+
# @param [Object] value Any valid value
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
206
|
+
def _to_hash(value)
|
207
|
+
if value.is_a?(Array)
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
209
|
+
elsif value.is_a?(Hash)
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
212
|
+
end
|
213
|
+
elsif value.respond_to? :to_hash
|
214
|
+
value.to_hash
|
215
|
+
else
|
216
|
+
value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The
|
4
|
+
#The eMASS Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The eMASS API provides an interface for application to communicate eMASS Services. For information on how to register and use the eMASS API reference the [eMASS API Getting Started](eMASSGettingStarted.md). Additional information about eMASS can be obtain by contacting the National Industrial Security Program (NISP). Points of Contact are:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
7
|
-
Contact: disa.
|
6
|
+
The version of the OpenAPI document: v3.22
|
7
|
+
Contact: disa.global.servicedesk.mbx.ma-ticket-request@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.12.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -18,10 +18,10 @@ module EmassClient
|
|
18
18
|
# [Required] Unique eMASS system identifier.
|
19
19
|
attr_accessor :system_id
|
20
20
|
|
21
|
-
# [Required] Unique item identifier
|
21
|
+
# [Required] Unique item identifier.
|
22
22
|
attr_accessor :milestone_id
|
23
23
|
|
24
|
-
# [Required] Unique item identifier
|
24
|
+
# [Required] Unique item identifier.
|
25
25
|
attr_accessor :poam_id
|
26
26
|
|
27
27
|
# [Required] Include milestone description.
|
@@ -30,9 +30,15 @@ module EmassClient
|
|
30
30
|
# [Required] Required for ongoing and completed POA&M items. Unix time format.
|
31
31
|
attr_accessor :scheduled_completion_date
|
32
32
|
|
33
|
-
# [Read-Only] Values include the following options: (Not Approved,Under Review,Approved)
|
33
|
+
# [Read-Only] Values include the following options: (Not Approved,Under Review,Approved).
|
34
34
|
attr_accessor :review_status
|
35
35
|
|
36
|
+
# [Read-Only] Last, first name of the user that created the milestone.
|
37
|
+
attr_accessor :created_by
|
38
|
+
|
39
|
+
# [Read-Only] Timestamp representing when the milestone was entered into the database.
|
40
|
+
attr_accessor :created_date
|
41
|
+
|
36
42
|
class EnumAttributeValidator
|
37
43
|
attr_reader :datatype
|
38
44
|
attr_reader :allowable_values
|
@@ -63,13 +69,20 @@ module EmassClient
|
|
63
69
|
:'poam_id' => :'poamId',
|
64
70
|
:'description' => :'description',
|
65
71
|
:'scheduled_completion_date' => :'scheduledCompletionDate',
|
66
|
-
:'review_status' => :'reviewStatus'
|
72
|
+
:'review_status' => :'reviewStatus',
|
73
|
+
:'created_by' => :'createdBy',
|
74
|
+
:'created_date' => :'createdDate'
|
67
75
|
}
|
68
76
|
end
|
69
77
|
|
78
|
+
# Returns attribute mapping this model knows about
|
79
|
+
def self.acceptable_attribute_map
|
80
|
+
attribute_map
|
81
|
+
end
|
82
|
+
|
70
83
|
# Returns all the JSON keys this model knows about
|
71
84
|
def self.acceptable_attributes
|
72
|
-
|
85
|
+
acceptable_attribute_map.values
|
73
86
|
end
|
74
87
|
|
75
88
|
# Attribute type mapping.
|
@@ -80,13 +93,17 @@ module EmassClient
|
|
80
93
|
:'poam_id' => :'Integer',
|
81
94
|
:'description' => :'String',
|
82
95
|
:'scheduled_completion_date' => :'Integer',
|
83
|
-
:'review_status' => :'String'
|
96
|
+
:'review_status' => :'String',
|
97
|
+
:'created_by' => :'String',
|
98
|
+
:'created_date' => :'Integer'
|
84
99
|
}
|
85
100
|
end
|
86
101
|
|
87
102
|
# List of attributes with nullable: true
|
88
103
|
def self.openapi_nullable
|
89
104
|
Set.new([
|
105
|
+
:'review_status',
|
106
|
+
:'created_by',
|
90
107
|
])
|
91
108
|
end
|
92
109
|
|
@@ -98,9 +115,10 @@ module EmassClient
|
|
98
115
|
end
|
99
116
|
|
100
117
|
# check to see if the attribute exists and convert string to symbol for hash key
|
118
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
101
119
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
102
|
-
if (!
|
103
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesGet`. Please check the name to make sure it's valid. List of attributes: " +
|
120
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
121
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesGet`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
104
122
|
end
|
105
123
|
h[k.to_sym] = v
|
106
124
|
}
|
@@ -128,11 +146,20 @@ module EmassClient
|
|
128
146
|
if attributes.key?(:'review_status')
|
129
147
|
self.review_status = attributes[:'review_status']
|
130
148
|
end
|
149
|
+
|
150
|
+
if attributes.key?(:'created_by')
|
151
|
+
self.created_by = attributes[:'created_by']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'created_date')
|
155
|
+
self.created_date = attributes[:'created_date']
|
156
|
+
end
|
131
157
|
end
|
132
158
|
|
133
159
|
# Show invalid properties with the reasons. Usually used together with valid?
|
134
160
|
# @return Array for valid properties with the reasons
|
135
161
|
def list_invalid_properties
|
162
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
136
163
|
invalid_properties = Array.new
|
137
164
|
invalid_properties
|
138
165
|
end
|
@@ -140,6 +167,7 @@ module EmassClient
|
|
140
167
|
# Check to see if the all the properties in the model are valid
|
141
168
|
# @return true if the model is valid
|
142
169
|
def valid?
|
170
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
143
171
|
review_status_validator = EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved", "unknown_default_open_api"])
|
144
172
|
return false unless review_status_validator.valid?(@review_status)
|
145
173
|
true
|
@@ -165,7 +193,9 @@ module EmassClient
|
|
165
193
|
poam_id == o.poam_id &&
|
166
194
|
description == o.description &&
|
167
195
|
scheduled_completion_date == o.scheduled_completion_date &&
|
168
|
-
review_status == o.review_status
|
196
|
+
review_status == o.review_status &&
|
197
|
+
created_by == o.created_by &&
|
198
|
+
created_date == o.created_date
|
169
199
|
end
|
170
200
|
|
171
201
|
# @see the `==` method
|
@@ -177,44 +207,37 @@ module EmassClient
|
|
177
207
|
# Calculates hash code according to all attributes.
|
178
208
|
# @return [Integer] Hash code
|
179
209
|
def hash
|
180
|
-
[system_id, milestone_id, poam_id, description, scheduled_completion_date, review_status].hash
|
210
|
+
[system_id, milestone_id, poam_id, description, scheduled_completion_date, review_status, created_by, created_date].hash
|
181
211
|
end
|
182
212
|
|
183
213
|
# Builds the object from hash
|
184
214
|
# @param [Hash] attributes Model attributes in the form of hash
|
185
215
|
# @return [Object] Returns the model itself
|
186
216
|
def self.build_from_hash(attributes)
|
187
|
-
new.build_from_hash(attributes)
|
188
|
-
end
|
189
|
-
|
190
|
-
# Builds the object from hash
|
191
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
192
|
-
# @return [Object] Returns the model itself
|
193
|
-
def build_from_hash(attributes)
|
194
217
|
return nil unless attributes.is_a?(Hash)
|
195
218
|
attributes = attributes.transform_keys(&:to_sym)
|
196
|
-
|
197
|
-
|
198
|
-
|
219
|
+
transformed_hash = {}
|
220
|
+
openapi_types.each_pair do |key, type|
|
221
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
222
|
+
transformed_hash["#{key}"] = nil
|
199
223
|
elsif type =~ /\AArray<(.*)>/i
|
200
224
|
# check to ensure the input is an array given that the attribute
|
201
225
|
# is documented as an array but the input is not
|
202
|
-
if attributes[
|
203
|
-
|
226
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
227
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
204
228
|
end
|
205
|
-
elsif !attributes[
|
206
|
-
|
229
|
+
elsif !attributes[attribute_map[key]].nil?
|
230
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
207
231
|
end
|
208
232
|
end
|
209
|
-
|
210
|
-
self
|
233
|
+
new(transformed_hash)
|
211
234
|
end
|
212
235
|
|
213
236
|
# Deserializes the data based on type
|
214
237
|
# @param string type Data type
|
215
238
|
# @param string value Value to be deserialized
|
216
239
|
# @return [Object] Deserialized data
|
217
|
-
def _deserialize(type, value)
|
240
|
+
def self._deserialize(type, value)
|
218
241
|
case type.to_sym
|
219
242
|
when :Time
|
220
243
|
Time.parse(value)
|
@@ -249,7 +272,7 @@ module EmassClient
|
|
249
272
|
else # model
|
250
273
|
# models (e.g. Pet) or oneOf
|
251
274
|
klass = EmassClient.const_get(type)
|
252
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
275
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
253
276
|
end
|
254
277
|
end
|
255
278
|
|
@@ -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.
|
@@ -76,9 +81,10 @@ module EmassClient
|
|
76
81
|
end
|
77
82
|
|
78
83
|
# check to see if the attribute exists and convert string to symbol for hash key
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
79
85
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
-
if (!
|
81
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesPutPostDelete`. Please check the name to make sure it's valid. List of attributes: " +
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesPutPostDelete`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
82
88
|
end
|
83
89
|
h[k.to_sym] = v
|
84
90
|
}
|
@@ -113,9 +119,14 @@ module EmassClient
|
|
113
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
114
120
|
# @return Array for valid properties with the reasons
|
115
121
|
def list_invalid_properties
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
116
123
|
invalid_properties = Array.new
|
117
|
-
if !@errors.nil? && @errors.length >
|
118
|
-
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to
|
124
|
+
if !@errors.nil? && @errors.length > 25
|
125
|
+
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 25.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if !@errors.nil? && @errors.length < 1
|
129
|
+
invalid_properties.push('invalid value for "errors", number of items must be greater than or equal to 1.')
|
119
130
|
end
|
120
131
|
|
121
132
|
invalid_properties
|
@@ -124,15 +135,21 @@ module EmassClient
|
|
124
135
|
# Check to see if the all the properties in the model are valid
|
125
136
|
# @return true if the model is valid
|
126
137
|
def valid?
|
127
|
-
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
139
|
+
return false if !@errors.nil? && @errors.length > 25
|
140
|
+
return false if !@errors.nil? && @errors.length < 1
|
128
141
|
true
|
129
142
|
end
|
130
143
|
|
131
144
|
# Custom attribute writer method with validation
|
132
145
|
# @param [Object] errors Value to be assigned
|
133
146
|
def errors=(errors)
|
134
|
-
if !errors.nil? && errors.length >
|
135
|
-
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to
|
147
|
+
if !errors.nil? && errors.length > 25
|
148
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 25.'
|
149
|
+
end
|
150
|
+
|
151
|
+
if !errors.nil? && errors.length < 1
|
152
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be greater than or equal to 1.'
|
136
153
|
end
|
137
154
|
|
138
155
|
@errors = errors
|
@@ -167,37 +184,30 @@ module EmassClient
|
|
167
184
|
# @param [Hash] attributes Model attributes in the form of hash
|
168
185
|
# @return [Object] Returns the model itself
|
169
186
|
def self.build_from_hash(attributes)
|
170
|
-
new.build_from_hash(attributes)
|
171
|
-
end
|
172
|
-
|
173
|
-
# Builds the object from hash
|
174
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
175
|
-
# @return [Object] Returns the model itself
|
176
|
-
def build_from_hash(attributes)
|
177
187
|
return nil unless attributes.is_a?(Hash)
|
178
188
|
attributes = attributes.transform_keys(&:to_sym)
|
179
|
-
|
180
|
-
|
181
|
-
|
189
|
+
transformed_hash = {}
|
190
|
+
openapi_types.each_pair do |key, type|
|
191
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
192
|
+
transformed_hash["#{key}"] = nil
|
182
193
|
elsif type =~ /\AArray<(.*)>/i
|
183
194
|
# check to ensure the input is an array given that the attribute
|
184
195
|
# is documented as an array but the input is not
|
185
|
-
if attributes[
|
186
|
-
|
196
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
197
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
187
198
|
end
|
188
|
-
elsif !attributes[
|
189
|
-
|
199
|
+
elsif !attributes[attribute_map[key]].nil?
|
200
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
190
201
|
end
|
191
202
|
end
|
192
|
-
|
193
|
-
self
|
203
|
+
new(transformed_hash)
|
194
204
|
end
|
195
205
|
|
196
206
|
# Deserializes the data based on type
|
197
207
|
# @param string type Data type
|
198
208
|
# @param string value Value to be deserialized
|
199
209
|
# @return [Object] Deserialized data
|
200
|
-
def _deserialize(type, value)
|
210
|
+
def self._deserialize(type, value)
|
201
211
|
case type.to_sym
|
202
212
|
when :Time
|
203
213
|
Time.parse(value)
|
@@ -232,7 +242,7 @@ module EmassClient
|
|
232
242
|
else # model
|
233
243
|
# models (e.g. Pet) or oneOf
|
234
244
|
klass = EmassClient.const_get(type)
|
235
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
245
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
236
246
|
end
|
237
247
|
end
|
238
248
|
|