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,190 @@
|
|
|
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 GitBranchRequest < ApiModelBase
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
attr_accessor :path
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'name' => :'name',
|
|
26
|
+
:'path' => :'path'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'name' => :'String',
|
|
44
|
+
:'path' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::GitBranchRequest` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::GitBranchRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'name')
|
|
71
|
+
self.name = attributes[:'name']
|
|
72
|
+
else
|
|
73
|
+
self.name = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'path')
|
|
77
|
+
self.path = attributes[:'path']
|
|
78
|
+
else
|
|
79
|
+
self.path = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @name.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @path.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @name.nil?
|
|
104
|
+
return false if @path.nil?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] name Value to be assigned
|
|
110
|
+
def name=(name)
|
|
111
|
+
if name.nil?
|
|
112
|
+
fail ArgumentError, 'name cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
@name = name
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] path Value to be assigned
|
|
120
|
+
def path=(path)
|
|
121
|
+
if path.nil?
|
|
122
|
+
fail ArgumentError, 'path cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@path = path
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
name == o.name &&
|
|
134
|
+
path == o.path
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[name, path].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
@@ -0,0 +1,190 @@
|
|
|
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 GitCheckoutRequest < ApiModelBase
|
|
18
|
+
attr_accessor :branch
|
|
19
|
+
|
|
20
|
+
attr_accessor :path
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'branch' => :'branch',
|
|
26
|
+
:'path' => :'path'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'branch' => :'String',
|
|
44
|
+
:'path' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::GitCheckoutRequest` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::GitCheckoutRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'branch')
|
|
71
|
+
self.branch = attributes[:'branch']
|
|
72
|
+
else
|
|
73
|
+
self.branch = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'path')
|
|
77
|
+
self.path = attributes[:'path']
|
|
78
|
+
else
|
|
79
|
+
self.path = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @branch.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "branch", branch cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @path.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @branch.nil?
|
|
104
|
+
return false if @path.nil?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] branch Value to be assigned
|
|
110
|
+
def branch=(branch)
|
|
111
|
+
if branch.nil?
|
|
112
|
+
fail ArgumentError, 'branch cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
@branch = branch
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] path Value to be assigned
|
|
120
|
+
def path=(path)
|
|
121
|
+
if path.nil?
|
|
122
|
+
fail ArgumentError, 'path cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@path = path
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
branch == o.branch &&
|
|
134
|
+
path == o.path
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[branch, path].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
@@ -0,0 +1,236 @@
|
|
|
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 GitCloneRequest < ApiModelBase
|
|
18
|
+
attr_accessor :branch
|
|
19
|
+
|
|
20
|
+
attr_accessor :commit_id
|
|
21
|
+
|
|
22
|
+
# Skip TLS certificate verification for this clone. Defaults to false (verify). Set to true ONLY for trusted internal Git servers with self-signed or private-CA certs; credentials, if supplied, will be transmitted over an unverified TLS connection and are exposed to any MITM on the route.
|
|
23
|
+
attr_accessor :insecure_skip_tls
|
|
24
|
+
|
|
25
|
+
attr_accessor :password
|
|
26
|
+
|
|
27
|
+
attr_accessor :path
|
|
28
|
+
|
|
29
|
+
attr_accessor :url
|
|
30
|
+
|
|
31
|
+
attr_accessor :username
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'branch' => :'branch',
|
|
37
|
+
:'commit_id' => :'commit_id',
|
|
38
|
+
:'insecure_skip_tls' => :'insecure_skip_tls',
|
|
39
|
+
:'password' => :'password',
|
|
40
|
+
:'path' => :'path',
|
|
41
|
+
:'url' => :'url',
|
|
42
|
+
:'username' => :'username'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns attribute mapping this model knows about
|
|
47
|
+
def self.acceptable_attribute_map
|
|
48
|
+
attribute_map
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
|
52
|
+
def self.acceptable_attributes
|
|
53
|
+
acceptable_attribute_map.values
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
def self.openapi_types
|
|
58
|
+
{
|
|
59
|
+
:'branch' => :'String',
|
|
60
|
+
:'commit_id' => :'String',
|
|
61
|
+
:'insecure_skip_tls' => :'Boolean',
|
|
62
|
+
:'password' => :'String',
|
|
63
|
+
:'path' => :'String',
|
|
64
|
+
:'url' => :'String',
|
|
65
|
+
:'username' => :'String'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# List of attributes with nullable: true
|
|
70
|
+
def self.openapi_nullable
|
|
71
|
+
Set.new([
|
|
72
|
+
])
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Initializes the object
|
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
77
|
+
def initialize(attributes = {})
|
|
78
|
+
if (!attributes.is_a?(Hash))
|
|
79
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `NightonaToolboxApiClient::GitCloneRequest` initialize method"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
83
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `NightonaToolboxApiClient::GitCloneRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'branch')
|
|
92
|
+
self.branch = attributes[:'branch']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'commit_id')
|
|
96
|
+
self.commit_id = attributes[:'commit_id']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'insecure_skip_tls')
|
|
100
|
+
self.insecure_skip_tls = attributes[:'insecure_skip_tls']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'password')
|
|
104
|
+
self.password = attributes[:'password']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'path')
|
|
108
|
+
self.path = attributes[:'path']
|
|
109
|
+
else
|
|
110
|
+
self.path = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'url')
|
|
114
|
+
self.url = attributes[:'url']
|
|
115
|
+
else
|
|
116
|
+
self.url = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'username')
|
|
120
|
+
self.username = attributes[:'username']
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
125
|
+
# @return Array for valid properties with the reasons
|
|
126
|
+
def list_invalid_properties
|
|
127
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
128
|
+
invalid_properties = Array.new
|
|
129
|
+
if @path.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if @url.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
invalid_properties
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Check to see if the all the properties in the model are valid
|
|
141
|
+
# @return true if the model is valid
|
|
142
|
+
def valid?
|
|
143
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
144
|
+
return false if @path.nil?
|
|
145
|
+
return false if @url.nil?
|
|
146
|
+
true
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method with validation
|
|
150
|
+
# @param [Object] path Value to be assigned
|
|
151
|
+
def path=(path)
|
|
152
|
+
if path.nil?
|
|
153
|
+
fail ArgumentError, 'path cannot be nil'
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
@path = path
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Custom attribute writer method with validation
|
|
160
|
+
# @param [Object] url Value to be assigned
|
|
161
|
+
def url=(url)
|
|
162
|
+
if url.nil?
|
|
163
|
+
fail ArgumentError, 'url cannot be nil'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@url = url
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Checks equality by comparing each attribute.
|
|
170
|
+
# @param [Object] Object to be compared
|
|
171
|
+
def ==(o)
|
|
172
|
+
return true if self.equal?(o)
|
|
173
|
+
self.class == o.class &&
|
|
174
|
+
branch == o.branch &&
|
|
175
|
+
commit_id == o.commit_id &&
|
|
176
|
+
insecure_skip_tls == o.insecure_skip_tls &&
|
|
177
|
+
password == o.password &&
|
|
178
|
+
path == o.path &&
|
|
179
|
+
url == o.url &&
|
|
180
|
+
username == o.username
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# @see the `==` method
|
|
184
|
+
# @param [Object] Object to be compared
|
|
185
|
+
def eql?(o)
|
|
186
|
+
self == o
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Calculates hash code according to all attributes.
|
|
190
|
+
# @return [Integer] Hash code
|
|
191
|
+
def hash
|
|
192
|
+
[branch, commit_id, insecure_skip_tls, password, path, url, username].hash
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Builds the object from hash
|
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
197
|
+
# @return [Object] Returns the model itself
|
|
198
|
+
def self.build_from_hash(attributes)
|
|
199
|
+
return nil unless attributes.is_a?(Hash)
|
|
200
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
201
|
+
transformed_hash = {}
|
|
202
|
+
openapi_types.each_pair do |key, type|
|
|
203
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
204
|
+
transformed_hash["#{key}"] = nil
|
|
205
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
206
|
+
# check to ensure the input is an array given that the attribute
|
|
207
|
+
# is documented as an array but the input is not
|
|
208
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
209
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
210
|
+
end
|
|
211
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
212
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
new(transformed_hash)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Returns the object in the form of hash
|
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
|
220
|
+
def to_hash
|
|
221
|
+
hash = {}
|
|
222
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
223
|
+
value = self.send(attr)
|
|
224
|
+
if value.nil?
|
|
225
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
226
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
hash[param] = _to_hash(value)
|
|
230
|
+
end
|
|
231
|
+
hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
end
|