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,565 @@
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
+ # A ModelSerializer that takes additional arguments for \"fields\", \"omit\" and \"expand\" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations
18
+ class AwsEcsExecutionMethodCapability
19
+ attr_accessor :task_definition_arn
20
+
21
+ attr_accessor :task_definition_infrastructure_website_url
22
+
23
+ attr_accessor :allocated_cpu_units
24
+
25
+ attr_accessor :allocated_memory_mb
26
+
27
+ attr_accessor :type
28
+
29
+ attr_accessor :capabilities
30
+
31
+ attr_accessor :tags
32
+
33
+ attr_accessor :default_subnets
34
+
35
+ attr_accessor :default_subnet_infrastructure_website_urls
36
+
37
+ attr_accessor :default_launch_type
38
+
39
+ attr_accessor :supported_launch_types
40
+
41
+ attr_accessor :default_cluster_arn
42
+
43
+ attr_accessor :default_cluster_infrastructure_website_url
44
+
45
+ attr_accessor :default_security_groups
46
+
47
+ attr_accessor :default_security_group_infrastructure_website_urls
48
+
49
+ attr_accessor :default_assign_public_ip
50
+
51
+ attr_accessor :default_execution_role
52
+
53
+ attr_accessor :default_execution_role_infrastructure_website_url
54
+
55
+ attr_accessor :default_task_role
56
+
57
+ attr_accessor :default_task_role_infrastructure_website_url
58
+
59
+ attr_accessor :default_platform_version
60
+
61
+ attr_accessor :main_container_name
62
+
63
+ attr_accessor :service_options
64
+
65
+ # Attribute mapping from ruby-style variable name to JSON key.
66
+ def self.attribute_map
67
+ {
68
+ :'task_definition_arn' => :'task_definition_arn',
69
+ :'task_definition_infrastructure_website_url' => :'task_definition_infrastructure_website_url',
70
+ :'allocated_cpu_units' => :'allocated_cpu_units',
71
+ :'allocated_memory_mb' => :'allocated_memory_mb',
72
+ :'type' => :'type',
73
+ :'capabilities' => :'capabilities',
74
+ :'tags' => :'tags',
75
+ :'default_subnets' => :'default_subnets',
76
+ :'default_subnet_infrastructure_website_urls' => :'default_subnet_infrastructure_website_urls',
77
+ :'default_launch_type' => :'default_launch_type',
78
+ :'supported_launch_types' => :'supported_launch_types',
79
+ :'default_cluster_arn' => :'default_cluster_arn',
80
+ :'default_cluster_infrastructure_website_url' => :'default_cluster_infrastructure_website_url',
81
+ :'default_security_groups' => :'default_security_groups',
82
+ :'default_security_group_infrastructure_website_urls' => :'default_security_group_infrastructure_website_urls',
83
+ :'default_assign_public_ip' => :'default_assign_public_ip',
84
+ :'default_execution_role' => :'default_execution_role',
85
+ :'default_execution_role_infrastructure_website_url' => :'default_execution_role_infrastructure_website_url',
86
+ :'default_task_role' => :'default_task_role',
87
+ :'default_task_role_infrastructure_website_url' => :'default_task_role_infrastructure_website_url',
88
+ :'default_platform_version' => :'default_platform_version',
89
+ :'main_container_name' => :'main_container_name',
90
+ :'service_options' => :'service_options'
91
+ }
92
+ end
93
+
94
+ # Returns all the JSON keys this model knows about
95
+ def self.acceptable_attributes
96
+ attribute_map.values
97
+ end
98
+
99
+ # Attribute type mapping.
100
+ def self.openapi_types
101
+ {
102
+ :'task_definition_arn' => :'String',
103
+ :'task_definition_infrastructure_website_url' => :'String',
104
+ :'allocated_cpu_units' => :'Integer',
105
+ :'allocated_memory_mb' => :'Integer',
106
+ :'type' => :'String',
107
+ :'capabilities' => :'Array<String>',
108
+ :'tags' => :'Hash<String, String>',
109
+ :'default_subnets' => :'Array<String>',
110
+ :'default_subnet_infrastructure_website_urls' => :'Array<String>',
111
+ :'default_launch_type' => :'AwsEcsLaunchType',
112
+ :'supported_launch_types' => :'Array<AwsEcsLaunchType>',
113
+ :'default_cluster_arn' => :'String',
114
+ :'default_cluster_infrastructure_website_url' => :'String',
115
+ :'default_security_groups' => :'Array<String>',
116
+ :'default_security_group_infrastructure_website_urls' => :'Array<String>',
117
+ :'default_assign_public_ip' => :'Boolean',
118
+ :'default_execution_role' => :'String',
119
+ :'default_execution_role_infrastructure_website_url' => :'String',
120
+ :'default_task_role' => :'String',
121
+ :'default_task_role_infrastructure_website_url' => :'String',
122
+ :'default_platform_version' => :'String',
123
+ :'main_container_name' => :'String',
124
+ :'service_options' => :'AwsEcsServiceOptions'
125
+ }
126
+ end
127
+
128
+ # List of attributes with nullable: true
129
+ def self.openapi_nullable
130
+ Set.new([
131
+ :'tags',
132
+ :'default_subnets',
133
+ :'default_launch_type',
134
+ :'supported_launch_types',
135
+ :'default_security_groups',
136
+ :'default_assign_public_ip',
137
+ ])
138
+ end
139
+
140
+ # Initializes the object
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ def initialize(attributes = {})
143
+ if (!attributes.is_a?(Hash))
144
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CloudReactorAPIClient::AwsEcsExecutionMethodCapability` initialize method"
145
+ end
146
+
147
+ # check to see if the attribute exists and convert string to symbol for hash key
148
+ attributes = attributes.each_with_object({}) { |(k, v), h|
149
+ if (!self.class.attribute_map.key?(k.to_sym))
150
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CloudReactorAPIClient::AwsEcsExecutionMethodCapability`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
151
+ end
152
+ h[k.to_sym] = v
153
+ }
154
+
155
+ if attributes.key?(:'task_definition_arn')
156
+ self.task_definition_arn = attributes[:'task_definition_arn']
157
+ end
158
+
159
+ if attributes.key?(:'task_definition_infrastructure_website_url')
160
+ self.task_definition_infrastructure_website_url = attributes[:'task_definition_infrastructure_website_url']
161
+ end
162
+
163
+ if attributes.key?(:'allocated_cpu_units')
164
+ self.allocated_cpu_units = attributes[:'allocated_cpu_units']
165
+ end
166
+
167
+ if attributes.key?(:'allocated_memory_mb')
168
+ self.allocated_memory_mb = attributes[:'allocated_memory_mb']
169
+ end
170
+
171
+ if attributes.key?(:'type')
172
+ self.type = attributes[:'type']
173
+ end
174
+
175
+ if attributes.key?(:'capabilities')
176
+ if (value = attributes[:'capabilities']).is_a?(Array)
177
+ self.capabilities = value
178
+ end
179
+ end
180
+
181
+ if attributes.key?(:'tags')
182
+ if (value = attributes[:'tags']).is_a?(Hash)
183
+ self.tags = value
184
+ end
185
+ end
186
+
187
+ if attributes.key?(:'default_subnets')
188
+ if (value = attributes[:'default_subnets']).is_a?(Array)
189
+ self.default_subnets = value
190
+ end
191
+ end
192
+
193
+ if attributes.key?(:'default_subnet_infrastructure_website_urls')
194
+ if (value = attributes[:'default_subnet_infrastructure_website_urls']).is_a?(Array)
195
+ self.default_subnet_infrastructure_website_urls = value
196
+ end
197
+ end
198
+
199
+ if attributes.key?(:'default_launch_type')
200
+ self.default_launch_type = attributes[:'default_launch_type']
201
+ end
202
+
203
+ if attributes.key?(:'supported_launch_types')
204
+ if (value = attributes[:'supported_launch_types']).is_a?(Array)
205
+ self.supported_launch_types = value
206
+ end
207
+ end
208
+
209
+ if attributes.key?(:'default_cluster_arn')
210
+ self.default_cluster_arn = attributes[:'default_cluster_arn']
211
+ end
212
+
213
+ if attributes.key?(:'default_cluster_infrastructure_website_url')
214
+ self.default_cluster_infrastructure_website_url = attributes[:'default_cluster_infrastructure_website_url']
215
+ end
216
+
217
+ if attributes.key?(:'default_security_groups')
218
+ if (value = attributes[:'default_security_groups']).is_a?(Array)
219
+ self.default_security_groups = value
220
+ end
221
+ end
222
+
223
+ if attributes.key?(:'default_security_group_infrastructure_website_urls')
224
+ if (value = attributes[:'default_security_group_infrastructure_website_urls']).is_a?(Array)
225
+ self.default_security_group_infrastructure_website_urls = value
226
+ end
227
+ end
228
+
229
+ if attributes.key?(:'default_assign_public_ip')
230
+ self.default_assign_public_ip = attributes[:'default_assign_public_ip']
231
+ end
232
+
233
+ if attributes.key?(:'default_execution_role')
234
+ self.default_execution_role = attributes[:'default_execution_role']
235
+ end
236
+
237
+ if attributes.key?(:'default_execution_role_infrastructure_website_url')
238
+ self.default_execution_role_infrastructure_website_url = attributes[:'default_execution_role_infrastructure_website_url']
239
+ end
240
+
241
+ if attributes.key?(:'default_task_role')
242
+ self.default_task_role = attributes[:'default_task_role']
243
+ end
244
+
245
+ if attributes.key?(:'default_task_role_infrastructure_website_url')
246
+ self.default_task_role_infrastructure_website_url = attributes[:'default_task_role_infrastructure_website_url']
247
+ end
248
+
249
+ if attributes.key?(:'default_platform_version')
250
+ self.default_platform_version = attributes[:'default_platform_version']
251
+ end
252
+
253
+ if attributes.key?(:'main_container_name')
254
+ self.main_container_name = attributes[:'main_container_name']
255
+ end
256
+
257
+ if attributes.key?(:'service_options')
258
+ self.service_options = attributes[:'service_options']
259
+ end
260
+ end
261
+
262
+ # Show invalid properties with the reasons. Usually used together with valid?
263
+ # @return Array for valid properties with the reasons
264
+ def list_invalid_properties
265
+ invalid_properties = Array.new
266
+ if !@task_definition_arn.nil? && @task_definition_arn.to_s.length > 1000
267
+ invalid_properties.push('invalid value for "task_definition_arn", the character length must be smaller than or equal to 1000.')
268
+ end
269
+
270
+ if @task_definition_infrastructure_website_url.nil?
271
+ invalid_properties.push('invalid value for "task_definition_infrastructure_website_url", task_definition_infrastructure_website_url cannot be nil.')
272
+ end
273
+
274
+ if @type.nil?
275
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
276
+ end
277
+
278
+ if @capabilities.nil?
279
+ invalid_properties.push('invalid value for "capabilities", capabilities cannot be nil.')
280
+ end
281
+
282
+ if @default_subnet_infrastructure_website_urls.nil?
283
+ invalid_properties.push('invalid value for "default_subnet_infrastructure_website_urls", default_subnet_infrastructure_website_urls cannot be nil.')
284
+ end
285
+
286
+ if !@default_cluster_arn.nil? && @default_cluster_arn.to_s.length > 1000
287
+ invalid_properties.push('invalid value for "default_cluster_arn", the character length must be smaller than or equal to 1000.')
288
+ end
289
+
290
+ if @default_cluster_infrastructure_website_url.nil?
291
+ invalid_properties.push('invalid value for "default_cluster_infrastructure_website_url", default_cluster_infrastructure_website_url cannot be nil.')
292
+ end
293
+
294
+ if @default_security_group_infrastructure_website_urls.nil?
295
+ invalid_properties.push('invalid value for "default_security_group_infrastructure_website_urls", default_security_group_infrastructure_website_urls cannot be nil.')
296
+ end
297
+
298
+ if !@default_execution_role.nil? && @default_execution_role.to_s.length > 1000
299
+ invalid_properties.push('invalid value for "default_execution_role", the character length must be smaller than or equal to 1000.')
300
+ end
301
+
302
+ if @default_execution_role_infrastructure_website_url.nil?
303
+ invalid_properties.push('invalid value for "default_execution_role_infrastructure_website_url", default_execution_role_infrastructure_website_url cannot be nil.')
304
+ end
305
+
306
+ if !@default_task_role.nil? && @default_task_role.to_s.length > 1000
307
+ invalid_properties.push('invalid value for "default_task_role", the character length must be smaller than or equal to 1000.')
308
+ end
309
+
310
+ if @default_task_role_infrastructure_website_url.nil?
311
+ invalid_properties.push('invalid value for "default_task_role_infrastructure_website_url", default_task_role_infrastructure_website_url cannot be nil.')
312
+ end
313
+
314
+ if !@default_platform_version.nil? && @default_platform_version.to_s.length > 10
315
+ invalid_properties.push('invalid value for "default_platform_version", the character length must be smaller than or equal to 10.')
316
+ end
317
+
318
+ if !@main_container_name.nil? && @main_container_name.to_s.length > 1000
319
+ invalid_properties.push('invalid value for "main_container_name", the character length must be smaller than or equal to 1000.')
320
+ end
321
+
322
+ invalid_properties
323
+ end
324
+
325
+ # Check to see if the all the properties in the model are valid
326
+ # @return true if the model is valid
327
+ def valid?
328
+ return false if !@task_definition_arn.nil? && @task_definition_arn.to_s.length > 1000
329
+ return false if @task_definition_infrastructure_website_url.nil?
330
+ return false if @type.nil?
331
+ return false if @capabilities.nil?
332
+ return false if @default_subnet_infrastructure_website_urls.nil?
333
+ return false if !@default_cluster_arn.nil? && @default_cluster_arn.to_s.length > 1000
334
+ return false if @default_cluster_infrastructure_website_url.nil?
335
+ return false if @default_security_group_infrastructure_website_urls.nil?
336
+ return false if !@default_execution_role.nil? && @default_execution_role.to_s.length > 1000
337
+ return false if @default_execution_role_infrastructure_website_url.nil?
338
+ return false if !@default_task_role.nil? && @default_task_role.to_s.length > 1000
339
+ return false if @default_task_role_infrastructure_website_url.nil?
340
+ return false if !@default_platform_version.nil? && @default_platform_version.to_s.length > 10
341
+ return false if !@main_container_name.nil? && @main_container_name.to_s.length > 1000
342
+ true
343
+ end
344
+
345
+ # Custom attribute writer method with validation
346
+ # @param [Object] task_definition_arn Value to be assigned
347
+ def task_definition_arn=(task_definition_arn)
348
+ if !task_definition_arn.nil? && task_definition_arn.to_s.length > 1000
349
+ fail ArgumentError, 'invalid value for "task_definition_arn", the character length must be smaller than or equal to 1000.'
350
+ end
351
+
352
+ @task_definition_arn = task_definition_arn
353
+ end
354
+
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] default_cluster_arn Value to be assigned
357
+ def default_cluster_arn=(default_cluster_arn)
358
+ if !default_cluster_arn.nil? && default_cluster_arn.to_s.length > 1000
359
+ fail ArgumentError, 'invalid value for "default_cluster_arn", the character length must be smaller than or equal to 1000.'
360
+ end
361
+
362
+ @default_cluster_arn = default_cluster_arn
363
+ end
364
+
365
+ # Custom attribute writer method with validation
366
+ # @param [Object] default_execution_role Value to be assigned
367
+ def default_execution_role=(default_execution_role)
368
+ if !default_execution_role.nil? && default_execution_role.to_s.length > 1000
369
+ fail ArgumentError, 'invalid value for "default_execution_role", the character length must be smaller than or equal to 1000.'
370
+ end
371
+
372
+ @default_execution_role = default_execution_role
373
+ end
374
+
375
+ # Custom attribute writer method with validation
376
+ # @param [Object] default_task_role Value to be assigned
377
+ def default_task_role=(default_task_role)
378
+ if !default_task_role.nil? && default_task_role.to_s.length > 1000
379
+ fail ArgumentError, 'invalid value for "default_task_role", the character length must be smaller than or equal to 1000.'
380
+ end
381
+
382
+ @default_task_role = default_task_role
383
+ end
384
+
385
+ # Custom attribute writer method with validation
386
+ # @param [Object] default_platform_version Value to be assigned
387
+ def default_platform_version=(default_platform_version)
388
+ if !default_platform_version.nil? && default_platform_version.to_s.length > 10
389
+ fail ArgumentError, 'invalid value for "default_platform_version", the character length must be smaller than or equal to 10.'
390
+ end
391
+
392
+ @default_platform_version = default_platform_version
393
+ end
394
+
395
+ # Custom attribute writer method with validation
396
+ # @param [Object] main_container_name Value to be assigned
397
+ def main_container_name=(main_container_name)
398
+ if !main_container_name.nil? && main_container_name.to_s.length > 1000
399
+ fail ArgumentError, 'invalid value for "main_container_name", the character length must be smaller than or equal to 1000.'
400
+ end
401
+
402
+ @main_container_name = main_container_name
403
+ end
404
+
405
+ # Checks equality by comparing each attribute.
406
+ # @param [Object] Object to be compared
407
+ def ==(o)
408
+ return true if self.equal?(o)
409
+ self.class == o.class &&
410
+ task_definition_arn == o.task_definition_arn &&
411
+ task_definition_infrastructure_website_url == o.task_definition_infrastructure_website_url &&
412
+ allocated_cpu_units == o.allocated_cpu_units &&
413
+ allocated_memory_mb == o.allocated_memory_mb &&
414
+ type == o.type &&
415
+ capabilities == o.capabilities &&
416
+ tags == o.tags &&
417
+ default_subnets == o.default_subnets &&
418
+ default_subnet_infrastructure_website_urls == o.default_subnet_infrastructure_website_urls &&
419
+ default_launch_type == o.default_launch_type &&
420
+ supported_launch_types == o.supported_launch_types &&
421
+ default_cluster_arn == o.default_cluster_arn &&
422
+ default_cluster_infrastructure_website_url == o.default_cluster_infrastructure_website_url &&
423
+ default_security_groups == o.default_security_groups &&
424
+ default_security_group_infrastructure_website_urls == o.default_security_group_infrastructure_website_urls &&
425
+ default_assign_public_ip == o.default_assign_public_ip &&
426
+ default_execution_role == o.default_execution_role &&
427
+ default_execution_role_infrastructure_website_url == o.default_execution_role_infrastructure_website_url &&
428
+ default_task_role == o.default_task_role &&
429
+ default_task_role_infrastructure_website_url == o.default_task_role_infrastructure_website_url &&
430
+ default_platform_version == o.default_platform_version &&
431
+ main_container_name == o.main_container_name &&
432
+ service_options == o.service_options
433
+ end
434
+
435
+ # @see the `==` method
436
+ # @param [Object] Object to be compared
437
+ def eql?(o)
438
+ self == o
439
+ end
440
+
441
+ # Calculates hash code according to all attributes.
442
+ # @return [Integer] Hash code
443
+ def hash
444
+ [task_definition_arn, task_definition_infrastructure_website_url, allocated_cpu_units, allocated_memory_mb, type, capabilities, tags, default_subnets, default_subnet_infrastructure_website_urls, default_launch_type, supported_launch_types, default_cluster_arn, default_cluster_infrastructure_website_url, default_security_groups, default_security_group_infrastructure_website_urls, default_assign_public_ip, default_execution_role, default_execution_role_infrastructure_website_url, default_task_role, default_task_role_infrastructure_website_url, default_platform_version, main_container_name, service_options].hash
445
+ end
446
+
447
+ # Builds the object from hash
448
+ # @param [Hash] attributes Model attributes in the form of hash
449
+ # @return [Object] Returns the model itself
450
+ def self.build_from_hash(attributes)
451
+ new.build_from_hash(attributes)
452
+ end
453
+
454
+ # Builds the object from hash
455
+ # @param [Hash] attributes Model attributes in the form of hash
456
+ # @return [Object] Returns the model itself
457
+ def build_from_hash(attributes)
458
+ return nil unless attributes.is_a?(Hash)
459
+ self.class.openapi_types.each_pair do |key, type|
460
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
461
+ self.send("#{key}=", nil)
462
+ elsif type =~ /\AArray<(.*)>/i
463
+ # check to ensure the input is an array given that the attribute
464
+ # is documented as an array but the input is not
465
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
466
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
467
+ end
468
+ elsif !attributes[self.class.attribute_map[key]].nil?
469
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
470
+ end
471
+ end
472
+
473
+ self
474
+ end
475
+
476
+ # Deserializes the data based on type
477
+ # @param string type Data type
478
+ # @param string value Value to be deserialized
479
+ # @return [Object] Deserialized data
480
+ def _deserialize(type, value)
481
+ case type.to_sym
482
+ when :Time
483
+ Time.parse(value)
484
+ when :Date
485
+ Date.parse(value)
486
+ when :String
487
+ value.to_s
488
+ when :Integer
489
+ value.to_i
490
+ when :Float
491
+ value.to_f
492
+ when :Boolean
493
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
494
+ true
495
+ else
496
+ false
497
+ end
498
+ when :Object
499
+ # generic object (usually a Hash), return directly
500
+ value
501
+ when /\AArray<(?<inner_type>.+)>\z/
502
+ inner_type = Regexp.last_match[:inner_type]
503
+ value.map { |v| _deserialize(inner_type, v) }
504
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
505
+ k_type = Regexp.last_match[:k_type]
506
+ v_type = Regexp.last_match[:v_type]
507
+ {}.tap do |hash|
508
+ value.each do |k, v|
509
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
510
+ end
511
+ end
512
+ else # model
513
+ # models (e.g. Pet) or oneOf
514
+ klass = CloudReactorAPIClient.const_get(type)
515
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
516
+ end
517
+ end
518
+
519
+ # Returns the string representation of the object
520
+ # @return [String] String presentation of the object
521
+ def to_s
522
+ to_hash.to_s
523
+ end
524
+
525
+ # to_body is an alias to to_hash (backward compatibility)
526
+ # @return [Hash] Returns the object in the form of hash
527
+ def to_body
528
+ to_hash
529
+ end
530
+
531
+ # Returns the object in the form of hash
532
+ # @return [Hash] Returns the object in the form of hash
533
+ def to_hash
534
+ hash = {}
535
+ self.class.attribute_map.each_pair do |attr, param|
536
+ value = self.send(attr)
537
+ if value.nil?
538
+ is_nullable = self.class.openapi_nullable.include?(attr)
539
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
540
+ end
541
+
542
+ hash[param] = _to_hash(value)
543
+ end
544
+ hash
545
+ end
546
+
547
+ # Outputs non-array value in the form of hash
548
+ # For object, use to_hash. Otherwise, just return the value
549
+ # @param [Object] value Any valid value
550
+ # @return [Hash] Returns the value in the form of hash
551
+ def _to_hash(value)
552
+ if value.is_a?(Array)
553
+ value.compact.map { |v| _to_hash(v) }
554
+ elsif value.is_a?(Hash)
555
+ {}.tap do |hash|
556
+ value.each { |k, v| hash[k] = _to_hash(v) }
557
+ end
558
+ elsif value.respond_to? :to_hash
559
+ value.to_hash
560
+ else
561
+ value
562
+ end
563
+ end
564
+ end
565
+ end
@@ -0,0 +1,37 @@
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 AwsEcsLaunchType
18
+ FARGATE = "FARGATE".freeze
19
+ EC2 = "EC2".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = AwsEcsLaunchType.constants.select { |c| AwsEcsLaunchType::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #AwsEcsLaunchType" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ end