emass_client 1.0.3 → 1.0.5

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 +18 -9
  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.0-SNAPSHOT
10
+
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module EmassClient
15
17
  class MilestonesRequiredPut
@@ -31,12 +33,17 @@ module EmassClient
31
33
  }
32
34
  end
33
35
 
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
34
41
  # Attribute type mapping.
35
42
  def self.openapi_types
36
43
  {
37
- :'milestone_id' => :'Object',
38
- :'description' => :'Object',
39
- :'scheduled_completion_date' => :'Object'
44
+ :'milestone_id' => :'Integer',
45
+ :'description' => :'String',
46
+ :'scheduled_completion_date' => :'Integer'
40
47
  }
41
48
  end
42
49
 
@@ -45,7 +52,7 @@ module EmassClient
45
52
  Set.new([
46
53
  ])
47
54
  end
48
-
55
+
49
56
  # Initializes the object
50
57
  # @param [Hash] attributes Model attributes in the form of hash
51
58
  def initialize(attributes = {})
@@ -136,8 +143,11 @@ module EmassClient
136
143
  # @return [Object] Returns the model itself
137
144
  def build_from_hash(attributes)
138
145
  return nil unless attributes.is_a?(Hash)
146
+ attributes = attributes.transform_keys(&:to_sym)
139
147
  self.class.openapi_types.each_pair do |key, type|
140
- if type =~ /\AArray<(.*)>/i
148
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
+ self.send("#{key}=", nil)
150
+ elsif type =~ /\AArray<(.*)>/i
141
151
  # check to ensure the input is an array given that the attribute
142
152
  # is documented as an array but the input is not
143
153
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -145,8 +155,6 @@ module EmassClient
145
155
  end
146
156
  elsif !attributes[self.class.attribute_map[key]].nil?
147
157
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
149
- self.send("#{key}=", nil)
150
158
  end
151
159
  end
152
160
 
@@ -159,8 +167,8 @@ module EmassClient
159
167
  # @return [Object] Deserialized data
160
168
  def _deserialize(type, value)
161
169
  case type.to_sym
162
- when :DateTime
163
- DateTime.parse(value)
170
+ when :Time
171
+ Time.parse(value)
164
172
  when :Date
165
173
  Date.parse(value)
166
174
  when :String
@@ -190,7 +198,9 @@ module EmassClient
190
198
  end
191
199
  end
192
200
  else # model
193
- EmassClient.const_get(type).build_from_hash(value)
201
+ # models (e.g. Pet) or oneOf
202
+ klass = EmassClient.const_get(type)
203
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
204
  end
195
205
  end
196
206
 
@@ -238,5 +248,8 @@ module EmassClient
238
248
  else
239
249
  value
240
250
  end
241
- end end
251
+ end
252
+
253
+ end
254
+
242
255
  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.0-SNAPSHOT
10
+
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module EmassClient
15
17
  class PacGet
@@ -73,26 +75,35 @@ module EmassClient
73
75
  }
74
76
  end
75
77
 
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
76
83
  # Attribute type mapping.
77
84
  def self.openapi_types
78
85
  {
79
- :'system_id' => :'Object',
80
- :'workflow' => :'Object',
81
- :'name' => :'Object',
82
- :'current_stage_name' => :'Object',
83
- :'current_stage' => :'Object',
84
- :'total_stages' => :'Object',
85
- :'days_at_current_stage' => :'Object',
86
- :'comments' => :'Object'
86
+ :'system_id' => :'Integer',
87
+ :'workflow' => :'String',
88
+ :'name' => :'String',
89
+ :'current_stage_name' => :'String',
90
+ :'current_stage' => :'Integer',
91
+ :'total_stages' => :'Integer',
92
+ :'days_at_current_stage' => :'Integer',
93
+ :'comments' => :'String'
87
94
  }
88
95
  end
89
96
 
90
97
  # List of attributes with nullable: true
91
98
  def self.openapi_nullable
