Class: DaytonaToolboxApiClient::GitApi

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona_toolbox_api_client/api/git_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ GitApi

Returns a new instance of GitApi.



19
20
21
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_files(request, opts = {}) ⇒ nil

Add files to Git staging Add files to the Git staging area

Parameters:

  • request (GitAddRequest)

    Add files request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


27
28
29
30
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 27

def add_files(request, opts = {})
  add_files_with_http_info(request, opts)
  nil
end

#add_files_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add files to Git staging Add files to the Git staging area

Parameters:

  • request (GitAddRequest)

    Add files request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 37

def add_files_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.add_files ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.add_files"
  end
  # resource path
  local_var_path = '/git/add'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.add_files",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#add_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_remote(request, opts = {}) ⇒ nil

Add a remote Add (or overwrite) a remote in the Git repository

Parameters:

  • request (GitAddRemoteRequest)

    Add remote request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


95
96
97
98
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 95

def add_remote(request, opts = {})
  add_remote_with_http_info(request, opts)
  nil
end

#add_remote_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add a remote Add (or overwrite) a remote in the Git repository

Parameters:

  • request (GitAddRemoteRequest)

    Add remote request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 105

def add_remote_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.add_remote ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.add_remote"
  end
  # resource path
  local_var_path = '/git/remotes'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.add_remote",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#add_remote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#authenticate(request, opts = {}) ⇒ nil

Authenticate Git Persist Git credentials globally via the credential store. Stores the password in plaintext on disk.

Parameters:

  • request (GitAuthenticateRequest)

    Authenticate request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


161
162
163
164
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 161

def authenticate(request, opts = {})
  authenticate_with_http_info(request, opts)
  nil
end

#authenticate_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Authenticate Git Persist Git credentials globally via the credential store. Stores the password in plaintext on disk.

Parameters:

  • request (GitAuthenticateRequest)

    Authenticate request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 171

def authenticate_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.authenticate ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.authenticate"
  end
  # resource path
  local_var_path = '/git/credentials'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.authenticate",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#authenticate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#checkout_branch(request, opts = {}) ⇒ nil

Checkout branch or commit Switch to a different branch or commit in the Git repository

Parameters:

  • request (GitCheckoutRequest)

    Checkout request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


227
228
229
230
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 227

def checkout_branch(request, opts = {})
  checkout_branch_with_http_info(request, opts)
  nil
end

#checkout_branch_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Checkout branch or commit Switch to a different branch or commit in the Git repository

Parameters:

  • request (GitCheckoutRequest)

    Checkout request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 237

def checkout_branch_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.checkout_branch ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.checkout_branch"
  end
  # resource path
  local_var_path = '/git/checkout'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.checkout_branch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#checkout_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#clone_repository(request, opts = {}) ⇒ nil

Clone a Git repository Clone a Git repository to the specified path. Defaults to strict TLS verification; set insecure_skip_tls=true to skip verification for self-signed or private-CA Git servers.

Parameters:

  • request (GitCloneRequest)

    Clone repository request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


295
296
297
298
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 295

def clone_repository(request, opts = {})
  clone_repository_with_http_info(request, opts)
  nil
end

#clone_repository_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Clone a Git repository Clone a Git repository to the specified path. Defaults to strict TLS verification; set insecure_skip_tls=true to skip verification for self-signed or private-CA Git servers.

Parameters:

  • request (GitCloneRequest)

    Clone repository request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 305

def clone_repository_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.clone_repository ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.clone_repository"
  end
  # resource path
  local_var_path = '/git/clone'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.clone_repository",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#clone_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#commit_changes(request, opts = {}) ⇒ GitCommitResponse

Commit changes Commit staged changes to the Git repository

Parameters:

  • request (GitCommitRequest)

    Commit request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



363
364
365
366
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 363

def commit_changes(request, opts = {})
  data, _status_code, _headers = commit_changes_with_http_info(request, opts)
  data
end

#commit_changes_with_http_info(request, opts = {}) ⇒ Array<(GitCommitResponse, Integer, Hash)>

Commit changes Commit staged changes to the Git repository

Parameters:

  • request (GitCommitRequest)

    Commit request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GitCommitResponse, Integer, Hash)>)

    GitCommitResponse data, response status code and response headers



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 373

def commit_changes_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.commit_changes ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.commit_changes"
  end
  # resource path
  local_var_path = '/git/commit'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type] || 'GitCommitResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.commit_changes",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#commit_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#configure_user(request, opts = {}) ⇒ nil

Configure Git user Configure the Git user name and email at the given scope

Parameters:

  • request (GitConfigureUserRequest)

    Configure user request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


431
432
433
434
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 431

def configure_user(request, opts = {})
  configure_user_with_http_info(request, opts)
  nil
end

#configure_user_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Configure Git user Configure the Git user name and email at the given scope

Parameters:

  • request (GitConfigureUserRequest)

    Configure user request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 441

