daytona_toolbox_api_client 0.193.0 → 0.194.0

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 (25) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +14 -1
  3. data/lib/daytona_toolbox_api_client/api/file_system_api.rb +5 -2
  4. data/lib/daytona_toolbox_api_client/api/git_api.rb +600 -4
  5. data/lib/daytona_toolbox_api_client/api/system_api.rb +79 -0
  6. data/lib/daytona_toolbox_api_client/models/file_info.rb +11 -1
  7. data/lib/daytona_toolbox_api_client/models/git_add_remote_request.rb +236 -0
  8. data/lib/daytona_toolbox_api_client/models/git_authenticate_request.rb +210 -0
  9. data/lib/daytona_toolbox_api_client/models/git_clone_request.rb +11 -1
  10. data/lib/daytona_toolbox_api_client/models/git_config_response.rb +148 -0
  11. data/lib/daytona_toolbox_api_client/models/git_configure_user_request.rb +210 -0
  12. data/lib/daytona_toolbox_api_client/models/git_init_request.rb +184 -0
  13. data/lib/daytona_toolbox_api_client/models/{git_repo_request.rb → git_pull_request.rb} +24 -4
  14. data/lib/daytona_toolbox_api_client/models/git_push_request.rb +212 -0
  15. data/lib/daytona_toolbox_api_client/models/git_remote.rb +190 -0
  16. data/lib/daytona_toolbox_api_client/models/git_reset_request.rb +196 -0
  17. data/lib/daytona_toolbox_api_client/models/git_restore_request.rb +222 -0
  18. data/lib/daytona_toolbox_api_client/models/git_set_config_request.rb +210 -0
  19. data/lib/daytona_toolbox_api_client/models/git_status.rb +24 -4
  20. data/lib/daytona_toolbox_api_client/models/list_branch_response.rb +14 -4
  21. data/lib/daytona_toolbox_api_client/models/list_remotes_response.rb +166 -0
  22. data/lib/daytona_toolbox_api_client/models/system_metrics.rb +228 -0
  23. data/lib/daytona_toolbox_api_client/version.rb +1 -1
  24. data/lib/daytona_toolbox_api_client.rb +14 -1
  25. metadata +15 -2
