worker_ruby 0.5.7

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 (156) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/README.md +118 -0
  4. data/VERSION +1 -0
  5. data/VERSION.txt +1 -0
  6. data/docs/Complete.md +10 -0
  7. data/docs/CoreApi.md +200 -0
  8. data/docs/Error.md +8 -0
  9. data/docs/ErrorBody.md +9 -0
  10. data/docs/Group.md +12 -0
  11. data/docs/GroupWrapper.md +8 -0
  12. data/docs/GroupsApi.md +197 -0
  13. data/docs/GroupsWrapper.md +8 -0
  14. data/docs/IdStatus.md +9 -0
  15. data/docs/Image.md +10 -0
  16. data/docs/ImageWrapper.md +8 -0
  17. data/docs/ImagesApi.md +98 -0
  18. data/docs/ImagesWrapper.md +8 -0
  19. data/docs/Job.md +25 -0
  20. data/docs/JobWrapper.md +8 -0
  21. data/docs/JobsApi.md +684 -0
  22. data/docs/JobsWrapper.md +10 -0
  23. data/docs/Log.md +8 -0
  24. data/docs/NewJob.md +14 -0
  25. data/docs/NewJobWithImage.md +15 -0
  26. data/docs/NewJobsWrapper.md +8 -0
  27. data/docs/NewTask.md +14 -0
  28. data/docs/NewTasksWrapper.md +8 -0
  29. data/docs/Reason.md +7 -0
  30. data/docs/RunnerApi.md +170 -0
  31. data/docs/Start.md +8 -0
  32. data/docs/Task.md +25 -0
  33. data/docs/TaskWrapper.md +8 -0
  34. data/docs/TasksApi.md +684 -0
  35. data/docs/TasksWrapper.md +10 -0
  36. data/git_push.sh +67 -0
  37. data/iron_ruby.gemspec +55 -0
  38. data/iron_titan.gemspec +32 -0
  39. data/lib/iron_ruby.rb +66 -0
  40. data/lib/iron_ruby/api/groups_api.rb +262 -0
  41. data/lib/iron_ruby/api/runner_api.rb +229 -0
  42. data/lib/iron_ruby/api/tasks_api.rb +842 -0
  43. data/lib/iron_ruby/api_client.rb +378 -0
  44. data/lib/iron_ruby/api_error.rb +47 -0
  45. data/lib/iron_ruby/configuration.rb +207 -0
  46. data/lib/iron_ruby/models/complete.rb +220 -0
  47. data/lib/iron_ruby/models/error.rb +199 -0
  48. data/lib/iron_ruby/models/error_body.rb +208 -0
  49. data/lib/iron_ruby/models/group.rb +242 -0
  50. data/lib/iron_ruby/models/group_wrapper.rb +200 -0
  51. data/lib/iron_ruby/models/groups_wrapper.rb +202 -0
  52. data/lib/iron_ruby/models/id_status.rb +243 -0
  53. data/lib/iron_ruby/models/new_task.rb +270 -0
  54. data/lib/iron_ruby/models/new_tasks_wrapper.rb +202 -0
  55. data/lib/iron_ruby/models/start.rb +200 -0
  56. data/lib/iron_ruby/models/task.rb +427 -0
  57. data/lib/iron_ruby/models/task_wrapper.rb +200 -0
  58. data/lib/iron_ruby/models/tasks_wrapper.rb +221 -0
  59. data/lib/iron_ruby/version.rb +26 -0
  60. data/lib/iron_titan.rb +66 -0
  61. data/lib/iron_titan/api/core_api.rb +260 -0
  62. data/lib/iron_titan/api/groups_api.rb +262 -0
  63. data/lib/iron_titan/api/images_api.rb +138 -0
  64. data/lib/iron_titan/api/jobs_api.rb +842 -0
  65. data/lib/iron_titan/api/runner_api.rb +229 -0
  66. data/lib/iron_titan/api_client.rb +372 -0
  67. data/lib/iron_titan/api_error.rb +47 -0
  68. data/lib/iron_titan/configuration.rb +186 -0
  69. data/lib/iron_titan/models/complete.rb +220 -0
  70. data/lib/iron_titan/models/error.rb +199 -0
  71. data/lib/iron_titan/models/error_body.rb +208 -0
  72. data/lib/iron_titan/models/group.rb +242 -0
  73. data/lib/iron_titan/models/group_wrapper.rb +200 -0
  74. data/lib/iron_titan/models/groups_wrapper.rb +202 -0
  75. data/lib/iron_titan/models/id_status.rb +243 -0
  76. data/lib/iron_titan/models/image.rb +184 -0
  77. data/lib/iron_titan/models/image_wrapper.rb +161 -0
  78. data/lib/iron_titan/models/images_wrapper.rb +163 -0
  79. data/lib/iron_titan/models/job.rb +427 -0
  80. data/lib/iron_titan/models/job_array.rb +160 -0
  81. data/lib/iron_titan/models/job_wrapper.rb +200 -0
  82. data/lib/iron_titan/models/jobs_wrapper.rb +221 -0
  83. data/lib/iron_titan/models/log.rb +161 -0
  84. data/lib/iron_titan/models/new_job.rb +270 -0
  85. data/lib/iron_titan/models/new_job_array.rb +160 -0
  86. data/lib/iron_titan/models/new_job_with_image.rb +249 -0
  87. data/lib/iron_titan/models/new_jobs_wrapper.rb +202 -0
  88. data/lib/iron_titan/models/reason.rb +164 -0
  89. data/lib/iron_titan/models/start.rb +200 -0
  90. data/lib/iron_titan/version.rb +26 -0
  91. data/lib/worker_ruby.rb +66 -0
  92. data/lib/worker_ruby/api/groups_api.rb +262 -0
  93. data/lib/worker_ruby/api/runner_api.rb +229 -0
  94. data/lib/worker_ruby/api/tasks_api.rb +842 -0
  95. data/lib/worker_ruby/api_client.rb +378 -0
  96. data/lib/worker_ruby/api_error.rb +47 -0
  97. data/lib/worker_ruby/configuration.rb +207 -0
  98. data/lib/worker_ruby/models/complete.rb +220 -0
  99. data/lib/worker_ruby/models/error.rb +199 -0
  100. data/lib/worker_ruby/models/error_body.rb +208 -0
  101. data/lib/worker_ruby/models/group.rb +242 -0
  102. data/lib/worker_ruby/models/group_wrapper.rb +200 -0
  103. data/lib/worker_ruby/models/groups_wrapper.rb +202 -0
  104. data/lib/worker_ruby/models/id_status.rb +243 -0
  105. data/lib/worker_ruby/models/new_task.rb +270 -0
  106. data/lib/worker_ruby/models/new_tasks_wrapper.rb +202 -0
  107. data/lib/worker_ruby/models/start.rb +200 -0
  108. data/lib/worker_ruby/models/task.rb +427 -0
  109. data/lib/worker_ruby/models/task_wrapper.rb +200 -0
  110. data/lib/worker_ruby/models/tasks_wrapper.rb +221 -0
  111. data/lib/worker_ruby/version.rb +26 -0
  112. data/spec/api/CoreApi_spec.rb +99 -0
  113. data/spec/api/JobsApi_spec.rb +131 -0
  114. data/spec/api/core_api_spec.rb +99 -0
  115. data/spec/api/groups_api_spec.rb +94 -0
  116. data/spec/api/images_api_spec.rb +66 -0
  117. data/spec/api/jobs_api_spec.rb +220 -0
  118. data/spec/api/runner_api_spec.rb +88 -0
  119. data/spec/api/tasks_api_spec.rb +220 -0
  120. data/spec/api_client_spec.rb +237 -0
  121. data/spec/configuration_spec.rb +53 -0
  122. data/spec/models/ErrorBody_spec.rb +56 -0
  123. data/spec/models/JobArray_spec.rb +46 -0
  124. data/spec/models/JobWrapper_spec.rb +46 -0
  125. data/spec/models/NewJobArray_spec.rb +46 -0
  126. data/spec/models/NewJob_spec.rb +96 -0
  127. data/spec/models/complete_spec.rb +65 -0
  128. data/spec/models/error_body_spec.rb +59 -0
  129. data/spec/models/error_spec.rb +53 -0
  130. data/spec/models/group_spec.rb +77 -0
  131. data/spec/models/group_wrapper_spec.rb +53 -0
  132. data/spec/models/groups_wrapper_spec.rb +53 -0
  133. data/spec/models/id_status_spec.rb +63 -0
  134. data/spec/models/image_spec.rb +66 -0
  135. data/spec/models/image_wrapper_spec.rb +46 -0
  136. data/spec/models/images_wrapper_spec.rb +46 -0
  137. data/spec/models/job_array_spec.rb +46 -0
  138. data/spec/models/job_spec.rb +161 -0
  139. data/spec/models/job_wrapper_spec.rb +53 -0
  140. data/spec/models/jobs_wrapper_spec.rb +65 -0
  141. data/spec/models/log_spec.rb +46 -0
  142. data/spec/models/new_job_array_spec.rb +46 -0
  143. data/spec/models/new_job_spec.rb +89 -0
  144. data/spec/models/new_job_with_image_spec.rb +116 -0
  145. data/spec/models/new_jobs_wrapper_spec.rb +53 -0
  146. data/spec/models/new_task_spec.rb +89 -0
  147. data/spec/models/new_tasks_wrapper_spec.rb +53 -0
  148. data/spec/models/reason_spec.rb +36 -0
  149. data/spec/models/start_spec.rb +53 -0
  150. data/spec/models/task_spec.rb +163 -0
  151. data/spec/models/task_wrapper_spec.rb +53 -0
  152. data/spec/models/tasks_wrapper_spec.rb +65 -0
  153. data/spec/spec_helper.rb +122 -0
  154. data/worker_ruby-0.5.5.gem +0 -0
  155. data/worker_ruby.gemspec +55 -0
  156. metadata +420 -0
