daytona_toolbox_api_client 0.126.0.alpha.1

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 (100) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +39 -0
  3. data/.openapi-generator/FILES +92 -0
  4. data/.openapi-generator/VERSION +1 -0
  5. data/.openapi-generator-ignore +12 -0
  6. data/.rspec +2 -0
  7. data/.rubocop.yml +148 -0
  8. data/Gemfile +9 -0
  9. data/Gemfile.lock +101 -0
  10. data/Rakefile +10 -0
  11. data/daytona_toolbox_api_client.gemspec +39 -0
  12. data/fix-gemspec.sh +13 -0
  13. data/lib/daytona_toolbox_api_client/api/computer_use_api.rb +1463 -0
  14. data/lib/daytona_toolbox_api_client/api/file_system_api.rb +893 -0
  15. data/lib/daytona_toolbox_api_client/api/git_api.rb +744 -0
  16. data/lib/daytona_toolbox_api_client/api/info_api.rb +193 -0
  17. data/lib/daytona_toolbox_api_client/api/interpreter_api.rb +267 -0
  18. data/lib/daytona_toolbox_api_client/api/lsp_api.rb +510 -0
  19. data/lib/daytona_toolbox_api_client/api/port_api.rb +142 -0
  20. data/lib/daytona_toolbox_api_client/api/process_api.rb +938 -0
  21. data/lib/daytona_toolbox_api_client/api_client.rb +392 -0
  22. data/lib/daytona_toolbox_api_client/api_error.rb +58 -0
  23. data/lib/daytona_toolbox_api_client/configuration.rb +297 -0
  24. data/lib/daytona_toolbox_api_client/models/command.rb +270 -0
  25. data/lib/daytona_toolbox_api_client/models/completion_context.rb +244 -0
  26. data/lib/daytona_toolbox_api_client/models/completion_item.rb +289 -0
  27. data/lib/daytona_toolbox_api_client/models/completion_list.rb +263 -0
  28. data/lib/daytona_toolbox_api_client/models/computer_use_start_response.rb +229 -0
  29. data/lib/daytona_toolbox_api_client/models/computer_use_status_response.rb +218 -0
  30. data/lib/daytona_toolbox_api_client/models/computer_use_stop_response.rb +229 -0
  31. data/lib/daytona_toolbox_api_client/models/create_context_request.rb +227 -0
  32. data/lib/daytona_toolbox_api_client/models/create_session_request.rb +235 -0
  33. data/lib/daytona_toolbox_api_client/models/display_info.rb +263 -0
  34. data/lib/daytona_toolbox_api_client/models/display_info_response.rb +220 -0
  35. data/lib/daytona_toolbox_api_client/models/execute_request.rb +255 -0
  36. data/lib/daytona_toolbox_api_client/models/execute_response.rb +244 -0
  37. data/lib/daytona_toolbox_api_client/models/file_info.rb +417 -0
  38. data/lib/daytona_toolbox_api_client/models/file_status.rb +335 -0
  39. data/lib/daytona_toolbox_api_client/models/files_download_request.rb +237 -0
  40. data/lib/daytona_toolbox_api_client/models/git_add_request.rb +264 -0
  41. data/lib/daytona_toolbox_api_client/models/git_branch_request.rb +261 -0
  42. data/lib/daytona_toolbox_api_client/models/git_checkout_request.rb +261 -0
  43. data/lib/daytona_toolbox_api_client/models/git_clone_request.rb +297 -0
  44. data/lib/daytona_toolbox_api_client/models/git_commit_info.rb +339 -0
  45. data/lib/daytona_toolbox_api_client/models/git_commit_request.rb +322 -0
  46. data/lib/daytona_toolbox_api_client/models/git_commit_response.rb +235 -0
  47. data/lib/daytona_toolbox_api_client/models/git_git_delete_branch_request.rb +261 -0
  48. data/lib/daytona_toolbox_api_client/models/git_repo_request.rb +253 -0
  49. data/lib/daytona_toolbox_api_client/models/git_status.rb +290 -0
  50. data/lib/daytona_toolbox_api_client/models/interpreter_context.rb +339 -0
  51. data/lib/daytona_toolbox_api_client/models/is_port_in_use_response.rb +218 -0
  52. data/lib/daytona_toolbox_api_client/models/keyboard_hotkey_request.rb +219 -0
  53. data/lib/daytona_toolbox_api_client/models/keyboard_press_request.rb +230 -0
  54. data/lib/daytona_toolbox_api_client/models/keyboard_type_request.rb +228 -0
  55. data/lib/daytona_toolbox_api_client/models/list_branch_response.rb +237 -0
  56. data/lib/daytona_toolbox_api_client/models/list_contexts_response.rb +237 -0
  57. data/lib/daytona_toolbox_api_client/models/lsp_completion_params.rb +322 -0
  58. data/lib/daytona_toolbox_api_client/models/lsp_document_request.rb +287 -0
  59. data/lib/daytona_toolbox_api_client/models/lsp_location.rb +261 -0
  60. data/lib/daytona_toolbox_api_client/models/lsp_position.rb +261 -0
  61. data/lib/daytona_toolbox_api_client/models/lsp_range.rb +261 -0
  62. data/lib/daytona_toolbox_api_client/models/lsp_server_request.rb +261 -0
  63. data/lib/daytona_toolbox_api_client/models/lsp_symbol.rb +287 -0
  64. data/lib/daytona_toolbox_api_client/models/match.rb +287 -0
  65. data/lib/daytona_toolbox_api_client/models/mouse_click_request.rb +246 -0
  66. data/lib/daytona_toolbox_api_client/models/mouse_click_response.rb +227 -0
  67. data/lib/daytona_toolbox_api_client/models/mouse_drag_request.rb +254 -0
  68. data/lib/daytona_toolbox_api_client/models/mouse_drag_response.rb +227 -0
  69. data/lib/daytona_toolbox_api_client/models/mouse_move_request.rb +227 -0
  70. data/lib/daytona_toolbox_api_client/models/mouse_position_response.rb +227 -0
  71. data/lib/daytona_toolbox_api_client/models/mouse_scroll_request.rb +246 -0
  72. data/lib/daytona_toolbox_api_client/models/port_list.rb +220 -0
  73. data/lib/daytona_toolbox_api_client/models/position.rb +227 -0
  74. data/lib/daytona_toolbox_api_client/models/process_errors_response.rb +227 -0
  75. data/lib/daytona_toolbox_api_client/models/process_logs_response.rb +227 -0
  76. data/lib/daytona_toolbox_api_client/models/process_restart_response.rb +227 -0
  77. data/lib/daytona_toolbox_api_client/models/process_status.rb +245 -0
  78. data/lib/daytona_toolbox_api_client/models/process_status_response.rb +227 -0
  79. data/lib/daytona_toolbox_api_client/models/pty_create_request.rb +266 -0
  80. data/lib/daytona_toolbox_api_client/models/pty_create_response.rb +218 -0
  81. data/lib/daytona_toolbox_api_client/models/pty_list_response.rb +220 -0
  82. data/lib/daytona_toolbox_api_client/models/pty_resize_request.rb +297 -0
  83. data/lib/daytona_toolbox_api_client/models/pty_session_info.rb +284 -0
  84. data/lib/daytona_toolbox_api_client/models/replace_request.rb +289 -0
  85. data/lib/daytona_toolbox_api_client/models/replace_result.rb +236 -0
  86. data/lib/daytona_toolbox_api_client/models/screenshot_response.rb +236 -0
  87. data/lib/daytona_toolbox_api_client/models/scroll_response.rb +218 -0
  88. data/lib/daytona_toolbox_api_client/models/search_files_response.rb +237 -0
  89. data/lib/daytona_toolbox_api_client/models/session.rb +263 -0
  90. data/lib/daytona_toolbox_api_client/models/session_execute_request.rb +253 -0
  91. data/lib/daytona_toolbox_api_client/models/session_execute_response.rb +254 -0
  92. data/lib/daytona_toolbox_api_client/models/status.rb +46 -0
  93. data/lib/daytona_toolbox_api_client/models/user_home_dir_response.rb +218 -0
  94. data/lib/daytona_toolbox_api_client/models/window_info.rb +272 -0
  95. data/lib/daytona_toolbox_api_client/models/windows_response.rb +220 -0
  96. data/lib/daytona_toolbox_api_client/models/work_dir_response.rb +218 -0
  97. data/lib/daytona_toolbox_api_client/version.rb +15 -0
  98. data/lib/daytona_toolbox_api_client.rb +120 -0
  99. data/project.json +65 -0
  100. metadata +178 -0
