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 MilestonesGet
@@ -65,15 +67,20 @@ module EmassClient
65
67
  }
66
68
  end
67
69
 
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ attribute_map.values
73
+ end
74
+
68
75
  # Attribute type mapping.
69
76
  def self.openapi_types
70
77
  {
71
- :'system_id' => :'Object',
72
- :'milestone_id' => :'Object',
73
- :'poam_id' => :'Object',
74
- :'description' => :'Object',
75
- :'scheduled_completion_date' => :'Object',
76
- :'review_status' => :'Object'
78
+ :'system_id' => :'Integer',
79
+ :'milestone_id' => :'Integer',
80
+ :'poam_id' => :'Integer',
81
+ :'description' => :'String',
82
+ :'scheduled_completion_date' => :'Integer',
83
+ :'review_status' => :'String'
77
84
  }
78
85
  end
79
86
 
@@ -82,7 +89,7 @@ module EmassClient
82
89
  Set.new([
83
90
  ])
84
91
  end
85
-
92
+
86
93
  # Initializes the object
87
94
  # @param [Hash] attributes Model attributes in the form of hash
88
95
  def initialize(attributes = {})
@@ -133,7 +140,7 @@ module EmassClient
133
140
  # Check to see if the all the properties in the model are valid
134
141
  # @return true if the model is valid
135
142
  def valid?
136
- review_status_validator = EnumAttributeValidator.new('Object', ['Not Approved', 'Under Review', 'Approved'])
143
+ review_status_validator = EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved", "unknown_default_open_api"])
137
144
  return false unless review_status_validator.valid?(@review_status)
138
145
  true
139
146
  end
@@ -141,7 +148,7 @@ module EmassClient
141
148
  # Custom attribute writer method checking allowed values (enum).
142
149
  # @param [Object] review_status Object to be assigned
143
150
  def review_status=(review_status)
144
- validator = EnumAttributeValidator.new('Object', ['Not Approved', 'Under Review', 'Approved'])
151
+ validator = EnumAttributeValidator.new('String', ["Not Approved", "Under Review", "Approved", "unknown_default_open_api"])
145
152
  unless validator.valid?(review_status)
146
153
  fail ArgumentError, "invalid value for \"review_status\", must be one of #{validator.allowable_values}."
147
154
  end
@@ -185,8 +192,11 @@ module EmassClient
185
192
  # @return [Object] Returns the model itself
186
193
  def build_from_hash(attributes)
187
194
  return nil unless attributes.is_a?(Hash)
195
+ attributes = attributes.transform_keys(&:to_sym)
188
196
  self.class.openapi_types.each_pair do |key, type|
189
- if type =~ /\AArray<(.*)>/i
197
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
198
+ self.send("#{key}=", nil)
199
+ elsif type =~ /\AArray<(.*)>/i
190
200
  # check to ensure the input is an array given that the attribute
191
201
  # is documented as an array but the input is not
192
202
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -194,8 +204,6 @@ module EmassClient
194
204
  end
195
205
  elsif !attributes[self.class.attribute_map[key]].nil?
196
206
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
197
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
198
- self.send("#{key}=", nil)
199
207
  end
200
208
  end
201
209
 
@@ -208,8 +216,8 @@ module EmassClient
208
216
  # @return [Object] Deserialized data
209
217
  def _deserialize(type, value)
210
218
  case type.to_sym
211
- when :DateTime
212
- DateTime.parse(value)
219
+ when :Time
220
+ Time.parse(value)
213
221
  when :Date
214
222
  Date.parse(value)
215
223
  when :String
@@ -239,7 +247,9 @@ module EmassClient
239
247
  end
240
248
  end
241
249
  else # model
242
- EmassClient.const_get(type).build_from_hash(value)
250
+ # models (e.g. Pet) or oneOf
251
+ klass = EmassClient.const_get(type)
252
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
243
253
  end
244
254
  end
245
255
 
