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,107 +1,113 @@
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 WorkflowInstancesGet
16
- # [Read-Only] Date the workflow instance or the workflow transition was created.
17
- attr_accessor :created_date
18
+ # [Read-Only] Unique workflow definition identifier.
19
+ attr_accessor :workflow_uid
18
20
 
19
- # [Read-Only] Name of the current stage.
20
- attr_accessor :current_stage
21
+ # [Read-only] Unique system record identifier.
22
+ attr_accessor :system_id
21
23
 
22
- # [Read-Only] User that last acted on the workflow.
23
- attr_accessor :last_edited_by
24
+ # [Read-Only] The system name.
25
+ attr_accessor :system_name
24
26
 
25
- # [Read-Only] Date the workflow was last acted on.
26
- attr_accessor :last_edited_date
27
+ # [Read-Only] Unique workflow instance identifier.
28
+ attr_accessor :workflow_instance_id
27
29
 
28
30
  # [Read-Only] The package name.
29
31
  attr_accessor :package_name
30
32
 
31
- # [Read-Only] The system name.
32
- attr_accessor :system_name
33
+ # [Read-Only] Date the workflow instance or the workflow transition was created.
34
+ attr_accessor :created_date
33
35
 
34
- # [Read-Only] Version of the workflow definition.
35
- attr_accessor :version
36
+ # [Read-Only] Date the workflow was last acted on.
37
+ attr_accessor :last_edited_date
38
+
39
+ # [Read-Only] User that last acted on the workflow.
40
+ attr_accessor :last_edited_by
36
41
 
37
42
  # [Read-Only] The workflow type.
38
43
  attr_accessor :workflow
39
44
 
40
- # [Read-Only] Unique workflow instance identifier.
41
- attr_accessor :workflow_instance_id
42
-
43
- attr_accessor :transitions
45
+ # [Read-Only] Version of the workflow definition.
46
+ attr_accessor :version
44
47
 
45
- class EnumAttributeValidator
46
- attr_reader :datatype
47
- attr_reader :allowable_values
48
-
49
- def initialize(datatype, allowable_values)
50
- @allowable_values = allowable_values.map do |value|
51
- case datatype.to_s
52
- when /Integer/i
53
- value.to_i
54
- when /Float/i
55
- value.to_f
56
- else
57
- value
58
- end
59
- end
60
- end
48
+ # [Read-Only] Name of the current stage.
49
+ attr_accessor :current_stage
61
50
 
62
- def valid?(value)
63
- !value || allowable_values.include?(value)
64
- end
65
- end
51
+ attr_accessor :transitions
66
52
 
67
53
  # Attribute mapping from ruby-style variable name to JSON key.
68
54
  def self.attribute_map
69
55
  {
56
+ :'workflow_uid' => :'workflowUid',
57
+ :'system_id' => :'systemId',
58
+ :'system_name' => :'systemName',
59
+ :'workflow_instance_id' => :'workflowInstanceId',
60
+ :'package_name' => :'packageName',
70
61
  :'created_date' => :'createdDate',
71
- :'current_stage' => :'currentStage',
72
- :'last_edited_by' => :'lastEditedBy',
73
62
  :'last_edited_date' => :'lastEditedDate',
74
- :'package_name' => :'packageName',
75
- :'system_name' => :'systemName',
76
- :'version' => :'version',
63
+ :'last_edited_by' => :'lastEditedBy',
77
64
  :'workflow' => :'workflow',
78
- :'workflow_instance_id' => :'workflowInstanceId',
65
+ :'version' => :'version',
66
+ :'current_stage' => :'currentStage',
79
67
  :'transitions' => :'transitions'
80
68
  }
81
69
  end
82
70
 
71
+ # Returns all the JSON keys this model knows about
72
+ def self.acceptable_attributes
73
+ attribute_map.values
74
+ end
75
+
83
76
  # Attribute type mapping.
84
77
  def self.openapi_types
85
78
  {
86
- :'created_date' => :'Object',
87
- :'current_stage' => :'Object',
88
- :'last_edited_by' => :'Object',
89
- :'last_edited_date' => :'Object',
90
- :'package_name' => :'Object',
91
- :'system_name' => :'Object',
92
- :'version' => :'Object',
93
- :'workflow' => :'Object',
94
- :'workflow_instance_id' => :'Object',
95
- :'transitions' => :'Object'
79
+ :'workflow_uid' => :'String',
80
+ :'system_id' => :'Integer',
81
+ :'system_name' => :'String',
82
+ :'workflow_instance_id' => :'Integer',
83
+ :'package_name' => :'String',
84
+ :'created_date' => :'Integer',
85
+ :'last_edited_date' => :'Integer',
86
+ :'last_edited_by' => :'String',
87
+ :'workflow' => :'String',
88
+ :'version' => :'String',
89
+ :'current_stage' => :'String',
90
+ :'transitions' => :'Array<InstancesTransitions>'
96
91
  }
