emass_client 1.0.1 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +152 -1124
  3. data/Rakefile +2 -0
  4. data/lib/emass_client/api/artifacts_api.rb +124 -97
  5. data/lib/emass_client/api/artifacts_export_api.rb +28 -19
  6. data/lib/emass_client/api/cac_api.rb +50 -31
  7. data/lib/emass_client/api/cloud_resources_api.rb +96 -0
  8. data/lib/emass_client/api/cmmc_assessments_api.rb +20 -11
  9. data/lib/emass_client/api/containers_api.rb +96 -0
  10. data/lib/emass_client/api/controls_api.rb +53 -34
  11. data/lib/emass_client/api/milestones_api.rb +138 -92
  12. data/lib/emass_client/api/pac_api.rb +50 -31
  13. data/lib/emass_client/api/poam_api.rb +132 -86
  14. data/lib/emass_client/api/registration_api.rb +30 -18
  15. data/lib/emass_client/api/static_code_scans_api.rb +38 -26
  16. data/lib/emass_client/api/system_roles_api.rb +48 -29
  17. data/lib/emass_client/api/systems_api.rb +57 -39
  18. data/lib/emass_client/api/test_api.rb +20 -11
  19. data/lib/emass_client/api/test_results_api.rb +53 -34
  20. data/lib/emass_client/api/workflow_definitions_api.rb +23 -14
  21. data/lib/emass_client/api/workflow_instances_api.rb +58 -53
  22. data/lib/emass_client/api_client.rb +59 -57
  23. data/lib/emass_client/api_error.rb +5 -5
  24. data/lib/emass_client/configuration.rb +93 -16
  25. data/lib/emass_client/models/artifacts_get.rb +54 -31
  26. data/lib/emass_client/models/{artifacts_delete_inner.rb → artifacts_request_delete_body_inner.rb} +29 -16
  27. data/lib/emass_client/models/artifacts_response_del.rb +27 -14
  28. data/lib/emass_client/models/{artifacts_response_del_data.rb → artifacts_response_del_data_inner.rb} +31 -18
  29. data/lib/emass_client/models/artifacts_response_get.rb +27 -14
  30. data/lib/emass_client/models/artifacts_response_put_post.rb +27 -14
  31. data/lib/emass_client/models/artifacts_response_put_post_data_inner.rb +265 -0
  32. data/lib/emass_client/models/cac_get.rb +82 -50
  33. data/lib/emass_client/models/cac_response_get.rb +27 -14
  34. data/lib/emass_client/models/cac_response_post.rb +27 -14
  35. data/lib/emass_client/models/{cac_response_post_data.rb → cac_response_post_data_inner.rb} +61 -21
  36. data/lib/emass_client/models/{pac_request_post_body.rb → cloud_resources_post.rb} +73 -69
  37. data/lib/emass_client/models/cloud_resources_response_post.rb +230 -0
  38. data/lib/emass_client/models/cmmc_get.rb +53 -63
  39. data/lib/emass_client/models/cmmc_response_get.rb +27 -14
  40. data/lib/emass_client/models/connectivity_ccsd.rb +29 -14
  41. data/lib/emass_client/models/containers_resources_post.rb +265 -0
  42. data/lib/emass_client/models/containers_response_post.rb +230 -0
  43. data/lib/emass_client/models/controls_get.rb +103 -66
  44. data/lib/emass_client/models/controls_put.rb +58 -18
  45. data/lib/emass_client/models/controls_response_get.rb +28 -14
  46. data/lib/emass_client/models/controls_response_put.rb +27 -14
  47. data/lib/emass_client/models/definition_transitions.rb +32 -62
  48. data/lib/emass_client/models/instances_transitions.rb +37 -88
  49. data/lib/emass_client/models/milestone_response_get.rb +27 -14
  50. data/lib/emass_client/models/milestone_response_get_milestone.rb +228 -0
  51. data/lib/emass_client/models/milestone_response_post.rb +27 -14
  52. data/lib/emass_client/models/milestone_response_put.rb +27 -14
  53. data/lib/emass_client/models/milestones_get.rb +33 -20
  54. data/lib/emass_client/models/milestones_put_post_delete.rb +60 -20
  55. data/lib/emass_client/models/{delete_milestone.rb → milestones_request_delete_body_inner.rb} +29 -21
  56. data/lib/emass_client/models/milestones_required_post.rb +27 -14
  57. data/lib/emass_client/models/milestones_required_put.rb +28 -15
  58. data/lib/emass_client/models/pac_get.rb +39 -22
  59. data/lib/emass_client/models/pac_post.rb +60 -20
  60. data/lib/emass_client/models/pac_response_get.rb +28 -14
  61. data/lib/emass_client/models/pac_response_post.rb +27 -14
  62. data/lib/emass_client/models/poam_get.rb +114 -77
  63. data/lib/emass_client/models/poam_post_put_del.rb +59 -19
  64. data/lib/emass_client/models/{delete_poam.rb → poam_request_delete_body_inner.rb} +29 -21
  65. data/lib/emass_client/models/poam_response_delete.rb +27 -14
  66. data/lib/emass_client/models/poam_response_get_poams.rb +228 -0
  67. data/lib/emass_client/models/{static_code_required_post.rb → poam_response_get_systems.rb} +42 -29
  68. data/lib/emass_client/models/poam_response_post.rb +27 -14
  69. data/lib/emass_client/models/poam_response_put.rb +27 -14
  70. data/lib/emass_client/models/register.rb +27 -14
  71. data/lib/emass_client/models/register_data.rb +26 -13
  72. data/lib/emass_client/models/register_user_request_post_body.rb +26 -13
  73. data/lib/emass_client/models/{model_200.rb → response200.rb} +53 -16
  74. data/lib/emass_client/models/{model_400.rb → response201.rb} +29 -16
  75. data/lib/emass_client/models/{model_201_meta.rb → response201_meta.rb} +54 -17
  76. data/lib/emass_client/models/{model_400_response.rb → response400.rb} +29 -16
  77. data/lib/emass_client/models/{model_400_meta.rb → response400_meta.rb} +54 -17
  78. data/lib/emass_client/models/{model_401.rb → response401.rb} +29 -16
  79. data/lib/emass_client/models/{model_401_meta.rb → response401_meta.rb} +54 -17
  80. data/lib/emass_client/models/{model_201.rb → response403.rb} +29 -16
  81. data/lib/emass_client/models/{model_403_meta.rb → response403_meta.rb} +54 -17
  82. data/lib/emass_client/models/{model_404.rb → response404.rb} +54 -17
  83. data/lib/emass_client/models/response405.rb +219 -0
  84. data/lib/emass_client/models/{model_405_meta.rb → response405_meta.rb} +54 -17
  85. data/lib/emass_client/models/response411.rb +219 -0
  86. data/lib/emass_client/models/{model_411_meta.rb → response411_meta.rb} +54 -17
  87. data/lib/emass_client/models/response490.rb +219 -0
  88. data/lib/emass_client/models/{model_490_meta.rb → response490_meta.rb} +54 -17
  89. data/lib/emass_client/models/response500.rb +219 -0
  90. data/lib/emass_client/models/{model_500_meta.rb → response500_meta.rb} +54 -17
  91. data/lib/emass_client/models/role_category.rb +32 -50
  92. data/lib/emass_client/models/roles.rb +29 -61
  93. data/lib/emass_client/models/ssps.rb +32 -16
  94. data/lib/emass_client/models/stage.rb +30 -49
  95. data/lib/emass_client/models/static_code_application.rb +34 -33
  96. data/lib/emass_client/models/static_code_post.rb +275 -0
  97. data/lib/emass_client/models/static_code_request_post_body.rb +47 -14
  98. data/lib/emass_client/models/{static_code_required_post_application.rb → static_code_request_post_body_application.rb} +30 -17
  99. data/lib/emass_client/models/static_code_response_post.rb +230 -0
  100. data/lib/emass_client/models/success200_response.rb +27 -14
  101. data/lib/emass_client/models/{error.rb → success200_response_data_inner.rb} +57 -36
  102. data/lib/emass_client/models/system_response.rb +28 -17
  103. data/lib/emass_client/models/system_roles_category_response.rb +28 -14
  104. data/lib/emass_client/models/system_roles_response.rb +27 -14
  105. data/lib/emass_client/models/{system_roles_response_data.rb → system_roles_response_data_inner.rb} +30 -17
  106. data/lib/emass_client/models/systems.rb +218 -191
  107. data/lib/emass_client/models/{poam_response_get.rb → systems_response.rb} +30 -17
  108. data/lib/emass_client/models/test.rb +27 -14
  109. data/lib/emass_client/models/test_data.rb +26 -13
  110. data/lib/emass_client/models/test_results_get.rb +39 -35
  111. data/lib/emass_client/models/test_results_post.rb +58 -18
  112. data/lib/emass_client/models/test_results_response_get.rb +27 -14
  113. data/lib/emass_client/models/test_results_response_post.rb +27 -14
  114. data/lib/emass_client/models/users.rb +28 -15
  115. data/lib/emass_client/models/workflow_definition_get.rb +63 -68
  116. data/lib/emass_client/models/workflow_definition_response_get.rb +27 -14
  117. data/lib/emass_client/models/workflow_instance_get.rb +331 -0
  118. data/lib/emass_client/models/workflow_instance_response_get.rb +230 -0
  119. data/lib/emass_client/models/workflow_instances_get.rb +107 -133
  120. data/lib/emass_client/models/workflow_instances_response_get.rb +39 -17
  121. data/lib/emass_client/models/workflow_instances_response_get_pagination.rb +246 -0
  122. data/lib/emass_client/version.rb +6 -5
  123. data/lib/emass_client.rb +47 -54
  124. metadata +60 -89
  125. data/lib/emass_client/models/artifacts_delete.rb +0 -201
  126. data/lib/emass_client/models/artifacts_request_put_body.rb +0 -363
  127. data/lib/emass_client/models/cac_request_post_body.rb +0 -217
  128. data/lib/emass_client/models/controls_request_put_body.rb +0 -606
  129. data/lib/emass_client/models/empty200_response.rb +0 -197
  130. data/lib/emass_client/models/milestones_delete.rb +0 -197
  131. data/lib/emass_client/models/milestones_post.rb +0 -197
  132. data/lib/emass_client/models/milestones_put.rb +0 -197
  133. data/lib/emass_client/models/milestones_request_post_body.rb +0 -242
  134. data/lib/emass_client/models/milestones_request_put_body.rb +0 -242
  135. data/lib/emass_client/models/model_403.rb +0 -206
  136. data/lib/emass_client/models/model_404_response.rb +0 -206
  137. data/lib/emass_client/models/model_405.rb +0 -206
  138. data/lib/emass_client/models/model_411.rb +0 -206
  139. data/lib/emass_client/models/model_490.rb +0 -206
  140. data/lib/emass_client/models/model_500.rb +0 -206
  141. data/lib/emass_client/models/poam_delete.rb +0 -197
  142. data/lib/emass_client/models/poam_post.rb +0 -197
  143. data/lib/emass_client/models/poam_put.rb +0 -197
  144. data/lib/emass_client/models/poam_request_post_body.rb +0 -197
  145. data/lib/emass_client/models/poam_request_put_body.rb +0 -197
  146. data/lib/emass_client/models/poam_required_post.rb +0 -564
  147. data/lib/emass_client/models/poam_required_put.rb +0 -594
  148. data/lib/emass_client/models/system_id_artifacts_body.rb +0 -284
  149. data/lib/emass_client/models/test_results_request_post_body.rb +0 -306
