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,941 @@
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 Task
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::Task` 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::Task`. 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 @url.nil?
377
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
378
+ end
379
+
380
+ if @uuid.nil?
381
+ invalid_properties.push('invalid value for "uuid", uuid cannot be nil.')
382
+ end
383
+
384
+ if @name.nil?
385
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
386
+ end
387
+
388
+ if @name.to_s.length > 200
389
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
390
+ end
391
+
392
+ if !@description.nil? && @description.to_s.length > 5000
393
+ invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 5000.')
394
+ end
395
+
396
+ if @dashboard_url.nil?
397
+ invalid_properties.push('invalid value for "dashboard_url", dashboard_url cannot be nil.')
398
+ end
399
+
400
+ if !@max_manual_start_delay_before_alert_seconds.nil? && @max_manual_start_delay_before_alert_seconds > 2147483647
401
+ invalid_properties.push('invalid value for "max_manual_start_delay_before_alert_seconds", must be smaller than or equal to 2147483647.')
402
+ end
403
+
404
+ if !@max_manual_start_delay_before_alert_seconds.nil? && @max_manual_start_delay_before_alert_seconds < 0
405
+ invalid_properties.push('invalid value for "max_manual_start_delay_before_alert_seconds", must be greater than or equal to 0.')
406
+ end
407
+
408
+ if !@max_manual_start_delay_before_abandonment_seconds.nil? && @max_manual_start_delay_before_abandonment_seconds > 2147483647
409
+ invalid_properties.push('invalid value for "max_manual_start_delay_before_abandonment_seconds", must be smaller than or equal to 2147483647.')
410
+ end
411
+
412
+ if !@max_manual_start_delay_before_abandonment_seconds.nil? && @max_manual_start_delay_before_abandonment_seconds < 0
413
+ invalid_properties.push('invalid value for "max_manual_start_delay_before_abandonment_seconds", must be greater than or equal to 0.')
414
+ end
415
+
416
+ if !@heartbeat_interval_seconds.nil? && @heartbeat_interval_seconds > 2147483647
417
+ invalid_properties.push('invalid value for "heartbeat_interval_seconds", must be smaller than or equal to 2147483647.')
418
+ end
419
+
420
+ if !@heartbeat_interval_seconds.nil? && @heartbeat_interval_seconds < 10
421
+ invalid_properties.push('invalid value for "heartbeat_interval_seconds", must be greater than or equal to 10.')
422
+ end
423
+
424
+ if !@max_heartbeat_lateness_before_alert_seconds.nil? && @max_heartbeat_lateness_before_alert_seconds > 2147483647
425
+ invalid_properties.push('invalid value for "max_heartbeat_lateness_before_alert_seconds", must be smaller than or equal to 2147483647.')
426
+ end
427
+
428
+ if !@max_heartbeat_lateness_before_alert_seconds.nil? && @max_heartbeat_lateness_before_alert_seconds < 0
429
+ invalid_properties.push('invalid value for "max_heartbeat_lateness_before_alert_seconds", must be greater than or equal to 0.')
430
+ end
431
+
432
+ if !@max_heartbeat_lateness_before_abandonment_seconds.nil? && @max_heartbeat_lateness_before_abandonment_seconds > 2147483647
433
+ invalid_properties.push('invalid value for "max_heartbeat_lateness_before_abandonment_seconds", must be smaller than or equal to 2147483647.')
434
+ end
435
+
436
+ if !@max_heartbeat_lateness_before_abandonment_seconds.nil? && @max_heartbeat_lateness_before_abandonment_seconds < 0
437
+ invalid_properties.push('invalid value for "max_heartbeat_lateness_before_abandonment_seconds", must be greater than or equal to 0.')
438
+ end
439
+
440
+ if !@schedule.nil? && @schedule.to_s.length > 1000
441
+ invalid_properties.push('invalid value for "schedule", the character length must be smaller than or equal to 1000.')
442
+ end
443
+
444
+ if !@scheduled_instance_count.nil? && @scheduled_instance_count > 2147483647
445
+ invalid_properties.push('invalid value for "scheduled_instance_count", must be smaller than or equal to 2147483647.')
446
+ end
447
+
448
+ if !@scheduled_instance_count.nil? && @scheduled_instance_count < 0
449
+ invalid_properties.push('invalid value for "scheduled_instance_count", must be greater than or equal to 0.')
450
+ end
451
+
452
+ if @is_service.nil?
453
+ invalid_properties.push('invalid value for "is_service", is_service cannot be nil.')
454
+ end
455
+
456
+ if !@service_instance_count.nil? && @service_instance_count > 2147483647
457
+ invalid_properties.push('invalid value for "service_instance_count", must be smaller than or equal to 2147483647.')
458
+ end
459
+
460
+ if !@service_instance_count.nil? && @service_instance_count < 0
461
+ invalid_properties.push('invalid value for "service_instance_count", must be greater than or equal to 0.')
462
+ end
463
+
464
+ if !@min_service_instance_count.nil? && @min_service_instance_count > 2147483647
465
+ invalid_properties.push('invalid value for "min_service_instance_count", must be smaller than or equal to 2147483647.')
466
+ end
467
+
468
+ if !@min_service_instance_count.nil? && @min_service_instance_count < 0
469
+ invalid_properties.push('invalid value for "min_service_instance_count", must be greater than or equal to 0.')
470
+ end
471
+
472
+ if !@max_concurrency.nil? && @max_concurrency > 2147483647
473
+ invalid_properties.push('invalid value for "max_concurrency", must be smaller than or equal to 2147483647.')
474
+ end
475
+
476
+ if !@max_concurrency.nil? && @max_concurrency < -2147483648
477
+ invalid_properties.push('invalid value for "max_concurrency", must be greater than or equal to -2147483648.')
478
+ end
479
+
480
+ if !@max_age_seconds.nil? && @max_age_seconds > 2147483647
481
+ invalid_properties.push('invalid value for "max_age_seconds", must be smaller than or equal to 2147483647.')
482
+ end
483
+
484
+ if !@max_age_seconds.nil? && @max_age_seconds < 0
485
+ invalid_properties.push('invalid value for "max_age_seconds", must be greater than or equal to 0.')
486
+ end
487
+
488
+ if !@default_max_retries.nil? && @default_max_retries > 2147483647
489
+ invalid_properties.push('invalid value for "default_max_retries", must be smaller than or equal to 2147483647.')
490
+ end
491
+
492
+ if !@default_max_retries.nil? && @default_max_retries < 0
493
+ invalid_properties.push('invalid value for "default_max_retries", must be greater than or equal to 0.')
494
+ end
495
+
496
+ if !@project_url.nil? && @project_url.to_s.length > 1000
497
+ invalid_properties.push('invalid value for "project_url", the character length must be smaller than or equal to 1000.')
498
+ end
499
+
500
+ if !@log_query.nil? && @log_query.to_s.length > 1000
501
+ invalid_properties.push('invalid value for "log_query", the character length must be smaller than or equal to 1000.')
502
+ end
503
+
504
+ if @created_by_user.nil?
505
+ invalid_properties.push('invalid value for "created_by_user", created_by_user cannot be nil.')
506
+ end
507
+
508
+ if @created_at.nil?
509
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
510
+ end
511
+
512
+ if @updated_at.nil?
513
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
514
+ end
515
+
516
+ invalid_properties
517
+ end
518
+
519
+ # Check to see if the all the properties in the model are valid
520
+ # @return true if the model is valid
521
+ def valid?
522
+ return false if @url.nil?
523
+ return false if @uuid.nil?
524
+ return false if @name.nil?
525
+ return false if @name.to_s.length > 200
526
+ return false if !@description.nil? && @description.to_s.length > 5000
527
+ return false if @dashboard_url.nil?
528
+ return false if !@max_manual_start_delay_before_alert_seconds.nil? && @max_manual_start_delay_before_alert_seconds > 2147483647
529
+ return false if !@max_manual_start_delay_before_alert_seconds.nil? && @max_manual_start_delay_before_alert_seconds < 0
530
+ return false if !@max_manual_start_delay_before_abandonment_seconds.nil? && @max_manual_start_delay_before_abandonment_seconds > 2147483647
531
+ return false if !@max_manual_start_delay_before_abandonment_seconds.nil? && @max_manual_start_delay_before_abandonment_seconds < 0
532
+ return false if !@heartbeat_interval_seconds.nil? && @heartbeat_interval_seconds > 2147483647
533
+ return false if !@heartbeat_interval_seconds.nil? && @heartbeat_interval_seconds < 10
534
+ return false if !@max_heartbeat_lateness_before_alert_seconds.nil? && @max_heartbeat_lateness_before_alert_seconds > 2147483647
535
+ return false if !@max_heartbeat_lateness_before_alert_seconds.nil? && @max_heartbeat_lateness_before_alert_seconds < 0
536
+ return false if !@max_heartbeat_lateness_before_abandonment_seconds.nil? && @max_heartbeat_lateness_before_abandonment_seconds > 2147483647
537
+ return false if !@max_heartbeat_lateness_before_abandonment_seconds.nil? && @max_heartbeat_lateness_before_abandonment_seconds < 0
538
+ return false if !@schedule.nil? && @schedule.to_s.length > 1000
539
+ return false if !@scheduled_instance_count.nil? && @scheduled_instance_count > 2147483647
540
+ return false if !@scheduled_instance_count.nil? && @scheduled_instance_count < 0
541
+ return false if @is_service.nil?
542
+ return false if !@service_instance_count.nil? && @service_instance_count > 2147483647
543
+ return false if !@service_instance_count.nil? && @service_instance_count < 0
544
+ return false if !@min_service_instance_count.nil? && @min_service_instance_count > 2147483647
545
+ return false if !@min_service_instance_count.nil? && @min_service_instance_count < 0
546
+ return false if !@max_concurrency.nil? && @max_concurrency > 2147483647
547
+ return false if !@max_concurrency.nil? && @max_concurrency < -2147483648
548
+ return false if !@max_age_seconds.nil? && @max_age_seconds > 2147483647
549
+ return false if !@max_age_seconds.nil? && @max_age_seconds < 0
550
+ return false if !@default_max_retries.nil? && @default_max_retries > 2147483647
551
+ return false if !@default_max_retries.nil? && @default_max_retries < 0
552
+ return false if !@project_url.nil? && @project_url.to_s.length > 1000
553
+ return false if !@log_query.nil? && @log_query.to_s.length > 1000
554
+ return false if @created_by_user.nil?
555
+ return false if @created_at.nil?
556
+ return false if @updated_at.nil?
557
+ true
558
+ end
559
+
560
+ # Custom attribute writer method with validation
561
+ # @param [Object] name Value to be assigned
562
+ def name=(name)
563
+ if name.nil?
564
+ fail ArgumentError, 'name cannot be nil'
565
+ end
566
+
567
+ if name.to_s.length > 200
568
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
569
+ end
570
+
571
+ @name = name
572
+ end
573
+
574
+ # Custom attribute writer method with validation
575
+ # @param [Object] description Value to be assigned
576
+ def description=(description)
577
+ if !description.nil? && description.to_s.length > 5000
578
+ fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 5000.'
579
+ end
580
+
581
+ @description = description
582
+ end
583
+
584
+ # Custom attribute writer method with validation
585
+ # @param [Object] max_manual_start_delay_before_alert_seconds Value to be assigned
586
+ def max_manual_start_delay_before_alert_seconds=(max_manual_start_delay_before_alert_seconds)
587
+ if !max_manual_start_delay_before_alert_seconds.nil? && max_manual_start_delay_before_alert_seconds > 2147483647
588
+ fail ArgumentError, 'invalid value for "max_manual_start_delay_before_alert_seconds", must be smaller than or equal to 2147483647.'
589
+ end
590
+
591
+ if !max_manual_start_delay_before_alert_seconds.nil? && max_manual_start_delay_before_alert_seconds < 0
592
+ fail ArgumentError, 'invalid value for "max_manual_start_delay_before_alert_seconds", must be greater than or equal to 0.'
593
+ end
594
+
595
+ @max_manual_start_delay_before_alert_seconds = max_manual_start_delay_before_alert_seconds
596
+ end
597
+
598
+ # Custom attribute writer method with validation
599
+ # @param [Object] max_manual_start_delay_before_abandonment_seconds Value to be assigned
600
+ def max_manual_start_delay_before_abandonment_seconds=(max_manual_start_delay_before_abandonment_seconds)
601
+ if !max_manual_start_delay_before_abandonment_seconds.nil? && max_manual_start_delay_before_abandonment_seconds > 2147483647
602
+ fail ArgumentError, 'invalid value for "max_manual_start_delay_before_abandonment_seconds", must be smaller than or equal to 2147483647.'
603
+ end
604
+
605
+ if !max_manual_start_delay_before_abandonment_seconds.nil? && max_manual_start_delay_before_abandonment_seconds < 0
606
+ fail ArgumentError, 'invalid value for "max_manual_start_delay_before_abandonment_seconds", must be greater than or equal to 0.'
607
+ end
608
+
609
+ @max_manual_start_delay_before_abandonment_seconds = max_manual_start_delay_before_abandonment_seconds
610
+ end
611
+
612
+ # Custom attribute writer method with validation
613
+ # @param [Object] heartbeat_interval_seconds Value to be assigned
614
+ def heartbeat_interval_seconds=(heartbeat_interval_seconds)
615
+ if !heartbeat_interval_seconds.nil? && heartbeat_interval_seconds > 2147483647
616
+ fail ArgumentError, 'invalid value for "heartbeat_interval_seconds", must be smaller than or equal to 2147483647.'
617
+ end
618
+
619
+ if !heartbeat_interval_seconds.nil? && heartbeat_interval_seconds < 10
620
+ fail ArgumentError, 'invalid value for "heartbeat_interval_seconds", must be greater than or equal to 10.'
621
+ end
622
+
623
+ @heartbeat_interval_seconds = heartbeat_interval_seconds
624
+ end
625
+
626
+ # Custom attribute writer method with validation
627
+ # @param [Object] max_heartbeat_lateness_before_alert_seconds Value to be assigned
628
+ def max_heartbeat_lateness_before_alert_seconds=(max_heartbeat_lateness_before_alert_seconds)
629
+ if !max_heartbeat_lateness_before_alert_seconds.nil? && max_heartbeat_lateness_before_alert_seconds > 2147483647
630
+ fail ArgumentError, 'invalid value for "max_heartbeat_lateness_before_alert_seconds", must be smaller than or equal to 2147483647.'
631
+ end
632
+
633
+ if !max_heartbeat_lateness_before_alert_seconds.nil? && max_heartbeat_lateness_before_alert_seconds < 0
634
+ fail ArgumentError, 'invalid value for "max_heartbeat_lateness_before_alert_seconds", must be greater than or equal to 0.'
635
+ end
636
+
637
+ @max_heartbeat_lateness_before_alert_seconds = max_heartbeat_lateness_before_alert_seconds
638
+ end
639
+
640
+ # Custom attribute writer method with validation
641
+ # @param [Object] max_heartbeat_lateness_before_abandonment_seconds Value to be assigned
642
+ def max_heartbeat_lateness_before_abandonment_seconds=(max_heartbeat_lateness_before_abandonment_seconds)
643
+ if !max_heartbeat_lateness_before_abandonment_seconds.nil? && max_heartbeat_lateness_before_abandonment_seconds > 2147483647
644
+ fail ArgumentError, 'invalid value for "max_heartbeat_lateness_before_abandonment_seconds", must be smaller than or equal to 2147483647.'
645
+ end
646
+
647
+ if !max_heartbeat_lateness_before_abandonment_seconds.nil? && max_heartbeat_lateness_before_abandonment_seconds < 0
648
+ fail ArgumentError, 'invalid value for "max_heartbeat_lateness_before_abandonment_seconds", must be greater than or equal to 0.'
649
+ end
650
+
651
+ @max_heartbeat_lateness_before_abandonment_seconds = max_heartbeat_lateness_before_abandonment_seconds
652
+ end
653
+
654
+ # Custom attribute writer method with validation
655
+ # @param [Object] schedule Value to be assigned
656
+ def schedule=(schedule)
657
+ if !schedule.nil? && schedule.to_s.length > 1000
658
+ fail ArgumentError, 'invalid value for "schedule", the character length must be smaller than or equal to 1000.'
659
+ end
660
+
661
+ @schedule = schedule
662
+ end
663
+
664
+ # Custom attribute writer method with validation
665
+ # @param [Object] scheduled_instance_count Value to be assigned
666
+ def scheduled_instance_count=(scheduled_instance_count)
667
+ if !scheduled_instance_count.nil? && scheduled_instance_count > 2147483647
668
+ fail ArgumentError, 'invalid value for "scheduled_instance_count", must be smaller than or equal to 2147483647.'
669
+ end
670
+
671
+ if !scheduled_instance_count.nil? && scheduled_instance_count < 0
672
+ fail ArgumentError, 'invalid value for "scheduled_instance_count", must be greater than or equal to 0.'
673
+ end
674
+
675
+ @scheduled_instance_count = scheduled_instance_count
676
+ end
677
+
678
+ # Custom attribute writer method with validation
679
+ # @param [Object] service_instance_count Value to be assigned
680
+ def service_instance_count=(service_instance_count)
681
+ if !service_instance_count.nil? && service_instance_count > 2147483647
682
+ fail ArgumentError, 'invalid value for "service_instance_count", must be smaller than or equal to 2147483647.'
683
+ end
684
+
685
+ if !service_instance_count.nil? && service_instance_count < 0
686
+ fail ArgumentError, 'invalid value for "service_instance_count", must be greater than or equal to 0.'
687
+ end
688
+
689
+ @service_instance_count = service_instance_count
690
+ end
691
+
692
+ # Custom attribute writer method with validation
693
+ # @param [Object] min_service_instance_count Value to be assigned
694
+ def min_service_instance_count=(min_service_instance_count)
695
+ if !min_service_instance_count.nil? && min_service_instance_count > 2147483647
696
+ fail ArgumentError, 'invalid value for "min_service_instance_count", must be smaller than or equal to 2147483647.'
697
+ end
698
+
699
+ if !min_service_instance_count.nil? && min_service_instance_count < 0
700
+ fail ArgumentError, 'invalid value for "min_service_instance_count", must be greater than or equal to 0.'
701
+ end
702
+
703
+ @min_service_instance_count = min_service_instance_count
704
+ end
705
+
706
+ # Custom attribute writer method with validation
707
+ # @param [Object] max_concurrency Value to be assigned
708
+ def max_concurrency=(max_concurrency)
709
+ if !max_concurrency.nil? && max_concurrency > 2147483647
710
+ fail ArgumentError, 'invalid value for "max_concurrency", must be smaller than or equal to 2147483647.'
711
+ end
712
+
713
+ if !max_concurrency.nil? && max_concurrency < -2147483648
714
+ fail ArgumentError, 'invalid value for "max_concurrency", must be greater than or equal to -2147483648.'
715
+ end
716
+
717
+ @max_concurrency = max_concurrency
718
+ end
719
+
720
+ # Custom attribute writer method with validation
721
+ # @param [Object] max_age_seconds Value to be assigned
722
+ def max_age_seconds=(max_age_seconds)
723
+ if !max_age_seconds.nil? && max_age_seconds > 2147483647
724
+ fail ArgumentError, 'invalid value for "max_age_seconds", must be smaller than or equal to 2147483647.'
725
+ end
726
+
727
+ if !max_age_seconds.nil? && max_age_seconds < 0
728
+ fail ArgumentError, 'invalid value for "max_age_seconds", must be greater than or equal to 0.'
729
+ end
730
+
731
+ @max_age_seconds = max_age_seconds
732
+ end
733
+
734
+ # Custom attribute writer method with validation
735
+ # @param [Object] default_max_retries Value to be assigned
736
+ def default_max_retries=(default_max_retries)
737
+ if !default_max_retries.nil? && default_max_retries > 2147483647
738
+ fail ArgumentError, 'invalid value for "default_max_retries", must be smaller than or equal to 2147483647.'
739
+ end
740
+
741
+ if !default_max_retries.nil? && default_max_retries < 0
742
+ fail ArgumentError, 'invalid value for "default_max_retries", must be greater than or equal to 0.'
743
+ end
744
+
745
+ @default_max_retries = default_max_retries
746
+ end
747
+
748
+ # Custom attribute writer method with validation
749
+ # @param [Object] project_url Value to be assigned
750
+ def project_url=(project_url)
751
+ if !project_url.nil? && project_url.to_s.length > 1000
752
+ fail ArgumentError, 'invalid value for "project_url", the character length must be smaller than or equal to 1000.'
753
+ end
754
+
755
+ @project_url = project_url
756
+ end
757
+
758
+ # Custom attribute writer method with validation
759
+ # @param [Object] log_query Value to be assigned
760
+ def log_query=(log_query)
761
+ if !log_query.nil? && log_query.to_s.length > 1000
762
+ fail ArgumentError, 'invalid value for "log_query", the character length must be smaller than or equal to 1000.'
763
+ end
764
+
765
+ @log_query = log_query
766
+ end
767
+
768
+ # Checks equality by comparing each attribute.
769
+ # @param [Object] Object to be compared
770
+ def ==(o)
771
+ return true if self.equal?(o)
772
+ self.class == o.class &&
773
+ url == o.url &&
774
+ uuid == o.uuid &&
775
+ name == o.name &&
776
+ description == o.description &&
777
+ dashboard_url == o.dashboard_url &&
778
+ infrastructure_website_url == o.infrastructure_website_url &&
779
+ max_manual_start_delay_before_alert_seconds == o.max_manual_start_delay_before_alert_seconds &&
780
+ max_manual_start_delay_before_abandonment_seconds == o.max_manual_start_delay_before_abandonment_seconds &&
781
+ heartbeat_interval_seconds == o.heartbeat_interval_seconds &&
782
+ max_heartbeat_lateness_before_alert_seconds == o.max_heartbeat_lateness_before_alert_seconds &&
783
+ max_heartbeat_lateness_before_abandonment_seconds == o.max_heartbeat_lateness_before_abandonment_seconds &&
784
+ schedule == o.schedule &&
785
+ scheduled_instance_count == o.scheduled_instance_count &&
786
+ is_service == o.is_service &&
787
+ service_instance_count == o.service_instance_count &&
788
+ min_service_instance_count == o.min_service_instance_count &&
789
+ max_concurrency == o.max_concurrency &&
790
+ max_age_seconds == o.max_age_seconds &&
791
+ default_max_retries == o.default_max_retries &&
792
+ project_url == o.project_url &&
793
+ log_query == o.log_query &&
794
+ logs_url == o.logs_url &&
795
+ links == o.links &&
796
+ run_environment == o.run_environment &&
797
+ execution_method_capability == o.execution_method_capability &&
798
+ alert_methods == o.alert_methods &&
799
+ other_metadata == o.other_metadata &&
800
+ latest_task_execution == o.latest_task_execution &&
801
+ current_service_info == o.current_service_info &&
802
+ created_by_user == o.created_by_user &&
803
+ created_by_group == o.created_by_group &&
804
+ was_auto_created == o.was_auto_created &&
805
+ passive == o.passive &&
806
+ enabled == o.enabled &&
807
+ created_at == o.created_at &&
808
+ updated_at == o.updated_at
809
+ end
810
+
811
+ # @see the `==` method
812
+ # @param [Object] Object to be compared
813
+ def eql?(o)
814
+ self == o
815
+ end
816
+
817
+ # Calculates hash code according to all attributes.
818
+ # @return [Integer] Hash code
819
+ def hash
820
+ [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
821
+ end
822
+
823
+ # Builds the object from hash
824
+ # @param [Hash] attributes Model attributes in the form of hash
825
+ # @return [Object] Returns the model itself
826
+ def self.build_from_hash(attributes)
827
+ new.build_from_hash(attributes)
828
+ end
829
+
830
+ # Builds the object from hash
831
+ # @param [Hash] attributes Model attributes in the form of hash
832
+ # @return [Object] Returns the model itself
833
+ def build_from_hash(attributes)
834
+ return nil unless attributes.is_a?(Hash)
835
+ self.class.openapi_types.each_pair do |key, type|
836
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
837
+ self.send("#{key}=", nil)
838
+ elsif type =~ /\AArray<(.*)>/i
839
+ # check to ensure the input is an array given that the attribute
840
+ # is documented as an array but the input is not
841
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
842
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
843
+ end
844
+ elsif !attributes[self.class.attribute_map[key]].nil?
845
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
846
+ end
847
+ end
848
+
849
+ self
850
+ end
851
+
852
+ # Deserializes the data based on type
853
+ # @param string type Data type
854
+ # @param string value Value to be deserialized
855
+ # @return [Object] Deserialized data
856
+ def _deserialize(type, value)
857
+ case type.to_sym
858
+ when :Time
859
+ Time.parse(value)
860
+ when :Date
861
+ Date.parse(value)
862
+ when :String
863
+ value.to_s
864
+ when :Integer
865
+ value.to_i
866
+ when :Float
867
+ value.to_f
868
+ when :Boolean
869
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
870
+ true
871
+ else
872
+ false
873
+ end
874
+ when :Object
875
+ # generic object (usually a Hash), return directly
876
+ value
877
+ when /\AArray<(?<inner_type>.+)>\z/
878
+ inner_type = Regexp.last_match[:inner_type]
879
+ value.map { |v| _deserialize(inner_type, v) }
880
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
881
+ k_type = Regexp.last_match[:k_type]
882
+ v_type = Regexp.last_match[:v_type]
883
+ {}.tap do |hash|
884
+ value.each do |k, v|
885
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
886
+ end
887
+ end
888
+ else # model
889
+ # models (e.g. Pet) or oneOf
890
+ klass = CloudReactorAPIClient.const_get(type)
891
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
892
+ end
893
+ end
894
+
895
+ # Returns the string representation of the object
896
+ # @return [String] String presentation of the object
897
+ def to_s
898
+ to_hash.to_s
899
+ end
900
+
901
+ # to_body is an alias to to_hash (backward compatibility)
902
+ # @return [Hash] Returns the object in the form of hash
903
+ def to_body
904
+ to_hash
905
+ end
906
+
907
+ # Returns the object in the form of hash
908
+ # @return [Hash] Returns the object in the form of hash
909
+ def to_hash
910
+ hash = {}
911
+ self.class.attribute_map.each_pair do |attr, param|
912
+ value = self.send(attr)
913
+ if value.nil?
914
+ is_nullable = self.class.openapi_nullable.include?(attr)
915
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
916
+ end
917
+
918
+ hash[param] = _to_hash(value)
919
+ end
920
+ hash
921
+ end
922
+
923
+ # Outputs non-array value in the form of hash
924
+ # For object, use to_hash. Otherwise, just return the value
925
+ # @param [Object] value Any valid value
926
+ # @return [Hash] Returns the value in the form of hash
927
+ def _to_hash(value)
928
+ if value.is_a?(Array)
929
+ value.compact.map { |v| _to_hash(v) }
930
+ elsif value.is_a?(Hash)
931
+ {}.tap do |hash|
932
+ value.each { |k, v| hash[k] = _to_hash(v) }
933
+ end
934
+ elsif value.respond_to? :to_hash
935
+ value.to_hash
936
+ else
937
+ value
938
+ end
939
+ end
940
+ end
941
+ end