97
92
  end
98
93
 
99
94
  # List of attributes with nullable: true
100
95
  def self.openapi_nullable
101
96
  Set.new([
97
+ :'workflow_uid',
98
+ :'system_id',
99
+ :'system_name',
100
+ :'workflow_instance_id',
101
+ :'package_name',
102
+ :'created_date',
103
+ :'last_edited_date',
104
+ :'last_edited_by',
105
+ :'workflow',
106
+ :'version',
107
+ :'current_stage',
102
108
  ])
103
109
  end
104
-
110
+
105
111
  # Initializes the object
106
112
  # @param [Hash] attributes Model attributes in the form of hash
107
113
  def initialize(attributes = {})
@@ -117,40 +123,48 @@ module EmassClient
117
123
  h[k.to_sym] = v
118
124
  }
119
125
 
120
- if attributes.key?(:'created_date')
121
- self.created_date = attributes[:'created_date']
126
+ if attributes.key?(:'workflow_uid')
127
+ self.workflow_uid = attributes[:'workflow_uid']
122
128
  end
123
129
 
124
- if attributes.key?(:'current_stage')
125
- self.current_stage = attributes[:'current_stage']
130
+ if attributes.key?(:'system_id')
131
+ self.system_id = attributes[:'system_id']
126
132
  end
127
133
 
128
- if attributes.key?(:'last_edited_by')
129
- self.last_edited_by = attributes[:'last_edited_by']
134
+ if attributes.key?(:'system_name')
135
+ self.system_name = attributes[:'system_name']
130
136
  end
131
137
 
132
- if attributes.key?(:'last_edited_date')
133
- self.last_edited_date = attributes[:'last_edited_date']
138
+ if attributes.key?(:'workflow_instance_id')
139
+ self.workflow_instance_id = attributes[:'workflow_instance_id']
134
140
  end
135
141
 
136
142
  if attributes.key?(:'package_name')
137
143
  self.package_name = attributes[:'package_name']
138
144
  end
139
145
 
140
- if attributes.key?(:'system_name')
141
- self.system_name = attributes[:'system_name']
146
+ if attributes.key?(:'created_date')
147
+ self.created_date = attributes[:'created_date']
142
148
  end
143
149
 
144
- if attributes.key?(:'version')
145
- self.version = attributes[:'version']
150
+ if attributes.key?(:'last_edited_date')
151
+ self.last_edited_date = attributes[:'last_edited_date']
152
+ end
153
+
154
+ if attributes.key?(:'last_edited_by')
155
+ self.last_edited_by = attributes[:'last_edited_by']
146
156
  end
147
157
 
148
158
  if attributes.key?(:'workflow')
149
159
  self.workflow = attributes[:'workflow']
150
160
  end
151
161
 
152
- if attributes.key?(:'workflow_instance_id')
153
- self.workflow_instance_id = attributes[:'workflow_instance_id']
162
+ if attributes.key?(:'version')
163
+ self.version = attributes[:'version']
164
+ end
165
+
166
+ if attributes.key?(:'current_stage')
167
+ self.current_stage = attributes[:'current_stage']
154
168
  end
155
169
 
156
170
  if attributes.key?(:'transitions')
@@ -170,71 +184,25 @@ module EmassClient
170
184
  # Check to see if the all the properties in the model are valid
171
185
  # @return true if the model is valid
172
186
  def valid?
173
- current_stage_validator = EnumAttributeValidator.new('Object', ['Echelon I', 'Echelon II', 'Echelon III', 'Categorize System', 'Submit Categorization', 'Approval', 'Cancel', 'Complete'])
174
- return false unless current_stage_validator.valid?(@current_stage)
175
- package_name_validator = EnumAttributeValidator.new('Object', ['Test POA&M Approval', 'Test RMF Step 1 package', 'Test RMF Step 2 package', 'Test RMF Step 3 package'])
176
- return false unless package_name_validator.valid?(@package_name)
177
- system_name_validator = EnumAttributeValidator.new('Object', ['Test system 1', 'Test system 2', 'Test system 3', 'Test system 4'])
178
- return false unless system_name_validator.valid?(@system_name)
179
- workflow_validator = EnumAttributeValidator.new('Object', ['POA&M Approval', 'RMF Step 1: Security Category', 'RMF Step 2: Security Category', 'RMF Step 3: Security Category'])
180
- return false unless workflow_validator.valid?(@workflow)
181
187
  true
182
188
  end
183
189
 
