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
|
|
@@ -29,9 +29,14 @@ module EmassClient
|
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
32
|
+
# Returns attribute mapping this model knows about
|
33
|
+
def self.acceptable_attribute_map
|
34
|
+
attribute_map
|
35
|
+
end
|
36
|
+
|
32
37
|
# Returns all the JSON keys this model knows about
|
33
38
|
def self.acceptable_attributes
|
34
|
-
|
39
|
+
acceptable_attribute_map.values
|
35
40
|
end
|
36
41
|
|
37
42
|
# 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::ConnectivityCcsd`. 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::ConnectivityCcsd`. 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
|
}
|
@@ -77,6 +83,7 @@ module EmassClient
|
|
77
83
|
# Show invalid properties with the reasons. Usually used together with valid?
|
78
84
|
# @return Array for valid properties with the reasons
|
79
85
|
def list_invalid_properties
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
80
87
|
invalid_properties = Array.new
|
81
88
|
invalid_properties
|
82
89
|
end
|
@@ -84,6 +91,7 @@ module EmassClient
|
|
84
91
|
# Check to see if the all the properties in the model are valid
|
85
92
|
# @return true if the model is valid
|
86
93
|
def valid?
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
87
95
|
true
|
88
96
|
end
|
89
97
|
|
@@ -112,37 +120,30 @@ module EmassClient
|
|
112
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
113
121
|
# @return [Object] Returns the model itself
|
114
122
|
def self.build_from_hash(attributes)
|
115
|
-
new.build_from_hash(attributes)
|
116
|
-
end
|
117
|
-
|
118
|
-
# Builds the object from hash
|
119
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
-
# @return [Object] Returns the model itself
|
121
|
-
def build_from_hash(attributes)
|
122
123
|
return nil unless attributes.is_a?(Hash)
|
123
124
|
attributes = attributes.transform_keys(&:to_sym)
|
124
|
-
|
125
|
-
|
126
|
-
|
125
|
+
transformed_hash = {}
|
126
|
+
openapi_types.each_pair do |key, type|
|
127
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = nil
|
127
129
|
elsif type =~ /\AArray<(.*)>/i
|
128
130
|
# check to ensure the input is an array given that the attribute
|
129
131
|
# is documented as an array but the input is not
|
130
|
-
if attributes[
|
131
|
-
|
132
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
133
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
132
134
|
end
|
133
|
-
elsif !attributes[
|
134
|
-
|
135
|
+
elsif !attributes[attribute_map[key]].nil?
|
136
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
135
137
|
end
|
136
138
|
end
|
137
|
-
|
138
|
-
self
|
139
|
+
new(transformed_hash)
|
139
140
|
end
|
140
141
|
|
141
142
|
# Deserializes the data based on type
|
142
143
|
# @param string type Data type
|
143
144
|
# @param string value Value to be deserialized
|
144
145
|
# @return [Object] Deserialized data
|
145
|
-
def _deserialize(type, value)
|
146
|
+
def self._deserialize(type, value)
|
146
147
|
case type.to_sym
|
147
148
|
when :Time
|
148
149
|
Time.parse(value)
|
@@ -177,7 +178,7 @@ module EmassClient
|
|
177
178
|
else # model
|
178
179
|
# models (e.g. Pet) or oneOf
|
179
180
|
klass = EmassClient.const_get(type)
|
180
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
181
182
|
end
|
182
183
|
end
|
183
184
|
|
@@ -0,0 +1,221 @@
|
|
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 ContainerResourcesDeleteBodyInner
|
18
|
+
# [Required] Unique item identifier
|
19
|
+
attr_accessor :container_id
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'container_id' => :'containerId'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns attribute mapping this model knows about
|
29
|
+
def self.acceptable_attribute_map
|
30
|
+
attribute_map
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
acceptable_attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'container_id' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ContainerResourcesDeleteBodyInner` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ContainerResourcesDeleteBodyInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'container_id')
|
68
|
+
self.container_id = attributes[:'container_id']
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
73
|
+
# @return Array for valid properties with the reasons
|
74
|
+
def list_invalid_properties
|
75
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
|
+
invalid_properties = Array.new
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
87
|
+
# Checks equality by comparing each attribute.
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class &&
|
92
|
+
container_id == o.container_id
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[container_id].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
112
|
+
attributes = attributes.transform_keys(&:to_sym)
|
113
|
+
transformed_hash = {}
|
114
|
+
openapi_types.each_pair do |key, type|
|
115
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
116
|
+
transformed_hash["#{key}"] = nil
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
121
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
122
|
+
end
|
123
|
+
elsif !attributes[attribute_map[key]].nil?
|
124
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
125
|
+
end
|
126
|
+
end
|
127
|
+
new(transformed_hash)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deserializes the data based on type
|
131
|
+
# @param string type Data type
|
132
|
+
# @param string value Value to be deserialized
|
133
|
+
# @return [Object] Deserialized data
|
134
|
+
def self._deserialize(type, value)
|
135
|
+
case type.to_sym
|
136
|
+
when :Time
|
137
|
+
Time.parse(value)
|
138
|
+
when :Date
|
139
|
+
Date.parse(value)
|
140
|
+
when :String
|
141
|
+
value.to_s
|
142
|
+
when :Integer
|
143
|
+
value.to_i
|
144
|
+
when :Float
|
145
|
+
value.to_f
|
146
|
+
when :Boolean
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
148
|
+
true
|
149
|
+
else
|
150
|
+
false
|
151
|
+
end
|
152
|
+
when :Object
|
153
|
+
# generic object (usually a Hash), return directly
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else # model
|
167
|
+
# models (e.g. Pet) or oneOf
|
168
|
+
klass = EmassClient.const_get(type)
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the object in the form of hash
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_hash
|
188
|
+
hash = {}
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
190
|
+
value = self.send(attr)
|
191
|
+
if value.nil?
|
192
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
194
|
+
end
|
195
|
+
|
196
|
+
hash[param] = _to_hash(value)
|
197
|
+
end
|
198
|
+
hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Outputs non-array value in the form of hash
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
203
|
+
# @param [Object] value Any valid value
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
205
|
+
def _to_hash(value)
|
206
|
+
if value.is_a?(Array)
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
208
|
+
elsif value.is_a?(Hash)
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
211
|
+
end
|
212
|
+
elsif value.respond_to? :to_hash
|
213
|
+
value.to_hash
|
214
|
+
else
|
215
|
+
value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
data/lib/emass_client/models/{containers_resources_post.rb → containers_resources_post_delete.rb}
RENAMED
@@ -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 ContainersResourcesPostDelete
|
18
18
|
# [Required] Unique identifier of the container
|
19
19
|
attr_accessor :container_id
|
20
20
|
|
@@ -34,9 +34,14 @@ module EmassClient
|
|
34
34
|
}
|
35
35
|
end
|
36
36
|
|
37
|
+
# Returns attribute mapping this model knows about
|
38
|
+
def self.acceptable_attribute_map
|
39
|
+
attribute_map
|
40
|
+
end
|
41
|
+
|
37
42
|
# Returns all the JSON keys this model knows about
|
38
43
|
def self.acceptable_attributes
|
39
|
-
|
44
|
+
acceptable_attribute_map.values
|
40
45
|
end
|
41
46
|
|
42
47
|
# Attribute type mapping.
|
@@ -60,13 +65,14 @@ module EmassClient
|
|
60
65
|
# @param [Hash] attributes Model attributes in the form of hash
|
61
66
|
def initialize(attributes = {})
|
62
67
|
if (!attributes.is_a?(Hash))
|
63
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::ContainersResourcesPostDelete` initialize method"
|
64
69
|
end
|
65
70
|
|
66
71
|
# check to see if the attribute exists and convert string to symbol for hash key
|
72
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
67
73
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
-
if (!
|
69
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::
|
74
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::ContainersResourcesPostDelete`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
70
76
|
end
|
71
77
|
h[k.to_sym] = v
|
72
78
|
}
|
@@ -93,9 +99,14 @@ module EmassClient
|
|
93
99
|
# Show invalid properties with the reasons. Usually used together with valid?
|
94
100
|
# @return Array for valid properties with the reasons
|
95
101
|
def list_invalid_properties
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
96
103
|
invalid_properties = Array.new
|
97
|
-
if !@errors.nil? && @errors.length >
|
98
|
-
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to
|
104
|
+
if !@errors.nil? && @errors.length > 25
|
105
|
+
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 25.')
|
106
|
+
end
|
107
|
+
|
108
|
+
if !@errors.nil? && @errors.length < 1
|
109
|
+
invalid_properties.push('invalid value for "errors", number of items must be greater than or equal to 1.')
|
99
110
|
end
|
100
111
|
|
101
112
|
invalid_properties
|
@@ -104,15 +115,21 @@ module EmassClient
|
|
104
115
|
# Check to see if the all the properties in the model are valid
|
105
116
|
# @return true if the model is valid
|
106
117
|
def valid?
|
107
|
-
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
119
|
+
return false if !@errors.nil? && @errors.length > 25
|
120
|
+
return false if !@errors.nil? && @errors.length < 1
|
108
121
|
true
|
109
122
|
end
|
110
123
|
|
111
124
|
# Custom attribute writer method with validation
|
112
125
|
# @param [Object] errors Value to be assigned
|
113
126
|
def errors=(errors)
|
114
|
-
if !errors.nil? && errors.length >
|
115
|
-
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to
|
127
|
+
if !errors.nil? && errors.length > 25
|
128
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 25.'
|
129
|
+
end
|
130
|
+
|
131
|
+
if !errors.nil? && errors.length < 1
|
132
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be greater than or equal to 1.'
|
116
133
|
end
|
117
134
|
|
118
135
|
@errors = errors
|
@@ -145,37 +162,30 @@ module EmassClient
|
|
145
162
|
# @param [Hash] attributes Model attributes in the form of hash
|
146
163
|
# @return [Object] Returns the model itself
|
147
164
|
def self.build_from_hash(attributes)
|
148
|
-
new.build_from_hash(attributes)
|
149
|
-
end
|
150
|
-
|
151
|
-
# Builds the object from hash
|
152
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
-
# @return [Object] Returns the model itself
|
154
|
-
def build_from_hash(attributes)
|
155
165
|
return nil unless attributes.is_a?(Hash)
|
156
166
|
attributes = attributes.transform_keys(&:to_sym)
|
157
|
-
|
158
|
-
|
159
|
-
|
167
|
+
transformed_hash = {}
|
168
|
+
openapi_types.each_pair do |key, type|
|
169
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
170
|
+
transformed_hash["#{key}"] = nil
|
160
171
|
elsif type =~ /\AArray<(.*)>/i
|
161
172
|
# check to ensure the input is an array given that the attribute
|
162
173
|
# is documented as an array but the input is not
|
163
|
-
if attributes[
|
164
|
-
|
174
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
175
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
165
176
|
end
|
166
|
-
elsif !attributes[
|
167
|
-
|
177
|
+
elsif !attributes[attribute_map[key]].nil?
|
178
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
168
179
|
end
|
169
180
|
end
|
170
|
-
|
171
|
-
self
|
181
|
+
new(transformed_hash)
|
172
182
|
end
|
173
183
|
|
174
184
|
# Deserializes the data based on type
|
175
185
|
# @param string type Data type
|
176
186
|
# @param string value Value to be deserialized
|
177
187
|
# @return [Object] Deserialized data
|
178
|
-
def _deserialize(type, value)
|
188
|
+
def self._deserialize(type, value)
|
179
189
|
case type.to_sym
|
180
190
|
when :Time
|
181
191
|
Time.parse(value)
|
@@ -210,7 +220,7 @@ module EmassClient
|
|
210
220
|
else # model
|
211
221
|
# models (e.g. Pet) or oneOf
|
212
222
|
klass = EmassClient.const_get(type)
|
213
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
223
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
214
224
|
end
|
215
225
|
end
|
216
226
|
|
@@ -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 ContainersResponseDelete
|
18
18
|
attr_accessor :meta
|
19
19
|
|
20
20
|
attr_accessor :data
|
@@ -27,16 +27,21 @@ 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.
|
36
41
|
def self.openapi_types
|
37
42
|
{
|
38
43
|
:'meta' => :'Response200',
|
39
|
-
:'data' => :'Array<
|
44
|
+
:'data' => :'Array<ContainersResourcesPostDelete>'
|
40
45
|
}
|
41
46
|
end
|
42
47
|
|
@@ -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::ContainersResponseDelete` 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::ContainersResponseDelete`. 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
|
|