cloudreactor_api_client 0.1.0.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +92 -0
  4. data/cloudreactor_api_client.md +226 -0
  5. data/lib/cloudreactor_api_client/api/alert_methods_api.rb +482 -0
  6. data/lib/cloudreactor_api_client/api/email_notification_profiles_api.rb +482 -0
  7. data/lib/cloudreactor_api_client/api/pagerduty_profiles_api.rb +482 -0
  8. data/lib/cloudreactor_api_client/api/run_environments_api.rb +479 -0
  9. data/lib/cloudreactor_api_client/api/task_executions_api.rb +409 -0
  10. data/lib/cloudreactor_api_client/api/tasks_api.rb +412 -0
  11. data/lib/cloudreactor_api_client/api/workflow_executions_api.rb +549 -0
  12. data/lib/cloudreactor_api_client/api/workflow_task_instances_api.rb +424 -0
  13. data/lib/cloudreactor_api_client/api/workflow_transitions_api.rb +406 -0
  14. data/lib/cloudreactor_api_client/api/workflows_api.rb +482 -0
  15. data/lib/cloudreactor_api_client/api_client.rb +390 -0
  16. data/lib/cloudreactor_api_client/api_error.rb +57 -0
  17. data/lib/cloudreactor_api_client/configuration.rb +277 -0
  18. data/lib/cloudreactor_api_client/models/alert_method.rb +449 -0
  19. data/lib/cloudreactor_api_client/models/aws_ecs_execution_method.rb +517 -0
  20. data/lib/cloudreactor_api_client/models/aws_ecs_execution_method_capability.rb +565 -0
  21. data/lib/cloudreactor_api_client/models/aws_ecs_launch_type.rb +37 -0
  22. data/lib/cloudreactor_api_client/models/aws_ecs_run_environment_execution_method_capability.rb +476 -0
  23. data/lib/cloudreactor_api_client/models/aws_ecs_service_load_balancer_details.rb +307 -0
  24. data/lib/cloudreactor_api_client/models/aws_ecs_service_options.rb +308 -0
  25. data/lib/cloudreactor_api_client/models/current_service_info.rb +255 -0
  26. data/lib/cloudreactor_api_client/models/email_notification_profile.rb +454 -0
  27. data/lib/cloudreactor_api_client/models/execution_method_capability.rb +54 -0
  28. data/lib/cloudreactor_api_client/models/failure_behavior_enum.rb +38 -0
  29. data/lib/cloudreactor_api_client/models/group.rb +268 -0
  30. data/lib/cloudreactor_api_client/models/link.rb +301 -0
  31. data/lib/cloudreactor_api_client/models/name_and_uuid.rb +236 -0
  32. data/lib/cloudreactor_api_client/models/notification_severity.rb +39 -0
  33. data/lib/cloudreactor_api_client/models/pager_duty_profile.rb +484 -0
  34. data/lib/cloudreactor_api_client/models/paginated_alert_method_list.rb +247 -0
  35. data/lib/cloudreactor_api_client/models/paginated_email_notification_profile_list.rb +247 -0
  36. data/lib/cloudreactor_api_client/models/paginated_pager_duty_profile_list.rb +247 -0
  37. data/lib/cloudreactor_api_client/models/paginated_run_environment_list.rb +247 -0
  38. data/lib/cloudreactor_api_client/models/paginated_task_execution_list.rb +247 -0
  39. data/lib/cloudreactor_api_client/models/paginated_task_list.rb +247 -0
  40. data/lib/cloudreactor_api_client/models/paginated_workflow_execution_summary_list.rb +247 -0
  41. data/lib/cloudreactor_api_client/models/paginated_workflow_summary_list.rb +247 -0
  42. data/lib/cloudreactor_api_client/models/paginated_workflow_task_instance_list.rb +247 -0
  43. data/lib/cloudreactor_api_client/models/paginated_workflow_transition_list.rb +247 -0
  44. data/lib/cloudreactor_api_client/models/patched_alert_method.rb +405 -0
  45. data/lib/cloudreactor_api_client/models/patched_email_notification_profile.rb +415 -0
  46. data/lib/cloudreactor_api_client/models/patched_pager_duty_profile.rb +436 -0
  47. data/lib/cloudreactor_api_client/models/patched_run_environment.rb +511 -0
  48. data/lib/cloudreactor_api_client/models/patched_task.rb +897 -0
  49. data/lib/cloudreactor_api_client/models/patched_task_execution.rb +1904 -0
  50. data/lib/cloudreactor_api_client/models/patched_workflow.rb +507 -0
  51. data/lib/cloudreactor_api_client/models/patched_workflow_execution.rb +559 -0
  52. data/lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb +676 -0
  53. data/lib/cloudreactor_api_client/models/patched_workflow_transition.rb +432 -0
  54. data/lib/cloudreactor_api_client/models/propagate_tags_enum.rb +37 -0
  55. data/lib/cloudreactor_api_client/models/rule_type_enum.rb +43 -0
  56. data/lib/cloudreactor_api_client/models/run_environment.rb +555 -0
  57. data/lib/cloudreactor_api_client/models/start_transition_condition_enum.rb +39 -0
  58. data/lib/cloudreactor_api_client/models/stop_reason_enum.rb +42 -0
  59. data/lib/cloudreactor_api_client/models/task.rb +941 -0
  60. data/lib/cloudreactor_api_client/models/task_execution.rb +1954 -0
  61. data/lib/cloudreactor_api_client/models/task_execution_status.rb +46 -0
  62. data/lib/cloudreactor_api_client/models/threshold_property_enum.rb +39 -0
  63. data/lib/cloudreactor_api_client/models/timeout_behavior_enum.rb +40 -0
  64. data/lib/cloudreactor_api_client/models/unknown_execution_method_capability.rb +238 -0
  65. data/lib/cloudreactor_api_client/models/workflow.rb +556 -0
  66. data/lib/cloudreactor_api_client/models/workflow_execution.rb +629 -0
  67. data/lib/cloudreactor_api_client/models/workflow_execution_status.rb +42 -0
  68. data/lib/cloudreactor_api_client/models/workflow_execution_summary.rb +523 -0
  69. data/lib/cloudreactor_api_client/models/workflow_summary.rb +513 -0
  70. data/lib/cloudreactor_api_client/models/workflow_task_instance.rb +715 -0
  71. data/lib/cloudreactor_api_client/models/workflow_task_instance_execution.rb +280 -0
  72. data/lib/cloudreactor_api_client/models/workflow_task_instance_execution_base.rb +270 -0
  73. data/lib/cloudreactor_api_client/models/workflow_transition.rb +467 -0
  74. data/lib/cloudreactor_api_client/models/workflow_transition_evaluation.rb +280 -0
  75. data/lib/cloudreactor_api_client/version.rb +15 -0
  76. data/lib/cloudreactor_api_client.rb +121 -0
  77. data/lib/cloudreactor_wrapper_io/status_updater.rb +124 -0
  78. data/lib/cloudreactor_wrapper_io.rb +13 -0
  79. data/spec/api/alert_methods_api_spec.rb +114 -0
  80. data/spec/api/email_notification_profiles_api_spec.rb +114 -0
  81. data/spec/api/pagerduty_profiles_api_spec.rb +114 -0
  82. data/spec/api/run_environments_api_spec.rb +113 -0
  83. data/spec/api/task_executions_api_spec.rb +102 -0
  84. data/spec/api/tasks_api_spec.rb +103 -0
  85. data/spec/api/workflow_executions_api_spec.rb +124 -0
  86. data/spec/api/workflow_task_instances_api_spec.rb +107 -0
  87. data/spec/api/workflow_transitions_api_spec.rb +101 -0
  88. data/spec/api/workflows_api_spec.rb +114 -0
  89. data/spec/api_client_spec.rb +226 -0
  90. data/spec/configuration_spec.rb +42 -0
  91. data/spec/integration/task_execution_integration_spec.rb +51 -0
  92. data/spec/models/alert_method_spec.rb +136 -0
  93. data/spec/models/aws_ecs_execution_method_capability_spec.rb +166 -0
  94. data/spec/models/aws_ecs_execution_method_spec.rb +148 -0
  95. data/spec/models/aws_ecs_launch_type_spec.rb +28 -0
  96. data/spec/models/aws_ecs_run_environment_execution_method_capability_spec.rb +130 -0
  97. data/spec/models/aws_ecs_service_load_balancer_details_spec.rb +46 -0
  98. data/spec/models/aws_ecs_service_options_spec.rb +88 -0
  99. data/spec/models/current_service_info_spec.rb +52 -0
  100. data/spec/models/email_notification_profile_spec.rb +118 -0
  101. data/spec/models/execution_method_capability_spec.rb +43 -0
  102. data/spec/models/failure_behavior_enum_spec.rb +28 -0
  103. data/spec/models/group_spec.rb +46 -0
  104. data/spec/models/link_spec.rb +70 -0
  105. data/spec/models/name_and_uuid_spec.rb +46 -0
  106. data/spec/models/notification_severity_spec.rb +28 -0
  107. data/spec/models/pager_duty_profile_spec.rb +118 -0
  108. data/spec/models/paginated_alert_method_list_spec.rb +52 -0
  109. data/spec/models/paginated_email_notification_profile_list_spec.rb +52 -0
  110. data/spec/models/paginated_pager_duty_profile_list_spec.rb +52 -0
  111. data/spec/models/paginated_run_environment_list_spec.rb +52 -0
  112. data/spec/models/paginated_task_execution_list_spec.rb +52 -0
  113. data/spec/models/paginated_task_list_spec.rb +52 -0
  114. data/spec/models/paginated_workflow_execution_summary_list_spec.rb +52 -0
  115. data/spec/models/paginated_workflow_summary_list_spec.rb +52 -0
  116. data/spec/models/paginated_workflow_task_instance_list_spec.rb +52 -0
  117. data/spec/models/paginated_workflow_transition_list_spec.rb +52 -0
  118. data/spec/models/patched_alert_method_spec.rb +136 -0
  119. data/spec/models/patched_email_notification_profile_spec.rb +118 -0
  120. data/spec/models/patched_pager_duty_profile_spec.rb +118 -0
  121. data/spec/models/patched_run_environment_spec.rb +136 -0
  122. data/spec/models/patched_task_execution_spec.rb +466 -0
  123. data/spec/models/patched_task_spec.rb +244 -0
  124. data/spec/models/patched_workflow_execution_spec.rb +172 -0
  125. data/spec/models/patched_workflow_spec.rb +142 -0
  126. data/spec/models/patched_workflow_task_instance_spec.rb +196 -0
  127. data/spec/models/patched_workflow_transition_spec.rb +118 -0
  128. data/spec/models/propagate_tags_enum_spec.rb +28 -0
  129. data/spec/models/rule_type_enum_spec.rb +28 -0
  130. data/spec/models/run_environment_spec.rb +136 -0
  131. data/spec/models/start_transition_condition_enum_spec.rb +28 -0
  132. data/spec/models/stop_reason_enum_spec.rb +28 -0
  133. data/spec/models/task_execution_spec.rb +466 -0
  134. data/spec/models/task_execution_status_spec.rb +28 -0
  135. data/spec/models/task_spec.rb +244 -0
  136. data/spec/models/threshold_property_enum_spec.rb +28 -0
  137. data/spec/models/timeout_behavior_enum_spec.rb +28 -0
  138. data/spec/models/unknown_execution_method_capability_spec.rb +40 -0
  139. data/spec/models/workflow_execution_spec.rb +172 -0
  140. data/spec/models/workflow_execution_status_spec.rb +28 -0
  141. data/spec/models/workflow_execution_summary_spec.rb +130 -0
  142. data/spec/models/workflow_spec.rb +142 -0
  143. data/spec/models/workflow_summary_spec.rb +124 -0
  144. data/spec/models/workflow_task_instance_execution_base_spec.rb +58 -0
  145. data/spec/models/workflow_task_instance_execution_spec.rb +64 -0
  146. data/spec/models/workflow_task_instance_spec.rb +196 -0
  147. data/spec/models/workflow_transition_evaluation_spec.rb +64 -0
  148. data/spec/models/workflow_transition_spec.rb +118 -0
  149. data/spec/spec_helper.rb +111 -0
  150. data/spec/wrapper_io/status_updater_spec.rb +147 -0
  151. metadata +305 -0