@@ -1,15 +1,17 @@
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. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register 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) where {url}/api/register (POST) is used to register the client certificate.</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:
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.</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
- OpenAPI spec version: v3.2
6
+ The version of the OpenAPI document: v3.3
7
7
  Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.26
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module EmassClient
15
17
  class ControlsGet
@@ -161,48 +163,77 @@ module EmassClient
161
163
  }
162
164
  end
163
165
 
166
+ # Returns all the JSON keys this model knows about
167
+ def self.acceptable_attributes
168
+ attribute_map.values
169
+ end
170
+
164
171
  # Attribute type mapping.
165
172
  def self.openapi_types
166
173
  {
167
- :'system_id' => :'Object',
168
- :'name' => :'Object',
169
- :'acronym' => :'Object',
170
- :'ccis' => :'Object',
171
- :'is_inherited' => :'Object',
172
- :'modified_by_overlays' => :'Object',
173
- :'included_status' => :'Object',
174
- :'compliance_status' => :'Object',
175
- :'responsible_entities' => :'Object',
176
- :'implementation_status' => :'Object',
177
- :'common_control_provider' => :'Object',
178
- :'na_justification' => :'Object',
179
- :'control_designation' => :'Object',
180
- :'estimated_completion_date' => :'Object',
181
- :'implementation_narrative' => :'Object',
182
- :'slcm_criticality' => :'Object',
183
- :'slcm_frequency' => :'Object',
184
- :'slcm_method' => :'Object',
185
- :'slcm_reporting' => :'Object',
186
- :'slcm_tracking' => :'Object',
187
- :'slcm_comments' => :'Object',
188
- :'severity' => :'Object',
189
- :'vulnerabilty_summary' => :'Object',
190
- :'recommendations' => :'Object',
191
- :'relevance_of_threat' => :'Object',
192
- :'likelihood' => :'Object',
193
- :'impact' => :'Object',
194
- :'impact_description' => :'Object',
195
- :'residual_risk_level' => :'Object',
196
- :'test_method' => :'Object'
174
+ :'system_id' => :'Integer',
175
+ :'name' => :'String',
176
+ :'acronym' => :'String',
177
+ :'ccis' => :'String',
178
+ :'is_inherited' => :'Boolean',
179
+ :'modified_by_overlays' => :'String',
180
+ :'included_status' => :'String',
181
+ :'compliance_status' => :'String',
182
+ :'responsible_entities' => :'String',
183
+ :'implementation_status' => :'String',
184
+ :'common_control_provider' => :'String',
185
+ :'na_justification' => :'String',
186
+ :'control_designation' => :'String',
187
+ :'estimated_completion_date' => :'Integer',
188
+ :'implementation_narrative' => :'String',
189
+ :'slcm_criticality' => :'String',
190
+ :'slcm_frequency' => :'String',
191
+ :'slcm_method' => :'String',
192
+ :'slcm_reporting' => :'String',
193
+ :'slcm_tracking' => :'String',
194
+ :'slcm_comments' => :'String',
195
+ :'severity' => :'String',
196
+ :'vulnerabilty_summary' => :'String',
197
+ :'recommendations' => :'String',
198
+ :'relevance_of_threat' => :'String',
199
+ :'likelihood' => :'String',
200
+ :'impact' => :'String',
201
+ :'impact_description' => :'String',
202
+ :'residual_risk_level' => :'String',
203
+ :'test_method' => :'String'
197
204
  }
