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,406 @@
|
|
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 WorkflowTransitionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# @param workflow_transition [WorkflowTransition]
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @return [WorkflowTransition]
|
25
|
+
def workflow_transitions_create(workflow_transition, opts = {})
|
26
|
+
data, _status_code, _headers = workflow_transitions_create_with_http_info(workflow_transition, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# @param workflow_transition [WorkflowTransition]
|
31
|
+
# @param [Hash] opts the optional parameters
|
32
|
+
# @return [Array<(WorkflowTransition, Integer, Hash)>] WorkflowTransition data, response status code and response headers
|
33
|
+
def workflow_transitions_create_with_http_info(workflow_transition, opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: WorkflowTransitionsApi.workflow_transitions_create ...'
|
36
|
+
end
|
37
|
+
# verify the required parameter 'workflow_transition' is set
|
38
|
+
if @api_client.config.client_side_validation && workflow_transition.nil?
|
39
|
+
fail ArgumentError, "Missing the required parameter 'workflow_transition' when calling WorkflowTransitionsApi.workflow_transitions_create"
|
40
|
+
end
|
41
|
+
# resource path
|
42
|
+
local_var_path = '/workflow_transitions/'
|
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(workflow_transition)
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:debug_return_type] || 'WorkflowTransition'
|
65
|
+
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
68
|
+
|
69
|
+
new_options = opts.merge(
|
70
|
+
:operation => :"WorkflowTransitionsApi.workflow_transitions_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: WorkflowTransitionsApi#workflow_transitions_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 workflow_transitions_destroy(uuid, opts = {})
|
90
|
+
workflow_transitions_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 workflow_transitions_destroy_with_http_info(uuid, opts = {})
|
98
|
+
if @api_client.config.debugging
|
99
|
+
@api_client.config.logger.debug 'Calling API: WorkflowTransitionsApi.workflow_transitions_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 WorkflowTransitionsApi.workflow_transitions_destroy"
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/workflow_transitions/{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 => :"WorkflowTransitionsApi.workflow_transitions_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: WorkflowTransitionsApi#workflow_transitions_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 [Integer] :offset The initial index from which to return the results.
|
147
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
148
|
+
# @option opts [String] :search A search term.
|
149
|
+
# @return [PaginatedWorkflowTransitionList]
|
150
|
+
def workflow_transitions_list(opts = {})
|
151
|
+
data, _status_code, _headers = workflow_transitions_list_with_http_info(opts)
|
152
|
+
data
|
153
|
+
end
|
154
|
+
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @option opts [String] :description
|
157
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
158
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
159
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
160
|
+
# @option opts [String] :search A search term.
|
161
|
+
# @return [Array<(PaginatedWorkflowTransitionList, Integer, Hash)>] PaginatedWorkflowTransitionList data, response status code and response headers
|
162
|
+
def workflow_transitions_list_with_http_info(opts = {})
|
163
|
+
if @api_client.config.debugging
|
164
|
+
@api_client.config.logger.debug 'Calling API: WorkflowTransitionsApi.workflow_transitions_list ...'
|
165
|
+
end
|
166
|
+
# resource path
|
167
|
+
local_var_path = '/workflow_transitions/'
|
168
|
+
|
169
|
+
# query parameters
|
170
|
+
query_params = opts[:query_params] || {}
|
171
|
+
query_params[:'description'] = opts[:'description'] if !opts[:'description'].nil?
|
172
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
173
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
174
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
175
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
176
|
+
|
177
|
+
# header parameters
|
178
|
+
header_params = opts[:header_params] || {}
|
179
|
+
# HTTP header 'Accept' (if needed)
|
180
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
181
|
+
|
182
|
+
# form parameters
|
183
|
+
form_params = opts[:form_params] || {}
|
184
|
+
|
185
|
+
# http body (model)
|
186
|
+
post_body = opts[:debug_body]
|
187
|
+
|
188
|
+
# return_type
|
189
|
+
return_type = opts[:debug_return_type] || 'PaginatedWorkflowTransitionList'
|
190
|
+
|
191
|
+
# auth_names
|
192
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
193
|
+
|
194
|
+
new_options = opts.merge(
|
195
|
+
:operation => :"WorkflowTransitionsApi.workflow_transitions_list",
|
196
|
+
:header_params => header_params,
|
197
|
+
:query_params => query_params,
|
198
|
+
:form_params => form_params,
|
199
|
+
:body => post_body,
|
200
|
+
:auth_names => auth_names,
|
201
|
+
:return_type => return_type
|
202
|
+
)
|
203
|
+
|
204
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
205
|
+
if @api_client.config.debugging
|
206
|
+
@api_client.config.logger.debug "API called: WorkflowTransitionsApi#workflow_transitions_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
207
|
+
end
|
208
|
+
return data, status_code, headers
|
209
|
+
end
|
210
|
+
|
211
|
+
# @param uuid [String]
|
212
|
+
# @param [Hash] opts the optional parameters
|
213
|
+
# @option opts [PatchedWorkflowTransition] :patched_workflow_transition
|
214
|
+
# @return [WorkflowTransition]
|
215
|
+
def workflow_transitions_partial_update(uuid, opts = {})
|
216
|
+
data, _status_code, _headers = workflow_transitions_partial_update_with_http_info(uuid, opts)
|
217
|
+
data
|
218
|
+
end
|
219
|
+
|
220
|
+
# @param uuid [String]
|
221
|
+
# @param [Hash] opts the optional parameters
|
222
|
+
# @option opts [PatchedWorkflowTransition] :patched_workflow_transition
|
223
|
+
# @return [Array<(WorkflowTransition, Integer, Hash)>] WorkflowTransition data, response status code and response headers
|
224
|
+
def workflow_transitions_partial_update_with_http_info(uuid, opts = {})
|
225
|
+
if @api_client.config.debugging
|
226
|
+
@api_client.config.logger.debug 'Calling API: WorkflowTransitionsApi.workflow_transitions_partial_update ...'
|
227
|
+
end
|
228
|
+
# verify the required parameter 'uuid' is set
|
229
|
+
if @api_client.config.client_side_validation && uuid.nil?
|
230
|
+
fail ArgumentError, "Missing the required parameter 'uuid' when calling WorkflowTransitionsApi.workflow_transitions_partial_update"
|
231
|
+
end
|
232
|
+
# resource path
|
233
|
+
local_var_path = '/workflow_transitions/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
|
234
|
+
|
235
|
+
# query parameters
|
236
|
+
query_params = opts[:query_params] || {}
|
237
|
+
|
238
|
+
# header parameters
|
239
|
+
header_params = opts[:header_params] || {}
|
240
|
+
# HTTP header 'Accept' (if needed)
|
241
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
242
|
+
# HTTP header 'Content-Type'
|
243
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
244
|
+
if !content_type.nil?
|
245
|
+
header_params['Content-Type'] = content_type
|
246
|
+
end
|
247
|
+
|
248
|
+
# form parameters
|
249
|
+
form_params = opts[:form_params] || {}
|
250
|
+
|
251
|
+
# http body (model)
|
252
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patched_workflow_transition'])
|
253
|
+
|
254
|
+
# return_type
|
255
|
+
return_type = opts[:debug_return_type] || 'WorkflowTransition'
|
256
|
+
|
257
|
+
# auth_names
|
258
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
259
|
+
|
260
|
+
new_options = opts.merge(
|
261
|
+
:operation => :"WorkflowTransitionsApi.workflow_transitions_partial_update",
|
262
|
+
:header_params => header_params,
|
263
|
+
:query_params => query_params,
|
264
|
+
:form_params => form_params,
|
265
|
+
:body => post_body,
|
266
|
+
:auth_names => auth_names,
|
267
|
+
:return_type => return_type
|
268
|
+
)
|
269
|
+
|
270
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
271
|
+
if @api_client.config.debugging
|
272
|
+
@api_client.config.logger.debug "API called: WorkflowTransitionsApi#workflow_transitions_partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
273
|
+
end
|
274
|
+
return data, status_code, headers
|
275
|
+
end
|
276
|
+
|
277
|
+
# @param uuid [String]
|
278
|
+
# @param [Hash] opts the optional parameters
|
279
|
+
# @return [WorkflowTransition]
|
280
|
+
def workflow_transitions_retrieve(uuid, opts = {})
|
281
|
+
data, _status_code, _headers = workflow_transitions_retrieve_with_http_info(uuid, opts)
|
282
|
+
data
|
283
|
+
end
|
284
|
+
|
285
|
+
# @param uuid [String]
|
286
|
+
# @param [Hash] opts the optional parameters
|
287
|
+
# @return [Array<(WorkflowTransition, Integer, Hash)>] WorkflowTransition data, response status code and response headers
|
288
|
+
def workflow_transitions_retrieve_with_http_info(uuid, opts = {})
|
289
|
+
if @api_client.config.debugging
|
290
|
+
@api_client.config.logger.debug 'Calling API: WorkflowTransitionsApi.workflow_transitions_retrieve ...'
|
291
|
+
end
|
292
|
+
# verify the required parameter 'uuid' is set
|
293
|
+
if @api_client.config.client_side_validation && uuid.nil?
|
294
|
+
fail ArgumentError, "Missing the required parameter 'uuid' when calling WorkflowTransitionsApi.workflow_transitions_retrieve"
|
295
|
+
end
|
296
|
+
# resource path
|
297
|
+
local_var_path = '/workflow_transitions/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
|
298
|
+
|
299
|
+
# query parameters
|
300
|
+
query_params = opts[:query_params] || {}
|
301
|
+
|
302
|
+
# header parameters
|
303
|
+
header_params = opts[:header_params] || {}
|
304
|
+
# HTTP header 'Accept' (if needed)
|
305
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
306
|
+
|
307
|
+
# form parameters
|
308
|
+
form_params = opts[:form_params] || {}
|
309
|
+
|
310
|
+
# http body (model)
|
311
|
+
post_body = opts[:debug_body]
|
312
|
+
|
313
|
+
# return_type
|
314
|
+
return_type = opts[:debug_return_type] || 'WorkflowTransition'
|
315
|
+
|
316
|
+
# auth_names
|
317
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
318
|
+
|
319
|
+
new_options = opts.merge(
|
320
|
+
:operation => :"WorkflowTransitionsApi.workflow_transitions_retrieve",
|
321
|
+
:header_params => header_params,
|
322
|
+
:query_params => query_params,
|
323
|
+
:form_params => form_params,
|
324
|
+
:body => post_body,
|
325
|
+
:auth_names => auth_names,
|
326
|
+
:return_type => return_type
|
327
|
+
)
|
328
|
+
|
329
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
330
|
+
if @api_client.config.debugging
|
331
|
+
@api_client.config.logger.debug "API called: WorkflowTransitionsApi#workflow_transitions_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
332
|
+
end
|
333
|
+
return data, status_code, headers
|
334
|
+
end
|
335
|
+
|
336
|
+
# @param uuid [String]
|
337
|
+
# @param workflow_transition [WorkflowTransition]
|
338
|
+
# @param [Hash] opts the optional parameters
|
339
|
+
# @return [WorkflowTransition]
|
340
|
+
def workflow_transitions_update(uuid, workflow_transition, opts = {})
|
341
|
+
data, _status_code, _headers = workflow_transitions_update_with_http_info(uuid, workflow_transition, opts)
|
342
|
+
data
|
343
|
+
end
|
344
|
+
|
345
|
+
# @param uuid [String]
|
346
|
+
# @param workflow_transition [WorkflowTransition]
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @return [Array<(WorkflowTransition, Integer, Hash)>] WorkflowTransition data, response status code and response headers
|
349
|
+
def workflow_transitions_update_with_http_info(uuid, workflow_transition, opts = {})
|
350
|
+
if @api_client.config.debugging
|
351
|
+
@api_client.config.logger.debug 'Calling API: WorkflowTransitionsApi.workflow_transitions_update ...'
|
352
|
+
end
|
353
|
+
# verify the required parameter 'uuid' is set
|
354
|
+
if @api_client.config.client_side_validation && uuid.nil?
|
355
|
+
fail ArgumentError, "Missing the required parameter 'uuid' when calling WorkflowTransitionsApi.workflow_transitions_update"
|
356
|
+
end
|
357
|
+
# verify the required parameter 'workflow_transition' is set
|
358
|
+
if @api_client.config.client_side_validation && workflow_transition.nil?
|
359
|
+
fail ArgumentError, "Missing the required parameter 'workflow_transition' when calling WorkflowTransitionsApi.workflow_transitions_update"
|
360
|
+
end
|
361
|
+
# resource path
|
362
|
+
local_var_path = '/workflow_transitions/{uuid}/'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))
|
363
|
+
|
364
|
+
# query parameters
|
365
|
+
query_params = opts[:query_params] || {}
|
366
|
+
|
367
|
+
# header parameters
|
368
|
+
header_params = opts[:header_params] || {}
|
369
|
+
# HTTP header 'Accept' (if needed)
|
370
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
371
|
+
# HTTP header 'Content-Type'
|
372
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
373
|
+
if !content_type.nil?
|
374
|
+
header_params['Content-Type'] = content_type
|
375
|
+
end
|
376
|
+
|
377
|
+
# form parameters
|
378
|
+
form_params = opts[:form_params] || {}
|
379
|
+
|
380
|
+
# http body (model)
|
381
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(workflow_transition)
|
382
|
+
|
383
|
+
# return_type
|
384
|
+
return_type = opts[:debug_return_type] || 'WorkflowTransition'
|
385
|
+
|
386
|
+
# auth_names
|
387
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
388
|
+
|
389
|
+
new_options = opts.merge(
|
390
|
+
:operation => :"WorkflowTransitionsApi.workflow_transitions_update",
|
391
|
+
:header_params => header_params,
|
392
|
+
:query_params => query_params,
|
393
|
+
:form_params => form_params,
|
394
|
+
:body => post_body,
|
395
|
+
:auth_names => auth_names,
|
396
|
+
:return_type => return_type
|
397
|
+
)
|
398
|
+
|
399
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
400
|
+
if @api_client.config.debugging
|
401
|
+
@api_client.config.logger.debug "API called: WorkflowTransitionsApi#workflow_transitions_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
402
|
+
end
|
403
|
+
return data, status_code, headers
|
404
|
+
end
|
405
|
+
end
|
406
|
+
end
|