@@ -0,0 +1,555 @@
1
+ =begin
2
+ #CloudReactor API
3
+
4
+ #CloudReactor API Documentation
5
+
6
+ The version of the OpenAPI document: 0.2.0
7
+ Contact: jeff@cloudreactor.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module CloudReactorAPIClient
17
+ # RunEnvironments contain common settings for running a set of related Tasks. Usually RunEnvironments group Tasks in the same deployment environment (e.g. staging or production). Task and Workflows belong to a RunEnvironment but can override the RunEnvironment's settings.
18
+ class RunEnvironment
19
+ attr_accessor :url
20
+
21
+ attr_accessor :uuid
22
+
23
+ attr_accessor :name
24
+
25
+ attr_accessor :description
26
+
27
+ attr_accessor :dashboard_url
28
+
29
+ # Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
30
+ attr_accessor :created_by_user
31
+
32
+ attr_accessor :created_by_group
33
+
34
+ attr_accessor :created_at
35
+
36
+ attr_accessor :updated_at
37
+
38
+ attr_accessor :aws_account_id
39
+
40
+ attr_accessor :aws_default_region
41
+
42
+ attr_accessor :aws_access_key
43
+
44
+ attr_accessor :aws_assumed_role_external_id
45
+
46
+ attr_accessor :aws_events_role_arn
47
+
48
+ attr_accessor :aws_workflow_starter_lambda_arn
49
+
50
+ attr_accessor :aws_workflow_starter_access_key
51
+
52
+ attr_accessor :default_alert_methods
53
+
54
+ attr_accessor :execution_method_capabilities
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'url' => :'url',
60
+ :'uuid' => :'uuid',
61
+ :'name' => :'name',
62
+ :'description' => :'description',
63
+ :'dashboard_url' => :'dashboard_url',
64
+ :'created_by_user' => :'created_by_user',
65
+ :'created_by_group' => :'created_by_group',
66
+ :'created_at' => :'created_at',
67
+ :'updated_at' => :'updated_at',
68
+ :'aws_account_id' => :'aws_account_id',
69
+ :'aws_default_region' => :'aws_default_region',
70
+ :'aws_access_key' => :'aws_access_key',
71
+ :'aws_assumed_role_external_id' => :'aws_assumed_role_external_id',
72
+ :'aws_events_role_arn' => :'aws_events_role_arn',
73
+ :'aws_workflow_starter_lambda_arn' => :'aws_workflow_starter_lambda_arn',
74
+ :'aws_workflow_starter_access_key' => :'aws_workflow_starter_access_key',
75
+ :'default_alert_methods' => :'default_alert_methods',
76
+ :'execution_method_capabilities' => :'execution_method_capabilities'
77
+ }
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ attribute_map.values
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.openapi_types
87
+ {
88
+ :'url' => :'String',
89
+ :'uuid' => :'String',
90
+ :'name' => :'String',
91
+ :'description' => :'String',
92
+ :'dashboard_url' => :'String',
93
+ :'created_by_user' => :'String',
94
+ :'created_by_group' => :'Group',
95
+ :'created_at' => :'Time',
96
+ :'updated_at' => :'Time',
97
+ :'aws_account_id' => :'String',
98
+ :'aws_default_region' => :'String',
99
+ :'aws_access_key' => :'String',
100
+ :'aws_assumed_role_external_id' => :'String',
101
+ :'aws_events_role_arn' => :'String',
102
+ :'aws_workflow_starter_lambda_arn' => :'String',
103
+ :'aws_workflow_starter_access_key' => :'String',
104
+ :'default_alert_methods' => :'Array<NameAndUuid>',
105
+ :'execution_method_capabilities' => :'Array<AwsEcsRunEnvironmentExecutionMethodCapability>'
106
+ }
107
+ end
108
+
109
+ # List of attributes with nullable: true
110
+ def self.openapi_nullable
111
+ Set.new([
112
+ :'created_by_group',
113
+ ])
114
+ end
115
+
116
+ # Initializes the object
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ def initialize(attributes = {})
119
+ if (!attributes.is_a?(Hash))
120
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CloudReactorAPIClient::RunEnvironment` initialize method"
121
+ end
122
+
123
+ # check to see if the attribute exists and convert string to symbol for hash key
124
+ attributes = attributes.each_with_object({}) { |(k, v), h|
125
+ if (!self.class.attribute_map.key?(k.to_sym))
126
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CloudReactorAPIClient::RunEnvironment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
127
+ end
128
+ h[k.to_sym] = v
129
+ }
130
+
131
+ if attributes.key?(:'url')
132
+ self.url = attributes[:'url']
133
+ end
134
+
135
+ if attributes.key?(:'uuid')
136
+ self.uuid = attributes[:'uuid']
137
+ end
138
+
139
+ if attributes.key?(:'name')
140
+ self.name = attributes[:'name']
141
+ end
142
+
143
+ if attributes.key?(:'description')
144
+ self.description = attributes[:'description']
145
+ end
146
+
147
+ if attributes.key?(:'dashboard_url')
148
+ self.dashboard_url = attributes[:'dashboard_url']
149
+ end
150
+
151
+ if attributes.key?(:'created_by_user')
152
+ self.created_by_user = attributes[:'created_by_user']
153
+ end
154
+
155
+ if attributes.key?(:'created_by_group')
156
+ self.created_by_group = attributes[:'created_by_group']
157
+ end
158
+
159
+ if attributes.key?(:'created_at')
160
+ self.created_at = attributes[:'created_at']
161
+ end
162
+
163
+ if attributes.key?(:'updated_at')
164
+ self.updated_at = attributes[:'updated_at']
165
+ end
166
+
167
+ if attributes.key?(:'aws_account_id')
168
+ self.aws_account_id = attributes[:'aws_account_id']
169
+ end
170
+
171
+ if attributes.key?(:'aws_default_region')
172
+ self.aws_default_region = attributes[:'aws_default_region']
173
+ end
174
+
175
+ if attributes.key?(:'aws_access_key')
176
+ self.aws_access_key = attributes[:'aws_access_key']
177
+ end
178
+
179
+ if attributes.key?(:'aws_assumed_role_external_id')
180
+ self.aws_assumed_role_external_id = attributes[:'aws_assumed_role_external_id']
181
+ end
182
+
183
+ if attributes.key?(:'aws_events_role_arn')
184
+ self.aws_events_role_arn = attributes[:'aws_events_role_arn']
185
+ end
186
+
187
+ if attributes.key?(:'aws_workflow_starter_lambda_arn')
188
+ self.aws_workflow_starter_lambda_arn = attributes[:'aws_workflow_starter_lambda_arn']
189
+ end
190
+
191
+ if attributes.key?(:'aws_workflow_starter_access_key')
192
+ self.aws_workflow_starter_access_key = attributes[:'aws_workflow_starter_access_key']
193
+ end
194
+
195
+ if attributes.key?(:'default_alert_methods')
196
+ if (value = attributes[:'default_alert_methods']).is_a?(Array)
197
+ self.default_alert_methods = value
198
+ end
199
+ end
200
+
201
+ if attributes.key?(:'execution_method_capabilities')
202
+ if (value = attributes[:'execution_method_capabilities']).is_a?(Array)
203
+ self.execution_method_capabilities = value
204
+ end
205
+ end
206
+ end
207
+
208
+ # Show invalid properties with the reasons. Usually used together with valid?
209
+ # @return Array for valid properties with the reasons
210
+ def list_invalid_properties
211
+ invalid_properties = Array.new
212
+ if @url.nil?
213
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
214
+ end
215
+
216
+ if @uuid.nil?
217
+ invalid_properties.push('invalid value for "uuid", uuid cannot be nil.')
218
+ end
219
+
220
+ if @name.nil?
221
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
222
+ end
223
+
224
+ if @name.to_s.length > 200
225
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
226
+ end
227
+
228
+ if !@description.nil? && @description.to_s.length > 5000
229
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 5000.')
230
+ end
231
+
232
+ if @dashboard_url.nil?
233
+ invalid_properties.push('invalid value for "dashboard_url", dashboard_url cannot be nil.')
234
+ end
235
+
236
+ if @created_by_user.nil?
237
+ invalid_properties.push('invalid value for "created_by_user", created_by_user cannot be nil.')
238
+ end
239
+
240
+ if @created_at.nil?
241
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
242
+ end
243
+
244
+ if @updated_at.nil?
245
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
246
+ end
247
+
248
+ if !@aws_account_id.nil? && @aws_account_id.to_s.length > 200
249
+ invalid_properties.push('invalid value for "aws_account_id", the character length must be smaller than or equal to 200.')
250
+ end
251
+
252
+ if !@aws_default_region.nil? && @aws_default_region.to_s.length > 20
253
+ invalid_properties.push('invalid value for "aws_default_region", the character length must be smaller than or equal to 20.')
254
+ end
255
+
256
+ if !@aws_access_key.nil? && @aws_access_key.to_s.length > 100
257
+ invalid_properties.push('invalid value for "aws_access_key", the character length must be smaller than or equal to 100.')
258
+ end
259
+
260
+ if !@aws_assumed_role_external_id.nil? && @aws_assumed_role_external_id.to_s.length > 1000
261
+ invalid_properties.push('invalid value for "aws_assumed_role_external_id", the character length must be smaller than or equal to 1000.')
262
+ end
263
+
264
+ if !@aws_events_role_arn.nil? && @aws_events_role_arn.to_s.length > 100
265
+ invalid_properties.push('invalid value for "aws_events_role_arn", the character length must be smaller than or equal to 100.')
266
+ end
267
+
268
+ if !@aws_workflow_starter_lambda_arn.nil? && @aws_workflow_starter_lambda_arn.to_s.length > 1000
269
+ invalid_properties.push('invalid value for "aws_workflow_starter_lambda_arn", the character length must be smaller than or equal to 1000.')
270
+ end
271
+
272
+ if !@aws_workflow_starter_access_key.nil? && @aws_workflow_starter_access_key.to_s.length > 1000
273
+ invalid_properties.push('invalid value for "aws_workflow_starter_access_key", the character length must be smaller than or equal to 1000.')
274
+ end
275
+
276
+ if @execution_method_capabilities.nil?
277
+ invalid_properties.push('invalid value for "execution_method_capabilities", execution_method_capabilities cannot be nil.')
278
+ end
279
+
280
+ invalid_properties
281
+ end
282
+
283
+ # Check to see if the all the properties in the model are valid
284
+ # @return true if the model is valid
285
+ def valid?
286
+ return false if @url.nil?
287
+ return false if @uuid.nil?
288
+ return false if @name.nil?
289
+ return false if @name.to_s.length > 200
290
+ return false if !@description.nil? && @description.to_s.length > 5000
291
+ return false if @dashboard_url.nil?
292
+ return false if @created_by_user.nil?
293
+ return false if @created_at.nil?
294
+ return false if @updated_at.nil?
295
+ return false if !@aws_account_id.nil? && @aws_account_id.to_s.length > 200
296
+ return false if !@aws_default_region.nil? && @aws_default_region.to_s.length > 20
297
+ return false if !@aws_access_key.nil? && @aws_access_key.to_s.length > 100
298
+ return false if !@aws_assumed_role_external_id.nil? && @aws_assumed_role_external_id.to_s.length > 1000
299
+ return false if !@aws_events_role_arn.nil? && @aws_events_role_arn.to_s.length > 100
300
+ return false if !@aws_workflow_starter_lambda_arn.nil? && @aws_workflow_starter_lambda_arn.to_s.length > 1000
301
+ return false if !@aws_workflow_starter_access_key.nil? && @aws_workflow_starter_access_key.to_s.length > 1000
302
+ return false if @execution_method_capabilities.nil?
303
+ true
304
+ end
305
+
306
+ # Custom attribute writer method with validation
307
+ # @param [Object] name Value to be assigned
308
+ def name=(name)
309
+ if name.nil?
310
+ fail ArgumentError, 'name cannot be nil'
311
+ end
312
+
313
+ if name.to_s.length > 200
314
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
315
+ end
316
+
317
+ @name = name
318
+ end
319
+
320
+ # Custom attribute writer method with validation
321
+ # @param [Object] description Value to be assigned
322
+ def description=(description)
323
+ if !description.nil? && description.to_s.length > 5000
324
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 5000.'
325
+ end
326
+
327
+ @description = description
328
+ end
329
+
330
+ # Custom attribute writer method with validation
331
+ # @param [Object] aws_account_id Value to be assigned
332
+ def aws_account_id=(aws_account_id)
333
+ if !aws_account_id.nil? && aws_account_id.to_s.length > 200
334
+ fail ArgumentError, 'invalid value for "aws_account_id", the character length must be smaller than or equal to 200.'
335
+ end
336
+
337
+ @aws_account_id = aws_account_id
338
+ end
339
+
340
+ # Custom attribute writer method with validation
341
+ # @param [Object] aws_default_region Value to be assigned
342
+ def aws_default_region=(aws_default_region)
343
+ if !aws_default_region.nil? && aws_default_region.to_s.length > 20
344
+ fail ArgumentError, 'invalid value for "aws_default_region", the character length must be smaller than or equal to 20.'
345
+ end
346
+
347
+ @aws_default_region = aws_default_region
348
+ end
349
+
350
+ # Custom attribute writer method with validation
351
+ # @param [Object] aws_access_key Value to be assigned
352
+ def aws_access_key=(aws_access_key)
353
+ if !aws_access_key.nil? && aws_access_key.to_s.length > 100
354
+ fail ArgumentError, 'invalid value for "aws_access_key", the character length must be smaller than or equal to 100.'
355
+ end
356
+
357
+ @aws_access_key = aws_access_key
358
+ end
359
+
360
+ # Custom attribute writer method with validation
361
+ # @param [Object] aws_assumed_role_external_id Value to be assigned
362
+ def aws_assumed_role_external_id=(aws_assumed_role_external_id)
363
+ if !aws_assumed_role_external_id.nil? && aws_assumed_role_external_id.to_s.length > 1000
364
+ fail ArgumentError, 'invalid value for "aws_assumed_role_external_id", the character length must be smaller than or equal to 1000.'
365
+ end
366
+
367
+ @aws_assumed_role_external_id = aws_assumed_role_external_id
368
+ end
369
+
370
+ # Custom attribute writer method with validation
371
+ # @param [Object] aws_events_role_arn Value to be assigned
372
+ def aws_events_role_arn=(aws_events_role_arn)
373
+ if !aws_events_role_arn.nil? && aws_events_role_arn.to_s.length > 100
374
+ fail ArgumentError, 'invalid value for "aws_events_role_arn", the character length must be smaller than or equal to 100.'
375
+ end
376
+
377
+ @aws_events_role_arn = aws_events_role_arn
378
+ end
379
+
380
+ # Custom attribute writer method with validation
381
+ # @param [Object] aws_workflow_starter_lambda_arn Value to be assigned
382
+ def aws_workflow_starter_lambda_arn=(aws_workflow_starter_lambda_arn)
383
+ if !aws_workflow_starter_lambda_arn.nil? && aws_workflow_starter_lambda_arn.to_s.length > 1000
384
+ fail ArgumentError, 'invalid value for "aws_workflow_starter_lambda_arn", the character length must be smaller than or equal to 1000.'
385
+ end
386
+
387
+ @aws_workflow_starter_lambda_arn = aws_workflow_starter_lambda_arn
388
+ end
389
+
390
+ # Custom attribute writer method with validation
391
+ # @param [Object] aws_workflow_starter_access_key Value to be assigned
392
+ def aws_workflow_starter_access_key=(aws_workflow_starter_access_key)
393
+ if !aws_workflow_starter_access_key.nil? && aws_workflow_starter_access_key.to_s.length > 1000
394
+ fail ArgumentError, 'invalid value for "aws_workflow_starter_access_key", the character length must be smaller than or equal to 1000.'
395
+ end
396
+
397
+ @aws_workflow_starter_access_key = aws_workflow_starter_access_key
398
+ end
399
+
400
+ # Checks equality by comparing each attribute.
401
+ # @param [Object] Object to be compared
402
+ def ==(o)
403
+ return true if self.equal?(o)
404
+ self.class == o.class &&
405
+ url == o.url &&
406
+ uuid == o.uuid &&
407
+ name == o.name &&
408
+ description == o.description &&
409
+ dashboard_url == o.dashboard_url &&
410
+ created_by_user == o.created_by_user &&
411
+ created_by_group == o.created_by_group &&
412
+ created_at == o.created_at &&
413
+ updated_at == o.updated_at &&
414
+ aws_account_id == o.aws_account_id &&
415
+ aws_default_region == o.aws_default_region &&
416
+ aws_access_key == o.aws_access_key &&
417
+ aws_assumed_role_external_id == o.aws_assumed_role_external_id &&
418
+ aws_events_role_arn == o.aws_events_role_arn &&
419
+ aws_workflow_starter_lambda_arn == o.aws_workflow_starter_lambda_arn &&
420
+ aws_workflow_starter_access_key == o.aws_workflow_starter_access_key &&
421
+ default_alert_methods == o.default_alert_methods &&
422
+ execution_method_capabilities == o.execution_method_capabilities
423
+ end
424
+
425
+ # @see the `==` method
426
+ # @param [Object] Object to be compared
427
+ def eql?(o)
428
+ self == o
429
+ end
430
+
431
+ # Calculates hash code according to all attributes.
432
+ # @return [Integer] Hash code
433
+ def hash
434
+ [url, uuid, name, description, dashboard_url, created_by_user, created_by_group, created_at, updated_at, aws_account_id, aws_default_region, aws_access_key, aws_assumed_role_external_id, aws_events_role_arn, aws_workflow_starter_lambda_arn, aws_workflow_starter_access_key, default_alert_methods, execution_method_capabilities].hash
435
+ end
436
+
437
+ # Builds the object from hash
438
+ # @param [Hash] attributes Model attributes in the form of hash
439
+ # @return [Object] Returns the model itself
440
+ def self.build_from_hash(attributes)
441
+ new.build_from_hash(attributes)
442
+ end
443
+
444
+ # Builds the object from hash
445
+ # @param [Hash] attributes Model attributes in the form of hash
446
+ # @return [Object] Returns the model itself
447
+ def build_from_hash(attributes)
448
+ return nil unless attributes.is_a?(Hash)
449
+ self.class.openapi_types.each_pair do |key, type|
450
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
451
+ self.send("#{key}=", nil)
452
+ elsif type =~ /\AArray<(.*)>/i
453
+ # check to ensure the input is an array given that the attribute
454
+ # is documented as an array but the input is not
455
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
456
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
457
+ end
458
+ elsif !attributes[self.class.attribute_map[key]].nil?
459
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
460
+ end
461
+ end
462
+
463
+ self
464
+ end
465
+
466
+ # Deserializes the data based on type
467
+ # @param string type Data type
468
+ # @param string value Value to be deserialized
469
+ # @return [Object] Deserialized data
470
+ def _deserialize(type, value)
471
+ case type.to_sym
472
+ when :Time
473
+ Time.parse(value)
474
+ when :Date
475
+ Date.parse(value)
476
+ when :String
477
+ value.to_s
478
+ when :Integer
479
+ value.to_i
480
+ when :Float
481
+ value.to_f
482
+ when :Boolean
483
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
484
+ true
485
+ else
486
+ false
487
+ end
488
+ when :Object
489
+ # generic object (usually a Hash), return directly
490
+ value
491
+ when /\AArray<(?<inner_type>.+)>\z/
492
+ inner_type = Regexp.last_match[:inner_type]
493
+ value.map { |v| _deserialize(inner_type, v) }
494
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
495
+ k_type = Regexp.last_match[:k_type]
496
+ v_type = Regexp.last_match[:v_type]
497
+ {}.tap do |hash|
498
+ value.each do |k, v|
499
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
500
+ end
501
+ end
502
+ else # model
503
+ # models (e.g. Pet) or oneOf
504
+ klass = CloudReactorAPIClient.const_get(type)
505
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
506
+ end
507
+ end
508
+
509
+ # Returns the string representation of the object
510
+ # @return [String] String presentation of the object
511
+ def to_s
512
+ to_hash.to_s
513
+ end
514
+
515
+ # to_body is an alias to to_hash (backward compatibility)
516
+ # @return [Hash] Returns the object in the form of hash
517
+ def to_body
518
+ to_hash
519
+ end
520
+
521
+ # Returns the object in the form of hash
522
+ # @return [Hash] Returns the object in the form of hash
523
+ def to_hash
524
+ hash = {}
525
+ self.class.attribute_map.each_pair do |attr, param|
526
+ value = self.send(attr)
527
+ if value.nil?
528
+ is_nullable = self.class.openapi_nullable.include?(attr)
529
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
530
+ end
531
+
532
+ hash[param] = _to_hash(value)
533
+ end
534
+ hash
535
+ end
536
+
537
+ # Outputs non-array value in the form of hash
538
+ # For object, use to_hash. Otherwise, just return the value
539
+ # @param [Object] value Any valid value
540
+ # @return [Hash] Returns the value in the form of hash
541
+ def _to_hash(value)
542
+ if value.is_a?(Array)
543
+ value.compact.map { |v| _to_hash(v) }
544
+ elsif value.is_a?(Hash)
545
+ {}.tap do |hash|
546
+ value.each { |k, v| hash[k] = _to_hash(v) }
547
+ end
548
+ elsif value.respond_to? :to_hash
549
+ value.to_hash
550
+ else
551
+ value
552
+ end
553
+ end
554
+ end
555
+ end
@@ -0,0 +1,39 @@
1
+ =begin
2
+ #CloudReactor API
3
+
4
+ #CloudReactor API Documentation
5
+
6
+ The version of the OpenAPI document: 0.2.0
7
+ Contact: jeff@cloudreactor.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module CloudReactorAPIClient
17
+ class StartTransitionConditionEnum
18
+ ALL = "all".freeze
19
+ ANY = "any".freeze
20
+ COUNT_AT_LEAST = "count_at_least".freeze
21
+ RATIO_AT_LEAST = "ratio_at_least".freeze
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def self.build_from_hash(value)
27
+ new.build_from_hash(value)
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ constantValues = StartTransitionConditionEnum.constants.select { |c| StartTransitionConditionEnum::const_get(c) == value }
35
+ raise "Invalid ENUM value #{value} for class #StartTransitionConditionEnum" if constantValues.empty?
36
+ value
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #CloudReactor API
3
+
4
+ #CloudReactor API Documentation
5
+
6
+ The version of the OpenAPI document: 0.2.0
7
+ Contact: jeff@cloudreactor.io
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module CloudReactorAPIClient
17
+ class StopReasonEnum
18
+ MANUAL = "MANUAL".freeze
19
+ MAX_EXECUTION_TIME_EXCEEDED = "MAX_EXECUTION_TIME_EXCEEDED".freeze
20
+ MISSING_HEARTBEAT = "MISSING_HEARTBEAT".freeze
21
+ FAILED_TO_START = "FAILED_TO_START".freeze
22
+ WORKFLOW_EXECUTION_STOPPED = "WORKFLOW_EXECUTION_STOPPED".freeze
23
+ WORKFLOW_EXECUTION_RETRIED = "WORKFLOW_EXECUTION_RETRIED".freeze
24
+ WORKFLOW_EXECUTION_TIMED_OUT = "WORKFLOW_EXECUTION_TIMED_OUT".freeze
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
29
+ def self.build_from_hash(value)
30
+ new.build_from_hash(value)
31
+ end
32
+
33
+ # Builds the enum from string
34
+ # @param [String] The enum value in the form of the string
35
+ # @return [String] The enum value
36
+ def build_from_hash(value)
37
+ constantValues = StopReasonEnum.constants.select { |c| StopReasonEnum::const_get(c) == value }
38
+ raise "Invalid ENUM value #{value} for class #StopReasonEnum" if constantValues.empty?
39
+ value
40
+ end
41
+ end
42
+ end