198
205
  end
199
206
 
200
207
  # List of attributes with nullable: true
201
208
  def self.openapi_nullable
202
209
  Set.new([
210
+ :'name',
211
+ :'ccis',
212
+ :'is_inherited',
213
+ :'modified_by_overlays',
214
+ :'included_status',
215
+ :'compliance_status',
216
+ :'implementation_status',
217
+ :'common_control_provider',
218
+ :'na_justification',
219
+ :'slcm_criticality',
220
+ :'slcm_frequency',
221
+ :'slcm_method',
222
+ :'slcm_reporting',
223
+ :'slcm_tracking',
224
+ :'slcm_comments',
225
+ :'severity',
226
+ :'vulnerabilty_summary',
227
+ :'recommendations',
228
+ :'relevance_of_threat',
229
+ :'likelihood',
230
+ :'impact',
231
+ :'impact_description',
232
+ :'residual_risk_level',
233
+ :'test_method'
203
234
  ])
204
235
  end
205
-
236
+
206
237
  # Initializes the object
207
238
  # @param [Hash] attributes Model attributes in the form of hash
208
239
  def initialize(attributes = {})
@@ -349,29 +380,29 @@ module EmassClient
349
380
  # Check to see if the all the properties in the model are valid
350
381
  # @return true if the model is valid
351
382
  def valid?
352
- modified_by_overlays_validator = EnumAttributeValidator.new('Object', ['Privacy', 'Requirements', 'Concurrency'])
383
+ modified_by_overlays_validator = EnumAttributeValidator.new('String', ["Privacy", "Requirements", "Concurrency", "unknown_default_open_api"])
353
384
  return false unless modified_by_overlays_validator.valid?(@modified_by_overlays)
354
- implementation_status_validator = EnumAttributeValidator.new('Object', ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited'])
385
+ implementation_status_validator = EnumAttributeValidator.new('String', ["Planned", "Implemented", "Inherited", "Not Applicable", "Manually Inherited", "unknown_default_open_api"])
355
386
  return false unless implementation_status_validator.valid?(@implementation_status)
356
- common_control_provider_validator = EnumAttributeValidator.new('Object', ['DoD', 'Component', 'Enclave'])
387
+ common_control_provider_validator = EnumAttributeValidator.new('String', ["DoD", "Component", "Enclave", "unknown_default_open_api"])
357
388
  return false unless common_control_provider_validator.valid?(@common_control_provider)
358
- control_designation_validator = EnumAttributeValidator.new('Object', ['Common', 'System-Specific', 'Hybrid'])
389
+ control_designation_validator = EnumAttributeValidator.new('String', ["Common", "System-Specific", "Hybrid", "unknown_default_open_api"])
359
390
  return false unless control_designation_validator.valid?(@control_designation)
360
- slcm_frequency_validator = EnumAttributeValidator.new('Object', ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined'])
391
+ slcm_frequency_validator = EnumAttributeValidator.new('String', ["Constantly", "Daily", "Weekly", "Monthly", "Quarterly", "Semi-Annually", "Annually", "Every Two Years", "Every Three Years", "Undetermined", "unknown_default_open_api"])
361
392
  return false unless slcm_frequency_validator.valid?(@slcm_frequency)
362
- slcm_method_validator = EnumAttributeValidator.new('Object', ['Automated', 'Semi-Automated', 'Manual', 'Undetermined'])
393
+ slcm_method_validator = EnumAttributeValidator.new('String', ["Automated", "Semi-Automated", "Manual", "Undetermined", "unknown_default_open_api"])
363
394
  return false unless slcm_method_validator.valid?(@slcm_method)
364
- severity_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
395
+ severity_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
365
396
  return false unless severity_validator.valid?(@severity)
366
- relevance_of_threat_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
397
+ relevance_of_threat_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
367
398
  return false unless relevance_of_threat_validator.valid?(@relevance_of_threat)
368
- likelihood_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
399
+ likelihood_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
369
400
  return false unless likelihood_validator.valid?(@likelihood)
370
- impact_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
401
+ impact_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
371
402
  return false unless impact_validator.valid?(@impact)
372
- residual_risk_level_validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
403
+ residual_risk_level_validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
373
404
  return false unless residual_risk_level_validator.valid?(@residual_risk_level)
374
- test_method_validator = EnumAttributeValidator.new('Object', ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine', 'Test, Interview, Examine'])
405
+ test_method_validator = EnumAttributeValidator.new('String', ["Test", "Interview", "Examine", "Test, Interview", "Test, Examine", "Interview, Examine", "Test, Interview, Examine", "unknown_default_open_api"])
375
406
  return false unless test_method_validator.valid?(@test_method)
376
407
  true
377
408
  end
@@ -379,7 +410,7 @@ module EmassClient
379
410
  # Custom attribute writer method checking allowed values (enum).
380
411
  # @param [Object] modified_by_overlays Object to be assigned
381
412
  def modified_by_overlays=(modified_by_overlays)
382
- validator = EnumAttributeValidator.new('Object', ['Privacy', 'Requirements', 'Concurrency'])
413
+ validator = EnumAttributeValidator.new('String', ["Privacy", "Requirements", "Concurrency", "unknown_default_open_api"])
383
414
  unless validator.valid?(modified_by_overlays)
384
415
  fail ArgumentError, "invalid value for \"modified_by_overlays\", must be one of #{validator.allowable_values}."
385
416
  end
@@ -389,7 +420,7 @@ module EmassClient
389
420
  # Custom attribute writer method checking allowed values (enum).
390
421
  # @param [Object] implementation_status Object to be assigned
391
422
  def implementation_status=(implementation_status)
392
- validator = EnumAttributeValidator.new('Object', ['Planned', 'Implemented', 'Inherited', 'Not Applicable', 'Manually Inherited'])
423
+ validator = EnumAttributeValidator.new('String', ["Planned", "Implemented", "Inherited", "Not Applicable", "Manually Inherited", "unknown_default_open_api"])
393
424
  unless validator.valid?(implementation_status)
394
425
  fail ArgumentError, "invalid value for \"implementation_status\", must be one of #{validator.allowable_values}."
395
426
  end
@@ -399,7 +430,7 @@ module EmassClient
399
430
  # Custom attribute writer method checking allowed values (enum).
400
431
  # @param [Object] common_control_provider Object to be assigned
401
432
  def common_control_provider=(common_control_provider)
402
- validator = EnumAttributeValidator.new('Object', ['DoD', 'Component', 'Enclave'])
433
+ validator = EnumAttributeValidator.new('String', ["DoD", "Component", "Enclave", "unknown_default_open_api"])
403
434
  unless validator.valid?(common_control_provider)
404
435
  fail ArgumentError, "invalid value for \"common_control_provider\", must be one of #{validator.allowable_values}."
405
436
  end
@@ -409,7 +440,7 @@ module EmassClient
409
440
  # Custom attribute writer method checking allowed values (enum).
410
441
  # @param [Object] control_designation Object to be assigned
411
442
  def control_designation=(control_designation)
412
- validator = EnumAttributeValidator.new('Object', ['Common', 'System-Specific', 'Hybrid'])
443
+ validator = EnumAttributeValidator.new('String', ["Common", "System-Specific", "Hybrid", "unknown_default_open_api"])
413
444
  unless validator.valid?(control_designation)
414
445
  fail ArgumentError, "invalid value for \"control_designation\", must be one of #{validator.allowable_values}."
415
446
  end
@@ -419,7 +450,7 @@ module EmassClient
419
450
  # Custom attribute writer method checking allowed values (enum).
420
451
  # @param [Object] slcm_frequency Object to be assigned
421
452
  def slcm_frequency=(slcm_frequency)
422
- validator = EnumAttributeValidator.new('Object', ['Constantly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Semi-Annually', 'Annually', 'Every Two Years', 'Every Three Years', 'Undetermined'])
453
+ validator = EnumAttributeValidator.new('String', ["Constantly", "Daily", "Weekly", "Monthly", "Quarterly", "Semi-Annually", "Annually", "Every Two Years", "Every Three Years", "Undetermined", "unknown_default_open_api"])
423
454
  unless validator.valid?(slcm_frequency)
424
455
  fail ArgumentError, "invalid value for \"slcm_frequency\", must be one of #{validator.allowable_values}."
425
456
  end
@@ -429,7 +460,7 @@ module EmassClient
429
460
  # Custom attribute writer method checking allowed values (enum).
430
461
  # @param [Object] slcm_method Object to be assigned
431
462
  def slcm_method=(slcm_method)
432
- validator = EnumAttributeValidator.new('Object', ['Automated', 'Semi-Automated', 'Manual', 'Undetermined'])
463
+ validator = EnumAttributeValidator.new('String', ["Automated", "Semi-Automated", "Manual", "Undetermined", "unknown_default_open_api"])
433
464
  unless validator.valid?(slcm_method)
434
465
  fail ArgumentError, "invalid value for \"slcm_method\", must be one of #{validator.allowable_values}."
435
466
  end
@@ -439,7 +470,7 @@ module EmassClient
439
470
  # Custom attribute writer method checking allowed values (enum).
440
471
  # @param [Object] severity Object to be assigned
441
472
  def severity=(severity)
442
- validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
473
+ validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
443
474
  unless validator.valid?(severity)
444
475
  fail ArgumentError, "invalid value for \"severity\", must be one of #{validator.allowable_values}."
445
476
  end
@@ -449,7 +480,7 @@ module EmassClient
449
480
  # Custom attribute writer method checking allowed values (enum).
450
481
  # @param [Object] relevance_of_threat Object to be assigned
451
482
  def relevance_of_threat=(relevance_of_threat)
452
- validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
483
+ validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
453
484
  unless validator.valid?(relevance_of_threat)
454
485
  fail ArgumentError, "invalid value for \"relevance_of_threat\", must be one of #{validator.allowable_values}."
455
486
  end
@@ -459,7 +490,7 @@ module EmassClient
459
490
  # Custom attribute writer method checking allowed values (enum).
460
491
  # @param [Object] likelihood Object to be assigned
461
492
  def likelihood=(likelihood)
462
- validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
493
+ validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
463
494
  unless validator.valid?(likelihood)
464
495
  fail ArgumentError, "invalid value for \"likelihood\", must be one of #{validator.allowable_values}."
465
496
  end
@@ -469,7 +500,7 @@ module EmassClient
469
500
  # Custom attribute writer method checking allowed values (enum).
470
501
  # @param [Object] impact Object to be assigned
471
502
  def impact=(impact)
472
- validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
503
+ validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
473
504
  unless validator.valid?(impact)
474
505
  fail ArgumentError, "invalid value for \"impact\", must be one of #{validator.allowable_values}."
475
506
  end
@@ -479,7 +510,7 @@ module EmassClient
479
510
  # Custom attribute writer method checking allowed values (enum).
480
511
  # @param [Object] residual_risk_level Object to be assigned
481
512
  def residual_risk_level=(residual_risk_level)
482
- validator = EnumAttributeValidator.new('Object', ['Very Low', 'Low', 'Moderate', 'High', 'Very High'])
513
+ validator = EnumAttributeValidator.new('String', ["Very Low", "Low", "Moderate", "High", "Very High", "unknown_default_open_api"])
483
514
  unless validator.valid?(residual_risk_level)
484
515
  fail ArgumentError, "invalid value for \"residual_risk_level\", must be one of #{validator.allowable_values}."
485
516
  end
@@ -489,7 +520,7 @@ module EmassClient
489
520
  # Custom attribute writer method checking allowed values (enum).
490
521
  # @param [Object] test_method Object to be assigned
491
522
  def test_method=(test_method)
492
- validator = EnumAttributeValidator.new('Object', ['Test', 'Interview', 'Examine', 'Test, Interview', 'Test, Examine', 'Interview, Examine', 'Test, Interview, Examine'])
523
+ validator = EnumAttributeValidator.new('String', ["Test", "Interview", "Examine", "Test, Interview", "Test, Examine", "Interview, Examine", "Test, Interview, Examine", "unknown_default_open_api"])
493
524
  unless validator.valid?(test_method)
494
525
  fail ArgumentError, "invalid value for \"test_method\", must be one of #{validator.allowable_values}."
495
526
  end
@@ -557,8 +588,11 @@ module EmassClient
557
588
  # @return [Object] Returns the model itself
558
589
  def build_from_hash(attributes)
559
590
  return nil unless attributes.is_a?(Hash)
591
+ attributes = attributes.transform_keys(&:to_sym)
560
592
  self.class.openapi_types.each_pair do |key, type|
561
- if type =~ /\AArray<(.*)>/i
593
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
594
+ self.send("#{key}=", nil)
595
+ elsif type =~ /\AArray<(.*)>/i
562
596
  # check to ensure the input is an array given that the attribute
563
597
  # is documented as an array but the input is not
564
598
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -566,8 +600,6 @@ module EmassClient
566
600
  end
567
601
  elsif !attributes[self.class.attribute_map[key]].nil?
568
602
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
569
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
570
- self.send("#{key}=", nil)
571
603
  end
572
604
  end
573
605
 
@@ -580,8 +612,8 @@ module EmassClient
580
612
  # @return [Object] Deserialized data
581
613
  def _deserialize(type, value)
582
614
  case type.to_sym
583
- when :DateTime
584
- DateTime.parse(value)
615
+ when :Time
616
+ Time.parse(value)
585
617
  when :Date
586
618
  Date.parse(value)
587
619
  when :String
@@ -611,7 +643,9 @@ module EmassClient
611
643
  end
612
644
  end
613
645
  else # model
614
- EmassClient.const_get(type).build_from_hash(value)
646
+ # models (e.g. Pet) or oneOf
647
+ klass = EmassClient.const_get(type)
648
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
615
649
  end
616
650
  end
617
651
 
@@ -659,5 +693,8 @@ module EmassClient
659
693
  else
660
694
  value
661
695
  end
662
- end end
696
+ end
697
+
698
+ end
699
+
663
700
  end
@@ -1,15 +1,17 @@
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. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.</br><br> <strong>Register CLI</strong></br> New users will need to register 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) where {url}/api/register (POST) is used to register the client certificate.</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:
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.</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
- OpenAPI spec version: v3.2
6
+ The version of the OpenAPI document: v3.3
7
7
  Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.26
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module EmassClient
15
17
  class ControlsPut
@@ -22,30 +24,40 @@ module EmassClient
22
24
  # The system identifier for the system being updated.
23
25
  attr_accessor :system_id
24
26
 
27
+ attr_accessor :errors
28
+
25
29
  # Attribute mapping from ruby-style variable name to JSON key.
26
30
  def self.attribute_map
27
31
  {
28
32
  :'acronym' => :'acronym',
29
33
  :'success' => :'success',
30
- :'system_id' => :'systemId'
34
+ :'system_id' => :'systemId',
35
+ :'errors' => :'errors'
31
36
  }
32
37
  end
33
38
 
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
34
44
  # Attribute type mapping.
35
45
  def self.openapi_types
36
46
  {
37
- :'acronym' => :'Object',
38
- :'success' => :'Object',
39
- :'system_id' => :'Object'
47
+ :'acronym' => :'String',
48
+ :'success' => :'Boolean',
49
+ :'system_id' => :'Integer',
50
+ :'errors' => :'Array<Object>'
40
51
  }
41
52
  end
42
53
 
43
54
  # List of attributes with nullable: true
44
55
  def self.openapi_nullable
45
56
  Set.new([
57
+ :'errors'
46
58
  ])
47
59
  end
48
-
60
+
49
61
  # Initializes the object
50
62
  # @param [Hash] attributes Model attributes in the form of hash
51
63
  def initialize(attributes = {})
@@ -72,21 +84,42 @@ module EmassClient
72
84
  if attributes.key?(:'system_id')
73
85
  self.system_id = attributes[:'system_id']
74
86
  end
87
+
88
+ if attributes.key?(:'errors')
89
+ if (value = attributes[:'errors']).is_a?(Array)
90
+ self.errors = value
91
+ end
92
+ end
75
93
  end
76
94
 
77
95
  # Show invalid properties with the reasons. Usually used together with valid?
78
96
  # @return Array for valid properties with the reasons
79
97
  def list_invalid_properties
80
98
  invalid_properties = Array.new
99
+ if !@errors.nil? && @errors.length > 5
100
+ invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 5.')
101
+ end
102
+
81
103
  invalid_properties
82
104
  end
83
105
 
84
106
  # Check to see if the all the properties in the model are valid
85
107
  # @return true if the model is valid
86
108
  def valid?
109
+ return false if !@errors.nil? && @errors.length > 5
87
110
  true
88
111
  end
89
112
 
113
+ # Custom attribute writer method with validation
114
+ # @param [Object] errors Value to be assigned
115
+ def errors=(errors)
116
+ if !errors.nil? && errors.length > 5
117
+ fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 5.'
118
+ end
119
+
120
+ @errors = errors
121
+ end
122
+
90
123
  # Checks equality by comparing each attribute.
91
124
  # @param [Object] Object to be compared
92
125
  def ==(o)
@@ -94,7 +127,8 @@ module EmassClient
94
127
  self.class == o.class &&
95
128
  acronym == o.acronym &&
96
129
  success == o.success &&
97
- system_id == o.system_id
130
+ system_id == o.system_id &&
131
+ errors == o.errors
98
132
  end
99
133
 
100
134
  # @see the `==` method
@@ -106,7 +140,7 @@ module EmassClient
106
140
  # Calculates hash code according to all attributes.
107
141
  # @return [Integer] Hash code
108
142
  def hash
109
- [acronym, success, system_id].hash
143
+ [acronym, success, system_id, errors].hash
110
144
  end
111
145
 
112
146
  # Builds the object from hash
@@ -121,8 +155,11 @@ module EmassClient
121
155
  # @return [Object] Returns the model itself
122
156
  def build_from_hash(attributes)
123
157
  return nil unless attributes.is_a?(Hash)
158
+ attributes = attributes.transform_keys(&:to_sym)
124
159
  self.class.openapi_types.each_pair do |key, type|
125
- if type =~ /\AArray<(.*)>/i
160
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
161
+ self.send("#{key}=", nil)
162
+ elsif type =~ /\AArray<(.*)>/i
126
163
  # check to ensure the input is an array given that the attribute
127
164
  # is documented as an array but the input is not
128
165
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -130,8 +167,6 @@ module EmassClient
130
167
  end
131
168
  elsif !attributes[self.class.attribute_map[key]].nil?
132
169
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
- self.send("#{key}=", nil)
135
170
  end
136
171
  end
137
172
 
@@ -144,8 +179,8 @@ module EmassClient
144
179
  # @return [Object] Deserialized data
145
180
  def _deserialize(type, value)
146
181
  case type.to_sym
147
- when :DateTime
148
- DateTime.parse(value)
182
+ when :Time
183
+ Time.parse(value)
149
184
  when :Date
150
185
  Date.parse(value)
151
186
  when :String
@@ -175,7 +210,9 @@ module EmassClient
175
210
  end
176
211
  end
177
212
  else # model
178
- EmassClient.const_get(type).build_from_hash(value)
213
+ # models (e.g. Pet) or oneOf
214
+ klass = EmassClient.const_get(type)
215
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
216
  end
180
217
  end
181
218
 
@@ -223,5 +260,8 @@ module EmassClient
223
260
  else
224
261
  value
225
262
  end
226
- end end
263
+ end
264
+
265
+ end
266
+
227
267
  end