184
- # Custom attribute writer method checking allowed values (enum).
185
- # @param [Object] current_stage Object to be assigned
186
- def current_stage=(current_stage)
187
- validator = EnumAttributeValidator.new('Object', ['Echelon I', 'Echelon II', 'Echelon III', 'Categorize System', 'Submit Categorization', 'Approval', 'Cancel', 'Complete'])
188
- unless validator.valid?(current_stage)
189
- fail ArgumentError, "invalid value for \"current_stage\", must be one of #{validator.allowable_values}."
190
- end
191
- @current_stage = current_stage
192
- end
193
-
194
- # Custom attribute writer method checking allowed values (enum).
195
- # @param [Object] package_name Object to be assigned
196
- def package_name=(package_name)
197
- validator = EnumAttributeValidator.new('Object', ['Test POA&M Approval', 'Test RMF Step 1 package', 'Test RMF Step 2 package', 'Test RMF Step 3 package'])
198
- unless validator.valid?(package_name)
199
- fail ArgumentError, "invalid value for \"package_name\", must be one of #{validator.allowable_values}."
200
- end
201
- @package_name = package_name
202
- end
203
-
204
- # Custom attribute writer method checking allowed values (enum).
205
- # @param [Object] system_name Object to be assigned
206
- def system_name=(system_name)
207
- validator = EnumAttributeValidator.new('Object', ['Test system 1', 'Test system 2', 'Test system 3', 'Test system 4'])
208
- unless validator.valid?(system_name)
209
- fail ArgumentError, "invalid value for \"system_name\", must be one of #{validator.allowable_values}."
210
- end
211
- @system_name = system_name
212
- end
213
-
214
- # Custom attribute writer method checking allowed values (enum).
215
- # @param [Object] workflow Object to be assigned
216
- def workflow=(workflow)
217
- validator = EnumAttributeValidator.new('Object', ['POA&M Approval', 'RMF Step 1: Security Category', 'RMF Step 2: Security Category', 'RMF Step 3: Security Category'])
218
- unless validator.valid?(workflow)
219
- fail ArgumentError, "invalid value for \"workflow\", must be one of #{validator.allowable_values}."
220
- end
221
- @workflow = workflow
222
- end
223
-
224
190
  # Checks equality by comparing each attribute.
225
191
  # @param [Object] Object to be compared
226
192
  def ==(o)
227
193
  return true if self.equal?(o)
228
194
  self.class == o.class &&
195
+ workflow_uid == o.workflow_uid &&
196
+ system_id == o.system_id &&
197
+ system_name == o.system_name &&
198
+ workflow_instance_id == o.workflow_instance_id &&
199
+ package_name == o.package_name &&
229
200
  created_date == o.created_date &&
230
- current_stage == o.current_stage &&
231
- last_edited_by == o.last_edited_by &&
232
201
  last_edited_date == o.last_edited_date &&
233
- package_name == o.package_name &&
234
- system_name == o.system_name &&
235
- version == o.version &&
202
+ last_edited_by == o.last_edited_by &&
236
203
  workflow == o.workflow &&
237
- workflow_instance_id == o.workflow_instance_id &&
204
+ version == o.version &&
205
+ current_stage == o.current_stage &&
238
206
  transitions == o.transitions
239
207
  end
240
208
 
@@ -247,7 +215,7 @@ module EmassClient
247
215
  # Calculates hash code according to all attributes.
248
216
  # @return [Integer] Hash code
249
217
  def hash
250
- [created_date, current_stage, last_edited_by, last_edited_date, package_name, system_name, version, workflow, workflow_instance_id, transitions].hash
218
+ [workflow_uid, system_id, system_name, workflow_instance_id, package_name, created_date, last_edited_date, last_edited_by, workflow, version, current_stage, transitions].hash
251
219
  end
252
220
 
253
221
  # Builds the object from hash
@@ -262,8 +230,11 @@ module EmassClient
262
230
  # @return [Object] Returns the model itself
263
231
  def build_from_hash(attributes)
264
232
  return nil unless attributes.is_a?(Hash)
233
+ attributes = attributes.transform_keys(&:to_sym)
265
234
  self.class.openapi_types.each_pair do |key, type|
266
- if type =~ /\AArray<(.*)>/i
235
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
236
+ self.send("#{key}=", nil)
237
+ elsif type =~ /\AArray<(.*)>/i
267
238
  # check to ensure the input is an array given that the attribute
268
239
  # is documented as an array but the input is not
269
240
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -271,8 +242,6 @@ module EmassClient
271
242
  end
272
243
  elsif !attributes[self.class.attribute_map[key]].nil?
273
244
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
274
- elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
275
- self.send("#{key}=", nil)
276
245
  end
277
246
  end
278
247
 
@@ -285,8 +254,8 @@ module EmassClient
285
254
  # @return [Object] Deserialized data