92
99
  Set.new([
100
+ :'current_stage_name',
101
+ :'current_stage',
102
+ :'total_stages',
103
+ :'days_at_current_stage',
93
104
  ])
94
105
  end
95
-
106
+
96
107
  # Initializes the object
97
108
  # @param [Hash] attributes Model attributes in the form of hash
98
109
  def initialize(attributes = {})
@@ -151,7 +162,7 @@ module EmassClient
151
162
  # Check to see if the all the properties in the model are valid
152
163
  # @return true if the model is valid
153
164
  def valid?
154
- workflow_validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval'])
165
+ workflow_validator = EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval", "unknown_default_open_api"])
155
166
  return false unless workflow_validator.valid?(@workflow)
156
167
  true
157
168
  end
@@ -159,7 +170,7 @@ module EmassClient
159
170
  # Custom attribute writer method checking allowed values (enum).
160
171
  # @param [Object] workflow Object to be assigned
161
172
  def workflow=(workflow)
162
- validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval'])
173
+ validator = EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval", "unknown_default_open_api"])
163
174
  unless validator.valid?(workflow)
164
175
  fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}."
165
176
  end
@@ -205,8 +216,11 @@ module EmassClient
205
216
  # @return [Object] Returns the model itself
206
217
  def build_from_hash(attributes)
207
218
  return nil unless attributes.is_a?(Hash)
219
+ attributes = attributes.transform_keys(&:to_sym)
208
220
  self.class.openapi_types.each_pair do |key, type|
209
- if type =~ /\AArray<(.*)>/i
221
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
222
+ self.send("#{key}=", nil)
223
+ elsif type =~ /\AArray<(.*)>/i
210
224
  # check to ensure the input is an array given that the attribute
211
225
  # is documented as an array but the input is not
212
226
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -214,8 +228,6 @@ module EmassClient
214
228
  end
215
229
  elsif !attributes[self.class.attribute_map[key]].nil?
216
230
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
217
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
218
- self.send("#{key}=", nil)
219
231
  end
220
232
  end
221
233
 
@@ -228,8 +240,8 @@ module EmassClient
228
240
  # @return [Object] Deserialized data
229
241
  def _deserialize(type, value)
230
242
  case type.to_sym
231
- when :DateTime
232
- DateTime.parse(value)
243
+ when :Time
244
+ Time.parse(value)
233
245
  when :Date
234
246
  Date.parse(value)
235
247
  when :String
@@ -259,7 +271,9 @@ module EmassClient
259
271
  end
260
272
  end
261
273
  else # model
262
- EmassClient.const_get(type).build_from_hash(value)
274
+ # models (e.g. Pet) or oneOf
275
+ klass = EmassClient.const_get(type)
276
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
263
277
  end
264
278
  end
265
279
 
@@ -307,5 +321,8 @@ module EmassClient
307
321
  else
308
322
  value
309
323
  end
310
- end end
324
+ end
325
+
326
+ end
327
+
311
328
  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.0-SNAPSHOT
10
+
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module EmassClient
15
17
  class PacPost
@@ -20,6 +22,8 @@ module EmassClient
20
22
 
21
23
  attr_accessor :system_id
22
24
 
25
+ attr_accessor :errors
26
+
23
27
  class EnumAttributeValidator
24
28
  attr_reader :datatype
25
29
  attr_reader :allowable_values
@@ -47,25 +51,33 @@ module EmassClient
47
51
  {
48
52
  :'workflow' => :'workflow',
49
53
  :'success' => :'success',
50
- :'system_id' => :'systemId'
54
+ :'system_id' => :'systemId',
55
+ :'errors' => :'errors'
51
56
  }
52
57
  end
53
58
 
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ attribute_map.values
62
+ end
63
+
54
64
  # Attribute type mapping.
55
65
  def self.openapi_types
56
66
  {
57
- :'workflow' => :'Object',
58
- :'success' => :'Object',
59
- :'system_id' => :'Object'
67
+ :'workflow' => :'String',
68
+ :'success' => :'Boolean',
69
+ :'system_id' => :'Integer',
70
+ :'errors' => :'Array<Object>'
60
71
  }
