emass_client 3.9.10 → 3.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +56 -41
- data/lib/emass_client/api/artifacts_api.rb +14 -11
- data/lib/emass_client/api/artifacts_export_api.rb +3 -3
- data/lib/emass_client/api/cac_api.rb +7 -7
- data/lib/emass_client/api/cloud_resource_results_api.rb +79 -5
- data/lib/emass_client/api/cmmc_assessments_api.rb +3 -3
- data/lib/emass_client/api/container_scan_results_api.rb +79 -5
- data/lib/emass_client/api/controls_api.rb +5 -5
- data/lib/emass_client/api/enterprise_artifacts_dashboards_api.rb +168 -0
- data/lib/emass_client/api/enterprise_poam_dashboards_api.rb +168 -0
- data/lib/emass_client/api/enterprise_security_controls_dashboards_api.rb +241 -0
- data/lib/emass_client/api/enterprise_sensor_based_hardware_resources_dashboards_api.rb +168 -0
- data/lib/emass_client/api/enterprise_sensor_based_software_resources_dashboards_api.rb +241 -0
- data/lib/emass_client/api/enterprise_terms_conditions_dashboards_api.rb +168 -0
- data/lib/emass_client/api/enterprise_vulnerability_dashboards_api.rb +241 -0
- data/lib/emass_client/api/fisma_inventory_summary_dashboards_api.rb +168 -0
- data/lib/emass_client/api/hardware_baseline_dashboards_api.rb +168 -0
- data/lib/emass_client/api/milestones_api.rb +6 -6
- data/lib/emass_client/api/pac_api.rb +11 -11
- data/lib/emass_client/api/poam_api.rb +12 -9
- data/lib/emass_client/api/ports_and_protocols_dashboards_api.rb +168 -0
- data/lib/emass_client/api/privacy_compliance_dashboards_api.rb +168 -0
- data/lib/emass_client/api/registration_api.rb +3 -3
- data/lib/emass_client/api/software_baseline_dashboards_api.rb +168 -0
- data/lib/emass_client/api/static_code_scans_api.rb +5 -5
- data/lib/emass_client/api/system_a20_summary_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_aa_summary_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_associations_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_pl109_reporting_summary_dashboard_api.rb +95 -0
- data/lib/emass_client/api/system_roles_api.rb +5 -13
- data/lib/emass_client/api/system_status_dashboard_api.rb +95 -0
- data/lib/emass_client/api/systems_api.rb +26 -26
- data/lib/emass_client/api/test_api.rb +3 -3
- data/lib/emass_client/api/test_results_api.rb +14 -11
- data/lib/emass_client/api/threat_risks_dashboards_api.rb +241 -0
- data/lib/emass_client/api/users_dashboard_api.rb +95 -0
- data/lib/emass_client/api/workflow_definitions_api.rb +3 -3
- data/lib/emass_client/api/workflow_instances_api.rb +6 -3
- data/lib/emass_client/api_client.rb +5 -4
- data/lib/emass_client/api_error.rb +3 -3
- data/lib/emass_client/configuration.rb +3 -3
- data/lib/emass_client/models/artifacts_get.rb +28 -23
- data/lib/emass_client/models/artifacts_request_delete_body_inner.rb +15 -20
- data/lib/emass_client/models/artifacts_response_del.rb +15 -20
- data/lib/emass_client/models/artifacts_response_del_data_inner.rb +15 -20
- data/lib/emass_client/models/artifacts_response_get.rb +15 -20
- data/lib/emass_client/models/artifacts_response_put_post.rb +15 -20
- data/lib/emass_client/models/artifacts_response_put_post_data_inner.rb +29 -25
- data/lib/emass_client/models/cac_get.rb +15 -20
- data/lib/emass_client/models/cac_response_get.rb +15 -20
- data/lib/emass_client/models/cac_response_post.rb +15 -20
- data/lib/emass_client/models/cac_response_post_data_inner.rb +29 -25
- data/lib/emass_client/models/cloud_resources_delete.rb +225 -0
- data/lib/emass_client/models/cloud_resources_delete_body_inner.rb +215 -0
- data/lib/emass_client/models/{cloud_resources_post.rb → cloud_resources_post_delete.rb} +32 -28
- data/lib/emass_client/models/cloud_resources_response_post.rb +16 -21
- data/lib/emass_client/models/cmmc_get.rb +15 -20
- data/lib/emass_client/models/cmmc_response_get.rb +15 -20
- data/lib/emass_client/models/connectivity_ccsd.rb +15 -20
- data/lib/emass_client/models/container_resources_delete_body_inner.rb +215 -0
- data/lib/emass_client/models/{containers_resources_post.rb → containers_resources_post_delete.rb} +32 -28
- data/lib/emass_client/models/containers_response_delete.rb +225 -0
- data/lib/emass_client/models/containers_response_post.rb +16 -21
- data/lib/emass_client/models/controls_get.rb +66 -39
- data/lib/emass_client/models/controls_put.rb +29 -25
- data/lib/emass_client/models/controls_response_get.rb +15 -20
- data/lib/emass_client/models/controls_response_put.rb +15 -20
- data/lib/emass_client/models/dashboard_mock_response.rb +15 -20
- data/lib/emass_client/models/dashboard_mock_response_pagination.rb +15 -20
- data/lib/emass_client/models/definition_transitions.rb +15 -20
- data/lib/emass_client/models/instances_transitions.rb +15 -20
- data/lib/emass_client/models/milestone_response_delete.rb +225 -0
- data/lib/emass_client/models/milestone_response_get.rb +15 -20
- data/lib/emass_client/models/milestone_response_get_milestone.rb +15 -20
- data/lib/emass_client/models/milestone_response_post.rb +15 -20
- data/lib/emass_client/models/milestone_response_put.rb +15 -20
- data/lib/emass_client/models/milestones_get.rb +15 -20
- data/lib/emass_client/models/milestones_put_post_delete.rb +29 -25
- data/lib/emass_client/models/milestones_request_delete_body_inner.rb +15 -20
- data/lib/emass_client/models/milestones_required_post.rb +19 -20
- data/lib/emass_client/models/milestones_required_put.rb +21 -20
- data/lib/emass_client/models/mock_object.rb +15 -20
- data/lib/emass_client/models/pac_get.rb +20 -45
- data/lib/emass_client/models/pac_post.rb +29 -25
- data/lib/emass_client/models/pac_response_get.rb +15 -20
- data/lib/emass_client/models/pac_response_post.rb +15 -20
- data/lib/emass_client/models/poam_get.rb +217 -36
- data/lib/emass_client/models/poam_post_put_del.rb +29 -25
- data/lib/emass_client/models/poam_request_delete_body_inner.rb +15 -20
- data/lib/emass_client/models/poam_response_delete.rb +15 -20
- data/lib/emass_client/models/poam_response_get_poams.rb +15 -20
- data/lib/emass_client/models/poam_response_get_systems.rb +15 -20
- data/lib/emass_client/models/poam_response_post.rb +15 -20
- data/lib/emass_client/models/poam_response_put.rb +15 -20
- data/lib/emass_client/models/register.rb +15 -20
- data/lib/emass_client/models/register_data.rb +15 -20
- data/lib/emass_client/models/register_user_request_post_body.rb +17 -20
- data/lib/emass_client/models/response200.rb +21 -22
- data/lib/emass_client/models/response201.rb +15 -20
- data/lib/emass_client/models/response201_meta.rb +21 -22
- data/lib/emass_client/models/response400.rb +15 -20
- data/lib/emass_client/models/response400_meta.rb +21 -22
- data/lib/emass_client/models/response401.rb +15 -20
- data/lib/emass_client/models/response401_meta.rb +21 -22
- data/lib/emass_client/models/response403.rb +15 -20
- data/lib/emass_client/models/response403_meta.rb +21 -22
- data/lib/emass_client/models/response404.rb +21 -22
- data/lib/emass_client/models/response405.rb +15 -20
- data/lib/emass_client/models/response405_meta.rb +21 -22
- data/lib/emass_client/models/response411.rb +15 -20
- data/lib/emass_client/models/response411_meta.rb +21 -22
- data/lib/emass_client/models/response490.rb +15 -20
- data/lib/emass_client/models/response490_meta.rb +21 -22
- data/lib/emass_client/models/response500.rb +15 -20
- data/lib/emass_client/models/response500_meta.rb +21 -22
- data/lib/emass_client/models/role_category.rb +15 -20
- data/lib/emass_client/models/roles.rb +15 -20
- data/lib/emass_client/models/ssps.rb +15 -20
- data/lib/emass_client/models/stage.rb +15 -20
- data/lib/emass_client/models/{static_code_application.rb → static_code_application_post.rb} +18 -23
- data/lib/emass_client/models/static_code_post.rb +29 -25
- data/lib/emass_client/models/static_code_request_post_body.rb +16 -21
- data/lib/emass_client/models/static_code_request_post_body_application.rb +15 -20
- data/lib/emass_client/models/static_code_response_post.rb +15 -20
- data/lib/emass_client/models/success200_response.rb +15 -20
- data/lib/emass_client/models/success200_response_data_inner.rb +29 -25
- data/lib/emass_client/models/system_response.rb +15 -20
- data/lib/emass_client/models/system_roles_category_response.rb +15 -20
- data/lib/emass_client/models/system_roles_response.rb +15 -20
- data/lib/emass_client/models/system_roles_response_data_inner.rb +15 -20
- data/lib/emass_client/models/systems.rb +248 -33
- data/lib/emass_client/models/systems_response.rb +15 -20
- data/lib/emass_client/models/test.rb +15 -20
- data/lib/emass_client/models/test_data.rb +15 -20
- data/lib/emass_client/models/test_results_get.rb +26 -21
- data/lib/emass_client/models/test_results_post.rb +29 -25
- data/lib/emass_client/models/test_results_response_get.rb +15 -20
- data/lib/emass_client/models/test_results_response_post.rb +15 -20
- data/lib/emass_client/models/users.rb +15 -20
- data/lib/emass_client/models/workflow_definition_get.rb +15 -20
- data/lib/emass_client/models/workflow_definition_response_get.rb +15 -20
- data/lib/emass_client/models/workflow_instance_get.rb +15 -20
- data/lib/emass_client/models/workflow_instance_response_get.rb +15 -20
- data/lib/emass_client/models/workflow_instances_get.rb +15 -20
- data/lib/emass_client/models/workflow_instances_response_get.rb +15 -20
- data/lib/emass_client/models/workflow_instances_response_get_pagination.rb +15 -20
- data/lib/emass_client/version.rb +4 -4
- data/lib/emass_client.rb +31 -7
- metadata +30 -6
- data/lib/emass_client/api/dashboards_api.rb +0 -2139
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate
|
4
|
+
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` POST endpoint to register the client certificate. The endpoint call returns the user `api-key`.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
6
|
+
The version of the OpenAPI document: v3.12
|
7
7
|
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -87,6 +87,7 @@ module EmassClient
|
|
87
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
88
88
|
# @return Array for valid properties with the reasons
|
89
89
|
def list_invalid_properties
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
90
91
|
invalid_properties = Array.new
|
91
92
|
invalid_properties
|
92
93
|
end
|
@@ -94,6 +95,7 @@ module EmassClient
|
|
94
95
|
# Check to see if the all the properties in the model are valid
|
95
96
|
# @return true if the model is valid
|
96
97
|
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
97
99
|
true
|
98
100
|
end
|
99
101
|
|
@@ -123,37 +125,30 @@ module EmassClient
|
|
123
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
124
126
|
# @return [Object] Returns the model itself
|
125
127
|
def self.build_from_hash(attributes)
|
126
|
-
new.build_from_hash(attributes)
|
127
|
-
end
|
128
|
-
|
129
|
-
# Builds the object from hash
|
130
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
-
# @return [Object] Returns the model itself
|
132
|
-
def build_from_hash(attributes)
|
133
128
|
return nil unless attributes.is_a?(Hash)
|
134
129
|
attributes = attributes.transform_keys(&:to_sym)
|
135
|
-
|
136
|
-
|
137
|
-
|
130
|
+
transformed_hash = {}
|
131
|
+
openapi_types.each_pair do |key, type|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
133
|
+
transformed_hash["#{key}"] = nil
|
138
134
|
elsif type =~ /\AArray<(.*)>/i
|
139
135
|
# check to ensure the input is an array given that the attribute
|
140
136
|
# is documented as an array but the input is not
|
141
|
-
if attributes[
|
142
|
-
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
143
139
|
end
|
144
|
-
elsif !attributes[
|
145
|
-
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
146
142
|
end
|
147
143
|
end
|
148
|
-
|
149
|
-
self
|
144
|
+
new(transformed_hash)
|
150
145
|
end
|
151
146
|
|
152
147
|
# Deserializes the data based on type
|
153
148
|
# @param string type Data type
|
154
149
|
# @param string value Value to be deserialized
|
155
150
|
# @return [Object] Deserialized data
|
156
|
-
def _deserialize(type, value)
|
151
|
+
def self._deserialize(type, value)
|
157
152
|
case type.to_sym
|
158
153
|
when :Time
|
159
154
|
Time.parse(value)
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate
|
4
|
+
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` POST endpoint to register the client certificate. The endpoint call returns the user `api-key`.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
6
|
+
The version of the OpenAPI document: v3.12
|
7
7
|
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -78,6 +78,7 @@ module EmassClient
|
|
78
78
|
# Show invalid properties with the reasons. Usually used together with valid?
|
79
79
|
# @return Array for valid properties with the reasons
|
80
80
|
def list_invalid_properties
|
81
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
81
82
|
invalid_properties = Array.new
|
82
83
|
invalid_properties
|
83
84
|
end
|
@@ -85,6 +86,7 @@ module EmassClient
|
|
85
86
|
# Check to see if the all the properties in the model are valid
|
86
87
|
# @return true if the model is valid
|
87
88
|
def valid?
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
88
90
|
true
|
89
91
|
end
|
90
92
|
|
@@ -113,37 +115,30 @@ module EmassClient
|
|
113
115
|
# @param [Hash] attributes Model attributes in the form of hash
|
114
116
|
# @return [Object] Returns the model itself
|
115
117
|
def self.build_from_hash(attributes)
|
116
|
-
new.build_from_hash(attributes)
|
117
|
-
end
|
118
|
-
|
119
|
-
# Builds the object from hash
|
120
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
-
# @return [Object] Returns the model itself
|
122
|
-
def build_from_hash(attributes)
|
123
118
|
return nil unless attributes.is_a?(Hash)
|
124
119
|
attributes = attributes.transform_keys(&:to_sym)
|
125
|
-
|
126
|
-
|
127
|
-
|
120
|
+
transformed_hash = {}
|
121
|
+
openapi_types.each_pair do |key, type|
|
122
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
123
|
+
transformed_hash["#{key}"] = nil
|
128
124
|
elsif type =~ /\AArray<(.*)>/i
|
129
125
|
# check to ensure the input is an array given that the attribute
|
130
126
|
# is documented as an array but the input is not
|
131
|
-
if attributes[
|
132
|
-
|
127
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
128
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
133
129
|
end
|
134
|
-
elsif !attributes[
|
135
|
-
|
130
|
+
elsif !attributes[attribute_map[key]].nil?
|
131
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
136
132
|
end
|
137
133
|
end
|
138
|
-
|
139
|
-
self
|
134
|
+
new(transformed_hash)
|
140
135
|
end
|
141
136
|
|
142
137
|
# Deserializes the data based on type
|
143
138
|
# @param string type Data type
|
144
139
|
# @param string value Value to be deserialized
|
145
140
|
# @return [Object] Deserialized data
|
146
|
-
def _deserialize(type, value)
|
141
|
+
def self._deserialize(type, value)
|
147
142
|
case type.to_sym
|
148
143
|
when :Time
|
149
144
|
Time.parse(value)
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate
|
4
|
+
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` POST endpoint to register the client certificate. The endpoint call returns the user `api-key`.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
6
|
+
The version of the OpenAPI document: v3.12
|
7
7
|
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.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 StaticCodeApplicationPost
|
18
18
|
# [Optional] Scan vulnerability ratting
|
19
19
|
attr_accessor :raw_severity
|
20
20
|
|
@@ -94,13 +94,13 @@ module EmassClient
|
|
94
94
|
# @param [Hash] attributes Model attributes in the form of hash
|
95
95
|
def initialize(attributes = {})
|
96
96
|
if (!attributes.is_a?(Hash))
|
97
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::
|
97
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::StaticCodeApplicationPost` initialize method"
|
98
98
|
end
|
99
99
|
|
100
100
|
# check to see if the attribute exists and convert string to symbol for hash key
|
101
101
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
102
102
|
if (!self.class.attribute_map.key?(k.to_sym))
|
103
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::
|
103
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::StaticCodeApplicationPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
104
104
|
end
|
105
105
|
h[k.to_sym] = v
|
106
106
|
}
|
@@ -133,6 +133,7 @@ module EmassClient
|
|
133
133
|
# Show invalid properties with the reasons. Usually used together with valid?
|
134
134
|
# @return Array for valid properties with the reasons
|
135
135
|
def list_invalid_properties
|
136
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
136
137
|
invalid_properties = Array.new
|
137
138
|
invalid_properties
|
138
139
|
end
|
@@ -140,6 +141,7 @@ module EmassClient
|
|
140
141
|
# Check to see if the all the properties in the model are valid
|
141
142
|
# @return true if the model is valid
|
142
143
|
def valid?
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
143
145
|
raw_severity_validator = EnumAttributeValidator.new('String', ["Low", "Medium", "Moderate", "High", "Critical", "unknown_default_open_api"])
|
144
146
|
return false unless raw_severity_validator.valid?(@raw_severity)
|
145
147
|
true
|
@@ -184,37 +186,30 @@ module EmassClient
|
|
184
186
|
# @param [Hash] attributes Model attributes in the form of hash
|
185
187
|
# @return [Object] Returns the model itself
|
186
188
|
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
189
|
return nil unless attributes.is_a?(Hash)
|
195
190
|
attributes = attributes.transform_keys(&:to_sym)
|
196
|
-
|
197
|
-
|
198
|
-
|
191
|
+
transformed_hash = {}
|
192
|
+
openapi_types.each_pair do |key, type|
|
193
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
194
|
+
transformed_hash["#{key}"] = nil
|
199
195
|
elsif type =~ /\AArray<(.*)>/i
|
200
196
|
# check to ensure the input is an array given that the attribute
|
201
197
|
# is documented as an array but the input is not
|
202
|
-
if attributes[
|
203
|
-
|
198
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
199
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
204
200
|
end
|
205
|
-
elsif !attributes[
|
206
|
-
|
201
|
+
elsif !attributes[attribute_map[key]].nil?
|
202
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
207
203
|
end
|
208
204
|
end
|
209
|
-
|
210
|
-
self
|
205
|
+
new(transformed_hash)
|
211
206
|
end
|
212
207
|
|
213
208
|
# Deserializes the data based on type
|
214
209
|
# @param string type Data type
|
215
210
|
# @param string value Value to be deserialized
|
216
211
|
# @return [Object] Deserialized data
|
217
|
-
def _deserialize(type, value)
|
212
|
+
def self._deserialize(type, value)
|
218
213
|
case type.to_sym
|
219
214
|
when :Time
|
220
215
|
Time.parse(value)
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate
|
4
|
+
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` POST endpoint to register the client certificate. The endpoint call returns the user `api-key`.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
6
|
+
The version of the OpenAPI document: v3.12
|
7
7
|
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -102,9 +102,14 @@ module EmassClient
|
|
102
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
103
103
|
# @return Array for valid properties with the reasons
|
104
104
|
def list_invalid_properties
|
105
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
105
106
|
invalid_properties = Array.new
|
106
|
-
if !@errors.nil? && @errors.length >
|
107
|
-
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to
|
107
|
+
if !@errors.nil? && @errors.length > 3
|
108
|
+
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 3.')
|
109
|
+
end
|
110
|
+
|
111
|
+
if !@errors.nil? && @errors.length < 1
|
112
|
+
invalid_properties.push('invalid value for "errors", number of items must be greater than or equal to 1.')
|
108
113
|
end
|
109
114
|
|
110
115
|
invalid_properties
|
@@ -113,15 +118,21 @@ module EmassClient
|
|
113
118
|
# Check to see if the all the properties in the model are valid
|
114
119
|
# @return true if the model is valid
|
115
120
|
def valid?
|
116
|
-
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
122
|
+
return false if !@errors.nil? && @errors.length > 3
|
123
|
+
return false if !@errors.nil? && @errors.length < 1
|
117
124
|
true
|
118
125
|
end
|
119
126
|
|
120
127
|
# Custom attribute writer method with validation
|
121
128
|
# @param [Object] errors Value to be assigned
|
122
129
|
def errors=(errors)
|
123
|
-
if !errors.nil? && errors.length >
|
124
|
-
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to
|
130
|
+
if !errors.nil? && errors.length > 3
|
131
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 3.'
|
132
|
+
end
|
133
|
+
|
134
|
+
if !errors.nil? && errors.length < 1
|
135
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be greater than or equal to 1.'
|
125
136
|
end
|
126
137
|
|
127
138
|
@errors = errors
|
@@ -155,37 +166,30 @@ module EmassClient
|
|
155
166
|
# @param [Hash] attributes Model attributes in the form of hash
|
156
167
|
# @return [Object] Returns the model itself
|
157
168
|
def self.build_from_hash(attributes)
|
158
|
-
new.build_from_hash(attributes)
|
159
|
-
end
|
160
|
-
|
161
|
-
# Builds the object from hash
|
162
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
163
|
-
# @return [Object] Returns the model itself
|
164
|
-
def build_from_hash(attributes)
|
165
169
|
return nil unless attributes.is_a?(Hash)
|
166
170
|
attributes = attributes.transform_keys(&:to_sym)
|
167
|
-
|
168
|
-
|
169
|
-
|
171
|
+
transformed_hash = {}
|
172
|
+
openapi_types.each_pair do |key, type|
|
173
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
174
|
+
transformed_hash["#{key}"] = nil
|
170
175
|
elsif type =~ /\AArray<(.*)>/i
|
171
176
|
# check to ensure the input is an array given that the attribute
|
172
177
|
# is documented as an array but the input is not
|
173
|
-
if attributes[
|
174
|
-
|
178
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
179
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
175
180
|
end
|
176
|
-
elsif !attributes[
|
177
|
-
|
181
|
+
elsif !attributes[attribute_map[key]].nil?
|
182
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
178
183
|
end
|
179
184
|
end
|
180
|
-
|
181
|
-
self
|
185
|
+
new(transformed_hash)
|
182
186
|
end
|
183
187
|
|
184
188
|
# Deserializes the data based on type
|
185
189
|
# @param string type Data type
|
186
190
|
# @param string value Value to be deserialized
|
187
191
|
# @return [Object] Deserialized data
|
188
|
-
def _deserialize(type, value)
|
192
|
+
def self._deserialize(type, value)
|
189
193
|
case type.to_sym
|
190
194
|
when :Time
|
191
195
|
Time.parse(value)
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate
|
4
|
+
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` POST endpoint to register the client certificate. The endpoint call returns the user `api-key`.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
6
|
+
The version of the OpenAPI document: v3.12
|
7
7
|
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -36,7 +36,7 @@ module EmassClient
|
|
36
36
|
def self.openapi_types
|
37
37
|
{
|
38
38
|
:'application' => :'StaticCodeRequestPostBodyApplication',
|
39
|
-
:'application_findings' => :'Array<
|
39
|
+
:'application_findings' => :'Array<StaticCodeApplicationPost>'
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
@@ -75,6 +75,7 @@ module EmassClient
|
|
75
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
76
|
# @return Array for valid properties with the reasons
|
77
77
|
def list_invalid_properties
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
79
|
invalid_properties = Array.new
|
79
80
|
invalid_properties
|
80
81
|
end
|
@@ -82,6 +83,7 @@ module EmassClient
|
|
82
83
|
# Check to see if the all the properties in the model are valid
|
83
84
|
# @return true if the model is valid
|
84
85
|
def valid?
|
86
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
87
|
true
|
86
88
|
end
|
87
89
|
|
@@ -110,37 +112,30 @@ module EmassClient
|
|
110
112
|
# @param [Hash] attributes Model attributes in the form of hash
|
111
113
|
# @return [Object] Returns the model itself
|
112
114
|
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
115
|
return nil unless attributes.is_a?(Hash)
|
121
116
|
attributes = attributes.transform_keys(&:to_sym)
|
122
|
-
|
123
|
-
|
124
|
-
|
117
|
+
transformed_hash = {}
|
118
|
+
openapi_types.each_pair do |key, type|
|
119
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = nil
|
125
121
|
elsif type =~ /\AArray<(.*)>/i
|
126
122
|
# check to ensure the input is an array given that the attribute
|
127
123
|
# is documented as an array but the input is not
|
128
|
-
if attributes[
|
129
|
-
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
130
126
|
end
|
131
|
-
elsif !attributes[
|
132
|
-
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
133
129
|
end
|
134
130
|
end
|
135
|
-
|
136
|
-
self
|
131
|
+
new(transformed_hash)
|
137
132
|
end
|
138
133
|
|
139
134
|
# Deserializes the data based on type
|
140
135
|
# @param string type Data type
|
141
136
|
# @param string value Value to be deserialized
|
142
137
|
# @return [Object] Deserialized data
|
143
|
-
def _deserialize(type, value)
|
138
|
+
def self._deserialize(type, value)
|
144
139
|
case type.to_sym
|
145
140
|
when :Time
|
146
141
|
Time.parse(value)
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#Enterprise Mission Assurance Support Service (eMASS)
|
3
3
|
|
4
|
-
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` endpoint to register the client certificate
|
4
|
+
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. <strong>Register External Application (that use the eMASS API)</strong></br> New users will need to [register](https://nisp.emass.apps.mil/Content/Help/jobaids/eMASS_OT_NewUser_Job_Aid.pdf) an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only). Use the `Registration` POST endpoint to register the client certificate. The endpoint call returns the user `api-key`.</br></br> Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message.</br></br> <strong>Available Request Headers</strong></br> <table> <tr> <th align=left>key</th> <th align=left>Example Value</th> <th align=left>Description</th> </tr> <tr> <td>`api-key`</td> <td>api-key-provided-by-emass</td> <td>This API key must be provided in the request header for all endpoint calls</td> </tr> <tr> <td>`user-uid`</td> <td>USER.UID.KEY</td> <td>This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls</td> </tr> <tr> <td></td><td></td> <td> Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC </td> </tr> </table> </br><strong>Approve API Client for Actionable Requests</strong></br> Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v3.
|
6
|
+
The version of the OpenAPI document: v3.12
|
7
7
|
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -75,6 +75,7 @@ module EmassClient
|
|
75
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
76
|
# @return Array for valid properties with the reasons
|
77
77
|
def list_invalid_properties
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
79
|
invalid_properties = Array.new
|
79
80
|
invalid_properties
|
80
81
|
end
|
@@ -82,6 +83,7 @@ module EmassClient
|
|
82
83
|
# Check to see if the all the properties in the model are valid
|
83
84
|
# @return true if the model is valid
|
84
85
|
def valid?
|
86
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
85
87
|
true
|
86
88
|
end
|
87
89
|
|
@@ -110,37 +112,30 @@ module EmassClient
|
|
110
112
|
# @param [Hash] attributes Model attributes in the form of hash
|
111
113
|
# @return [Object] Returns the model itself
|
112
114
|
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
115
|
return nil unless attributes.is_a?(Hash)
|
121
116
|
attributes = attributes.transform_keys(&:to_sym)
|
122
|
-
|
123
|
-
|
124
|
-
|
117
|
+
transformed_hash = {}
|
118
|
+
openapi_types.each_pair do |key, type|
|
119
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = nil
|
125
121
|
elsif type =~ /\AArray<(.*)>/i
|
126
122
|
# check to ensure the input is an array given that the attribute
|
127
123
|
# is documented as an array but the input is not
|
128
|
-
if attributes[
|
129
|
-
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
130
126
|
end
|
131
|
-
elsif !attributes[
|
132
|
-
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
133
129
|
end
|
134
130
|
end
|
135
|
-
|
136
|
-
self
|
131
|
+
new(transformed_hash)
|
137
132
|
end
|
138
133
|
|
139
134
|
# Deserializes the data based on type
|
140
135
|
# @param string type Data type
|
141
136
|
# @param string value Value to be deserialized
|
142
137
|
# @return [Object] Deserialized data
|
143
|
-
def _deserialize(type, value)
|
138
|
+
def self._deserialize(type, value)
|
144
139
|
case type.to_sym
|
145
140
|
when :Time
|
146
141
|
Time.parse(value)
|