286
255
  def _deserialize(type, value)
287
256
  case type.to_sym
288
- when :DateTime
289
- DateTime.parse(value)
257
+ when :Time
258
+ Time.parse(value)
290
259
  when :Date
291
260
  Date.parse(value)
292
261
  when :String
@@ -316,7 +285,9 @@ module EmassClient
316
285
  end
317
286
  end
318
287
  else # model
319
- EmassClient.const_get(type).build_from_hash(value)
288
+ # models (e.g. Pet) or oneOf
289
+ klass = EmassClient.const_get(type)
290
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
320
291
  end
321
292
  end
322
293
 
@@ -364,5 +335,8 @@ module EmassClient
364
335
  else
365
336
  value
366
337
  end
367
- end end
338
+ end
339
+
340
+ end
341
+
368
342
  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 WorkflowInstancesResponseGet
@@ -17,19 +19,28 @@ module EmassClient
17
19
 
18
20
  attr_accessor :data
19
21
 
22
+ attr_accessor :pagination
23
+
20
24
  # Attribute mapping from ruby-style variable name to JSON key.
21
25
  def self.attribute_map
22
26
  {
23
27
  :'meta' => :'meta',
24
- :'data' => :'data'
28
+ :'data' => :'data',
29
+ :'pagination' => :'pagination'
25
30
  }
26
31
  end
27
32
 
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
28
38
  # Attribute type mapping.
29
39
  def self.openapi_types
30
40
  {
31
- :'meta' => :'Object',
32
- :'data' => :'Object'
41
+ :'meta' => :'Response200',
42
+ :'data' => :'Array<WorkflowInstancesGet>',
43
+ :'pagination' => :'WorkflowInstancesResponseGetPagination'
33
44
  }
34
45
  end
35
46
 
@@ -38,7 +49,7 @@ module EmassClient
38
49
  Set.new([
39
50
  ])
40
51
  end
41
-
52
+
42
53
  # Initializes the object
43
54
  # @param [Hash] attributes Model attributes in the form of hash
44
55
  def initialize(attributes = {})
@@ -63,6 +74,10 @@ module EmassClient
63
74
  self.data = value
64
75
  end
65
76
  end
77
+
78
+ if attributes.key?(:'pagination')
79
+ self.pagination = attributes[:'pagination']
80
+ end
66
81
  end
67
82
 
68
83
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -84,7 +99,8 @@ module EmassClient
84
99
  return true if self.equal?(o)
85
100
  self.class == o.class &&
86
101
  meta == o.meta &&
87
- data == o.data
102
+ data == o.data &&
103
+ pagination == o.pagination
88
104
  end
89
105
 
90
106
  # @see the `==` method
@@ -96,7 +112,7 @@ module EmassClient
96
112
  # Calculates hash code according to all attributes.
97
113
  # @return [Integer] Hash code
98
114
  def hash
99
- [meta, data].hash
115
+ [meta, data, pagination].hash
100
116
  end
101
117
 
102
118
  # Builds the object from hash
@@ -111,8 +127,11 @@ module EmassClient
111
127
  # @return [Object] Returns the model itself
112
128
  def build_from_hash(attributes)
113
129
  return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
114
131
  self.class.openapi_types.each_pair do |key, type|
115
- if type =~ /\AArray<(.*)>/i
132
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
133
+ self.send("#{key}=", nil)
134
+ elsif type =~ /\AArray<(.*)>/i
116
135
  # check to ensure the input is an array given that the attribute
117
136
  # is documented as an array but the input is not
118
137
  if attributes[self.class.attribute_map[key]].is_a?(Array)
@@ -120,8 +139,6 @@ module EmassClient
120
139
  end
121
140
  elsif !attributes[self.class.attribute_map[key]].nil?
122
141
  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
142
  end
126
143
  end
127
144
 
@@ -134,8 +151,8 @@ module EmassClient
134
151
  # @return [Object] Deserialized data
135
152
  def _deserialize(type, value)
136
153
  case type.to_sym
137
- when :DateTime
138
- DateTime.parse(value)
154
+ when :Time
155
+ Time.parse(value)
139
156
  when :Date
140
157
  Date.parse(value)
141
158
  when :String
@@ -165,7 +182,9 @@ module EmassClient
165
182
  end
166
183
  end
167
184
  else # model
168
- EmassClient.const_get(type).build_from_hash(value)
185
+ # models (e.g. Pet) or oneOf
186
+ klass = EmassClient.const_get(type)
187
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
188
  end
170
189
  end
171
190
 
@@ -213,5 +232,8 @@ module EmassClient
213
232
  else
214
233
  value
215
234
  end
216
- end end
235
+ end
236
+
237
+ end
238
+
217
239
  end