61
72
  end
62
73
 
63
74
  # List of attributes with nullable: true
64
75
  def self.openapi_nullable
65
76
  Set.new([
77
+ :'errors'
66
78
  ])
67
79
  end
68
-
80
+
69
81
  # Initializes the object
70
82
  # @param [Hash] attributes Model attributes in the form of hash
71
83
  def initialize(attributes = {})
@@ -92,33 +104,54 @@ module EmassClient
92
104
  if attributes.key?(:'system_id')
93
105
  self.system_id = attributes[:'system_id']
94
106
  end
107
+
108
+ if attributes.key?(:'errors')
109
+ if (value = attributes[:'errors']).is_a?(Array)
110
+ self.errors = value
111
+ end
112
+ end
95
113
  end
96
114
 
97
115
  # Show invalid properties with the reasons. Usually used together with valid?
98
116
  # @return Array for valid properties with the reasons
99
117
  def list_invalid_properties
100
118
  invalid_properties = Array.new
119
+ if !@errors.nil? && @errors.length > 5
120
+ invalid_properties.push('invalid value for "errors", number of items must be less than or equal to 5.')
121
+ end
122
+
101
123
  invalid_properties
102
124
  end
103
125
 
104
126
  # Check to see if the all the properties in the model are valid
105
127
  # @return true if the model is valid
106
128
  def valid?
107
- workflow_validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval'])
129
+ workflow_validator = EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval", "unknown_default_open_api"])
108
130
  return false unless workflow_validator.valid?(@workflow)
131
+ return false if !@errors.nil? && @errors.length > 5
109
132
  true
110
133
  end
111
134
 
112
135
  # Custom attribute writer method checking allowed values (enum).
113
136
  # @param [Object] workflow Object to be assigned
114
137
  def workflow=(workflow)
115
- validator = EnumAttributeValidator.new('Object', ['Assess and Authorize', 'Assess Only', 'Security Plan Approval'])
138
+ validator = EnumAttributeValidator.new('String', ["Assess and Authorize", "Assess Only", "Security Plan Approval", "unknown_default_open_api"])
116
139
  unless validator.valid?(workflow)
117
140
  fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}."
118
141
  end
119
142
  @workflow = workflow
120
143
  end
121
144
 
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] errors Value to be assigned
147
+ def errors=(errors)
148
+ if !errors.nil? && errors.length > 5
149
+ fail ArgumentError, 'invalid value for "errors", number of items must be less than or equal to 5.'
150
+ end
151
+
152
+ @errors = errors
153
+ end
154
+
122
155
  # Checks equality by comparing each attribute.
123
156
  # @param [Object] Object to be compared
124
157
  def ==(o)
@@ -126,7 +159,8 @@ module EmassClient
126
159
  self.class == o.class &&
127
160
  workflow == o.workflow &&
128
161
  success == o.success &&
129
- system_id == o.system_id
162
+ system_id == o.system_id &&
163
+ errors == o.errors
130
164
  end
131
165
 
132
166
  # @see the `==` method
@@ -138,7 +172,7 @@ module EmassClient
138
172
  # Calculates hash code according to all attributes.
139
173
  # @return [Integer] Hash code
140
174
  def hash
141
- [workflow, success, system_id].hash
175
+ [workflow, success, system_id, errors].hash
142
176
  end
143
177
 
144
178
  # Builds the object from hash
@@ -153,8 +187,11 @@ module EmassClient
153
187
  # @return [Object] Returns the model itself
154
188
  def build_from_hash(attributes)
155
189
  return nil unless attributes.is_a?(Hash)
190
+ attributes = attributes.transform_keys(&:to_sym)
156
191
  self.class.openapi_types.each_pair do |key, type|
157
- if type =~ /\AArray<(.*)>/i
192
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
193
+ self.send("#{key}=", nil)
194
+ elsif type =~ /\AArray<(.*)>/i
158
195
  # check to ensure the input is an array given that the attribute
