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
|
|
@@ -65,16 +65,21 @@ module EmassClient
|
|
65
65
|
|
66
66
|
if attributes.key?(:'description')
|
67
67
|
self.description = attributes[:'description']
|
68
|
+
else
|
69
|
+
self.description = nil
|
68
70
|
end
|
69
71
|
|
70
72
|
if attributes.key?(:'scheduled_completion_date')
|
71
73
|
self.scheduled_completion_date = attributes[:'scheduled_completion_date']
|
74
|
+
else
|
75
|
+
self.scheduled_completion_date = nil
|
72
76
|
end
|
73
77
|
end
|
74
78
|
|
75
79
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
80
|
# @return Array for valid properties with the reasons
|
77
81
|
def list_invalid_properties
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
78
83
|
invalid_properties = Array.new
|
79
84
|
if @description.nil?
|
80
85
|
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
@@ -90,6 +95,7 @@ module EmassClient
|
|
90
95
|
# Check to see if the all the properties in the model are valid
|
91
96
|
# @return true if the model is valid
|
92
97
|
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
93
99
|
return false if @description.nil?
|
94
100
|
return false if @scheduled_completion_date.nil?
|
95
101
|
true
|
@@ -120,37 +126,30 @@ module EmassClient
|
|
120
126
|
# @param [Hash] attributes Model attributes in the form of hash
|
121
127
|
# @return [Object] Returns the model itself
|
122
128
|
def self.build_from_hash(attributes)
|
123
|
-
new.build_from_hash(attributes)
|
124
|
-
end
|
125
|
-
|
126
|
-
# Builds the object from hash
|
127
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
-
# @return [Object] Returns the model itself
|
129
|
-
def build_from_hash(attributes)
|
130
129
|
return nil unless attributes.is_a?(Hash)
|
131
130
|
attributes = attributes.transform_keys(&:to_sym)
|
132
|
-
|
133
|
-
|
134
|
-
|
131
|
+
transformed_hash = {}
|
132
|
+
openapi_types.each_pair do |key, type|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
134
|
+
transformed_hash["#{key}"] = nil
|
135
135
|
elsif type =~ /\AArray<(.*)>/i
|
136
136
|
# check to ensure the input is an array given that the attribute
|
137
137
|
# is documented as an array but the input is not
|
138
|
-
if attributes[
|
139
|
-
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
140
140
|
end
|
141
|
-
elsif !attributes[
|
142
|
-
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
143
143
|
end
|
144
144
|
end
|
145
|
-
|
146
|
-
self
|
145
|
+
new(transformed_hash)
|
147
146
|
end
|
148
147
|
|
149
148
|
# Deserializes the data based on type
|
150
149
|
# @param string type Data type
|
151
150
|
# @param string value Value to be deserialized
|
152
151
|
# @return [Object] Deserialized data
|
153
|
-
def _deserialize(type, value)
|
152
|
+
def self._deserialize(type, value)
|
154
153
|
case type.to_sym
|
155
154
|
when :Time
|
156
155
|
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
|
|
@@ -70,20 +70,27 @@ module EmassClient
|
|
70
70
|
|
71
71
|
if attributes.key?(:'milestone_id')
|
72
72
|
self.milestone_id = attributes[:'milestone_id']
|
73
|
+
else
|
74
|
+
self.milestone_id = nil
|
73
75
|
end
|
74
76
|
|
75
77
|
if attributes.key?(:'description')
|
76
78
|
self.description = attributes[:'description']
|
79
|
+
else
|
80
|
+
self.description = nil
|
77
81
|
end
|
78
82
|
|
79
83
|
if attributes.key?(:'scheduled_completion_date')
|
80
84
|
self.scheduled_completion_date = attributes[:'scheduled_completion_date']
|
85
|
+
else
|
86
|
+
self.scheduled_completion_date = nil
|
81
87
|
end
|
82
88
|
end
|
83
89
|
|
84
90
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
91
|
# @return Array for valid properties with the reasons
|
86
92
|
def list_invalid_properties
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
87
94
|
invalid_properties = Array.new
|
88
95
|
if @milestone_id.nil?
|
89
96
|
invalid_properties.push('invalid value for "milestone_id", milestone_id cannot be nil.')
|
@@ -103,6 +110,7 @@ module EmassClient
|
|
103
110
|
# Check to see if the all the properties in the model are valid
|
104
111
|
# @return true if the model is valid
|
105
112
|
def valid?
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
106
114
|
return false if @milestone_id.nil?
|
107
115
|
return false if @description.nil?
|
108
116
|
return false if @scheduled_completion_date.nil?
|
@@ -135,37 +143,30 @@ module EmassClient
|
|
135
143
|
# @param [Hash] attributes Model attributes in the form of hash
|
136
144
|
# @return [Object] Returns the model itself
|
137
145
|
def self.build_from_hash(attributes)
|
138
|
-
new.build_from_hash(attributes)
|
139
|
-
end
|
140
|
-
|
141
|
-
# Builds the object from hash
|
142
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
-
# @return [Object] Returns the model itself
|
144
|
-
def build_from_hash(attributes)
|
145
146
|
return nil unless attributes.is_a?(Hash)
|
146
147
|
attributes = attributes.transform_keys(&:to_sym)
|
147
|
-
|
148
|
-
|
149
|
-
|
148
|
+
transformed_hash = {}
|
149
|
+
openapi_types.each_pair do |key, type|
|
150
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = nil
|
150
152
|
elsif type =~ /\AArray<(.*)>/i
|
151
153
|
# check to ensure the input is an array given that the attribute
|
152
154
|
# is documented as an array but the input is not
|
153
|
-
if attributes[
|
154
|
-
|
155
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
156
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
155
157
|
end
|
156
|
-
elsif !attributes[
|
157
|
-
|
158
|
+
elsif !attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
158
160
|
end
|
159
161
|
end
|
160
|
-
|
161
|
-
self
|
162
|
+
new(transformed_hash)
|
162
163
|
end
|
163
164
|
|
164
165
|
# Deserializes the data based on type
|
165
166
|
# @param string type Data type
|
166
167
|
# @param string value Value to be deserialized
|
167
168
|
# @return [Object] Deserialized data
|
168
|
-
def _deserialize(type, value)
|
169
|
+
def self._deserialize(type, value)
|
169
170
|
case type.to_sym
|
170
171
|
when :Time
|
171
172
|
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
|
|
@@ -177,6 +177,7 @@ module EmassClient
|
|
177
177
|
# Show invalid properties with the reasons. Usually used together with valid?
|
178
178
|
# @return Array for valid properties with the reasons
|
179
179
|
def list_invalid_properties
|
180
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
180
181
|
invalid_properties = Array.new
|
181
182
|
invalid_properties
|
182
183
|
end
|
@@ -184,6 +185,7 @@ module EmassClient
|
|
184
185
|
# Check to see if the all the properties in the model are valid
|
185
186
|
# @return true if the model is valid
|
186
187
|
def valid?
|
188
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
187
189
|
true
|
188
190
|
end
|
189
191
|
|
@@ -223,37 +225,30 @@ module EmassClient
|
|
223
225
|
# @param [Hash] attributes Model attributes in the form of hash
|
224
226
|
# @return [Object] Returns the model itself
|
225
227
|
def self.build_from_hash(attributes)
|
226
|
-
new.build_from_hash(attributes)
|
227
|
-
end
|
228
|
-
|
229
|
-
# Builds the object from hash
|
230
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
231
|
-
# @return [Object] Returns the model itself
|
232
|
-
def build_from_hash(attributes)
|
233
228
|
return nil unless attributes.is_a?(Hash)
|
234
229
|
attributes = attributes.transform_keys(&:to_sym)
|
235
|
-
|
236
|
-
|
237
|
-
|
230
|
+
transformed_hash = {}
|
231
|
+
openapi_types.each_pair do |key, type|
|
232
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
233
|
+
transformed_hash["#{key}"] = nil
|
238
234
|
elsif type =~ /\AArray<(.*)>/i
|
239
235
|
# check to ensure the input is an array given that the attribute
|
240
236
|
# is documented as an array but the input is not
|
241
|
-
if attributes[
|
242
|
-
|
237
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
238
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
243
239
|
end
|
244
|
-
elsif !attributes[
|
245
|
-
|
240
|
+
elsif !attributes[attribute_map[key]].nil?
|
241
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
246
242
|
end
|
247
243
|
end
|
248
|
-
|
249
|
-
self
|
244
|
+
new(transformed_hash)
|
250
245
|
end
|
251
246
|
|
252
247
|
# Deserializes the data based on type
|
253
248
|
# @param string type Data type
|
254
249
|
# @param string value Value to be deserialized
|
255
250
|
# @return [Object] Deserialized data
|
256
|
-
def _deserialize(type, value)
|
251
|
+
def self._deserialize(type, value)
|
257
252
|
case type.to_sym
|
258
253
|
when :Time
|
259
254
|
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
|
|
@@ -15,9 +15,6 @@ require 'time'
|
|
15
15
|
|
16
16
|
module EmassClient
|
17
17
|
class PacGet
|
18
|
-
# [Required] Unique eMASS system identifier.
|
19
|
-
attr_accessor :system_id
|
20
|
-
|
21
18
|
# [Required] Values include the following:(Assess and Authorize, Assess Only, Security Plan Approval)
|
22
19
|
attr_accessor :workflow
|
23
20
|
|
@@ -36,9 +33,6 @@ module EmassClient
|
|
36
33
|
# [Read-Only] Indicates the number of days at current workflow stage.
|
37
34
|
attr_accessor :days_at_current_stage
|
38
35
|
|
39
|
-
# [Required] Comments related to package approval chain. Character Limit = 4,000.
|
40
|
-
attr_accessor :comments
|
41
|
-
|
42
36
|
class EnumAttributeValidator
|
43
37
|
attr_reader :datatype
|
44
38
|
attr_reader :allowable_values
|
@@ -64,14 +58,12 @@ module EmassClient
|
|
64
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
65
59
|
def self.attribute_map
|
66
60
|
{
|
67
|
-
:'system_id' => :'systemId',
|
68
61
|
:'workflow' => :'workflow',
|
69
62
|
:'name' => :'name',
|
70
63
|
:'current_stage_name' => :'currentStageName',
|
71
64
|
:'current_stage' => :'currentStage',
|
72
65
|
:'total_stages' => :'totalStages',
|
73
|
-
:'days_at_current_stage' => :'daysAtCurrentStage'
|
74
|
-
:'comments' => :'comments'
|
66
|
+
:'days_at_current_stage' => :'daysAtCurrentStage'
|
75
67
|
}
|
76
68
|
end
|
77
69
|
|
@@ -83,14 +75,12 @@ module EmassClient
|
|
83
75
|
# Attribute type mapping.
|
84
76
|
def self.openapi_types
|
85
77
|
{
|
86
|
-
:'system_id' => :'Integer',
|
87
78
|
:'workflow' => :'String',
|
88
79
|
:'name' => :'String',
|
89
80
|
:'current_stage_name' => :'String',
|
90
81
|
:'current_stage' => :'Integer',
|
91
82
|
:'total_stages' => :'Integer',
|
92
|
-
:'days_at_current_stage' => :'Integer'
|
93
|
-
:'comments' => :'String'
|
83
|
+
:'days_at_current_stage' => :'Integer'
|
94
84
|
}
|
95
85
|
end
|
96
86
|
|
@@ -100,7 +90,7 @@ module EmassClient
|
|
100
90
|
:'current_stage_name',
|
101
91
|
:'current_stage',
|
102
92
|
:'total_stages',
|
103
|
-
:'days_at_current_stage'
|
93
|
+
:'days_at_current_stage'
|
104
94
|
])
|
105
95
|
end
|
106
96
|
|
@@ -119,10 +109,6 @@ module EmassClient
|
|
119
109
|
h[k.to_sym] = v
|
120
110
|
}
|
121
111
|
|
122
|
-
if attributes.key?(:'system_id')
|
123
|
-
self.system_id = attributes[:'system_id']
|
124
|
-
end
|
125
|
-
|
126
112
|
if attributes.key?(:'workflow')
|
127
113
|
self.workflow = attributes[:'workflow']
|
128
114
|
end
|
@@ -146,15 +132,12 @@ module EmassClient
|
|
146
132
|
if attributes.key?(:'days_at_current_stage')
|
147
133
|
self.days_at_current_stage = attributes[:'days_at_current_stage']
|
148
134
|
end
|
149
|
-
|
150
|
-
if attributes.key?(:'comments')
|
151
|
-
self.comments = attributes[:'comments']
|
152
|
-
end
|
153
135
|
end
|
154
136
|
|
155
137
|
# Show invalid properties with the reasons. Usually used together with valid?
|
156
138
|
# @return Array for valid properties with the reasons
|
157
139
|
def list_invalid_properties
|
140
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
158
141
|
invalid_properties = Array.new
|
159
142
|
invalid_properties
|
160
143
|
end
|
@@ -162,6 +145,7 @@ module EmassClient
|
|
162
145
|
# Check to see if the all the properties in the model are valid
|
163
146
|
# @return true if the model is valid
|
164
147
|
def valid?
|
148
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
165
149
|
workflow_validator = EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval", "unknown_default_open_api"])
|
166
150
|
return false unless workflow_validator.valid?(@workflow)
|
167
151
|
true
|
@@ -182,14 +166,12 @@ module EmassClient
|
|
182
166
|
def ==(o)
|
183
167
|
return true if self.equal?(o)
|
184
168
|
self.class == o.class &&
|
185
|
-
system_id == o.system_id &&
|
186
169
|
workflow == o.workflow &&
|
187
170
|
name == o.name &&
|
188
171
|
current_stage_name == o.current_stage_name &&
|
189
172
|
current_stage == o.current_stage &&
|
190
173
|
total_stages == o.total_stages &&
|
191
|
-
days_at_current_stage == o.days_at_current_stage
|
192
|
-
comments == o.comments
|
174
|
+
days_at_current_stage == o.days_at_current_stage
|
193
175
|
end
|
194
176
|
|
195
177
|
# @see the `==` method
|
@@ -201,44 +183,37 @@ module EmassClient
|
|
201
183
|
# Calculates hash code according to all attributes.
|
202
184
|
# @return [Integer] Hash code
|
203
185
|
def hash
|
204
|
-
[
|
186
|
+
[workflow, name, current_stage_name, current_stage, total_stages, days_at_current_stage].hash
|
205
187
|
end
|
206
188
|
|
207
189
|
# Builds the object from hash
|
208
190
|
# @param [Hash] attributes Model attributes in the form of hash
|
209
191
|
# @return [Object] Returns the model itself
|
210
192
|
def self.build_from_hash(attributes)
|
211
|
-
new.build_from_hash(attributes)
|
212
|
-
end
|
213
|
-
|
214
|
-
# Builds the object from hash
|
215
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
216
|
-
# @return [Object] Returns the model itself
|
217
|
-
def build_from_hash(attributes)
|
218
193
|
return nil unless attributes.is_a?(Hash)
|
219
194
|
attributes = attributes.transform_keys(&:to_sym)
|
220
|
-
|
221
|
-
|
222
|
-
|
195
|
+
transformed_hash = {}
|
196
|
+
openapi_types.each_pair do |key, type|
|
197
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
198
|
+
transformed_hash["#{key}"] = nil
|
223
199
|
elsif type =~ /\AArray<(.*)>/i
|
224
200
|
# check to ensure the input is an array given that the attribute
|
225
201
|
# is documented as an array but the input is not
|
226
|
-
if attributes[
|
227
|
-
|
202
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
203
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
228
204
|
end
|
229
|
-
elsif !attributes[
|
230
|
-
|
205
|
+
elsif !attributes[attribute_map[key]].nil?
|
206
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
231
207
|
end
|
232
208
|
end
|
233
|
-
|
234
|
-
self
|
209
|
+
new(transformed_hash)
|
235
210
|
end
|
236
211
|
|
237
212
|
# Deserializes the data based on type
|
238
213
|
# @param string type Data type
|
239
214
|
# @param string value Value to be deserialized
|
240
215
|
# @return [Object] Deserialized data
|
241
|
-
def _deserialize(type, value)
|
216
|
+
def self._deserialize(type, value)
|
242
217
|
case type.to_sym
|
243
218
|
when :Time
|
244
219
|
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
|
|
@@ -115,9 +115,14 @@ module EmassClient
|
|
115
115
|
# Show invalid properties with the reasons. Usually used together with valid?
|
116
116
|
# @return Array for valid properties with the reasons
|
117
117
|
def list_invalid_properties
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
118
119
|
invalid_properties = Array.new
|
119
|
-
if !@errors.nil? && @errors.length >
|
120
|
-
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to
|
120
|
+
if !@errors.nil? && @errors.length > 3
|
121
|
+
invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 3.')
|
122
|
+
end
|
123
|
+
|
124
|
+
if !@errors.nil? && @errors.length < 1
|
125
|
+
invalid_properties.push('invalid value for "errors", number of items must be greater than or equal to 1.')
|
121
126
|
end
|
122
127
|
|
123
128
|
invalid_properties
|
@@ -126,9 +131,11 @@ module EmassClient
|
|
126
131
|
# Check to see if the all the properties in the model are valid
|
127
132
|
# @return true if the model is valid
|
128
133
|
def valid?
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
129
135
|
workflow_validator = EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval", "unknown_default_open_api"])
|
130
136
|
return false unless workflow_validator.valid?(@workflow)
|
131
|
-
return false if !@errors.nil? && @errors.length >
|
137
|
+
return false if !@errors.nil? && @errors.length > 3
|
138
|
+
return false if !@errors.nil? && @errors.length < 1
|
132
139
|
true
|
133
140
|
end
|
134
141
|
|
@@ -145,8 +152,12 @@ module EmassClient
|
|
145
152
|
# Custom attribute writer method with validation
|
146
153
|
# @param [Object] errors Value to be assigned
|
147
154
|
def errors=(errors)
|
148
|
-
if !errors.nil? && errors.length >
|
149
|
-
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to
|
155
|
+
if !errors.nil? && errors.length > 3
|
156
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 3.'
|
157
|
+
end
|
158
|
+
|
159
|
+
if !errors.nil? && errors.length < 1
|
160
|
+
fail ArgumentError, 'invalid value for "errors", number of items must be greater than or equal to 1.'
|
150
161
|
end
|
151
162
|
|
152
163
|
@errors = errors
|
@@ -179,37 +190,30 @@ module EmassClient
|
|
179
190
|
# @param [Hash] attributes Model attributes in the form of hash
|
180
191
|
# @return [Object] Returns the model itself
|
181
192
|
def self.build_from_hash(attributes)
|
182
|
-
new.build_from_hash(attributes)
|
183
|
-
end
|
184
|
-
|
185
|
-
# Builds the object from hash
|
186
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
187
|
-
# @return [Object] Returns the model itself
|
188
|
-
def build_from_hash(attributes)
|
189
193
|
return nil unless attributes.is_a?(Hash)
|
190
194
|
attributes = attributes.transform_keys(&:to_sym)
|
191
|
-
|
192
|
-
|
193
|
-
|
195
|
+
transformed_hash = {}
|
196
|
+
openapi_types.each_pair do |key, type|
|
197
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
198
|
+
transformed_hash["#{key}"] = nil
|
194
199
|
elsif type =~ /\AArray<(.*)>/i
|
195
200
|
# check to ensure the input is an array given that the attribute
|
196
201
|
# is documented as an array but the input is not
|
197
|
-
if attributes[
|
198
|
-
|
202
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
203
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
199
204
|
end
|
200
|
-
elsif !attributes[
|
201
|
-
|
205
|
+
elsif !attributes[attribute_map[key]].nil?
|
206
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
202
207
|
end
|
203
208
|
end
|
204
|
-
|
205
|
-
self
|
209
|
+
new(transformed_hash)
|
206
210
|
end
|
207
211
|
|
208
212
|
# Deserializes the data based on type
|
209
213
|
# @param string type Data type
|
210
214
|
# @param string value Value to be deserialized
|
211
215
|
# @return [Object] Deserialized data
|
212
|
-
def _deserialize(type, value)
|
216
|
+
def self._deserialize(type, value)
|
213
217
|
case type.to_sym
|
214
218
|
when :Time
|
215
219
|
Time.parse(value)
|