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.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +92 -0
- data/cloudreactor_api_client.md +226 -0
- data/lib/cloudreactor_api_client/api/alert_methods_api.rb +482 -0
- data/lib/cloudreactor_api_client/api/email_notification_profiles_api.rb +482 -0
- data/lib/cloudreactor_api_client/api/pagerduty_profiles_api.rb +482 -0
- data/lib/cloudreactor_api_client/api/run_environments_api.rb +479 -0
- data/lib/cloudreactor_api_client/api/task_executions_api.rb +409 -0
- data/lib/cloudreactor_api_client/api/tasks_api.rb +412 -0
- data/lib/cloudreactor_api_client/api/workflow_executions_api.rb +549 -0
- data/lib/cloudreactor_api_client/api/workflow_task_instances_api.rb +424 -0
- data/lib/cloudreactor_api_client/api/workflow_transitions_api.rb +406 -0
- data/lib/cloudreactor_api_client/api/workflows_api.rb +482 -0
- data/lib/cloudreactor_api_client/api_client.rb +390 -0
- data/lib/cloudreactor_api_client/api_error.rb +57 -0
- data/lib/cloudreactor_api_client/configuration.rb +277 -0
- data/lib/cloudreactor_api_client/models/alert_method.rb +449 -0
- data/lib/cloudreactor_api_client/models/aws_ecs_execution_method.rb +517 -0
- data/lib/cloudreactor_api_client/models/aws_ecs_execution_method_capability.rb +565 -0
- data/lib/cloudreactor_api_client/models/aws_ecs_launch_type.rb +37 -0
- data/lib/cloudreactor_api_client/models/aws_ecs_run_environment_execution_method_capability.rb +476 -0
- data/lib/cloudreactor_api_client/models/aws_ecs_service_load_balancer_details.rb +307 -0
- data/lib/cloudreactor_api_client/models/aws_ecs_service_options.rb +308 -0
- data/lib/cloudreactor_api_client/models/current_service_info.rb +255 -0
- data/lib/cloudreactor_api_client/models/email_notification_profile.rb +454 -0
- data/lib/cloudreactor_api_client/models/execution_method_capability.rb +54 -0
- data/lib/cloudreactor_api_client/models/failure_behavior_enum.rb +38 -0
- data/lib/cloudreactor_api_client/models/group.rb +268 -0
- data/lib/cloudreactor_api_client/models/link.rb +301 -0
- data/lib/cloudreactor_api_client/models/name_and_uuid.rb +236 -0
- data/lib/cloudreactor_api_client/models/notification_severity.rb +39 -0
- data/lib/cloudreactor_api_client/models/pager_duty_profile.rb +484 -0
- data/lib/cloudreactor_api_client/models/paginated_alert_method_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_email_notification_profile_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_pager_duty_profile_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_run_environment_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_task_execution_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_task_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_workflow_execution_summary_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_workflow_summary_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_workflow_task_instance_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/paginated_workflow_transition_list.rb +247 -0
- data/lib/cloudreactor_api_client/models/patched_alert_method.rb +405 -0
- data/lib/cloudreactor_api_client/models/patched_email_notification_profile.rb +415 -0
- data/lib/cloudreactor_api_client/models/patched_pager_duty_profile.rb +436 -0
- data/lib/cloudreactor_api_client/models/patched_run_environment.rb +511 -0
- data/lib/cloudreactor_api_client/models/patched_task.rb +897 -0
- data/lib/cloudreactor_api_client/models/patched_task_execution.rb +1904 -0
- data/lib/cloudreactor_api_client/models/patched_workflow.rb +507 -0
- data/lib/cloudreactor_api_client/models/patched_workflow_execution.rb +559 -0
- data/lib/cloudreactor_api_client/models/patched_workflow_task_instance.rb +676 -0
- data/lib/cloudreactor_api_client/models/patched_workflow_transition.rb +432 -0
- data/lib/cloudreactor_api_client/models/propagate_tags_enum.rb +37 -0
- data/lib/cloudreactor_api_client/models/rule_type_enum.rb +43 -0
- data/lib/cloudreactor_api_client/models/run_environment.rb +555 -0
- data/lib/cloudreactor_api_client/models/start_transition_condition_enum.rb +39 -0
- data/lib/cloudreactor_api_client/models/stop_reason_enum.rb +42 -0
- data/lib/cloudreactor_api_client/models/task.rb +941 -0
- data/lib/cloudreactor_api_client/models/task_execution.rb +1954 -0
- data/lib/cloudreactor_api_client/models/task_execution_status.rb +46 -0
- data/lib/cloudreactor_api_client/models/threshold_property_enum.rb +39 -0
- data/lib/cloudreactor_api_client/models/timeout_behavior_enum.rb +40 -0
- data/lib/cloudreactor_api_client/models/unknown_execution_method_capability.rb +238 -0
- data/lib/cloudreactor_api_client/models/workflow.rb +556 -0
- data/lib/cloudreactor_api_client/models/workflow_execution.rb +629 -0
- data/lib/cloudreactor_api_client/models/workflow_execution_status.rb +42 -0
- data/lib/cloudreactor_api_client/models/workflow_execution_summary.rb +523 -0
- data/lib/cloudreactor_api_client/models/workflow_summary.rb +513 -0
- data/lib/cloudreactor_api_client/models/workflow_task_instance.rb +715 -0
- data/lib/cloudreactor_api_client/models/workflow_task_instance_execution.rb +280 -0
- data/lib/cloudreactor_api_client/models/workflow_task_instance_execution_base.rb +270 -0
- data/lib/cloudreactor_api_client/models/workflow_transition.rb +467 -0
- data/lib/cloudreactor_api_client/models/workflow_transition_evaluation.rb +280 -0
- data/lib/cloudreactor_api_client/version.rb +15 -0
- data/lib/cloudreactor_api_client.rb +121 -0
- data/lib/cloudreactor_wrapper_io/status_updater.rb +124 -0
- data/lib/cloudreactor_wrapper_io.rb +13 -0
- data/spec/api/alert_methods_api_spec.rb +114 -0
- data/spec/api/email_notification_profiles_api_spec.rb +114 -0
- data/spec/api/pagerduty_profiles_api_spec.rb +114 -0
- data/spec/api/run_environments_api_spec.rb +113 -0
- data/spec/api/task_executions_api_spec.rb +102 -0
- data/spec/api/tasks_api_spec.rb +103 -0
- data/spec/api/workflow_executions_api_spec.rb +124 -0
- data/spec/api/workflow_task_instances_api_spec.rb +107 -0
- data/spec/api/workflow_transitions_api_spec.rb +101 -0
- data/spec/api/workflows_api_spec.rb +114 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/integration/task_execution_integration_spec.rb +51 -0
- data/spec/models/alert_method_spec.rb +136 -0
- data/spec/models/aws_ecs_execution_method_capability_spec.rb +166 -0
- data/spec/models/aws_ecs_execution_method_spec.rb +148 -0
- data/spec/models/aws_ecs_launch_type_spec.rb +28 -0
- data/spec/models/aws_ecs_run_environment_execution_method_capability_spec.rb +130 -0
- data/spec/models/aws_ecs_service_load_balancer_details_spec.rb +46 -0
- data/spec/models/aws_ecs_service_options_spec.rb +88 -0
- data/spec/models/current_service_info_spec.rb +52 -0
- data/spec/models/email_notification_profile_spec.rb +118 -0
- data/spec/models/execution_method_capability_spec.rb +43 -0
- data/spec/models/failure_behavior_enum_spec.rb +28 -0
- data/spec/models/group_spec.rb +46 -0
- data/spec/models/link_spec.rb +70 -0
- data/spec/models/name_and_uuid_spec.rb +46 -0
- data/spec/models/notification_severity_spec.rb +28 -0
- data/spec/models/pager_duty_profile_spec.rb +118 -0
- data/spec/models/paginated_alert_method_list_spec.rb +52 -0
- data/spec/models/paginated_email_notification_profile_list_spec.rb +52 -0
- data/spec/models/paginated_pager_duty_profile_list_spec.rb +52 -0
- data/spec/models/paginated_run_environment_list_spec.rb +52 -0
- data/spec/models/paginated_task_execution_list_spec.rb +52 -0
- data/spec/models/paginated_task_list_spec.rb +52 -0
- data/spec/models/paginated_workflow_execution_summary_list_spec.rb +52 -0
- data/spec/models/paginated_workflow_summary_list_spec.rb +52 -0
- data/spec/models/paginated_workflow_task_instance_list_spec.rb +52 -0
- data/spec/models/paginated_workflow_transition_list_spec.rb +52 -0
- data/spec/models/patched_alert_method_spec.rb +136 -0
- data/spec/models/patched_email_notification_profile_spec.rb +118 -0
- data/spec/models/patched_pager_duty_profile_spec.rb +118 -0
- data/spec/models/patched_run_environment_spec.rb +136 -0
- data/spec/models/patched_task_execution_spec.rb +466 -0
- data/spec/models/patched_task_spec.rb +244 -0
- data/spec/models/patched_workflow_execution_spec.rb +172 -0
- data/spec/models/patched_workflow_spec.rb +142 -0
- data/spec/models/patched_workflow_task_instance_spec.rb +196 -0
- data/spec/models/patched_workflow_transition_spec.rb +118 -0
- data/spec/models/propagate_tags_enum_spec.rb +28 -0
- data/spec/models/rule_type_enum_spec.rb +28 -0
- data/spec/models/run_environment_spec.rb +136 -0
- data/spec/models/start_transition_condition_enum_spec.rb +28 -0
- data/spec/models/stop_reason_enum_spec.rb +28 -0
- data/spec/models/task_execution_spec.rb +466 -0
- data/spec/models/task_execution_status_spec.rb +28 -0
- data/spec/models/task_spec.rb +244 -0
- data/spec/models/threshold_property_enum_spec.rb +28 -0
- data/spec/models/timeout_behavior_enum_spec.rb +28 -0
- data/spec/models/unknown_execution_method_capability_spec.rb +40 -0
- data/spec/models/workflow_execution_spec.rb +172 -0
- data/spec/models/workflow_execution_status_spec.rb +28 -0
- data/spec/models/workflow_execution_summary_spec.rb +130 -0
- data/spec/models/workflow_spec.rb +142 -0
- data/spec/models/workflow_summary_spec.rb +124 -0
- data/spec/models/workflow_task_instance_execution_base_spec.rb +58 -0
- data/spec/models/workflow_task_instance_execution_spec.rb +64 -0
- data/spec/models/workflow_task_instance_spec.rb +196 -0
- data/spec/models/workflow_transition_evaluation_spec.rb +64 -0
- data/spec/models/workflow_transition_spec.rb +118 -0
- data/spec/spec_helper.rb +111 -0
- data/spec/wrapper_io/status_updater_spec.rb +147 -0
- metadata +305 -0
@@ -0,0 +1,412 @@
|
|
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 'cgi'
|
14
|
+
|
15
|
+
module CloudReactorAPIClient
|
16
|
+
class TasksApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# @param task [Task]
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @return [Task]
|
25
|
+
def tasks_create(task, opts = {})
|
26
|
+
data, _status_code, _headers = tasks_create_with_http_info(task, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# @param task [Task]
|
31
|
+
# @param [Hash] opts the optional parameters
|
32
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
33
|
+
def tasks_create_with_http_info(task, opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_create ...'
|
36
|
+
end
|
37
|
+
# verify the required parameter 'task' is set
|
38
|
+
if @api_client.config.client_side_validation && task.nil?
|
39
|
+
fail ArgumentError, "Missing the required parameter 'task' when calling TasksApi.tasks_create"
|
40
|
+
end
|
41
|
+
# resource path
|
42
|
+
local_var_path = '/tasks/'
|
43
|
+
|
44
|
+
# query parameters
|
45
|
+
query_params = opts[:query_params] || {}
|
46
|
+
|
47
|
+
# header parameters
|
48
|
+
header_params = opts[:header_params] || {}
|
49
|
+
# HTTP header 'Accept' (if needed)
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
|
+
# HTTP header 'Content-Type'
|
52
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
53
|
+
if !content_type.nil?
|
54
|
+
header_params['Content-Type'] = content_type
|
55
|
+
end
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = opts[:form_params] || {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(task)
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:debug_return_type] || 'Task'
|
65
|
+
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
68
|
+
|
69
|
+
new_options = opts.merge(
|
70
|
+
:operation => :"TasksApi.tasks_create",
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# @param uuid [String]
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [nil]
|
89
|
+
def tasks_destroy(uuid, opts = {})
|
90
|
+
tasks_destroy_with_http_info(uuid, opts)
|
91
|
+
nil
|
92
|
+
end
|
93
|
+
|
94
|
+
# @param uuid [String]
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
97
|
+
def tasks_destroy_with_http_info(uuid, opts = {})
|
98
|
+
if @api_client.config.debugging
|
99
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_destroy ...'
|
100
|
+
end
|
101
|
+
# verify the required parameter 'uuid' is set
|
102
|
+
if @api_client.config.client_side_validation && uuid.nil?
|
103
|
+
fail ArgumentError, "Missing the required parameter 'uuid' when calling TasksApi.tasks_destroy"
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/tasks/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = opts[:header_params] || {}
|
113
|
+
|
114
|
+
# form parameters
|
115
|
+
form_params = opts[:form_params] || {}
|
116
|
+
|
117
|
+
# http body (model)
|
118
|
+
post_body = opts[:debug_body]
|
119
|
+
|
120
|
+
# return_type
|
121
|
+
return_type = opts[:debug_return_type]
|
122
|
+
|
123
|
+
# auth_names
|
124
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
125
|
+
|
126
|
+
new_options = opts.merge(
|
127
|
+
:operation => :"TasksApi.tasks_destroy",
|
128
|
+
:header_params => header_params,
|
129
|
+
:query_params => query_params,
|
130
|
+
:form_params => form_params,
|
131
|
+
:body => post_body,
|
132
|
+
:auth_names => auth_names,
|
133
|
+
:return_type => return_type
|
134
|
+
)
|
135
|
+
|
136
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
137
|
+
if @api_client.config.debugging
|
138
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_destroy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
139
|
+
end
|
140
|
+
return data, status_code, headers
|
141
|
+
end
|
142
|
+
|
143
|
+
# @param [Hash] opts the optional parameters
|
144
|
+
# @option opts [String] :description
|
145
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
146
|
+
# @option opts [String] :name
|
147
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
148
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
149
|
+
# @option opts [String] :run_environment__uuid
|
150
|
+
# @option opts [String] :search A search term.
|
151
|
+
# @return [PaginatedTaskList]
|
152
|
+
def tasks_list(opts = {})
|
153
|
+
data, _status_code, _headers = tasks_list_with_http_info(opts)
|
154
|
+
data
|
155
|
+
end
|
156
|
+
|
157
|
+
# @param [Hash] opts the optional parameters
|
158
|
+
# @option opts [String] :description
|
159
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
160
|
+
# @option opts [String] :name
|
161
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
162
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
163
|
+
# @option opts [String] :run_environment__uuid
|
164
|
+
# @option opts [String] :search A search term.
|
165
|
+
# @return [Array<(PaginatedTaskList, Integer, Hash)>] PaginatedTaskList data, response status code and response headers
|
166
|
+
def tasks_list_with_http_info(opts = {})
|
167
|
+
if @api_client.config.debugging
|
168
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_list ...'
|
169
|
+
end
|
170
|
+
# resource path
|
171
|
+
local_var_path = '/tasks/'
|
172
|
+
|
173
|
+
# query parameters
|
174
|
+
query_params = opts[:query_params] || {}
|
175
|
+
query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
|
176
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
177
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
178
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
179
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
180
|
+
query_params[:'run_environment__uuid'] = opts[:'run_environment__uuid'] if !opts[:'run_environment__uuid'].nil?
|
181
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
182
|
+
|
183
|
+
# header parameters
|
184
|
+
header_params = opts[:header_params] || {}
|
185
|
+
# HTTP header 'Accept' (if needed)
|
186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
187
|
+
|
188
|
+
# form parameters
|
189
|
+
form_params = opts[:form_params] || {}
|
190
|
+
|
191
|
+
# http body (model)
|
192
|
+
post_body = opts[:debug_body]
|
193
|
+
|
194
|
+
# return_type
|
195
|
+
return_type = opts[:debug_return_type] || 'PaginatedTaskList'
|
196
|
+
|
197
|
+
# auth_names
|
198
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
199
|
+
|
200
|
+
new_options = opts.merge(
|
201
|
+
:operation => :"TasksApi.tasks_list",
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type
|
208
|
+
)
|
209
|
+
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
217
|
+
# @param uuid [String]
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @option opts [PatchedTask] :patched_task
|
220
|
+
# @return [Task]
|
221
|
+
def tasks_partial_update(uuid, opts = {})
|
222
|
+
data, _status_code, _headers = tasks_partial_update_with_http_info(uuid, opts)
|
223
|
+
data
|
224
|
+
end
|
225
|
+
|
226
|
+
# @param uuid [String]
|
227
|
+
# @param [Hash] opts the optional parameters
|
228
|
+
# @option opts [PatchedTask] :patched_task
|
229
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
230
|
+
def tasks_partial_update_with_http_info(uuid, opts = {})
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_partial_update ...'
|
233
|
+
end
|
234
|
+
# verify the required parameter 'uuid' is set
|
235
|
+
if @api_client.config.client_side_validation && uuid.nil?
|
236
|
+
fail ArgumentError, "Missing the required parameter 'uuid' when calling TasksApi.tasks_partial_update"
|
237
|
+
end
|
238
|
+
# resource path
|
239
|
+
local_var_path = '/tasks/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
|
240
|
+
|
241
|
+
# query parameters
|
242
|
+
query_params = opts[:query_params] || {}
|
243
|
+
|
244
|
+
# header parameters
|
245
|
+
header_params = opts[:header_params] || {}
|
246
|
+
# HTTP header 'Accept' (if needed)
|
247
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
248
|
+
# HTTP header 'Content-Type'
|
249
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
250
|
+
if !content_type.nil?
|
251
|
+
header_params['Content-Type'] = content_type
|
252
|
+
end
|
253
|
+
|
254
|
+
# form parameters
|
255
|
+
form_params = opts[:form_params] || {}
|
256
|
+
|
257
|
+
# http body (model)
|
258
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_task'])
|
259
|
+
|
260
|
+
# return_type
|
261
|
+
return_type = opts[:debug_return_type] || 'Task'
|
262
|
+
|
263
|
+
# auth_names
|
264
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
265
|
+
|
266
|
+
new_options = opts.merge(
|
267
|
+
:operation => :"TasksApi.tasks_partial_update",
|
268
|
+
:header_params => header_params,
|
269
|
+
:query_params => query_params,
|
270
|
+
:form_params => form_params,
|
271
|
+
:body => post_body,
|
272
|
+
:auth_names => auth_names,
|
273
|
+
:return_type => return_type
|
274
|
+
)
|
275
|
+
|
276
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
277
|
+
if @api_client.config.debugging
|
278
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
279
|
+
end
|
280
|
+
return data, status_code, headers
|
281
|
+
end
|
282
|
+
|
283
|
+
# @param uuid [String]
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @return [Task]
|
286
|
+
def tasks_retrieve(uuid, opts = {})
|
287
|
+
data, _status_code, _headers = tasks_retrieve_with_http_info(uuid, opts)
|
288
|
+
data
|
289
|
+
end
|
290
|
+
|
291
|
+
# @param uuid [String]
|
292
|
+
# @param [Hash] opts the optional parameters
|
293
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
294
|
+
def tasks_retrieve_with_http_info(uuid, opts = {})
|
295
|
+
if @api_client.config.debugging
|
296
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_retrieve ...'
|
297
|
+
end
|
298
|
+
# verify the required parameter 'uuid' is set
|
299
|
+
if @api_client.config.client_side_validation && uuid.nil?
|
300
|
+
fail ArgumentError, "Missing the required parameter 'uuid' when calling TasksApi.tasks_retrieve"
|
301
|
+
end
|
302
|
+
# resource path
|
303
|
+
local_var_path = '/tasks/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
|
304
|
+
|
305
|
+
# query parameters
|
306
|
+
query_params = opts[:query_params] || {}
|
307
|
+
|
308
|
+
# header parameters
|
309
|
+
header_params = opts[:header_params] || {}
|
310
|
+
# HTTP header 'Accept' (if needed)
|
311
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
312
|
+
|
313
|
+
# form parameters
|
314
|
+
form_params = opts[:form_params] || {}
|
315
|
+
|
316
|
+
# http body (model)
|
317
|
+
post_body = opts[:debug_body]
|
318
|
+
|
319
|
+
# return_type
|
320
|
+
return_type = opts[:debug_return_type] || 'Task'
|
321
|
+
|
322
|
+
# auth_names
|
323
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
324
|
+
|
325
|
+
new_options = opts.merge(
|
326
|
+
:operation => :"TasksApi.tasks_retrieve",
|
327
|
+
:header_params => header_params,
|
328
|
+
:query_params => query_params,
|
329
|
+
:form_params => form_params,
|
330
|
+
:body => post_body,
|
331
|
+
:auth_names => auth_names,
|
332
|
+
:return_type => return_type
|
333
|
+
)
|
334
|
+
|
335
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
336
|
+
if @api_client.config.debugging
|
337
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
338
|
+
end
|
339
|
+
return data, status_code, headers
|
340
|
+
end
|
341
|
+
|
342
|
+
# @param uuid [String]
|
343
|
+
# @param task [Task]
|
344
|
+
# @param [Hash] opts the optional parameters
|
345
|
+
# @return [Task]
|
346
|
+
def tasks_update(uuid, task, opts = {})
|
347
|
+
data, _status_code, _headers = tasks_update_with_http_info(uuid, task, opts)
|
348
|
+
data
|
349
|
+
end
|
350
|
+
|
351
|
+
# @param uuid [String]
|
352
|
+
# @param task [Task]
|
353
|
+
# @param [Hash] opts the optional parameters
|
354
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
355
|
+
def tasks_update_with_http_info(uuid, task, opts = {})
|
356
|
+
if @api_client.config.debugging
|
357
|
+
@api_client.config.logger.debug 'Calling API: TasksApi.tasks_update ...'
|
358
|
+
end
|
359
|
+
# verify the required parameter 'uuid' is set
|
360
|
+
if @api_client.config.client_side_validation && uuid.nil?
|
361
|
+
fail ArgumentError, "Missing the required parameter 'uuid' when calling TasksApi.tasks_update"
|
362
|
+
end
|
363
|
+
# verify the required parameter 'task' is set
|
364
|
+
if @api_client.config.client_side_validation && task.nil?
|
365
|
+
fail ArgumentError, "Missing the required parameter 'task' when calling TasksApi.tasks_update"
|
366
|
+
end
|
367
|
+
# resource path
|
368
|
+
local_var_path = '/tasks/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
|
369
|
+
|
370
|
+
# query parameters
|
371
|
+
query_params = opts[:query_params] || {}
|
372
|
+
|
373
|
+
# header parameters
|
374
|
+
header_params = opts[:header_params] || {}
|
375
|
+
# HTTP header 'Accept' (if needed)
|
376
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
377
|
+
# HTTP header 'Content-Type'
|
378
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
379
|
+
if !content_type.nil?
|
380
|
+
header_params['Content-Type'] = content_type
|
381
|
+
end
|
382
|
+
|
383
|
+
# form parameters
|
384
|
+
form_params = opts[:form_params] || {}
|
385
|
+
|
386
|
+
# http body (model)
|
387
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(task)
|
388
|
+
|
389
|
+
# return_type
|
390
|
+
return_type = opts[:debug_return_type] || 'Task'
|
391
|
+
|
392
|
+
# auth_names
|
393
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
394
|
+
|
395
|
+
new_options = opts.merge(
|
396
|
+
:operation => :"TasksApi.tasks_update",
|
397
|
+
:header_params => header_params,
|
398
|
+
:query_params => query_params,
|
399
|
+
:form_params => form_params,
|
400
|
+
:body => post_body,
|
401
|
+
:auth_names => auth_names,
|
402
|
+
:return_type => return_type
|
403
|
+
)
|
404
|
+
|
405
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
406
|
+
if @api_client.config.debugging
|
407
|
+
@api_client.config.logger.debug "API called: TasksApi#tasks_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
408
|
+
end
|
409
|
+
return data, status_code, headers
|
410
|
+
end
|
411
|
+
end
|
412
|
+
end
|