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,897 @@
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 Task is a specification for a runnable job, including details on how to run the task and how often the task is supposed to run.
18
+ class PatchedTask
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
+ attr_accessor :infrastructure_website_url
30
+
31
+ attr_accessor :max_manual_start_delay_before_alert_seconds
32
+
33
+ attr_accessor :max_manual_start_delay_before_abandonment_seconds
34
+
35
+ attr_accessor :heartbeat_interval_seconds
36
+
37
+ attr_accessor :max_heartbeat_lateness_before_alert_seconds
38
+
39
+ attr_accessor :max_heartbeat_lateness_before_abandonment_seconds
40
+
41
+ attr_accessor :schedule
42
+
43
+ attr_accessor :scheduled_instance_count
44
+
45
+ attr_accessor :is_service
46
+
47
+ attr_accessor :service_instance_count
48
+
49
+ attr_accessor :min_service_instance_count
50
+
51
+ attr_accessor :max_concurrency
52
+
53
+ attr_accessor :max_age_seconds
54
+
55
+ attr_accessor :default_max_retries
56
+
57
+ attr_accessor :project_url
58
+
59
+ attr_accessor :log_query
60
+
61
+ attr_accessor :logs_url
62
+
63
+ attr_accessor :links
64
+
65
+ attr_accessor :run_environment
66
+
67
+ attr_accessor :execution_method_capability
68
+
69
+ attr_accessor :alert_methods
70
+
71
+ attr_accessor :other_metadata
72
+
73
+ attr_accessor :latest_task_execution
74
+
75
+ attr_accessor :current_service_info
76
+
77
+ # Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
78
+ attr_accessor :created_by_user
79
+
80
+ attr_accessor :created_by_group
81
+
82
+ attr_accessor :was_auto_created
83
+
84
+ attr_accessor :passive
85
+
86
+ attr_accessor :enabled
87
+
88
+ attr_accessor :created_at
89
+
90
+ attr_accessor :updated_at
91
+
92
+ # Attribute mapping from ruby-style variable name to JSON key.
93
+ def self.attribute_map
94
+ {
95
+ :'url' => :'url',
96
+ :'uuid' => :'uuid',
97
+ :'name' => :'name',
98
+ :'description' => :'description',
99
+ :'dashboard_url' => :'dashboard_url',
100
+ :'infrastructure_website_url' => :'infrastructure_website_url',
101
+ :'max_manual_start_delay_before_alert_seconds' => :'max_manual_start_delay_before_alert_seconds',
102
+ :'max_manual_start_delay_before_abandonment_seconds' => :'max_manual_start_delay_before_abandonment_seconds',
103
+ :'heartbeat_interval_seconds' => :'heartbeat_interval_seconds',
104
+ :'max_heartbeat_lateness_before_alert_seconds' => :'max_heartbeat_lateness_before_alert_seconds',
105
+ :'max_heartbeat_lateness_before_abandonment_seconds' => :'max_heartbeat_lateness_before_abandonment_seconds',
106
+ :'schedule' => :'schedule',
107
+ :'scheduled_instance_count' => :'scheduled_instance_count',
108
+ :'is_service' => :'is_service',
109
+ :'service_instance_count' => :'service_instance_count',
110
+ :'min_service_instance_count' => :'min_service_instance_count',
111
+ :'max_concurrency' => :'max_concurrency',
112
+ :'max_age_seconds' => :'max_age_seconds',
113
+ :'default_max_retries' => :'default_max_retries',
114
+ :'project_url' => :'project_url',
115
+ :'log_query' => :'log_query',
116
+ :'logs_url' => :'logs_url',
117
+ :'links' => :'links',
118
+ :'run_environment' => :'run_environment',
119
+ :'execution_method_capability' => :'execution_method_capability',
120
+ :'alert_methods' => :'alert_methods',
121
+ :'other_metadata' => :'other_metadata',
122
+ :'latest_task_execution' => :'latest_task_execution',
123
+ :'current_service_info' => :'current_service_info',
124
+ :'created_by_user' => :'created_by_user',
125
+ :'created_by_group' => :'created_by_group',
126
+ :'was_auto_created' => :'was_auto_created',
127
+ :'passive' => :'passive',
128
+ :'enabled' => :'enabled',
129
+ :'created_at' => :'created_at',
130
+ :'updated_at' => :'updated_at'
131
+ }
132
+ end
133
+
134
+ # Returns all the JSON keys this model knows about
135
+ def self.acceptable_attributes
136
+ attribute_map.values
137
+ end
138
+
139
+ # Attribute type mapping.
140
+ def self.openapi_types
141
+ {
142
+ :'url' => :'String',
143
+ :'uuid' => :'String',
144
+ :'name' => :'String',
145
+ :'description' => :'String',
146
+ :'dashboard_url' => :'String',
147
+ :'infrastructure_website_url' => :'String',
148
+ :'max_manual_start_delay_before_alert_seconds' => :'Integer',
149
+ :'max_manual_start_delay_before_abandonment_seconds' => :'Integer',
150
+ :'heartbeat_interval_seconds' => :'Integer',
151
+ :'max_heartbeat_lateness_before_alert_seconds' => :'Integer',
152
+ :'max_heartbeat_lateness_before_abandonment_seconds' => :'Integer',
153
+ :'schedule' => :'String',
154
+ :'scheduled_instance_count' => :'Integer',
155
+ :'is_service' => :'Boolean',
156
+ :'service_instance_count' => :'Integer',
157
+ :'min_service_instance_count' => :'Integer',
158
+ :'max_concurrency' => :'Integer',
159
+ :'max_age_seconds' => :'Integer',
160
+ :'default_max_retries' => :'Integer',
161
+ :'project_url' => :'String',
162
+ :'log_query' => :'String',
163
+ :'logs_url' => :'String',
164
+ :'links' => :'Array<Link>',
165
+ :'run_environment' => :'NameAndUuid',
166
+ :'execution_method_capability' => :'ExecutionMethodCapability',
167
+ :'alert_methods' => :'Array<NameAndUuid>',
168
+ :'other_metadata' => :'Hash<String, Object>',
169
+ :'latest_task_execution' => :'TaskExecution',
170
+ :'current_service_info' => :'CurrentServiceInfo',
171
+ :'created_by_user' => :'String',
172
+ :'created_by_group' => :'Group',
173
+ :'was_auto_created' => :'Boolean',
174
+ :'passive' => :'Boolean',
175
+ :'enabled' => :'Boolean',
176
+ :'created_at' => :'Time',
177
+ :'updated_at' => :'Time'
178
+ }
179
+ end
180
+
181
+ # List of attributes with nullable: true
182
+ def self.openapi_nullable
183
+ Set.new([
184
+ :'infrastructure_website_url',
185
+ :'max_manual_start_delay_before_alert_seconds',
186
+ :'max_manual_start_delay_before_abandonment_seconds',
187
+ :'heartbeat_interval_seconds',
188
+ :'max_heartbeat_lateness_before_alert_seconds',
189
+ :'max_heartbeat_lateness_before_abandonment_seconds',
190
+ :'scheduled_instance_count',
191
+ :'service_instance_count',
192
+ :'min_service_instance_count',
193
+ :'max_concurrency',
194
+ :'max_age_seconds',
195
+ :'logs_url',
196
+ :'run_environment',
197
+ :'execution_method_capability',
198
+ :'other_metadata',
199
+ :'latest_task_execution',
200
+ :'current_service_info',
201
+ :'created_by_group',
202
+ :'was_auto_created',
203
+ ])
204
+ end
205
+
206
+ # Initializes the object
207
+ # @param [Hash] attributes Model attributes in the form of hash
208
+ def initialize(attributes = {})
209
+ if (!attributes.is_a?(Hash))
210
+ fail ArgumentError, "The input argument (attributes) must be a hash in `CloudReactorAPIClient::PatchedTask` initialize method"
211
+ end
212
+
213
+ # check to see if the attribute exists and convert string to symbol for hash key
214
+ attributes = attributes.each_with_object({}) { |(k, v), h|
215
+ if (!self.class.attribute_map.key?(k.to_sym))
216
+ fail ArgumentError, "`#{k}` is not a valid attribute in `CloudReactorAPIClient::PatchedTask`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
217
+ end
218
+ h[k.to_sym] = v
219
+ }
220
+
221
+ if attributes.key?(:'url')
222
+ self.url = attributes[:'url']
223
+ end
224
+
225
+ if attributes.key?(:'uuid')
226
+ self.uuid = attributes[:'uuid']
227
+ end
228
+
229
+ if attributes.key?(:'name')
230
+ self.name = attributes[:'name']
231
+ end
232
+
233
+ if attributes.key?(:'description')
234
+ self.description = attributes[:'description']
235
+ end
236
+
237
+ if attributes.key?(:'dashboard_url')
238
+ self.dashboard_url = attributes[:'dashboard_url']
239
+ end
240
+
241
+ if attributes.key?(:'infrastructure_website_url')
242
+ self.infrastructure_website_url = attributes[:'infrastructure_website_url']
243
+ end
244
+
245
+ if attributes.key?(:'max_manual_start_delay_before_alert_seconds')
246
+ self.max_manual_start_delay_before_alert_seconds = attributes[:'max_manual_start_delay_before_alert_seconds']
247
+ end
248
+
249
+ if attributes.key?(:'max_manual_start_delay_before_abandonment_seconds')
250
+ self.max_manual_start_delay_before_abandonment_seconds = attributes[:'max_manual_start_delay_before_abandonment_seconds']
251
+ end
252
+
253
+ if attributes.key?(:'heartbeat_interval_seconds')
254
+ self.heartbeat_interval_seconds = attributes[:'heartbeat_interval_seconds']
255
+ end
256
+
257
+ if attributes.key?(:'max_heartbeat_lateness_before_alert_seconds')
258
+ self.max_heartbeat_lateness_before_alert_seconds = attributes[:'max_heartbeat_lateness_before_alert_seconds']
259
+ end
260
+
261
+ if attributes.key?(:'max_heartbeat_lateness_before_abandonment_seconds')
262
+ self.max_heartbeat_lateness_before_abandonment_seconds = attributes[:'max_heartbeat_lateness_before_abandonment_seconds']
263
+ end
264
+
265
+ if attributes.key?(:'schedule')
266
+ self.schedule = attributes[:'schedule']
267
+ end
268
+
269
+ if attributes.key?(:'scheduled_instance_count')
270
+ self.scheduled_instance_count = attributes[:'scheduled_instance_count']
271
+ end
272
+
273
+ if attributes.key?(:'is_service')
274
+ self.is_service = attributes[:'is_service']
275
+ end
276
+
277
+ if attributes.key?(:'service_instance_count')
278
+ self.service_instance_count = attributes[:'service_instance_count']
279
+ end
280
+
281
+ if attributes.key?(:'min_service_instance_count')
282
+ self.min_service_instance_count = attributes[:'min_service_instance_count']
283
+ end
284
+
285
+ if attributes.key?(:'max_concurrency')
286
+ self.max_concurrency = attributes[:'max_concurrency']
287
+ end
288
+
289
+ if attributes.key?(:'max_age_seconds')
290
+ self.max_age_seconds = attributes[:'max_age_seconds']
291
+ end
292
+
293
+ if attributes.key?(:'default_max_retries')
294
+ self.default_max_retries = attributes[:'default_max_retries']
295
+ end
296
+
297
+ if attributes.key?(:'project_url')
298
+ self.project_url = attributes[:'project_url']
299
+ end
300
+
301
+ if attributes.key?(:'log_query')
302
+ self.log_query = attributes[:'log_query']
303
+ end
304
+
305
+ if attributes.key?(:'logs_url')
306
+ self.logs_url = attributes[:'logs_url']
307
+ end
308
+
309
+ if attributes.key?(:'links')
310
+ if (value = attributes[:'links']).is_a?(Array)
311
+ self.links = value
312
+ end
313
+ end
314
+
315
+ if attributes.key?(:'run_environment')
316
+ self.run_environment = attributes[:'run_environment']
317
+ end
318
+
319
+ if attributes.key?(:'execution_method_capability')
320
+ self.execution_method_capability = attributes[:'execution_method_capability']
321
+ end
322
+
323
+ if attributes.key?(:'alert_methods')
324
+ if (value = attributes[:'alert_methods']).is_a?(Array)
325
+ self.alert_methods = value
326
+ end
327
+ end
328
+
329
+ if attributes.key?(:'other_metadata')
330
+ if (value = attributes[:'other_metadata']).is_a?(Hash)
331
+ self.other_metadata = value
332
+ end
333
+ end
334
+
335
+ if attributes.key?(:'latest_task_execution')
336
+ self.latest_task_execution = attributes[:'latest_task_execution']
337
+ end
338
+
339
+ if attributes.key?(:'current_service_info')
340
+ self.current_service_info = attributes[:'current_service_info']
341
+ end
342
+
343
+ if attributes.key?(:'created_by_user')
344
+ self.created_by_user = attributes[:'created_by_user']
345
+ end
346
+
347
+ if attributes.key?(:'created_by_group')
348
+ self.created_by_group = attributes[:'created_by_group']
349
+ end
350
+
351
+ if attributes.key?(:'was_auto_created')
352
+ self.was_auto_created = attributes[:'was_auto_created']
353
+ end
354
+
355
+ if attributes.key?(:'passive')
356
+ self.passive = attributes[:'passive']
357
+ end
358
+
359
+ if attributes.key?(:'enabled')
360
+ self.enabled = attributes[:'enabled']
361
+ end
362
+
363
+ if attributes.key?(:'created_at')
364
+ self.created_at = attributes[:'created_at']
365
+ end
366
+
367
+ if attributes.key?(:'updated_at')
368
+ self.updated_at = attributes[:'updated_at']
369
+ end
370
+ end
371
+
372
+ # Show invalid properties with the reasons. Usually used together with valid?
373
+ # @return Array for valid properties with the reasons
374
+ def list_invalid_properties
375
+ invalid_properties = Array.new
376
+ if !@name.nil? && @name.to_s.length > 200
377
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
378
+ end
379
+
380
+ if !@description.nil? && @description.to_s.length > 5000
381
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 5000.')
382
+ end
383
+
384
+ if !@max_manual_start_delay_before_alert_seconds.nil? && @max_manual_start_delay_before_alert_seconds > 2147483647
385
+ invalid_properties.push('invalid value for "max_manual_start_delay_before_alert_seconds", must be smaller than or equal to 2147483647.')
386
+ end
387
+
388
+ if !@max_manual_start_delay_before_alert_seconds.nil? && @max_manual_start_delay_before_alert_seconds < 0
389
+ invalid_properties.push('invalid value for "max_manual_start_delay_before_alert_seconds", must be greater than or equal to 0.')
390
+ end
391
+
392
+ if !@max_manual_start_delay_before_abandonment_seconds.nil? && @max_manual_start_delay_before_abandonment_seconds > 2147483647
393
+ invalid_properties.push('invalid value for "max_manual_start_delay_before_abandonment_seconds", must be smaller than or equal to 2147483647.')
394
+ end
395
+
396
+ if !@max_manual_start_delay_before_abandonment_seconds.nil? && @max_manual_start_delay_before_abandonment_seconds < 0
397
+ invalid_properties.push('invalid value for "max_manual_start_delay_before_abandonment_seconds", must be greater than or equal to 0.')
398
+ end
399
+
400
+ if !@heartbeat_interval_seconds.nil? && @heartbeat_interval_seconds > 2147483647
401
+ invalid_properties.push('invalid value for "heartbeat_interval_seconds", must be smaller than or equal to 2147483647.')
402
+ end
403
+
404
+ if !@heartbeat_interval_seconds.nil? && @heartbeat_interval_seconds < 10
405
+ invalid_properties.push('invalid value for "heartbeat_interval_seconds", must be greater than or equal to 10.')
406
+ end
407
+
408
+ if !@max_heartbeat_lateness_before_alert_seconds.nil? && @max_heartbeat_lateness_before_alert_seconds > 2147483647
409
+ invalid_properties.push('invalid value for "max_heartbeat_lateness_before_alert_seconds", must be smaller than or equal to 2147483647.')
410
+ end
411
+
412
+ if !@max_heartbeat_lateness_before_alert_seconds.nil? && @max_heartbeat_lateness_before_alert_seconds < 0
413
+ invalid_properties.push('invalid value for "max_heartbeat_lateness_before_alert_seconds", must be greater than or equal to 0.')
414
+ end
415
+
416
+ if !@max_heartbeat_lateness_before_abandonment_seconds.nil? && @max_heartbeat_lateness_before_abandonment_seconds > 2147483647
417
+ invalid_properties.push('invalid value for "max_heartbeat_lateness_before_abandonment_seconds", must be smaller than or equal to 2147483647.')
418
+ end
419
+
420
+ if !@max_heartbeat_lateness_before_abandonment_seconds.nil? && @max_heartbeat_lateness_before_abandonment_seconds < 0
421
+ invalid_properties.push('invalid value for "max_heartbeat_lateness_before_abandonment_seconds", must be greater than or equal to 0.')
422
+ end
423
+
424
+ if !@schedule.nil? && @schedule.to_s.length > 1000
425
+ invalid_properties.push('invalid value for "schedule", the character length must be smaller than or equal to 1000.')
426
+ end
427
+
428
+ if !@scheduled_instance_count.nil? && @scheduled_instance_count > 2147483647
429
+ invalid_properties.push('invalid value for "scheduled_instance_count", must be smaller than or equal to 2147483647.')
430
+ end
431
+
432
+ if !@scheduled_instance_count.nil? && @scheduled_instance_count < 0
433
+ invalid_properties.push('invalid value for "scheduled_instance_count", must be greater than or equal to 0.')
434
+ end
435
+
436
+ if !@service_instance_count.nil? && @service_instance_count > 2147483647
437
+ invalid_properties.push('invalid value for "service_instance_count", must be smaller than or equal to 2147483647.')
438
+ end
439
+
440
+ if !@service_instance_count.nil? && @service_instance_count < 0
441
+ invalid_properties.push('invalid value for "service_instance_count", must be greater than or equal to 0.')
442
+ end
443
+
444
+ if !@min_service_instance_count.nil? && @min_service_instance_count > 2147483647
445
+ invalid_properties.push('invalid value for "min_service_instance_count", must be smaller than or equal to 2147483647.')
446
+ end
447
+
448
+ if !@min_service_instance_count.nil? && @min_service_instance_count < 0
449
+ invalid_properties.push('invalid value for "min_service_instance_count", must be greater than or equal to 0.')
450
+ end
451
+
452
+ if !@max_concurrency.nil? && @max_concurrency > 2147483647
453
+ invalid_properties.push('invalid value for "max_concurrency", must be smaller than or equal to 2147483647.')
454
+ end
455
+
456
+ if !@max_concurrency.nil? && @max_concurrency < -2147483648
457
+ invalid_properties.push('invalid value for "max_concurrency", must be greater than or equal to -2147483648.')
458
+ end
459
+
460
+ if !@max_age_seconds.nil? && @max_age_seconds > 2147483647
461
+ invalid_properties.push('invalid value for "max_age_seconds", must be smaller than or equal to 2147483647.')
462
+ end
463
+
464
+ if !@max_age_seconds.nil? && @max_age_seconds < 0
465
+ invalid_properties.push('invalid value for "max_age_seconds", must be greater than or equal to 0.')
466
+ end
467
+
468
+ if !@default_max_retries.nil? && @default_max_retries > 2147483647
469
+ invalid_properties.push('invalid value for "default_max_retries", must be smaller than or equal to 2147483647.')
470
+ end
471
+
472
+ if !@default_max_retries.nil? && @default_max_retries < 0
473
+ invalid_properties.push('invalid value for "default_max_retries", must be greater than or equal to 0.')
474
+ end
475
+
476
+ if !@project_url.nil? && @project_url.to_s.length > 1000
477
+ invalid_properties.push('invalid value for "project_url", the character length must be smaller than or equal to 1000.')
478
+ end
479
+
480
+ if !@log_query.nil? && @log_query.to_s.length > 1000
481
+ invalid_properties.push('invalid value for "log_query", the character length must be smaller than or equal to 1000.')
482
+ end
483
+
484
+ invalid_properties
485
+ end
486
+
487
+ # Check to see if the all the properties in the model are valid
488
+ # @return true if the model is valid
489
+ def valid?
490
+ return false if !@name.nil? && @name.to_s.length > 200
491
+ return false if !@description.nil? && @description.to_s.length > 5000
492
+ return false if !@max_manual_start_delay_before_alert_seconds.nil? && @max_manual_start_delay_before_alert_seconds > 2147483647
493
+ return false if !@max_manual_start_delay_before_alert_seconds.nil? && @max_manual_start_delay_before_alert_seconds < 0
494
+ return false if !@max_manual_start_delay_before_abandonment_seconds.nil? && @max_manual_start_delay_before_abandonment_seconds > 2147483647
495
+ return false if !@max_manual_start_delay_before_abandonment_seconds.nil? && @max_manual_start_delay_before_abandonment_seconds < 0
496
+ return false if !@heartbeat_interval_seconds.nil? && @heartbeat_interval_seconds > 2147483647
497
+ return false if !@heartbeat_interval_seconds.nil? && @heartbeat_interval_seconds < 10
498
+ return false if !@max_heartbeat_lateness_before_alert_seconds.nil? && @max_heartbeat_lateness_before_alert_seconds > 2147483647
499
+ return false if !@max_heartbeat_lateness_before_alert_seconds.nil? && @max_heartbeat_lateness_before_alert_seconds < 0
500
+ return false if !@max_heartbeat_lateness_before_abandonment_seconds.nil? && @max_heartbeat_lateness_before_abandonment_seconds > 2147483647
501
+ return false if !@max_heartbeat_lateness_before_abandonment_seconds.nil? && @max_heartbeat_lateness_before_abandonment_seconds < 0
502
+ return false if !@schedule.nil? && @schedule.to_s.length > 1000
503
+ return false if !@scheduled_instance_count.nil? && @scheduled_instance_count > 2147483647
504
+ return false if !@scheduled_instance_count.nil? && @scheduled_instance_count < 0
505
+ return false if !@service_instance_count.nil? && @service_instance_count > 2147483647
506
+ return false if !@service_instance_count.nil? && @service_instance_count < 0
507
+ return false if !@min_service_instance_count.nil? && @min_service_instance_count > 2147483647
508
+ return false if !@min_service_instance_count.nil? && @min_service_instance_count < 0
509
+ return false if !@max_concurrency.nil? && @max_concurrency > 2147483647
510
+ return false if !@max_concurrency.nil? && @max_concurrency < -2147483648
511
+ return false if !@max_age_seconds.nil? && @max_age_seconds > 2147483647
512
+ return false if !@max_age_seconds.nil? && @max_age_seconds < 0
513
+ return false if !@default_max_retries.nil? && @default_max_retries > 2147483647
514
+ return false if !@default_max_retries.nil? && @default_max_retries < 0
515
+ return false if !@project_url.nil? && @project_url.to_s.length > 1000
516
+ return false if !@log_query.nil? && @log_query.to_s.length > 1000
517
+ true
518
+ end
519
+
520
+ # Custom attribute writer method with validation
521
+ # @param [Object] name Value to be assigned
522
+ def name=(name)
523
+ if !name.nil? && name.to_s.length > 200
524
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
525
+ end
526
+
527
+ @name = name
528
+ end
529
+
530
+ # Custom attribute writer method with validation
531
+ # @param [Object] description Value to be assigned
532
+ def description=(description)
533
+ if !description.nil? && description.to_s.length > 5000
534
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 5000.'
535
+ end
536
+
537
+ @description = description
538
+ end
539
+
540
+ # Custom attribute writer method with validation
541
+ # @param [Object] max_manual_start_delay_before_alert_seconds Value to be assigned
542
+ def max_manual_start_delay_before_alert_seconds=(max_manual_start_delay_before_alert_seconds)
543
+ if !max_manual_start_delay_before_alert_seconds.nil? && max_manual_start_delay_before_alert_seconds > 2147483647
544
+ fail ArgumentError, 'invalid value for "max_manual_start_delay_before_alert_seconds", must be smaller than or equal to 2147483647.'
545
+ end
546
+
547
+ if !max_manual_start_delay_before_alert_seconds.nil? && max_manual_start_delay_before_alert_seconds < 0
548
+ fail ArgumentError, 'invalid value for "max_manual_start_delay_before_alert_seconds", must be greater than or equal to 0.'
549
+ end
550
+
551
+ @max_manual_start_delay_before_alert_seconds = max_manual_start_delay_before_alert_seconds
552
+ end
553
+
554
+ # Custom attribute writer method with validation
555
+ # @param [Object] max_manual_start_delay_before_abandonment_seconds Value to be assigned
556
+ def max_manual_start_delay_before_abandonment_seconds=(max_manual_start_delay_before_abandonment_seconds)
557
+ if !max_manual_start_delay_before_abandonment_seconds.nil? && max_manual_start_delay_before_abandonment_seconds > 2147483647
558
+ fail ArgumentError, 'invalid value for "max_manual_start_delay_before_abandonment_seconds", must be smaller than or equal to 2147483647.'
559
+ end
560
+
561
+ if !max_manual_start_delay_before_abandonment_seconds.nil? && max_manual_start_delay_before_abandonment_seconds < 0
562
+ fail ArgumentError, 'invalid value for "max_manual_start_delay_before_abandonment_seconds", must be greater than or equal to 0.'
563
+ end
564
+
565
+ @max_manual_start_delay_before_abandonment_seconds = max_manual_start_delay_before_abandonment_seconds
566
+ end
567
+
568
+ # Custom attribute writer method with validation
569
+ # @param [Object] heartbeat_interval_seconds Value to be assigned
570
+ def heartbeat_interval_seconds=(heartbeat_interval_seconds)
571
+ if !heartbeat_interval_seconds.nil? && heartbeat_interval_seconds > 2147483647
572
+ fail ArgumentError, 'invalid value for "heartbeat_interval_seconds", must be smaller than or equal to 2147483647.'
573
+ end
574
+
575
+ if !heartbeat_interval_seconds.nil? && heartbeat_interval_seconds < 10
576
+ fail ArgumentError, 'invalid value for "heartbeat_interval_seconds", must be greater than or equal to 10.'
577
+ end
578
+
579
+ @heartbeat_interval_seconds = heartbeat_interval_seconds
580
+ end
581
+
582
+ # Custom attribute writer method with validation
583
+ # @param [Object] max_heartbeat_lateness_before_alert_seconds Value to be assigned
584
+ def max_heartbeat_lateness_before_alert_seconds=(max_heartbeat_lateness_before_alert_seconds)
585
+ if !max_heartbeat_lateness_before_alert_seconds.nil? && max_heartbeat_lateness_before_alert_seconds > 2147483647
586
+ fail ArgumentError, 'invalid value for "max_heartbeat_lateness_before_alert_seconds", must be smaller than or equal to 2147483647.'
587
+ end
588
+
589
+ if !max_heartbeat_lateness_before_alert_seconds.nil? && max_heartbeat_lateness_before_alert_seconds < 0
590
+ fail ArgumentError, 'invalid value for "max_heartbeat_lateness_before_alert_seconds", must be greater than or equal to 0.'
591
+ end
592
+
593
+ @max_heartbeat_lateness_before_alert_seconds = max_heartbeat_lateness_before_alert_seconds
594
+ end
595
+
596
+ # Custom attribute writer method with validation
597
+ # @param [Object] max_heartbeat_lateness_before_abandonment_seconds Value to be assigned
598
+ def max_heartbeat_lateness_before_abandonment_seconds=(max_heartbeat_lateness_before_abandonment_seconds)
599
+ if !max_heartbeat_lateness_before_abandonment_seconds.nil? && max_heartbeat_lateness_before_abandonment_seconds > 2147483647
600
+ fail ArgumentError, 'invalid value for "max_heartbeat_lateness_before_abandonment_seconds", must be smaller than or equal to 2147483647.'
601
+ end
602
+
603
+ if !max_heartbeat_lateness_before_abandonment_seconds.nil? && max_heartbeat_lateness_before_abandonment_seconds < 0
604
+ fail ArgumentError, 'invalid value for "max_heartbeat_lateness_before_abandonment_seconds", must be greater than or equal to 0.'
605
+ end
606
+
607
+ @max_heartbeat_lateness_before_abandonment_seconds = max_heartbeat_lateness_before_abandonment_seconds
608
+ end
609
+
610
+ # Custom attribute writer method with validation
611
+ # @param [Object] schedule Value to be assigned
612
+ def schedule=(schedule)
613
+ if !schedule.nil? && schedule.to_s.length > 1000
614
+ fail ArgumentError, 'invalid value for "schedule", the character length must be smaller than or equal to 1000.'
615
+ end
616
+
617
+ @schedule = schedule
618
+ end
619
+
620
+ # Custom attribute writer method with validation
621
+ # @param [Object] scheduled_instance_count Value to be assigned
622
+ def scheduled_instance_count=(scheduled_instance_count)
623
+ if !scheduled_instance_count.nil? && scheduled_instance_count > 2147483647
624
+ fail ArgumentError, 'invalid value for "scheduled_instance_count", must be smaller than or equal to 2147483647.'
625
+ end
626
+
627
+ if !scheduled_instance_count.nil? && scheduled_instance_count < 0
628
+ fail ArgumentError, 'invalid value for "scheduled_instance_count", must be greater than or equal to 0.'
629
+ end
630
+
631
+ @scheduled_instance_count = scheduled_instance_count
632
+ end
633
+
634
+ # Custom attribute writer method with validation
635
+ # @param [Object] service_instance_count Value to be assigned
636
+ def service_instance_count=(service_instance_count)
637
+ if !service_instance_count.nil? && service_instance_count > 2147483647
638
+ fail ArgumentError, 'invalid value for "service_instance_count", must be smaller than or equal to 2147483647.'
639
+ end
640
+
641
+ if !service_instance_count.nil? && service_instance_count < 0
642
+ fail ArgumentError, 'invalid value for "service_instance_count", must be greater than or equal to 0.'
643
+ end
644
+
645
+ @service_instance_count = service_instance_count
646
+ end
647
+
648
+ # Custom attribute writer method with validation
649
+ # @param [Object] min_service_instance_count Value to be assigned
650
+ def min_service_instance_count=(min_service_instance_count)
651
+ if !min_service_instance_count.nil? && min_service_instance_count > 2147483647
652
+ fail ArgumentError, 'invalid value for "min_service_instance_count", must be smaller than or equal to 2147483647.'
653
+ end
654
+
655
+ if !min_service_instance_count.nil? && min_service_instance_count < 0
656
+ fail ArgumentError, 'invalid value for "min_service_instance_count", must be greater than or equal to 0.'
657
+ end
658
+
659
+ @min_service_instance_count = min_service_instance_count
660
+ end
661
+
662
+ # Custom attribute writer method with validation
663
+ # @param [Object] max_concurrency Value to be assigned
664
+ def max_concurrency=(max_concurrency)
665
+ if !max_concurrency.nil? && max_concurrency > 2147483647
666
+ fail ArgumentError, 'invalid value for "max_concurrency", must be smaller than or equal to 2147483647.'
667
+ end
668
+
669
+ if !max_concurrency.nil? && max_concurrency < -2147483648
670
+ fail ArgumentError, 'invalid value for "max_concurrency", must be greater than or equal to -2147483648.'
671
+ end
672
+
673
+ @max_concurrency = max_concurrency
674
+ end
675
+
676
+ # Custom attribute writer method with validation
677
+ # @param [Object] max_age_seconds Value to be assigned
678
+ def max_age_seconds=(max_age_seconds)
679
+ if !max_age_seconds.nil? && max_age_seconds > 2147483647
680
+ fail ArgumentError, 'invalid value for "max_age_seconds", must be smaller than or equal to 2147483647.'
681
+ end
682
+
683
+ if !max_age_seconds.nil? && max_age_seconds < 0
684
+ fail ArgumentError, 'invalid value for "max_age_seconds", must be greater than or equal to 0.'
685
+ end
686
+
687
+ @max_age_seconds = max_age_seconds
688
+ end
689
+
690
+ # Custom attribute writer method with validation
691
+ # @param [Object] default_max_retries Value to be assigned
692
+ def default_max_retries=(default_max_retries)
693
+ if !default_max_retries.nil? && default_max_retries > 2147483647
694
+ fail ArgumentError, 'invalid value for "default_max_retries", must be smaller than or equal to 2147483647.'
695
+ end
696
+
697
+ if !default_max_retries.nil? && default_max_retries < 0
698
+ fail ArgumentError, 'invalid value for "default_max_retries", must be greater than or equal to 0.'
699
+ end
700
+
701
+ @default_max_retries = default_max_retries
702
+ end
703
+
704
+ # Custom attribute writer method with validation
705
+ # @param [Object] project_url Value to be assigned
706
+ def project_url=(project_url)
707
+ if !project_url.nil? && project_url.to_s.length > 1000
708
+ fail ArgumentError, 'invalid value for "project_url", the character length must be smaller than or equal to 1000.'
709
+ end
710
+
711
+ @project_url = project_url
712
+ end
713
+
714
+ # Custom attribute writer method with validation
715
+ # @param [Object] log_query Value to be assigned
716
+ def log_query=(log_query)
717
+ if !log_query.nil? && log_query.to_s.length > 1000
718
+ fail ArgumentError, 'invalid value for "log_query", the character length must be smaller than or equal to 1000.'
719
+ end
720
+
721
+ @log_query = log_query
722
+ end
723
+
724
+ # Checks equality by comparing each attribute.
725
+ # @param [Object] Object to be compared
726
+ def ==(o)
727
+ return true if self.equal?(o)
728
+ self.class == o.class &&
729
+ url == o.url &&
730
+ uuid == o.uuid &&
731
+ name == o.name &&
732
+ description == o.description &&
733
+ dashboard_url == o.dashboard_url &&
734
+ infrastructure_website_url == o.infrastructure_website_url &&
735
+ max_manual_start_delay_before_alert_seconds == o.max_manual_start_delay_before_alert_seconds &&
736
+ max_manual_start_delay_before_abandonment_seconds == o.max_manual_start_delay_before_abandonment_seconds &&
737
+ heartbeat_interval_seconds == o.heartbeat_interval_seconds &&
738
+ max_heartbeat_lateness_before_alert_seconds == o.max_heartbeat_lateness_before_alert_seconds &&
739
+ max_heartbeat_lateness_before_abandonment_seconds == o.max_heartbeat_lateness_before_abandonment_seconds &&
740
+ schedule == o.schedule &&
741
+ scheduled_instance_count == o.scheduled_instance_count &&
742
+ is_service == o.is_service &&
743
+ service_instance_count == o.service_instance_count &&
744
+ min_service_instance_count == o.min_service_instance_count &&
745
+ max_concurrency == o.max_concurrency &&
746
+ max_age_seconds == o.max_age_seconds &&
747
+ default_max_retries == o.default_max_retries &&
748
+ project_url == o.project_url &&
749
+ log_query == o.log_query &&
750
+ logs_url == o.logs_url &&
751
+ links == o.links &&
752
+ run_environment == o.run_environment &&
753
+ execution_method_capability == o.execution_method_capability &&
754
+ alert_methods == o.alert_methods &&
755
+ other_metadata == o.other_metadata &&
756
+ latest_task_execution == o.latest_task_execution &&
757
+ current_service_info == o.current_service_info &&
758
+ created_by_user == o.created_by_user &&
759
+ created_by_group == o.created_by_group &&
760
+ was_auto_created == o.was_auto_created &&
761
+ passive == o.passive &&
762
+ enabled == o.enabled &&
763
+ created_at == o.created_at &&
764
+ updated_at == o.updated_at
765
+ end
766
+
767
+ # @see the `==` method
768
+ # @param [Object] Object to be compared
769
+ def eql?(o)
770
+ self == o
771
+ end
772
+
773
+ # Calculates hash code according to all attributes.
774
+ # @return [Integer] Hash code
775
+ def hash
776
+ [url, uuid, name, description, dashboard_url, infrastructure_website_url, max_manual_start_delay_before_alert_seconds, max_manual_start_delay_before_abandonment_seconds, heartbeat_interval_seconds, max_heartbeat_lateness_before_alert_seconds, max_heartbeat_lateness_before_abandonment_seconds, schedule, scheduled_instance_count, is_service, service_instance_count, min_service_instance_count, max_concurrency, max_age_seconds, default_max_retries, project_url, log_query, logs_url, links, run_environment, execution_method_capability, alert_methods, other_metadata, latest_task_execution, current_service_info, created_by_user, created_by_group, was_auto_created, passive, enabled, created_at, updated_at].hash
777
+ end
778
+
779
+ # Builds the object from hash
780
+ # @param [Hash] attributes Model attributes in the form of hash
781
+ # @return [Object] Returns the model itself
782
+ def self.build_from_hash(attributes)
783
+ new.build_from_hash(attributes)
784
+ end
785
+
786
+ # Builds the object from hash
787
+ # @param [Hash] attributes Model attributes in the form of hash
788
+ # @return [Object] Returns the model itself
789
+ def build_from_hash(attributes)
790
+ return nil unless attributes.is_a?(Hash)
791
+ self.class.openapi_types.each_pair do |key, type|
792
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
793
+ self.send("#{key}=", nil)
794
+ elsif type =~ /\AArray<(.*)>/i
795
+ # check to ensure the input is an array given that the attribute
796
+ # is documented as an array but the input is not
797
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
798
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
799
+ end
800
+ elsif !attributes[self.class.attribute_map[key]].nil?
801
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
802
+ end
803
+ end
804
+
805
+ self
806
+ end
807
+
808
+ # Deserializes the data based on type
809
+ # @param string type Data type
810
+ # @param string value Value to be deserialized
811
+ # @return [Object] Deserialized data
812
+ def _deserialize(type, value)
813
+ case type.to_sym
814
+ when :Time
815
+ Time.parse(value)
816
+ when :Date
817
+ Date.parse(value)
818
+ when :String
819
+ value.to_s
820
+ when :Integer
821
+ value.to_i
822
+ when :Float
823
+ value.to_f
824
+ when :Boolean
825
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
826
+ true
827
+ else
828
+ false
829
+ end
830
+ when :Object
831
+ # generic object (usually a Hash), return directly
832
+ value
833
+ when /\AArray<(?<inner_type>.+)>\z/
834
+ inner_type = Regexp.last_match[:inner_type]
835
+ value.map { |v| _deserialize(inner_type, v) }
836
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
837
+ k_type = Regexp.last_match[:k_type]
838
+ v_type = Regexp.last_match[:v_type]
839
+ {}.tap do |hash|
840
+ value.each do |k, v|
841
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
842
+ end
843
+ end
844
+ else # model
845
+ # models (e.g. Pet) or oneOf
846
+ klass = CloudReactorAPIClient.const_get(type)
847
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
848
+ end
849
+ end
850
+
851
+ # Returns the string representation of the object
852
+ # @return [String] String presentation of the object
853
+ def to_s
854
+ to_hash.to_s
855
+ end
856
+
857
+ # to_body is an alias to to_hash (backward compatibility)
858
+ # @return [Hash] Returns the object in the form of hash
859
+ def to_body
860
+ to_hash
861
+ end
862
+
863
+ # Returns the object in the form of hash
864
+ # @return [Hash] Returns the object in the form of hash
865
+ def to_hash
866
+ hash = {}
867
+ self.class.attribute_map.each_pair do |attr, param|
868
+ value = self.send(attr)
869
+ if value.nil?
870
+ is_nullable = self.class.openapi_nullable.include?(attr)
871
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
872
+ end
873
+
874
+ hash[param] = _to_hash(value)
875
+ end
876
+ hash
877
+ end
878
+
879
+ # Outputs non-array value in the form of hash
880
+ # For object, use to_hash. Otherwise, just return the value
881
+ # @param [Object] value Any valid value
882
+ # @return [Hash] Returns the value in the form of hash
883
+ def _to_hash(value)
884
+ if value.is_a?(Array)
885
+ value.compact.map { |v| _to_hash(v) }
886
+ elsif value.is_a?(Hash)
887
+ {}.tap do |hash|
888
+ value.each { |k, v| hash[k] = _to_hash(v) }
889
+ end
890
+ elsif value.respond_to? :to_hash
891
+ value.to_hash
892
+ else
893
+ value
894
+ end
895
+ end
896
+ end
897
+ end