@@ -287,5 +297,8 @@ module EmassClient
287
297
  else
288
298
  value
289
299
  end
290
- end end
300
+ end
301
+
302
+ end
303
+
291
304
  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 MilestonesPutPostDelete
@@ -28,6 +30,8 @@ module EmassClient
28
30
  # Indicates if operations result (success/fail)
29
31
  attr_accessor :success
30
32
 
33
+ attr_accessor :errors
34
+
31
35
  # Attribute mapping from ruby-style variable name to JSON key.
32
36
  def self.attribute_map
33
37
  {
@@ -35,27 +39,35 @@ module EmassClient
35
39
  :'poam_id' => :'poamId',
36
40
  :'milestone_id' => :'milestoneId',
37
41
  :'external_uid' => :'externalUid',
38
- :'success' => :'success'
42
+ :'success' => :'success',
43
+ :'errors' => :'errors'
39
44
  }
40
45
  end
41
46
 
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ attribute_map.values
50
+ end
51
+
42
52
  # Attribute type mapping.
43
53
  def self.openapi_types
44
54
  {
45
- :'system_id' => :'Object',
46
- :'poam_id' => :'Object',
47
- :'milestone_id' => :'Object',
48
- :'external_uid' => :'Object',
49
- :'success' => :'Object'
55
+ :'system_id' => :'Integer',
56
+ :'poam_id' => :'Integer',
57
+ :'milestone_id' => :'Integer',
58
+ :'external_uid' => :'String',
59
+ :'success' => :'Boolean',
60
+ :'errors' => :'Array<Object>'
50
61
  }
51
62
  end
52
63
 
53
64
  # List of attributes with nullable: true
54
65
  def self.openapi_nullable
55
66
  Set.new([
67
+ :'errors'
56
68
  ])
57
69
  end
58
-
70
+
59
71
  # Initializes the object
60
72
  # @param [Hash] attributes Model attributes in the form of hash
61
73
  def initialize(attributes = {})
@@ -90,21 +102,42 @@ module EmassClient
90
102
  if attributes.key?(:'success')
91
103
  self.success = attributes[:'success']
92
104
  end
105
+
106
+ if attributes.key?(:'errors')
107
+ if (value = attributes[:'errors']).is_a?(Array)
108
+ self.errors = value
109
+ end
110
+ end
93
111
  end
94
112
 
95
113
  # Show invalid properties with the reasons. Usually used together with valid?
96
114
  # @return Array for valid properties with the reasons
97
115
  def list_invalid_properties
98
116
  invalid_properties = Array.new
117
+ if !@errors.nil? && @errors.length > 5
118
+ invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 5.')
119
+ end
120
+
99
121
  invalid_properties
100
122
  end
101
123
 
102
124
  # Check to see if the all the properties in the model are valid
103
125
  # @return true if the model is valid
104
126
  def valid?
127
+ return false if !@errors.nil? && @errors.length > 5
105
128
  true
106
129
  end
107
130
 
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] errors Value to be assigned
133
+ def errors=(errors)
134
+ if !errors.nil? && errors.length > 5
135
+ fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 5.'
136
+ end
137
+
138
+ @errors = errors
139
+ end
140
+
108
141
  # Checks equality by comparing each attribute.
109
142
  # @param [Object] Object to be compared
110
143
  def ==(o)
@@ -114,7 +147,8 @@ module EmassClient
114
147
  poam_id == o.poam_id &&
115
148
  milestone_id == o.milestone_id &&
116
149
  external_uid == o.external_uid &&
117
- success == o.success
150
+ success == o.success &&
151
+ errors == o.errors
118
152
  end
119
153
 
120
154
  # @see the `==` method
@@ -126,7 +160,7 @@ module EmassClient
126
160
  # Calculates hash code according to all attributes.
127
161
  # @return [Integer] Hash code
128
162
  def hash