159
196
  # is documented as an array but the input is not
160
197
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -162,8 +199,6 @@ module EmassClient
162
199
  end
163
200
  elsif !attributes[self.class.attribute_map[key]].nil?
164
201
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
165
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
- self.send("#{key}=", nil)
167
202
  end
168
203
  end
169
204
 
@@ -176,8 +211,8 @@ module EmassClient
176
211
  # @return [Object] Deserialized data
177
212
  def _deserialize(type, value)
178
213
  case type.to_sym
179
- when :DateTime
180
- DateTime.parse(value)
214
+ when :Time
215
+ Time.parse(value)
181
216
  when :Date
182
217
  Date.parse(value)
183
218
  when :String
@@ -207,7 +242,9 @@ module EmassClient
207
242
  end
208
243
  end
209
244
  else # model
210
- EmassClient.const_get(type).build_from_hash(value)
245
+ # models (e.g. Pet) or oneOf
246
+ klass = EmassClient.const_get(type)
247
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
211
248
  end
212
249
  end
213
250
 
@@ -255,5 +292,8 @@ module EmassClient
255
292
  else
256
293
  value
257
294
  end
258
- end end
295
+ end
296
+
297
+ end
298
+
259
299
  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.0-SNAPSHOT
10
+
10
11
  =end
11
12
 
12
13
  require 'date'
14
+ require 'time'
13
15
 
14
16
  module EmassClient
15
17
  class PacResponseGet
@@ -25,20 +27,26 @@ module EmassClient
25
27
  }
26
28
  end
27
29
 
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
28
35
  # Attribute type mapping.
29
36
  def self.openapi_types
30
37
  {
31
- :'meta' => :'Object',
32
- :'data' => :'Object'
38
+ :'meta' => :'Response200',
39
+ :'data' => :'Array<PacGet>'
33
40
  }
34
41
  end
35
42
 
36
43
  # List of attributes with nullable: true
37
44
  def self.openapi_nullable
38
45
  Set.new([
46
+ :'data'
39
47
  ])
40
48
  end
41
-
49
+
42
50
  # Initializes the object
43
51
  # @param [Hash] attributes Model attributes in the form of hash
44
52
  def initialize(attributes = {})
@@ -111,8 +119,11 @@ module EmassClient
111
119
  # @return [Object] Returns the model itself
112
120
  def build_from_hash(attributes)
113
121
  return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
114
123
  self.class.openapi_types.each_pair do |key, type|
115
- if type =~ /\AArray<(.*)>/i
124
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
125
+ self.send("#{key}=", nil)
126
+ elsif type =~ /\AArray<(.*)>/i
116
127
  # check to ensure the input is an array given that the attribute
117
128
  # is documented as an array but the input is not
118
129
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -120,8 +131,6 @@ module EmassClient
120
131
  end
121
132
  elsif !attributes[self.class.attribute_map[key]].nil?
122
133
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
- self.send("#{key}=", nil)
125
134
  end
126
135
  end
127
136
 
@@ -134,8 +143,8 @@ module EmassClient
134
143
  # @return [Object] Deserialized data
135
144
  def _deserialize(type, value)
136
145
  case type.to_sym
137
- when :DateTime
138
- DateTime.parse(value)
146
+ when :Time
147
+ Time.parse(value)
139
148
  when :Date
140
149
  Date.parse(value)
141
150
  when :String
@@ -165,7 +174,9 @@ module EmassClient
165
174
  end
166
175
  end
167
176
  else # model
168
- EmassClient.const_get(type).build_from_hash(value)
177
+ # models (e.g. Pet) or oneOf
178
+ klass = EmassClient.const_get(type)
179
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
180
  end
170
181
  end
171
182
 
@@ -213,5 +224,8 @@ module EmassClient
213
224
  else
214
225
  value
215
226
  end
216
- end end
227
+ end
228
+
229
+ end
230
+
217
231
  end