def configure_user_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.configure_user ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.configure_user"
  end
  # resource path
  local_var_path = '/git/config/user'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.configure_user",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#configure_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_branch(request, opts = {}) ⇒ nil

Create a new branch Create a new branch in the Git repository

Parameters:

  • request (GitBranchRequest)

    Create branch request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


497
498
499
500
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 497

def create_branch(request, opts = {})
  create_branch_with_http_info(request, opts)
  nil
end

#create_branch_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Create a new branch Create a new branch in the Git repository

Parameters:

  • request (GitBranchRequest)

    Create branch request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 507

def create_branch_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.create_branch ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.create_branch"
  end
  # resource path
  local_var_path = '/git/branches'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.create_branch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#create_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_branch(request, opts = {}) ⇒ nil

Delete a branch Delete a branch from the Git repository

Parameters:

  • request (GitDeleteBranchRequest)

    Delete branch request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


565
566
567
568
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 565

def delete_branch(request, opts = {})
  delete_branch_with_http_info(request, opts)
  nil
end

#delete_branch_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a branch Delete a branch from the Git repository

Parameters:

  • request (GitDeleteBranchRequest)

    Delete branch request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 575

def delete_branch_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.delete_branch ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.delete_branch"
  end
  # resource path
  local_var_path = '/git/branches'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.delete_branch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#delete_branch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_commit_history(path, opts = {}) ⇒ Array<GitCommitInfo>

Get commit history Get the commit history of the Git repository

Parameters:

  • path (String)

    Repository path

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



633
634
635
636
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 633

def get_commit_history(path, opts = {})
  data, _status_code, _headers = get_commit_history_with_http_info(path, opts)
  data
end

#get_commit_history_with_http_info(path, opts = {}) ⇒ Array<(Array<GitCommitInfo>, Integer, Hash)>

Get commit history Get the commit history of the Git repository

Parameters:

  • path (String)

    Repository path

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<GitCommitInfo>, Integer, Hash)>)

    Array data, response status code and response headers



643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 643

def get_commit_history_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.get_commit_history ...'
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling GitApi.get_commit_history"
  end
  # resource path
  local_var_path = '/git/history'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'path'] = path

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<GitCommitInfo>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.get_commit_history",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#get_commit_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_git_config(key, opts = {}) ⇒ GitConfigResponse

Get a Git config value Get a Git config value at the given scope (null when unset)

Parameters:

  • key (String)

    Config key (e.g. user.name)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :path (String)

    Repository path (required for local scope)

  • :scope (String)

    Config scope: global (default), local or system

Returns:



699
700
701
702
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 699

def get_git_config(key, opts = {})
  data, _status_code, _headers = get_git_config_with_http_info(key, opts)
  data
end

#get_git_config_with_http_info(key, opts = {}) ⇒ Array<(GitConfigResponse, Integer, Hash)>

Get a Git config value Get a Git config value at the given scope (null when unset)

Parameters:

  • key (String)

    Config key (e.g. user.name)

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :path (String)

    Repository path (required for local scope)

  • :scope (String)

    Config scope: global (default), local or system

Returns:

  • (Array<(GitConfigResponse, Integer, Hash)>)

    GitConfigResponse data, response status code and response headers



711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 711

def get_git_config_with_http_info(key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.get_git_config ...'
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling GitApi.get_git_config"
  end
  # resource path
  local_var_path = '/git/config'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'key'] = key
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
  query_params[:'scope'] = opts[:'scope'] if !opts[:'scope'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GitConfigResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.get_git_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#get_git_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_status(path, opts = {}) ⇒ GitStatus

Get Git status Get the Git status of the repository at the specified path

Parameters:

  • path (String)

    Repository path

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



767
768
769
770
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 767

def get_status(path, opts = {})
  data, _status_code, _headers = get_status_with_http_info(path, opts)
  data
end

#get_status_with_http_info(path, opts = {}) ⇒ Array<(GitStatus, Integer, Hash)>

Get Git status Get the Git status of the repository at the specified path

Parameters:

  • path (String)

    Repository path

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GitStatus, Integer, Hash)>)

    GitStatus data, response status code and response headers



777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 777

def get_status_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.get_status ...'
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling GitApi.get_status"
  end
  # resource path
  local_var_path = '/git/status'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'path'] = path

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GitStatus'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.get_status",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#get_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#init_repository(request, opts = {}) ⇒ nil

Initialize a Git repository Initialize a new Git repository at the specified path

Parameters:

  • request (GitInitRequest)

    Init repository request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


831
832
833
834
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 831

def init_repository(request, opts = {})
  init_repository_with_http_info(request, opts)
  nil
end

#init_repository_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Initialize a Git repository Initialize a new Git repository at the specified path

Parameters:

  • request (GitInitRequest)

    Init repository request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 841

def init_repository_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.init_repository ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.init_repository"
  end
  # resource path
  local_var_path = '/git/init'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.init_repository",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#init_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_branches(path, opts = {}) ⇒ ListBranchResponse