129
- [system_id, poam_id, milestone_id, external_uid, success].hash
163
+ [system_id, poam_id, milestone_id, external_uid, success, errors].hash
130
164
  end
131
165
 
132
166
  # Builds the object from hash
@@ -141,8 +175,11 @@ module EmassClient
141
175
  # @return [Object] Returns the model itself
142
176
  def build_from_hash(attributes)
143
177
  return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
144
179
  self.class.openapi_types.each_pair do |key, type|
145
- if type =~ /\AArray<(.*)>/i
180
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
181
+ self.send("#{key}=", nil)
182
+ elsif type =~ /\AArray<(.*)>/i
146
183
  # check to ensure the input is an array given that the attribute
147
184
  # is documented as an array but the input is not
148
185
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -150,8 +187,6 @@ module EmassClient
150
187
  end
151
188
  elsif !attributes[self.class.attribute_map[key]].nil?
152
189
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
- self.send("#{key}=", nil)
155
190
  end
156
191
  end
157
192
 
@@ -164,8 +199,8 @@ module EmassClient
164
199
  # @return [Object] Deserialized data
165
200
  def _deserialize(type, value)
166
201
  case type.to_sym
167
- when :DateTime
168
- DateTime.parse(value)
202
+ when :Time
203
+ Time.parse(value)
169
204
  when :Date
170
205
  Date.parse(value)
171
206
  when :String
@@ -195,7 +230,9 @@ module EmassClient
195
230
  end
196
231
  end
197
232
  else # model
198
- EmassClient.const_get(type).build_from_hash(value)
233
+ # models (e.g. Pet) or oneOf
234
+ klass = EmassClient.const_get(type)
235
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
199
236
  end
200
237
  end
201
238
 
@@ -243,5 +280,8 @@ module EmassClient
243
280
  else
244
281
  value
245
282
  end
246
- end end
283
+ end
284
+
285
+ end
286
+
247
287
  end
@@ -1,18 +1,20 @@
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
- class DeleteMilestone
17
+ class MilestonesRequestDeleteBodyInner
16
18
  # [Required] Unique item identifier
17
19
  attr_accessor :milestone_id
18
20
 
@@ -23,10 +25,15 @@ module EmassClient
23
25
  }
24
26
  end
25
27
 
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
26
33
  # Attribute type mapping.
27
34
  def self.openapi_types
28
35
  {
29
- :'milestone_id' => :'Object'
36
+ :'milestone_id' => :'Integer'
30
37
  }
31
38
  end
32
39
 
@@ -35,18 +42,18 @@ module EmassClient
35
42
  Set.new([
36
43
  ])
37
44
  end
38
-
45
+
39
46
  # Initializes the object
40
47
  # @param [Hash] attributes Model attributes in the form of hash
41
48
  def initialize(attributes = {})
42
49
  if (!attributes.is_a?(Hash))
43
- fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::DeleteMilestone` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `EmassClient::MilestonesRequestDeleteBodyInner` initialize method"
44
51
  end
45
52
 
46
53
  # check to see if the attribute exists and convert string to symbol for hash key
47
54
  attributes = attributes.each_with_object({}) { |(k, v), h|
48
55
  if (!self.class.attribute_map.key?(k.to_sym))
49
- fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::DeleteMilestone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `EmassClient::MilestonesRequestDeleteBodyInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
57
  end
51
58
  h[k.to_sym] = v
52
59
  }
@@ -60,17 +67,12 @@ module EmassClient
60
67
  # @return Array for valid properties with the reasons
61
68
  def list_invalid_properties
62
69
  invalid_properties = Array.new
63
- if @milestone_id.nil?
64
- invalid_properties.push('invalid value for "milestone_id", milestone_id cannot be nil.')
65
- end
66
-
67
70
  invalid_properties
68
71
  end
69
72
 
70
73
  # Check to see if the all the properties in the model are valid
71
74
  # @return true if the model is valid
72
75
  def valid?