@@ -0,0 +1,744 @@
1
+ =begin
2
+ #Daytona Daemon API
3
+
4
+ #Daytona Daemon API
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module DaytonaToolboxApiClient
16
+ class GitApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add files to Git staging
23
+ # Add files to the Git staging area
24
+ # @param request [GitAddRequest] Add files request
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def add_files(request, opts = {})
28
+ add_files_with_http_info(request, opts)
29
+ nil
30
+ end
31
+
32
+ # Add files to Git staging
33
+ # Add files to the Git staging area
34
+ # @param request [GitAddRequest] Add files request
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def add_files_with_http_info(request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: GitApi.add_files ...'
40
+ end
41
+ # verify the required parameter 'request' is set
42
+ if @api_client.config.client_side_validation && request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.add_files"
44
+ end
45
+ # resource path
46
+ local_var_path = '/git/add'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Content-Type'
54
+ content_type = @api_client.select_header_content_type(['application/json'])
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type]
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || []
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"GitApi.add_files",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: GitApi#add_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Checkout branch or commit
89
+ # Switch to a different branch or commit in the Git repository
90
+ # @param request [GitCheckoutRequest] Checkout request
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [nil]
93
+ def checkout_branch(request, opts = {})
94
+ checkout_branch_with_http_info(request, opts)
95
+ nil
96
+ end
97
+
98
+ # Checkout branch or commit
99
+ # Switch to a different branch or commit in the Git repository
100
+ # @param request [GitCheckoutRequest] Checkout request
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
103
+ def checkout_branch_with_http_info(request, opts = {})
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug 'Calling API: GitApi.checkout_branch ...'
106
+ end
107
+ # verify the required parameter 'request' is set
108
+ if @api_client.config.client_side_validation && request.nil?
109
+ fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.checkout_branch"
110
+ end
111
+ # resource path
112
+ local_var_path = '/git/checkout'
113
+
114
+ # query parameters
115
+ query_params = opts[:query_params] || {}
116
+
117
+ # header parameters
118
+ header_params = opts[:header_params] || {}
119
+ # HTTP header 'Content-Type'
120
+ content_type = @api_client.select_header_content_type(['application/json'])
121
+ if !content_type.nil?
122
+ header_params['Content-Type'] = content_type
123
+ end
124
+
125
+ # form parameters
126
+ form_params = opts[:form_params] || {}
127
+
128
+ # http body (model)
129
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
130
+
131
+ # return_type
132
+ return_type = opts[:debug_return_type]
133
+
134
+ # auth_names
135
+ auth_names = opts[:debug_auth_names] || []
136
+
137
+ new_options = opts.merge(
138
+ :operation => :"GitApi.checkout_branch",
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => return_type
145
+ )
146
+
147
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: GitApi#checkout_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
152
+ end
153
+
154
+ # Clone a Git repository
155
+ # Clone a Git repository to the specified path
156
+ # @param request [GitCloneRequest] Clone repository request
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [nil]
159
+ def clone_repository(request, opts = {})
160
+ clone_repository_with_http_info(request, opts)
161
+ nil
162
+ end
163
+
164
+ # Clone a Git repository
165
+ # Clone a Git repository to the specified path
166
+ # @param request [GitCloneRequest] Clone repository request
167
+ # @param [Hash] opts the optional parameters
168
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
169
+ def clone_repository_with_http_info(request, opts = {})
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug 'Calling API: GitApi.clone_repository ...'
172
+ end
173
+ # verify the required parameter 'request' is set
174
+ if @api_client.config.client_side_validation && request.nil?
175
+ fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.clone_repository"
176
+ end
177
+ # resource path
178
+ local_var_path = '/git/clone'
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+
183
+ # header parameters
184
+ header_params = opts[:header_params] || {}
185
+ # HTTP header 'Content-Type'
186
+ content_type = @api_client.select_header_content_type(['application/json'])
187
+ if !content_type.nil?
188
+ header_params['Content-Type'] = content_type
189
+ end
190
+
191
+ # form parameters
192
+ form_params = opts[:form_params] || {}
193
+
194
+ # http body (model)
195
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
196
+
197
+ # return_type
198
+ return_type = opts[:debug_return_type]
199
+
200
+ # auth_names
201
+ auth_names = opts[:debug_auth_names] || []
202
+
203
+ new_options = opts.merge(
204
+ :operation => :"GitApi.clone_repository",
205
+ :header_params => header_params,
206
+ :query_params => query_params,
207
+ :form_params => form_params,
208
+ :body => post_body,
209
+ :auth_names => auth_names,
210
+ :return_type => return_type
211
+ )
212
+
213
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
214
+ if @api_client.config.debugging
215
+ @api_client.config.logger.debug "API called: GitApi#clone_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
216
+ end
217
+ return data, status_code, headers
218
+ end
219
+
220
+ # Commit changes
221
+ # Commit staged changes to the Git repository
222
+ # @param request [GitCommitRequest] Commit request
223
+ # @param [Hash] opts the optional parameters
224
+ # @return [GitCommitResponse]
225
+ def commit_changes(request, opts = {})
226
+ data, _status_code, _headers = commit_changes_with_http_info(request, opts)
227
+ data
228
+ end
229
+
230
+ # Commit changes
231
+ # Commit staged changes to the Git repository
232
+ # @param request [GitCommitRequest] Commit request
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [Array<(GitCommitResponse, Integer, Hash)>] GitCommitResponse data, response status code and response headers
235
+ def commit_changes_with_http_info(request, opts = {})
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug 'Calling API: GitApi.commit_changes ...'
238
+ end
239
+ # verify the required parameter 'request' is set
240
+ if @api_client.config.client_side_validation && request.nil?
241
+ fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.commit_changes"
242
+ end
243
+ # resource path
244
+ local_var_path = '/git/commit'
245
+
246
+ # query parameters
247
+ query_params = opts[:query_params] || {}
248
+
249
+ # header parameters
250
+ header_params = opts[:header_params] || {}
251
+ # HTTP header 'Accept' (if needed)
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
253
+ # HTTP header 'Content-Type'
254
+ content_type = @api_client.select_header_content_type(['application/json'])
255
+ if !content_type.nil?
256
+ header_params['Content-Type'] = content_type
257
+ end
258
+
259
+ # form parameters
260
+ form_params = opts[:form_params] || {}
261
+
262
+ # http body (model)
263
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
264
+
265
+ # return_type
266
+ return_type = opts[:debug_return_type] || 'GitCommitResponse'
267
+
268
+ # auth_names
269
+ auth_names = opts[:debug_auth_names] || []
270
+
271
+ new_options = opts.merge(
272
+ :operation => :"GitApi.commit_changes",
273
+ :header_params => header_params,
274
+ :query_params => query_params,
275
+ :form_params => form_params,
276
+ :body => post_body,
277
+ :auth_names => auth_names,
278
+ :return_type => return_type
279
+ )
280
+
281
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
282
+ if @api_client.config.debugging
283
+ @api_client.config.logger.debug "API called: GitApi#commit_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
284
+ end
285
+ return data, status_code, headers
286
+ end
287
+
288
+ # Create a new branch
289
+ # Create a new branch in the Git repository
290
+ # @param request [GitBranchRequest] Create branch request
291
+ # @param [Hash] opts the optional parameters
292
+ # @return [nil]
293
+ def create_branch(request, opts = {})
294
+ create_branch_with_http_info(request, opts)
295
+ nil
296
+ end
297
+
298
+ # Create a new branch
299
+ # Create a new branch in the Git repository
300
+ # @param request [GitBranchRequest] Create branch request
301
+ # @param [Hash] opts the optional parameters
302
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
303
+ def create_branch_with_http_info(request, opts = {})
304
+ if @api_client.config.debugging
305
+ @api_client.config.logger.debug 'Calling API: GitApi.create_branch ...'
306
+ end
307
+ # verify the required parameter 'request' is set
308
+ if @api_client.config.client_side_validation && request.nil?
309
+ fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.create_branch"
310
+ end
311
+ # resource path
312
+ local_var_path = '/git/branches'
313
+
314
+ # query parameters
315
+ query_params = opts[:query_params] || {}
316
+
317
+ # header parameters
318
+ header_params = opts[:header_params] || {}
319
+ # HTTP header 'Content-Type'
320
+ content_type = @api_client.select_header_content_type(['application/json'])
321
+ if !content_type.nil?
322
+ header_params['Content-Type'] = content_type
323
+ end
324
+
325
+ # form parameters
326
+ form_params = opts[:form_params] || {}
327
+
328
+ # http body (model)
329
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
330
+
331
+ # return_type
332
+ return_type = opts[:debug_return_type]
333
+
334
+ # auth_names
335
+ auth_names = opts[:debug_auth_names] || []
336
+
337
+ new_options = opts.merge(
338
+ :operation => :"GitApi.create_branch",
339
+ :header_params => header_params,
340
+ :query_params => query_params,
341
+ :form_params => form_params,
342
+ :body => post_body,
343
+ :auth_names => auth_names,
344
+ :return_type => return_type
345
+ )
346
+
347
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug "API called: GitApi#create_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
350
+ end
351
+ return data, status_code, headers
352
+ end
353
+
354
+ # Delete a branch
355
+ # Delete a branch from the Git repository
356
+ # @param request [GitGitDeleteBranchRequest] Delete branch request
357
+ # @param [Hash] opts the optional parameters
358
+ # @return [nil]
359
+ def delete_branch(request, opts = {})
360
+ delete_branch_with_http_info(request, opts)
361
+ nil
362
+ end
363
+
364
+ # Delete a branch
365
+ # Delete a branch from the Git repository
366
+ # @param request [GitGitDeleteBranchRequest] Delete branch request
367
+ # @param [Hash] opts the optional parameters
368
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
369
+ def delete_branch_with_http_info(request, opts = {})
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug 'Calling API: GitApi.delete_branch ...'
372
+ end
373
+ # verify the required parameter 'request' is set
374
+ if @api_client.config.client_side_validation && request.nil?
375
+ fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.delete_branch"
376
+ end
377
+ # resource path
378
+ local_var_path = '/git/branches'
379
+
380
+ # query parameters
381
+ query_params = opts[:query_params] || {}
382
+
383
+ # header parameters
384
+ header_params = opts[:header_params] || {}
385
+ # HTTP header 'Content-Type'
386
+ content_type = @api_client.select_header_content_type(['application/json'])
387
+ if !content_type.nil?
388
+ header_params['Content-Type'] = content_type
389
+ end
390
+
391
+ # form parameters
392
+ form_params = opts[:form_params] || {}
393
+
394
+ # http body (model)
395
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
396
+
397
+ # return_type
398
+ return_type = opts[:debug_return_type]
399
+
400
+ # auth_names
401
+ auth_names = opts[:debug_auth_names] || []
402
+
403
+ new_options = opts.merge(
404
+ :operation => :"GitApi.delete_branch",
405
+ :header_params => header_params,
406
+ :query_params => query_params,
407
+ :form_params => form_params,
408
+ :body => post_body,
409
+ :auth_names => auth_names,
410
+ :return_type => return_type
411
+ )
412
+
413
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
414
+ if @api_client.config.debugging
415
+ @api_client.config.logger.debug "API called: GitApi#delete_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
416
+ end
417
+ return data, status_code, headers
418
+ end
419
+
420
+ # Get commit history
421
+ # Get the commit history of the Git repository
422
+ # @param path [String] Repository path
423
+ # @param [Hash] opts the optional parameters
424
+ # @return [Array<GitCommitInfo>]
425
+ def get_commit_history(path, opts = {})
426
+ data, _status_code, _headers = get_commit_history_with_http_info(path, opts)
427
+ data
428
+ end
429
+
430
+ # Get commit history
431
+ # Get the commit history of the Git repository
432
+ # @param path [String] Repository path
433
+ # @param [Hash] opts the optional parameters
434
+ # @return [Array<(Array<GitCommitInfo>, Integer, Hash)>] Array<GitCommitInfo> data, response status code and response headers
435
+ def get_commit_history_with_http_info(path, opts = {})
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug 'Calling API: GitApi.get_commit_history ...'
438
+ end
439
+ # verify the required parameter 'path' is set
440
+ if @api_client.config.client_side_validation && path.nil?
441
+ fail ArgumentError, "Missing the required parameter 'path' when calling GitApi.get_commit_history"
442
+ end
443
+ # resource path
444
+ local_var_path = '/git/history'
445
+
446
+ # query parameters
447
+ query_params = opts[:query_params] || {}
448
+ query_params[:'path'] = path
449
+
450
+ # header parameters
451
+ header_params = opts[:header_params] || {}
452
+ # HTTP header 'Accept' (if needed)
453
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
454
+
455
+ # form parameters
456
+ form_params = opts[:form_params] || {}
457
+
458
+ # http body (model)
459
+ post_body = opts[:debug_body]
460
+
461
+ # return_type
462
+ return_type = opts[:debug_return_type] || 'Array<GitCommitInfo>'
463
+
464
+ # auth_names
465
+ auth_names = opts[:debug_auth_names] || []
466
+
467
+ new_options = opts.merge(
468
+ :operation => :"GitApi.get_commit_history",
469
+ :header_params => header_params,
470
+ :query_params => query_params,
471
+ :form_params => form_params,
472
+ :body => post_body,
473
+ :auth_names => auth_names,
474
+ :return_type => return_type
475
+ )
476
+
477
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug "API called: GitApi#get_commit_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
480
+ end
481
+ return data, status_code, headers
482
+ end
483
+
484
+ # Get Git status
485
+ # Get the Git status of the repository at the specified path
486
+ # @param path [String] Repository path
487
+ # @param [Hash] opts the optional parameters
488
+ # @return [GitStatus]
489
+ def get_status(path, opts = {})
490
+ data, _status_code, _headers = get_status_with_http_info(path, opts)
491
+ data
492
+ end
493
+
494
+ # Get Git status
495
+ # Get the Git status of the repository at the specified path
496
+ # @param path [String] Repository path
497
+ # @param [Hash] opts the optional parameters
498
+ # @return [Array<(GitStatus, Integer, Hash)>] GitStatus data, response status code and response headers
499
+ def get_status_with_http_info(path, opts = {})
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug 'Calling API: GitApi.get_status ...'
502
+ end
503
+ # verify the required parameter 'path' is set
504
+ if @api_client.config.client_side_validation && path.nil?
505
+ fail ArgumentError, "Missing the required parameter 'path' when calling GitApi.get_status"
506
+ end
507
+ # resource path
508
+ local_var_path = '/git/status'
509
+
510
+ # query parameters
511
+ query_params = opts[:query_params] || {}
512
+ query_params[:'path'] = path
513
+
514
+ # header parameters
515
+ header_params = opts[:header_params] || {}
516
+ # HTTP header 'Accept' (if needed)
517
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
518
+
519
+ # form parameters
520
+ form_params = opts[:form_params] || {}
521
+
522
+ # http body (model)
523
+ post_body = opts[:debug_body]
524
+
525
+ # return_type
526
+ return_type = opts[:debug_return_type] || 'GitStatus'
527
+
528
+ # auth_names
529
+ auth_names = opts[:debug_auth_names] || []
530
+
531
+ new_options = opts.merge(
532
+ :operation => :"GitApi.get_status",
533
+ :header_params => header_params,
534
+ :query_params => query_params,
535
+ :form_params => form_params,
536
+ :body => post_body,
537
+ :auth_names => auth_names,
538
+ :return_type => return_type
539
+ )
540
+
541
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
542
+ if @api_client.config.debugging
543
+ @api_client.config.logger.debug "API called: GitApi#get_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
544
+ end
545
+ return data, status_code, headers
546
+ end
547
+
548
+ # List branches
549
+ # Get a list of all branches in the Git repository
550
+ # @param path [String] Repository path
551
+ # @param [Hash] opts the optional parameters
552
+ # @return [ListBranchResponse]
553
+ def list_branches(path, opts = {})
554
+ data, _status_code, _headers = list_branches_with_http_info(path, opts)
555
+ data
556
+ end
557
+
558
+ # List branches
559
+ # Get a list of all branches in the Git repository
560
+ # @param path [String] Repository path
561
+ # @param [Hash] opts the optional parameters
562
+ # @return [Array<(ListBranchResponse, Integer, Hash)>] ListBranchResponse data, response status code and response headers
563
+ def list_branches_with_http_info(path, opts = {})
564
+ if @api_client.config.debugging
565
+ @api_client.config.logger.debug 'Calling API: GitApi.list_branches ...'
566
+ end
567
+ # verify the required parameter 'path' is set
568
+ if @api_client.config.client_side_validation && path.nil?
569
+ fail ArgumentError, "Missing the required parameter 'path' when calling GitApi.list_branches"
570
+ end
571
+ # resource path
572
+ local_var_path = '/git/branches'
573
+
574
+ # query parameters
575
+ query_params = opts[:query_params] || {}
576
+ query_params[:'path'] = path
577
+
578
+ # header parameters
579
+ header_params = opts[:header_params] || {}
580
+ # HTTP header 'Accept' (if needed)
581
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
582
+
583
+ # form parameters
584
+ form_params = opts[:form_params] || {}
585
+
586
+ # http body (model)
587
+ post_body = opts[:debug_body]
588
+
589
+ # return_type
590
+ return_type = opts[:debug_return_type] || 'ListBranchResponse'
591
+
592
+ # auth_names
593
+ auth_names = opts[:debug_auth_names] || []
594
+
595
+ new_options = opts.merge(
596
+ :operation => :"GitApi.list_branches",
597
+ :header_params => header_params,
598
+ :query_params => query_params,
599
+ :form_params => form_params,
600
+ :body => post_body,
601
+ :auth_names => auth_names,
602
+ :return_type => return_type
603
+ )
604
+
605
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
606
+ if @api_client.config.debugging
607
+ @api_client.config.logger.debug "API called: GitApi#list_branches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
608
+ end
609
+ return data, status_code, headers
610
+ end
611
+
612
+ # Pull changes from remote
613
+ # Pull changes from the remote Git repository
614
+ # @param request [GitRepoRequest] Pull request
615
+ # @param [Hash] opts the optional parameters
616
+ # @return [nil]
617
+ def pull_changes(request, opts = {})
618
+ pull_changes_with_http_info(request, opts)
619
+ nil
620
+ end
621
+
622
+ # Pull changes from remote
623
+ # Pull changes from the remote Git repository
624
+ # @param request [GitRepoRequest] Pull request
625
+ # @param [Hash] opts the optional parameters
626
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
627
+ def pull_changes_with_http_info(request, opts = {})
628
+ if @api_client.config.debugging
629
+ @api_client.config.logger.debug 'Calling API: GitApi.pull_changes ...'
630
+ end
631
+ # verify the required parameter 'request' is set
632
+ if @api_client.config.client_side_validation && request.nil?
633
+ fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.pull_changes"
634
+ end
635
+ # resource path
636
+ local_var_path = '/git/pull'
637
+
638
+ # query parameters
639
+ query_params = opts[:query_params] || {}
640
+
641
+ # header parameters
642
+ header_params = opts[:header_params] || {}
643
+ # HTTP header 'Content-Type'
644
+ content_type = @api_client.select_header_content_type(['application/json'])
645
+ if !content_type.nil?
646
+ header_params['Content-Type'] = content_type
647
+ end
648
+
649
+ # form parameters
650
+ form_params = opts[:form_params] || {}
651
+
652
+ # http body (model)
653
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
654
+
655
+ # return_type
656
+ return_type = opts[:debug_return_type]
657
+
658
+ # auth_names
659
+ auth_names = opts[:debug_auth_names] || []
660
+
661
+ new_options = opts.merge(
662
+ :operation => :"GitApi.pull_changes",
663
+ :header_params => header_params,
664
+ :query_params => query_params,
665
+ :form_params => form_params,
666
+ :body => post_body,
667
+ :auth_names => auth_names,
668
+ :return_type => return_type
669
+ )
670
+
671
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
672
+ if @api_client.config.debugging
673
+ @api_client.config.logger.debug "API called: GitApi#pull_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
674
+ end
675
+ return data, status_code, headers
676
+ end
677
+
678
+ # Push changes to remote
679
+ # Push local changes to the remote Git repository
680
+ # @param request [GitRepoRequest] Push request
681
+ # @param [Hash] opts the optional parameters
682
+ # @return [nil]
683
+ def push_changes(request, opts = {})
684
+ push_changes_with_http_info(request, opts)
685
+ nil
686
+ end
687
+
688
+ # Push changes to remote
689
+ # Push local changes to the remote Git repository
690
+ # @param request [GitRepoRequest] Push request
691
+ # @param [Hash] opts the optional parameters
692
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
693
+ def push_changes_with_http_info(request, opts = {})
694
+ if @api_client.config.debugging
695
+ @api_client.config.logger.debug 'Calling API: GitApi.push_changes ...'
696
+ end
697
+ # verify the required parameter 'request' is set
698
+ if @api_client.config.client_side_validation && request.nil?
699
+ fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.push_changes"
700
+ end
701
+ # resource path
702
+ local_var_path = '/git/push'
703
+
704
+ # query parameters
705
+ query_params = opts[:query_params] || {}
706
+
707
+ # header parameters
708
+ header_params = opts[:header_params] || {}
709
+ # HTTP header 'Content-Type'
710
+ content_type = @api_client.select_header_content_type(['application/json'])
711
+ if !content_type.nil?
712
+ header_params['Content-Type'] = content_type
713
+ end
714
+
715
+ # form parameters
716
+ form_params = opts[:form_params] || {}
717
+
718
+ # http body (model)
719
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
720
+
721
+ # return_type
722
+ return_type = opts[:debug_return_type]
723
+
724
+ # auth_names
725
+ auth_names = opts[:debug_auth_names] || []
726
+
727
+ new_options = opts.merge(
728
+ :operation => :"GitApi.push_changes",
729
+ :header_params => header_params,
730
+ :query_params => query_params,
731
+ :form_params => form_params,
732
+ :body => post_body,
733
+ :auth_names => auth_names,
734
+ :return_type => return_type
735
+ )
736
+
737
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
738
+ if @api_client.config.debugging
739
+ @api_client.config.logger.debug "API called: GitApi#push_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
740
+ end
741
+ return data, status_code, headers
742
+ end
743
+ end
744
+ end