@@ -0,0 +1,222 @@
1
+ =begin
2
+ #Daytona Toolbox API
3
+
4
+ #Daytona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Daytona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Daytona Cloud: `https://proxy.app.daytona.io/toolbox/{sandboxId}`.
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaToolboxApiClient
17
+ class GitRestoreRequest < ApiModelBase
18
+ attr_accessor :files
19
+
20
+ attr_accessor :path
21
+
22
+ # Source restores file contents from the given revision instead of the index.
23
+ attr_accessor :source
24
+
25
+ # Staged restores the staging index for the given files.
26
+ attr_accessor :staged
27
+
28
+ # Worktree restores the working tree for the given files.
29
+ attr_accessor :worktree
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'files' => :'files',
35
+ :'path' => :'path',
36
+ :'source' => :'source',
37
+ :'staged' => :'staged',
38
+ :'worktree' => :'worktree'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'files' => :'Array<String>',
56
+ :'path' => :'String',
57
+ :'source' => :'String',
58
+ :'staged' => :'Boolean',
59
+ :'worktree' => :'Boolean'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaToolboxApiClient::GitRestoreRequest` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ acceptable_attribute_map = self.class.acceptable_attribute_map
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!acceptable_attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaToolboxApiClient::GitRestoreRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'files')
86
+ if (value = attributes[:'files']).is_a?(Array)
87
+ self.files = value
88
+ end
89
+ else
90
+ self.files = nil
91
+ end
92
+
93
+ if attributes.key?(:'path')
94
+ self.path = attributes[:'path']
95
+ else
96
+ self.path = nil
97
+ end
98
+
99
+ if attributes.key?(:'source')
100
+ self.source = attributes[:'source']
101
+ end
102
+
103
+ if attributes.key?(:'staged')
104
+ self.staged = attributes[:'staged']
105
+ end
106
+
107
+ if attributes.key?(:'worktree')
108
+ self.worktree = attributes[:'worktree']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
116
+ invalid_properties = Array.new
117
+ if @files.nil?
118
+ invalid_properties.push('invalid value for "files", files cannot be nil.')
119
+ end
120
+
121
+ if @path.nil?
122
+ invalid_properties.push('invalid value for "path", path cannot be nil.')
123
+ end
124
+
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ warn '[DEPRECATED] the `valid?` method is obsolete'
132
+ return false if @files.nil?
133
+ return false if @path.nil?
134
+ true
135
+ end
136
+
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] files Value to be assigned
139
+ def files=(files)
140
+ if files.nil?
141
+ fail ArgumentError, 'files cannot be nil'
142
+ end
143
+
144
+ @files = files
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] path Value to be assigned
149
+ def path=(path)
150
+ if path.nil?
151
+ fail ArgumentError, 'path cannot be nil'
152
+ end
153
+
154
+ @path = path
155
+ end
156
+
157
+ # Checks equality by comparing each attribute.
158
+ # @param [Object] Object to be compared
159
+ def ==(o)
160
+ return true if self.equal?(o)
161
+ self.class == o.class &&
162
+ files == o.files &&
163
+ path == o.path &&
164
+ source == o.source &&
165
+ staged == o.staged &&
166
+ worktree == o.worktree
167
+ end
168
+
169
+ # @see the `==` method
170
+ # @param [Object] Object to be compared
171
+ def eql?(o)
172
+ self == o
173
+ end
174
+
175
+ # Calculates hash code according to all attributes.
176
+ # @return [Integer] Hash code
177
+ def hash
178
+ [files, path, source, staged, worktree].hash
179
+ end
180
+
181
+ # Builds the object from hash
182
+ # @param [Hash] attributes Model attributes in the form of hash
183
+ # @return [Object] Returns the model itself
184
+ def self.build_from_hash(attributes)
185
+ return nil unless attributes.is_a?(Hash)
186
+ attributes = attributes.transform_keys(&:to_sym)
187
+ transformed_hash = {}
188
+ openapi_types.each_pair do |key, type|
189
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = nil
191
+ elsif type =~ /\AArray<(.*)>/i
192
+ # check to ensure the input is an array given that the attribute
193
+ # is documented as an array but the input is not
194
+ if attributes[attribute_map[key]].is_a?(Array)
195
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
196
+ end
197
+ elsif !attributes[attribute_map[key]].nil?
198
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
199
+ end
200
+ end
201
+ new(transformed_hash)
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -0,0 +1,210 @@
1
+ =begin
2
+ #Daytona Toolbox API
3
+
4
+ #Daytona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Daytona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Daytona Cloud: `https://proxy.app.daytona.io/toolbox/{sandboxId}`.
5
+
6
+ The version of the OpenAPI document: v0.0.0-dev
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaToolboxApiClient
17
+ class GitSetConfigRequest < ApiModelBase
18
+ attr_accessor :key
19
+
20
+ # Path is the repository path, required when scope is \"local\".
21
+ attr_accessor :path
22
+
23
+ # Scope is one of global (default), local or system.
24
+ attr_accessor :scope
25
+
26
+ attr_accessor :value
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'key' => :'key',
32
+ :'path' => :'path',
33
+ :'scope' => :'scope',
34
+ :'value' => :'value'
35
+ }
36
+ end
37
+
38
+ # Returns attribute mapping this model knows about
39
+ def self.acceptable_attribute_map
40
+ attribute_map
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ acceptable_attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'key' => :'String',
52
+ :'path' => :'String',
53
+ :'scope' => :'String',
54
+ :'value' => :'String'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaToolboxApiClient::GitSetConfigRequest` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaToolboxApiClient::GitSetConfigRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'key')
81
+ self.key = attributes[:'key']
82
+ else
83
+ self.key = nil
84
+ end
85
+
86
+ if attributes.key?(:'path')
87
+ self.path = attributes[:'path']
88
+ end
89
+
90
+ if attributes.key?(:'scope')
91
+ self.scope = attributes[:'scope']
92
+ end
93
+
94
+ if attributes.key?(:'value')
95
+ self.value = attributes[:'value']
96
+ else
97
+ self.value = nil
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ if @key.nil?
107
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
108
+ end
109
+
110
+ if @value.nil?
111
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ return false if @key.nil?
122
+ return false if @value.nil?
123
+ true
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] key Value to be assigned
128
+ def key=(key)
129
+ if key.nil?
130
+ fail ArgumentError, 'key cannot be nil'
131
+ end
132
+
133
+ @key = key
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param [Object] value Value to be assigned
138
+ def value=(value)
139
+ if value.nil?
140
+ fail ArgumentError, 'value cannot be nil'
141
+ end
142
+
143
+ @value = value
144
+ end
145
+
146
+ # Checks equality by comparing each attribute.
147
+ # @param [Object] Object to be compared
148
+ def ==(o)
149
+ return true if self.equal?(o)
150
+ self.class == o.class &&
151
+ key == o.key &&
152
+ path == o.path &&
153
+ scope == o.scope &&
154
+ value == o.value
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [key, path, scope, value].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ attributes = attributes.transform_keys(&:to_sym)
175
+ transformed_hash = {}
176
+ openapi_types.each_pair do |key, type|
177
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = nil
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[attribute_map[key]].is_a?(Array)
183
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
+ end
185
+ elsif !attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
187
+ end
188
+ end
189
+ new(transformed_hash)
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ end
209
+
210
+ end
@@ -23,8 +23,14 @@ module DaytonaToolboxApiClient
23
23
 
24
24
  attr_accessor :current_branch
25
25
 
26
+ # Detached is true when HEAD is not on a branch (detached HEAD state).
27
+ attr_accessor :detached
28
+
26
29
  attr_accessor :file_status
27
30
 
31
+ # Upstream is the upstream tracking branch (e.g. \"origin/main\"), empty when unset.
32
+ attr_accessor :upstream
33
+
28
34
  # Attribute mapping from ruby-style variable name to JSON key.
29
35
  def self.attribute_map
30
36
  {
@@ -32,7 +38,9 @@ module DaytonaToolboxApiClient
32
38
  :'behind' => :'behind',
33
39
  :'branch_published' => :'branchPublished',
34
40
  :'current_branch' => :'currentBranch',
35
- :'file_status' => :'fileStatus'
41
+ :'detached' => :'detached',
42
+ :'file_status' => :'fileStatus',
43
+ :'upstream' => :'upstream'
36
44
  }
37
45
  end
38
46
 
@@ -53,7 +61,9 @@ module DaytonaToolboxApiClient
53
61
  :'behind' => :'Integer',
54
62
  :'branch_published' => :'Boolean',
55
63
  :'current_branch' => :'String',
56
- :'file_status' => :'Array<FileStatus>'
64
+ :'detached' => :'Boolean',
65
+ :'file_status' => :'Array<FileStatus>',
66
+ :'upstream' => :'String'
57
67
  }
58
68
  end
59
69
 
@@ -97,6 +107,10 @@ module DaytonaToolboxApiClient
97
107
  self.current_branch = nil
98
108
  end
99
109
 
110
+ if attributes.key?(:'detached')
111
+ self.detached = attributes[:'detached']
112
+ end
113
+
100
114
  if attributes.key?(:'file_status')
101
115
  if (value = attributes[:'file_status']).is_a?(Array)
102
116
  self.file_status = value
@@ -104,6 +118,10 @@ module DaytonaToolboxApiClient
104
118
  else
105
119
  self.file_status = nil
106
120
  end
121
+
122
+ if attributes.key?(:'upstream')
123
+ self.upstream = attributes[:'upstream']
124
+ end
107
125
  end
108
126
 
109
127
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -160,7 +178,9 @@ module DaytonaToolboxApiClient
160
178
  behind == o.behind &&
161
179
  branch_published == o.branch_published &&
162
180
  current_branch == o.current_branch &&
163
- file_status == o.file_status
181
+ detached == o.detached &&
182
+ file_status == o.file_status &&
183
+ upstream == o.upstream
164
184
  end
165
185
 
166
186
  # @see the `==` method
@@ -172,7 +192,7 @@ module DaytonaToolboxApiClient
172
192
  # Calculates hash code according to all attributes.
173
193
  # @return [Integer] Hash code
174
194
  def hash
175
- [ahead, behind, branch_published, current_branch, file_status].hash
195
+ [ahead, behind, branch_published, current_branch, detached, file_status, upstream].hash
176
196
  end
177
197
 
178
198
  # Builds the object from hash
@@ -17,10 +17,14 @@ module DaytonaToolboxApiClient
17
17
  class ListBranchResponse < ApiModelBase
18
18
  attr_accessor :branches
19
19
 
20
+ # Current is the name of the checked out branch (empty when HEAD is detached).
21
+ attr_accessor :current
22
+
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
23
- :'branches' => :'branches'
26
+ :'branches' => :'branches',
27
+ :'current' => :'current'
24
28
  }
25
29
  end
26
30
 
@@ -37,7 +41,8 @@ module DaytonaToolboxApiClient
37
41
  # Attribute type mapping.
38
42
  def self.openapi_types
39
43
  {
40
- :'branches' => :'Array<String>'
44
+ :'branches' => :'Array<String>',
45
+ :'current' => :'String'
41
46
  }
42
47
  end
43
48
 
@@ -70,6 +75,10 @@ module DaytonaToolboxApiClient
70
75
  else
71
76
  self.branches = nil
72
77
  end
78
+
79
+ if attributes.key?(:'current')
80
+ self.current = attributes[:'current']
81
+ end
73
82
  end
74
83
 
75
84
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -107,7 +116,8 @@ module DaytonaToolboxApiClient
107
116
  def ==(o)
108
117
  return true if self.equal?(o)
109
118
  self.class == o.class &&
110
- branches == o.branches
119
+ branches == o.branches &&
120
+ current == o.current
111
121
  end
112
122
 
113
123
  # @see the `==` method
@@ -119,7 +129,7 @@ module DaytonaToolboxApiClient
119
129
  # Calculates hash code according to all attributes.
120
130
  # @return [Integer] Hash code
121
131
  def hash
122
- [branches].hash
132
+ [branches, current].hash
123
133
  end
124
134
 
125
135
  # Builds the object from hash