73
- return false if @milestone_id.nil?
74
76
  true
75
77
  end
76
78
 
@@ -106,8 +108,11 @@ module EmassClient
106
108
  # @return [Object] Returns the model itself
107
109
  def build_from_hash(attributes)
108
110
  return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
109
112
  self.class.openapi_types.each_pair do |key, type|
110
- if type =~ /\AArray<(.*)>/i
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
111
116
  # check to ensure the input is an array given that the attribute
112
117
  # is documented as an array but the input is not
113
118
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -115,8 +120,6 @@ module EmassClient
115
120
  end
116
121
  elsif !attributes[self.class.attribute_map[key]].nil?
117
122
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
- self.send("#{key}=", nil)
120
123
  end
121
124
  end
122
125
 
@@ -129,8 +132,8 @@ module EmassClient
129
132
  # @return [Object] Deserialized data
130
133
  def _deserialize(type, value)
131
134
  case type.to_sym
132
- when :DateTime
133
- DateTime.parse(value)
135
+ when :Time
136
+ Time.parse(value)
134
137
  when :Date
135
138
  Date.parse(value)
136
139
  when :String
@@ -160,7 +163,9 @@ module EmassClient
160
163
  end
161
164
  end
162
165
  else # model
163
- EmassClient.const_get(type).build_from_hash(value)
166
+ # models (e.g. Pet) or oneOf
167
+ klass = EmassClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
164
169
  end
165
170
  end
166
171
 
@@ -208,5 +213,8 @@ module EmassClient
208
213
  else
209
214
  value
210
215
  end
211
- end end
216
+ end
217
+
218
+ end
219
+
212
220
  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 MilestonesRequiredPost
@@ -27,11 +29,16 @@ module EmassClient
27
29
  }
28
30
  end
29
31
 
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
30
37
  # Attribute type mapping.
31
38
  def self.openapi_types
32
39
  {
33
- :'description' => :'Object',
34
- :'scheduled_completion_date' => :'Object'
40
+ :'description' => :'String',
41
+ :'scheduled_completion_date' => :'Integer'
35
42
  }
36
43
  end
37
44
 
@@ -40,7 +47,7 @@ module EmassClient
40
47
  Set.new([
41
48
  ])
42
49
  end
43
-
50
+
44
51
  # Initializes the object
45
52
  # @param [Hash] attributes Model attributes in the form of hash
46
53
  def initialize(attributes = {})
@@ -121,8 +128,11 @@ module EmassClient
121
128
  # @return [Object] Returns the model itself
122
129
  def build_from_hash(attributes)
123
130
  return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
124
132
  self.class.openapi_types.each_pair do |key, type|
125
- if type =~ /\AArray<(.*)>/i
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
126
136
  # check to ensure the input is an array given that the attribute
127
137
  # is documented as an array but the input is not
128
138
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -130,8 +140,6 @@ module EmassClient
130
140
  end
131
141
  elsif !attributes[self.class.attribute_map[key]].nil?
132
142
  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
143
  end
136
144
  end
137
145
 
@@ -144,8 +152,8 @@ module EmassClient
144
152
  # @return [Object] Deserialized data
145
153
  def _deserialize(type, value)
146
154
  case type.to_sym
147
- when :DateTime
148
- DateTime.parse(value)
155
+ when :Time
156
+ Time.parse(value)
149
157
  when :Date
150
158
  Date.parse(value)
151
159
  when :String
@@ -175,7 +183,9 @@ module EmassClient
175
183
  end
176
184
  end
177
185
  else # model
178
- EmassClient.const_get(type).build_from_hash(value)
186
+ # models (e.g. Pet) or oneOf
187
+ klass = EmassClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
189
  end
180
190
  end
181
191
 
@@ -223,5 +233,8 @@ module EmassClient
223
233
  else
224
234
  value
225
235
  end
226
- end end
236
+ end
237
+
238
+ end
239
+
227
240
  end