@@ -0,0 +1,26 @@
1
+ =begin
2
+ Titan API
3
+
4
+ The ultimate, language agnostic, container based job processing framework.
5
+
6
+ OpenAPI spec version: 0.4.9
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ module IronTitan
25
+ VERSION = "0.4.9"
26
+ end
@@ -0,0 +1,66 @@
1
+ =begin
2
+ #IronWorker CE API
3
+
4
+ #The ultimate, language agnostic, container based task processing framework.
5
+
6
+ OpenAPI spec version: 0.5.7
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ # Common files
25
+ require 'worker_ruby/api_client'
26
+ require 'worker_ruby/api_error'
27
+ require 'worker_ruby/version'
28
+ require 'worker_ruby/configuration'
29
+
30
+ # Models
31
+ require 'worker_ruby/models/complete'
32
+ require 'worker_ruby/models/error'
33
+ require 'worker_ruby/models/error_body'
34
+ require 'worker_ruby/models/group'
35
+ require 'worker_ruby/models/group_wrapper'
36
+ require 'worker_ruby/models/groups_wrapper'
37
+ require 'worker_ruby/models/id_status'
38
+ require 'worker_ruby/models/new_task'
39
+ require 'worker_ruby/models/new_tasks_wrapper'
40
+ require 'worker_ruby/models/start'
41
+ require 'worker_ruby/models/task'
42
+ require 'worker_ruby/models/task_wrapper'
43
+ require 'worker_ruby/models/tasks_wrapper'
44
+
45
+ # APIs
46
+ require 'worker_ruby/api/groups_api'
47
+ require 'worker_ruby/api/runner_api'
48
+ require 'worker_ruby/api/tasks_api'
49
+
50
+ module IronWorker
51
+ class << self
52
+ # Customize default settings for the SDK using block.
53
+ # IronWorker.configure do |config|
54
+ # config.username = "xxx"
55
+ # config.password = "xxx"
56
+ # end
57
+ # If no block given, return the default Configuration object.
58
+ def configure
59
+ if block_given?
60
+ yield(Configuration.default)
61
+ else
62
+ Configuration.default
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,262 @@
1
+ =begin
2
+ #IronWorker CE API
3
+
4
+ #The ultimate, language agnostic, container based task processing framework.
5
+
6
+ OpenAPI spec version: 0.5.7
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module IronWorker
27
+ class GroupsApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Get all group names.
35
+ # Get a list of all the groups in the system.
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [GroupsWrapper]
38
+ def groups_get(opts = {})
39
+ data, _status_code, _headers = groups_get_with_http_info(opts)
40
+ return data
41
+ end
42
+
43
+ # Get all group names.
44
+ # Get a list of all the groups in the system.
45
+ # @param [Hash] opts the optional parameters
46
+ # @return [Array<(GroupsWrapper, Fixnum, Hash)>] GroupsWrapper data, response status code and response headers
47
+ def groups_get_with_http_info(opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug "Calling API: GroupsApi.groups_get ..."
50
+ end
51
+ # resource path
52
+ local_var_path = "/groups".sub('{format}','json')
53
+
54
+ # query parameters
55
+ query_params = {}
56
+
57
+ # header parameters
58
+ header_params = {}
59
+
60
+ # HTTP header 'Accept' (if needed)
61
+ local_header_accept = ['application/json']
62
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
63
+
64
+ # HTTP header 'Content-Type'
65
+ local_header_content_type = ['application/json']
66
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
67
+
68
+ # form parameters
69
+ form_params = {}
70
+
71
+ # http body (model)
72
+ post_body = nil
73
+ auth_names = []
74
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => 'GroupsWrapper')
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: GroupsApi#groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+
87
+ # Get information for a group.
88
+ # This gives more details about a task group, such as statistics.
89
+ # @param name name of the group.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [GroupWrapper]
92
+ def groups_name_get(name, opts = {})
93
+ data, _status_code, _headers = groups_name_get_with_http_info(name, opts)
94
+ return data
95
+ end
96
+
97
+ # Get information for a group.
98
+ # This gives more details about a task group, such as statistics.
99
+ # @param name name of the group.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
102
+ def groups_name_get_with_http_info(name, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug "Calling API: GroupsApi.groups_name_get ..."
105
+ end
106
+ # verify the required parameter 'name' is set
107
+ fail ArgumentError, "Missing the required parameter 'name' when calling GroupsApi.groups_name_get" if name.nil?
108
+ # resource path
109
+ local_var_path = "/groups/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
110
+
111
+ # query parameters
112
+ query_params = {}
113
+
114
+ # header parameters
115
+ header_params = {}
116
+
117
+ # HTTP header 'Accept' (if needed)
118
+ local_header_accept = ['application/json']
119
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
120
+
121
+ # HTTP header 'Content-Type'
122
+ local_header_content_type = ['application/json']
123
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
124
+
125
+ # form parameters
126
+ form_params = {}
127
+
128
+ # http body (model)
129
+ post_body = nil
130
+ auth_names = []
131
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
132
+ :header_params => header_params,
133
+ :query_params => query_params,
134
+ :form_params => form_params,
135
+ :body => post_body,
136
+ :auth_names => auth_names,
137
+ :return_type => 'GroupWrapper')
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: GroupsApi#groups_name_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Create/update a task group.
145
+ # You can set group level settings here.
146
+ # @param name name of the group.
147
+ # @param body Group to post.
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [GroupWrapper]
150
+ def groups_name_put(name, body, opts = {})
151
+ data, _status_code, _headers = groups_name_put_with_http_info(name, body, opts)
152
+ return data
153
+ end
154
+
155
+ # Create/update a task group.
156
+ # You can set group level settings here.
157
+ # @param name name of the group.
158
+ # @param body Group to post.
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
161
+ def groups_name_put_with_http_info(name, body, opts = {})
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug "Calling API: GroupsApi.groups_name_put ..."
164
+ end
165
+ # verify the required parameter 'name' is set
166
+ fail ArgumentError, "Missing the required parameter 'name' when calling GroupsApi.groups_name_put" if name.nil?
167
+ # verify the required parameter 'body' is set
168
+ fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.groups_name_put" if body.nil?
169
+ # resource path
170
+ local_var_path = "/groups/{name}".sub('{format}','json').sub('{' + 'name' + '}', name.to_s)
171
+
172
+ # query parameters
173
+ query_params = {}
174
+
175
+ # header parameters
176
+ header_params = {}
177
+
178
+ # HTTP header 'Accept' (if needed)
179
+ local_header_accept = ['application/json']
180
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
181
+
182
+ # HTTP header 'Content-Type'
183
+ local_header_content_type = ['application/json']
184
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
185
+
186
+ # form parameters
187
+ form_params = {}
188
+
189
+ # http body (model)
190
+ post_body = @api_client.object_to_http_body(body)
191
+ auth_names = []
192
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
193
+ :header_params => header_params,
194
+ :query_params => query_params,
195
+ :form_params => form_params,
196
+ :body => post_body,
197
+ :auth_names => auth_names,
198
+ :return_type => 'GroupWrapper')
199
+ if @api_client.config.debugging
200
+ @api_client.config.logger.debug "API called: GroupsApi#groups_name_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
201
+ end
202
+ return data, status_code, headers
203
+ end
204
+
205
+ # Post new group
206
+ # Insert a new task group
207
+ # @param body Group to post.
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [GroupWrapper]
210
+ def groups_post(body, opts = {})
211
+ data, _status_code, _headers = groups_post_with_http_info(body, opts)
212
+ return data
213
+ end
214
+
215
+ # Post new group
216
+ # Insert a new task group
217
+ # @param body Group to post.
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<(GroupWrapper, Fixnum, Hash)>] GroupWrapper data, response status code and response headers
220
+ def groups_post_with_http_info(body, opts = {})
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "Calling API: GroupsApi.groups_post ..."
223
+ end
224
+ # verify the required parameter 'body' is set
225
+ fail ArgumentError, "Missing the required parameter 'body' when calling GroupsApi.groups_post" if body.nil?
226
+ # resource path
227
+ local_var_path = "/groups".sub('{format}','json')
228
+
229
+ # query parameters
230
+ query_params = {}
231
+
232
+ # header parameters
233
+ header_params = {}
234
+
235
+ # HTTP header 'Accept' (if needed)
236
+ local_header_accept = ['application/json']
237
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
238
+
239
+ # HTTP header 'Content-Type'
240
+ local_header_content_type = ['application/json']
241
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
242
+
243
+ # form parameters
244
+ form_params = {}
245
+
246
+ # http body (model)
247
+ post_body = @api_client.object_to_http_body(body)
248
+ auth_names = []
249
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
250
+ :header_params => header_params,
251
+ :query_params => query_params,
252
+ :form_params => form_params,
253
+ :body => post_body,
254
+ :auth_names => auth_names,
255
+ :return_type => 'GroupWrapper')
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug "API called: GroupsApi#groups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
258
+ end
259
+ return data, status_code, headers
260
+ end
261
+ end
262
+ end
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #IronWorker CE API
3
+
4
+ #The ultimate, language agnostic, container based task processing framework.
5
+
6
+ OpenAPI spec version: 0.5.7
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module IronWorker
27
+ class RunnerApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Mark task as failed.
35
+ # Task is marked as failed if it was in a valid state. Task's `finished_at` time is initialized.
36
+ # @param name Name of group for this set of tasks.
37
+ # @param id Task id
38
+ # @param body
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [TaskWrapper]
41
+ def groups_name_tasks_id_error_post(name, id, body, opts = {})
42
+ data, _status_code, _headers = groups_name_tasks_id_error_post_with_http_info(name, id, body, opts)
43
+ return data
44
+ end
45
+
46
+ # Mark task as failed.
47
+ # Task is marked as failed if it was in a valid state. Task&#39;s &#x60;finished_at&#x60; time is initialized.
48
+ # @param name Name of group for this set of tasks.
49
+ # @param id Task id
50
+ # @param body
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [Array<(TaskWrapper, Fixnum, Hash)>] TaskWrapper data, response status code and response headers
53
+ def groups_name_tasks_id_error_post_with_http_info(name, id, body, opts = {})
54
+ if @api_client.config.debugging
55
+ @api_client.config.logger.debug "Calling API: RunnerApi.groups_name_tasks_id_error_post ..."
56
+ end
57
+ # verify the required parameter 'name' is set
58
+ fail ArgumentError, "Missing the required parameter 'name' when calling RunnerApi.groups_name_tasks_id_error_post" if name.nil?
59
+ # verify the required parameter 'id' is set
60
+ fail ArgumentError, "Missing the required parameter 'id' when calling RunnerApi.groups_name_tasks_id_error_post" if id.nil?
61
+ # verify the required parameter 'body' is set
62
+ fail ArgumentError, "Missing the required parameter 'body' when calling RunnerApi.groups_name_tasks_id_error_post" if body.nil?
63
+ # resource path
64
+ local_var_path = "/groups/{name}/tasks/{id}/error".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'id' + '}', id.to_s)
65
+
66
+ # query parameters
67
+ query_params = {}
68
+
69
+ # header parameters
70
+ header_params = {}
71
+
72
+ # HTTP header 'Accept' (if needed)
73
+ local_header_accept = ['application/json']
74
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
75
+
76
+ # HTTP header 'Content-Type'
77
+ local_header_content_type = ['application/json']
78
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
79
+
80
+ # form parameters
81
+ form_params = {}
82
+
83
+ # http body (model)
84
+ post_body = @api_client.object_to_http_body(body)
85
+ auth_names = []
86
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => 'TaskWrapper')
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: RunnerApi#groups_name_tasks_id_error_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Mark task as started, ie: status = 'running'
100
+ # Task status is changed to 'running' if it was in a valid state before. Task's `started_at` time is initialized.
101
+ # @param name Name of group for this set of tasks.
102
+ # @param id Task id
103
+ # @param body
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [TaskWrapper]
106
+ def groups_name_tasks_id_start_post(name, id, body, opts = {})
107
+ data, _status_code, _headers = groups_name_tasks_id_start_post_with_http_info(name, id, body, opts)
108
+ return data
109
+ end
110
+
111
+ # Mark task as started, ie: status &#x3D; &#39;running&#39;
112
+ # Task status is changed to &#39;running&#39; if it was in a valid state before. Task&#39;s &#x60;started_at&#x60; time is initialized.
113
+ # @param name Name of group for this set of tasks.
114
+ # @param id Task id
115
+ # @param body
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [Array<(TaskWrapper, Fixnum, Hash)>] TaskWrapper data, response status code and response headers
118
+ def groups_name_tasks_id_start_post_with_http_info(name, id, body, opts = {})
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "Calling API: RunnerApi.groups_name_tasks_id_start_post ..."
121
+ end
122
+ # verify the required parameter 'name' is set
123
+ fail ArgumentError, "Missing the required parameter 'name' when calling RunnerApi.groups_name_tasks_id_start_post" if name.nil?
124
+ # verify the required parameter 'id' is set
125
+ fail ArgumentError, "Missing the required parameter 'id' when calling RunnerApi.groups_name_tasks_id_start_post" if id.nil?
126
+ # verify the required parameter 'body' is set
127
+ fail ArgumentError, "Missing the required parameter 'body' when calling RunnerApi.groups_name_tasks_id_start_post" if body.nil?
128
+ # resource path
129
+ local_var_path = "/groups/{name}/tasks/{id}/start".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'id' + '}', id.to_s)
130
+
131
+ # query parameters
132
+ query_params = {}
133
+
134
+ # header parameters
135
+ header_params = {}
136
+
137
+ # HTTP header 'Accept' (if needed)
138
+ local_header_accept = ['application/json']
139
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
140
+
141
+ # HTTP header 'Content-Type'
142
+ local_header_content_type = ['application/json']
143
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
144
+
145
+ # form parameters
146
+ form_params = {}
147
+
148
+ # http body (model)
149
+ post_body = @api_client.object_to_http_body(body)
150
+ auth_names = []
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
152
+ :header_params => header_params,
153
+ :query_params => query_params,
154
+ :form_params => form_params,
155
+ :body => post_body,
156
+ :auth_names => auth_names,
157
+ :return_type => 'TaskWrapper')
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug "API called: RunnerApi#groups_name_tasks_id_start_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
160
+ end
161
+ return data, status_code, headers
162
+ end
163
+
164
+ # Mark task as succeeded.
165
+ # Task status is changed to succeeded if it was in a valid state before. Task's `completed_at` time is initialized.
166
+ # @param name Name of group for this set of tasks.
167
+ # @param id Task id
168
+ # @param body
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [TaskWrapper]
171
+ def groups_name_tasks_id_success_post(name, id, body, opts = {})
172
+ data, _status_code, _headers = groups_name_tasks_id_success_post_with_http_info(name, id, body, opts)
173
+ return data
174
+ end
175
+
176
+ # Mark task as succeeded.
177
+ # Task status is changed to succeeded if it was in a valid state before. Task&#39;s &#x60;completed_at&#x60; time is initialized.
178
+ # @param name Name of group for this set of tasks.
179
+ # @param id Task id
180
+ # @param body
181
+ # @param [Hash] opts the optional parameters
182
+ # @return [Array<(TaskWrapper, Fixnum, Hash)>] TaskWrapper data, response status code and response headers
183
+ def groups_name_tasks_id_success_post_with_http_info(name, id, body, opts = {})
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug "Calling API: RunnerApi.groups_name_tasks_id_success_post ..."
186
+ end
187
+ # verify the required parameter 'name' is set
188
+ fail ArgumentError, "Missing the required parameter 'name' when calling RunnerApi.groups_name_tasks_id_success_post" if name.nil?
189
+ # verify the required parameter 'id' is set
190
+ fail ArgumentError, "Missing the required parameter 'id' when calling RunnerApi.groups_name_tasks_id_success_post" if id.nil?
191
+ # verify the required parameter 'body' is set
192
+ fail ArgumentError, "Missing the required parameter 'body' when calling RunnerApi.groups_name_tasks_id_success_post" if body.nil?
193
+ # resource path
194
+ local_var_path = "/groups/{name}/tasks/{id}/success".sub('{format}','json').sub('{' + 'name' + '}', name.to_s).sub('{' + 'id' + '}', id.to_s)
195
+
196
+ # query parameters
197
+ query_params = {}
198
+
199
+ # header parameters
200
+ header_params = {}
201
+
202
+ # HTTP header 'Accept' (if needed)
203
+ local_header_accept = ['application/json']
204
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
205
+
206
+ # HTTP header 'Content-Type'
207
+ local_header_content_type = ['application/json']
208
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
209
+
210
+ # form parameters
211
+ form_params = {}
212
+
213
+ # http body (model)
214
+ post_body = @api_client.object_to_http_body(body)
215
+ auth_names = []
216
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
217
+ :header_params => header_params,
218
+ :query_params => query_params,
219
+ :form_params => form_params,
220
+ :body => post_body,
221
+ :auth_names => auth_names,
222
+ :return_type => 'TaskWrapper')
223
+ if @api_client.config.debugging
224
+ @api_client.config.logger.debug "API called: RunnerApi#groups_name_tasks_id_success_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ end
226
+ return data, status_code, headers
227
+ end
228
+ end
229
+ end