nightona_toolbox_api_client 0.191.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.
- checksums.yaml +7 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +113 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +13 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Rakefile +10 -0
- data/fix-gemspec.sh +13 -0
- data/lib/nightona_toolbox_api_client/api/computer_use_api.rb +2179 -0
- data/lib/nightona_toolbox_api_client/api/file_system_api.rb +893 -0
- data/lib/nightona_toolbox_api_client/api/git_api.rb +744 -0
- data/lib/nightona_toolbox_api_client/api/info_api.rb +193 -0
- data/lib/nightona_toolbox_api_client/api/interpreter_api.rb +267 -0
- data/lib/nightona_toolbox_api_client/api/lsp_api.rb +510 -0
- data/lib/nightona_toolbox_api_client/api/port_api.rb +142 -0
- data/lib/nightona_toolbox_api_client/api/process_api.rb +1201 -0
- data/lib/nightona_toolbox_api_client/api/server_api.rb +85 -0
- data/lib/nightona_toolbox_api_client/api_client.rb +397 -0
- data/lib/nightona_toolbox_api_client/api_error.rb +58 -0
- data/lib/nightona_toolbox_api_client/api_model_base.rb +88 -0
- data/lib/nightona_toolbox_api_client/configuration.rb +308 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_bounds.rb +174 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_invoke_request.rb +173 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_node_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_nodes_response.rb +158 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_set_value_request.rb +173 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_tree_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/chart.rb +256 -0
- data/lib/nightona_toolbox_api_client/models/chart_element.rb +295 -0
- data/lib/nightona_toolbox_api_client/models/code_run_artifacts.rb +149 -0
- data/lib/nightona_toolbox_api_client/models/code_run_request.rb +222 -0
- data/lib/nightona_toolbox_api_client/models/code_run_response.rb +165 -0
- data/lib/nightona_toolbox_api_client/models/command.rb +199 -0
- data/lib/nightona_toolbox_api_client/models/completion_context.rb +173 -0
- data/lib/nightona_toolbox_api_client/models/completion_item.rb +218 -0
- data/lib/nightona_toolbox_api_client/models/completion_list.rb +192 -0
- data/lib/nightona_toolbox_api_client/models/computer_use_accessibility_node.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/computer_use_start_response.rb +158 -0
- data/lib/nightona_toolbox_api_client/models/computer_use_status_response.rb +147 -0
- data/lib/nightona_toolbox_api_client/models/computer_use_stop_response.rb +158 -0
- data/lib/nightona_toolbox_api_client/models/create_context_request.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/create_session_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/display_info.rb +192 -0
- data/lib/nightona_toolbox_api_client/models/display_info_response.rb +149 -0
- data/lib/nightona_toolbox_api_client/models/execute_request.rb +196 -0
- data/lib/nightona_toolbox_api_client/models/execute_response.rb +173 -0
- data/lib/nightona_toolbox_api_client/models/file_info.rb +373 -0
- data/lib/nightona_toolbox_api_client/models/file_status.rb +264 -0
- data/lib/nightona_toolbox_api_client/models/files_download_request.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/find_accessibility_nodes_request.rb +204 -0
- data/lib/nightona_toolbox_api_client/models/git_add_request.rb +193 -0
- data/lib/nightona_toolbox_api_client/models/git_branch_request.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/git_checkout_request.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/git_clone_request.rb +236 -0
- data/lib/nightona_toolbox_api_client/models/git_commit_info.rb +268 -0
- data/lib/nightona_toolbox_api_client/models/git_commit_request.rb +251 -0
- data/lib/nightona_toolbox_api_client/models/git_commit_response.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/git_delete_branch_request.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/git_repo_request.rb +182 -0
- data/lib/nightona_toolbox_api_client/models/git_status.rb +219 -0
- data/lib/nightona_toolbox_api_client/models/initialize_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/interpreter_context.rb +268 -0
- data/lib/nightona_toolbox_api_client/models/is_port_in_use_response.rb +147 -0
- data/lib/nightona_toolbox_api_client/models/keyboard_hotkey_request.rb +148 -0
- data/lib/nightona_toolbox_api_client/models/keyboard_press_request.rb +159 -0
- data/lib/nightona_toolbox_api_client/models/keyboard_type_request.rb +157 -0
- data/lib/nightona_toolbox_api_client/models/list_branch_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/list_contexts_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/list_recordings_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/lsp_completion_params.rb +251 -0
- data/lib/nightona_toolbox_api_client/models/lsp_document_request.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/lsp_location.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/lsp_position.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/lsp_range.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/lsp_server_request.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/lsp_symbol.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/match.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/mouse_click_request.rb +175 -0
- data/lib/nightona_toolbox_api_client/models/mouse_click_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/mouse_drag_request.rb +183 -0
- data/lib/nightona_toolbox_api_client/models/mouse_drag_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/mouse_move_request.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/mouse_position_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/mouse_scroll_request.rb +194 -0
- data/lib/nightona_toolbox_api_client/models/port_list.rb +149 -0
- data/lib/nightona_toolbox_api_client/models/position.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/process_errors_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/process_logs_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/process_restart_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/process_status.rb +174 -0
- data/lib/nightona_toolbox_api_client/models/process_status_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/pty_create_request.rb +195 -0
- data/lib/nightona_toolbox_api_client/models/pty_create_response.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/pty_list_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/pty_resize_request.rb +226 -0
- data/lib/nightona_toolbox_api_client/models/pty_session_info.rb +349 -0
- data/lib/nightona_toolbox_api_client/models/recording.rb +295 -0
- data/lib/nightona_toolbox_api_client/models/replace_request.rb +218 -0
- data/lib/nightona_toolbox_api_client/models/replace_result.rb +165 -0
- data/lib/nightona_toolbox_api_client/models/screenshot_response.rb +165 -0
- data/lib/nightona_toolbox_api_client/models/scroll_response.rb +147 -0
- data/lib/nightona_toolbox_api_client/models/search_files_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/session.rb +192 -0
- data/lib/nightona_toolbox_api_client/models/session_command_logs_response.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/session_execute_request.rb +191 -0
- data/lib/nightona_toolbox_api_client/models/session_execute_response.rb +200 -0
- data/lib/nightona_toolbox_api_client/models/session_send_input_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/start_recording_request.rb +147 -0
- data/lib/nightona_toolbox_api_client/models/status.rb +47 -0
- data/lib/nightona_toolbox_api_client/models/stop_recording_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/user_home_dir_response.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/window_info.rb +201 -0
- data/lib/nightona_toolbox_api_client/models/windows_response.rb +149 -0
- data/lib/nightona_toolbox_api_client/models/work_dir_response.rb +164 -0
- data/lib/nightona_toolbox_api_client/version.rb +15 -0
- data/lib/nightona_toolbox_api_client.rb +142 -0
- data/nightona_toolbox_api_client.gemspec +39 -0
- data/project.json +71 -0
- metadata +200 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nightona Toolbox API
|
|
3
|
+
|
|
4
|
+
#Nightona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Nightona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Nightona 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 NightonaToolboxApiClient
|
|
17
|
+
class FileInfo < ApiModelBase
|
|
18
|
+
attr_accessor :group
|
|
19
|
+
|
|
20
|
+
attr_accessor :is_dir
|
|
21
|
+
|
|
22
|
+
# Deprecated: ModTime uses Go's time.String() layout which is not a standard format. Use ModifiedAt instead, which is serialized as ISO 8601 / RFC 3339.
|
|
23
|
+
attr_accessor :mod_time
|
|
24
|
+
|
|
25
|
+
attr_accessor :mode
|
|
26
|
+
|
|
27
|
+
attr_accessor :modified_at
|
|
28
|
+
|
|
29
|
+
attr_accessor :name
|
|
30
|
+
|
|
31
|
+
attr_accessor :owner
|
|
32
|
+
|
|
33
|
+
attr_accessor :permissions
|
|
34
|
+
|
|
35
|
+
attr_accessor :size
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'group' => :'group',
|
|
41
|
+
:'is_dir' => :'isDir',
|
|
42
|
+
:'mod_time' => :'modTime',
|
|
43
|
+
:'mode' => :'mode',
|
|
44
|
+
:'modified_at' => :'modifiedAt',
|
|
45
|
+
:'name' => :'name',
|
|
46
|
+
:'owner' => :'owner',
|
|
47
|
+
:'permissions' => :'permissions',
|
|
48
|
+
:'size' => :'size'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
|
58
|
+
def self.acceptable_attributes
|
|
59
|
+
acceptable_attribute_map.values
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute type mapping.
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'group' => :'String',
|
|
66
|
+
:'is_dir' => :'Boolean',
|
|
67
|
+
:'mod_time' => :'String',
|
|
68
|
+
:'mode' => :'String',
|
|
69
|
+
:'modified_at' => :'String',
|
|
70
|
+
:'name' => :'String',
|
|
71
|
+
:'owner' => :'String',
|
|
72
|
+
:'permissions' => :'String',
|
|
73
|
+
:'size' => :'Integer'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# List of attributes with nullable: true
|
|
78
|
+
def self.openapi_nullable
|
|
79
|
+
Set.new([
|
|
80
|
+
])
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Initializes the object
|
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
85
|
+
def initialize(attributes = {})
|
|
86
|
+
if (!attributes.is_a?(Hash))
|
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::FileInfo` initialize method"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
93
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::FileInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
95
|
+
end
|
|
96
|
+
h[k.to_sym] = v
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'group')
|
|
100
|
+
self.group = attributes[:'group']
|
|
101
|
+
else
|
|
102
|
+
self.group = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'is_dir')
|
|
106
|
+
self.is_dir = attributes[:'is_dir']
|
|
107
|
+
else
|
|
108
|
+
self.is_dir = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'mod_time')
|
|
112
|
+
self.mod_time = attributes[:'mod_time']
|
|
113
|
+
else
|
|
114
|
+
self.mod_time = nil
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'mode')
|
|
118
|
+
self.mode = attributes[:'mode']
|
|
119
|
+
else
|
|
120
|
+
self.mode = nil
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'modified_at')
|
|
124
|
+
self.modified_at = attributes[:'modified_at']
|
|
125
|
+
else
|
|
126
|
+
self.modified_at = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'name')
|
|
130
|
+
self.name = attributes[:'name']
|
|
131
|
+
else
|
|
132
|
+
self.name = nil
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'owner')
|
|
136
|
+
self.owner = attributes[:'owner']
|
|
137
|
+
else
|
|
138
|
+
self.owner = nil
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'permissions')
|
|
142
|
+
self.permissions = attributes[:'permissions']
|
|
143
|
+
else
|
|
144
|
+
self.permissions = nil
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'size')
|
|
148
|
+
self.size = attributes[:'size']
|
|
149
|
+
else
|
|
150
|
+
self.size = nil
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
155
|
+
# @return Array for valid properties with the reasons
|
|
156
|
+
def list_invalid_properties
|
|
157
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
158
|
+
invalid_properties = Array.new
|
|
159
|
+
if @group.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "group", group cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if @is_dir.nil?
|
|
164
|
+
invalid_properties.push('invalid value for "is_dir", is_dir cannot be nil.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if @mod_time.nil?
|
|
168
|
+
invalid_properties.push('invalid value for "mod_time", mod_time cannot be nil.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if @mode.nil?
|
|
172
|
+
invalid_properties.push('invalid value for "mode", mode cannot be nil.')
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if @modified_at.nil?
|
|
176
|
+
invalid_properties.push('invalid value for "modified_at", modified_at cannot be nil.')
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if @name.nil?
|
|
180
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if @owner.nil?
|
|
184
|
+
invalid_properties.push('invalid value for "owner", owner cannot be nil.')
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if @permissions.nil?
|
|
188
|
+
invalid_properties.push('invalid value for "permissions", permissions cannot be nil.')
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if @size.nil?
|
|
192
|
+
invalid_properties.push('invalid value for "size", size cannot be nil.')
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
invalid_properties
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Check to see if the all the properties in the model are valid
|
|
199
|
+
# @return true if the model is valid
|
|
200
|
+
def valid?
|
|
201
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
202
|
+
return false if @group.nil?
|
|
203
|
+
return false if @is_dir.nil?
|
|
204
|
+
return false if @mod_time.nil?
|
|
205
|
+
return false if @mode.nil?
|
|
206
|
+
return false if @modified_at.nil?
|
|
207
|
+
return false if @name.nil?
|
|
208
|
+
return false if @owner.nil?
|
|
209
|
+
return false if @permissions.nil?
|
|
210
|
+
return false if @size.nil?
|
|
211
|
+
true
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Custom attribute writer method with validation
|
|
215
|
+
# @param [Object] group Value to be assigned
|
|
216
|
+
def group=(group)
|
|
217
|
+
if group.nil?
|
|
218
|
+
fail ArgumentError, 'group cannot be nil'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
@group = group
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Custom attribute writer method with validation
|
|
225
|
+
# @param [Object] is_dir Value to be assigned
|
|
226
|
+
def is_dir=(is_dir)
|
|
227
|
+
if is_dir.nil?
|
|
228
|
+
fail ArgumentError, 'is_dir cannot be nil'
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
@is_dir = is_dir
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Custom attribute writer method with validation
|
|
235
|
+
# @param [Object] mod_time Value to be assigned
|
|
236
|
+
def mod_time=(mod_time)
|
|
237
|
+
if mod_time.nil?
|
|
238
|
+
fail ArgumentError, 'mod_time cannot be nil'
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
@mod_time = mod_time
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Custom attribute writer method with validation
|
|
245
|
+
# @param [Object] mode Value to be assigned
|
|
246
|
+
def mode=(mode)
|
|
247
|
+
if mode.nil?
|
|
248
|
+
fail ArgumentError, 'mode cannot be nil'
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
@mode = mode
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Custom attribute writer method with validation
|
|
255
|
+
# @param [Object] modified_at Value to be assigned
|
|
256
|
+
def modified_at=(modified_at)
|
|
257
|
+
if modified_at.nil?
|
|
258
|
+
fail ArgumentError, 'modified_at cannot be nil'
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
@modified_at = modified_at
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Custom attribute writer method with validation
|
|
265
|
+
# @param [Object] name Value to be assigned
|
|
266
|
+
def name=(name)
|
|
267
|
+
if name.nil?
|
|
268
|
+
fail ArgumentError, 'name cannot be nil'
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
@name = name
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Custom attribute writer method with validation
|
|
275
|
+
# @param [Object] owner Value to be assigned
|
|
276
|
+
def owner=(owner)
|
|
277
|
+
if owner.nil?
|
|
278
|
+
fail ArgumentError, 'owner cannot be nil'
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
@owner = owner
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Custom attribute writer method with validation
|
|
285
|
+
# @param [Object] permissions Value to be assigned
|
|
286
|
+
def permissions=(permissions)
|
|
287
|
+
if permissions.nil?
|
|
288
|
+
fail ArgumentError, 'permissions cannot be nil'
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
@permissions = permissions
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Custom attribute writer method with validation
|
|
295
|
+
# @param [Object] size Value to be assigned
|
|
296
|
+
def size=(size)
|
|
297
|
+
if size.nil?
|
|
298
|
+
fail ArgumentError, 'size cannot be nil'
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
@size = size
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Checks equality by comparing each attribute.
|
|
305
|
+
# @param [Object] Object to be compared
|
|
306
|
+
def ==(o)
|
|
307
|
+
return true if self.equal?(o)
|
|
308
|
+
self.class == o.class &&
|
|
309
|
+
group == o.group &&
|
|
310
|
+
is_dir == o.is_dir &&
|
|
311
|
+
mod_time == o.mod_time &&
|
|
312
|
+
mode == o.mode &&
|
|
313
|
+
modified_at == o.modified_at &&
|
|
314
|
+
name == o.name &&
|
|
315
|
+
owner == o.owner &&
|
|
316
|
+
permissions == o.permissions &&
|
|
317
|
+
size == o.size
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# @see the `==` method
|
|
321
|
+
# @param [Object] Object to be compared
|
|
322
|
+
def eql?(o)
|
|
323
|
+
self == o
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Calculates hash code according to all attributes.
|
|
327
|
+
# @return [Integer] Hash code
|
|
328
|
+
def hash
|
|
329
|
+
[group, is_dir, mod_time, mode, modified_at, name, owner, permissions, size].hash
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Builds the object from hash
|
|
333
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
334
|
+
# @return [Object] Returns the model itself
|
|
335
|
+
def self.build_from_hash(attributes)
|
|
336
|
+
return nil unless attributes.is_a?(Hash)
|
|
337
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
338
|
+
transformed_hash = {}
|
|
339
|
+
openapi_types.each_pair do |key, type|
|
|
340
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
341
|
+
transformed_hash["#{key}"] = nil
|
|
342
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
343
|
+
# check to ensure the input is an array given that the attribute
|
|
344
|
+
# is documented as an array but the input is not
|
|
345
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
346
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
347
|
+
end
|
|
348
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
349
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
new(transformed_hash)
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Returns the object in the form of hash
|
|
356
|
+
# @return [Hash] Returns the object in the form of hash
|
|
357
|
+
def to_hash
|
|
358
|
+
hash = {}
|
|
359
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
360
|
+
value = self.send(attr)
|
|
361
|
+
if value.nil?
|
|
362
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
363
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
hash[param] = _to_hash(value)
|
|
367
|
+
end
|
|
368
|
+
hash
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
end
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nightona Toolbox API
|
|
3
|
+
|
|
4
|
+
#Nightona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Nightona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Nightona 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 NightonaToolboxApiClient
|
|
17
|
+
class FileStatus < ApiModelBase
|
|
18
|
+
attr_accessor :extra
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
attr_accessor :staging
|
|
23
|
+
|
|
24
|
+
attr_accessor :worktree
|
|
25
|
+
|
|
26
|
+
class EnumAttributeValidator
|
|
27
|
+
attr_reader :datatype
|
|
28
|
+
attr_reader :allowable_values
|
|
29
|
+
|
|
30
|
+
def initialize(datatype, allowable_values)
|
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
|
32
|
+
case datatype.to_s
|
|
33
|
+
when /Integer/i
|
|
34
|
+
value.to_i
|
|
35
|
+
when /Float/i
|
|
36
|
+
value.to_f
|
|
37
|
+
else
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?(value)
|
|
44
|
+
!value || allowable_values.include?(value)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:'extra' => :'extra',
|
|
52
|
+
:'name' => :'name',
|
|
53
|
+
:'staging' => :'staging',
|
|
54
|
+
:'worktree' => :'worktree'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns all the JSON keys this model knows about
|
|
64
|
+
def self.acceptable_attributes
|
|
65
|
+
acceptable_attribute_map.values
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute type mapping.
|
|
69
|
+
def self.openapi_types
|
|
70
|
+
{
|
|
71
|
+
:'extra' => :'String',
|
|
72
|
+
:'name' => :'String',
|
|
73
|
+
:'staging' => :'Status',
|
|
74
|
+
:'worktree' => :'Status'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# List of attributes with nullable: true
|
|
79
|
+
def self.openapi_nullable
|
|
80
|
+
Set.new([
|
|
81
|
+
])
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Initializes the object
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
def initialize(attributes = {})
|
|
87
|
+
if (!attributes.is_a?(Hash))
|
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::FileStatus` initialize method"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
92
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::FileStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
96
|
+
end
|
|
97
|
+
h[k.to_sym] = v
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'extra')
|
|
101
|
+
self.extra = attributes[:'extra']
|
|
102
|
+
else
|
|
103
|
+
self.extra = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'name')
|
|
107
|
+
self.name = attributes[:'name']
|
|
108
|
+
else
|
|
109
|
+
self.name = nil
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'staging')
|
|
113
|
+
self.staging = attributes[:'staging']
|
|
114
|
+
else
|
|
115
|
+
self.staging = nil
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'worktree')
|
|
119
|
+
self.worktree = attributes[:'worktree']
|
|
120
|
+
else
|
|
121
|
+
self.worktree = nil
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
126
|
+
# @return Array for valid properties with the reasons
|
|
127
|
+
def list_invalid_properties
|
|
128
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
129
|
+
invalid_properties = Array.new
|
|
130
|
+
if @extra.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "extra", extra cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @name.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @staging.nil?
|
|
139
|
+
invalid_properties.push('invalid value for "staging", staging cannot be nil.')
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if @worktree.nil?
|
|
143
|
+
invalid_properties.push('invalid value for "worktree", worktree cannot be nil.')
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
invalid_properties
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Check to see if the all the properties in the model are valid
|
|
150
|
+
# @return true if the model is valid
|
|
151
|
+
def valid?
|
|
152
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
153
|
+
return false if @extra.nil?
|
|
154
|
+
return false if @name.nil?
|
|
155
|
+
return false if @staging.nil?
|
|
156
|
+
return false if @worktree.nil?
|
|
157
|
+
true
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Custom attribute writer method with validation
|
|
161
|
+
# @param [Object] extra Value to be assigned
|
|
162
|
+
def extra=(extra)
|
|
163
|
+
if extra.nil?
|
|
164
|
+
fail ArgumentError, 'extra cannot be nil'
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@extra = extra
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Custom attribute writer method with validation
|
|
171
|
+
# @param [Object] name Value to be assigned
|
|
172
|
+
def name=(name)
|
|
173
|
+
if name.nil?
|
|
174
|
+
fail ArgumentError, 'name cannot be nil'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@name = name
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Custom attribute writer method with validation
|
|
181
|
+
# @param [Object] staging Value to be assigned
|
|
182
|
+
def staging=(staging)
|
|
183
|
+
if staging.nil?
|
|
184
|
+
fail ArgumentError, 'staging cannot be nil'
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
@staging = staging
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Custom attribute writer method with validation
|
|
191
|
+
# @param [Object] worktree Value to be assigned
|
|
192
|
+
def worktree=(worktree)
|
|
193
|
+
if worktree.nil?
|
|
194
|
+
fail ArgumentError, 'worktree cannot be nil'
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
@worktree = worktree
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Checks equality by comparing each attribute.
|
|
201
|
+
# @param [Object] Object to be compared
|
|
202
|
+
def ==(o)
|
|
203
|
+
return true if self.equal?(o)
|
|
204
|
+
self.class == o.class &&
|
|
205
|
+
extra == o.extra &&
|
|
206
|
+
name == o.name &&
|
|
207
|
+
staging == o.staging &&
|
|
208
|
+
worktree == o.worktree
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# @see the `==` method
|
|
212
|
+
# @param [Object] Object to be compared
|
|
213
|
+
def eql?(o)
|
|
214
|
+
self == o
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Calculates hash code according to all attributes.
|
|
218
|
+
# @return [Integer] Hash code
|
|
219
|
+
def hash
|
|
220
|
+
[extra, name, staging, worktree].hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Builds the object from hash
|
|
224
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
225
|
+
# @return [Object] Returns the model itself
|
|
226
|
+
def self.build_from_hash(attributes)
|
|
227
|
+
return nil unless attributes.is_a?(Hash)
|
|
228
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
229
|
+
transformed_hash = {}
|
|
230
|
+
openapi_types.each_pair do |key, type|
|
|
231
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
232
|
+
transformed_hash["#{key}"] = nil
|
|
233
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
234
|
+
# check to ensure the input is an array given that the attribute
|
|
235
|
+
# is documented as an array but the input is not
|
|
236
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
237
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
238
|
+
end
|
|
239
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
240
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
new(transformed_hash)
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Returns the object in the form of hash
|
|
247
|
+
# @return [Hash] Returns the object in the form of hash
|
|
248
|
+
def to_hash
|
|
249
|
+
hash = {}
|
|
250
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
251
|
+
value = self.send(attr)
|
|
252
|
+
if value.nil?
|
|
253
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
254
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
hash[param] = _to_hash(value)
|
|
258
|
+
end
|
|
259
|
+
hash
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
end
|