List branches Get a list of all branches in the Git repository

Parameters:

  • path (String)

    Repository path

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



897
898
899
900
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 897

def list_branches(path, opts = {})
  data, _status_code, _headers = list_branches_with_http_info(path, opts)
  data
end

#list_branches_with_http_info(path, opts = {}) ⇒ Array<(ListBranchResponse, Integer, Hash)>

List branches Get a list of all branches in the Git repository

Parameters:

  • path (String)

    Repository path

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListBranchResponse, Integer, Hash)>)

    ListBranchResponse data, response status code and response headers



907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 907

def list_branches_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.list_branches ...'
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling GitApi.list_branches"
  end
  # resource path
  local_var_path = '/git/branches'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'path'] = path

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListBranchResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.list_branches",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#list_branches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_remotes(path, opts = {}) ⇒ ListRemotesResponse

List remotes List the remotes configured in the Git repository

Parameters:

  • path (String)

    Repository path

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



961
962
963
964
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 961

def list_remotes(path, opts = {})
  data, _status_code, _headers = list_remotes_with_http_info(path, opts)
  data
end

#list_remotes_with_http_info(path, opts = {}) ⇒ Array<(ListRemotesResponse, Integer, Hash)>

List remotes List the remotes configured in the Git repository

Parameters:

  • path (String)

    Repository path

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListRemotesResponse, Integer, Hash)>)

    ListRemotesResponse data, response status code and response headers



971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 971

def list_remotes_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.list_remotes ...'
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling GitApi.list_remotes"
  end
  # resource path
  local_var_path = '/git/remotes'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'path'] = path

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListRemotesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.list_remotes",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#list_remotes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pull_changes(request, opts = {}) ⇒ nil

Pull changes from remote Pull changes from the remote Git repository

Parameters:

  • request (GitPullRequest)

    Pull request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1025
1026
1027
1028
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1025

def pull_changes(request, opts = {})
  pull_changes_with_http_info(request, opts)
  nil
end

#pull_changes_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Pull changes from remote Pull changes from the remote Git repository

Parameters:

  • request (GitPullRequest)

    Pull request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1035

def pull_changes_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.pull_changes ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.pull_changes"
  end
  # resource path
  local_var_path = '/git/pull'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.pull_changes",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#pull_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#push_changes(request, opts = {}) ⇒ nil

Push changes to remote Push local changes to the remote Git repository

Parameters:

  • request (GitPushRequest)

    Push request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1093
1094
1095
1096
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1093

def push_changes(request, opts = {})
  push_changes_with_http_info(request, opts)
  nil
end

#push_changes_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Push changes to remote Push local changes to the remote Git repository

Parameters:

  • request (GitPushRequest)

    Push request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1103

def push_changes_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.push_changes ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.push_changes"
  end
  # resource path
  local_var_path = '/git/push'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.push_changes",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#push_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reset_changes(request, opts = {}) ⇒ nil

Reset repository Reset the current HEAD to the specified state

Parameters:

  • request (GitResetRequest)

    Reset request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1159
1160
1161
1162
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1159

def reset_changes(request, opts = {})
  reset_changes_with_http_info(request, opts)
  nil
end

#reset_changes_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Reset repository Reset the current HEAD to the specified state

Parameters:

  • request (GitResetRequest)

    Reset request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1169

def reset_changes_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.reset_changes ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.reset_changes"
  end
  # resource path
  local_var_path = '/git/reset'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.reset_changes",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#reset_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#restore_files(request, opts = {}) ⇒ nil

Restore files Restore working tree files or unstage changes

Parameters:

  • request (GitRestoreRequest)

    Restore request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1225
1226
1227
1228
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1225

def restore_files(request, opts = {})
  restore_files_with_http_info(request, opts)
  nil
end

#restore_files_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Restore files Restore working tree files or unstage changes

Parameters:

  • request (GitRestoreRequest)

    Restore request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1235

def restore_files_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.restore_files ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.restore_files"
  end
  # resource path
  local_var_path = '/git/restore'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.restore_files",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#restore_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_git_config(request, opts = {}) ⇒ nil

Set a Git config value Set a Git config key/value at the given scope

Parameters:

  • request (GitSetConfigRequest)

    Set config request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1293
1294
1295
1296
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1293

def set_git_config(request, opts = {})
  set_git_config_with_http_info(request, opts)
  nil
end

#set_git_config_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Set a Git config value Set a Git config key/value at the given scope

Parameters:

  • request (GitSetConfigRequest)

    Set config request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
# File 'lib/daytona_toolbox_api_client/api/git_api.rb', line 1303

def set_git_config_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GitApi.set_git_config ...'
  end
  # verify the required parameter 'request' is set
  if @api_client.config.client_side_validation && request.nil?
    fail ArgumentError, "Missing the required parameter 'request' when calling GitApi.set_git_config"
  end
  # resource path
  local_var_path = '/git/config'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(request)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"GitApi.set_git_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GitApi#set_git_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end