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.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +14 -1
- data/lib/daytona_toolbox_api_client/api/file_system_api.rb +5 -2
- data/lib/daytona_toolbox_api_client/api/git_api.rb +600 -4
- data/lib/daytona_toolbox_api_client/api/system_api.rb +79 -0
- data/lib/daytona_toolbox_api_client/models/file_info.rb +11 -1
- data/lib/daytona_toolbox_api_client/models/git_add_remote_request.rb +236 -0
- data/lib/daytona_toolbox_api_client/models/git_authenticate_request.rb +210 -0
- data/lib/daytona_toolbox_api_client/models/git_clone_request.rb +11 -1
- data/lib/daytona_toolbox_api_client/models/git_config_response.rb +148 -0
- data/lib/daytona_toolbox_api_client/models/git_configure_user_request.rb +210 -0
- data/lib/daytona_toolbox_api_client/models/git_init_request.rb +184 -0
- data/lib/daytona_toolbox_api_client/models/{git_repo_request.rb → git_pull_request.rb} +24 -4
- data/lib/daytona_toolbox_api_client/models/git_push_request.rb +212 -0
- data/lib/daytona_toolbox_api_client/models/git_remote.rb +190 -0
- data/lib/daytona_toolbox_api_client/models/git_reset_request.rb +196 -0
- data/lib/daytona_toolbox_api_client/models/git_restore_request.rb +222 -0
- data/lib/daytona_toolbox_api_client/models/git_set_config_request.rb +210 -0
- data/lib/daytona_toolbox_api_client/models/git_status.rb +24 -4
- data/lib/daytona_toolbox_api_client/models/list_branch_response.rb +14 -4
- data/lib/daytona_toolbox_api_client/models/list_remotes_response.rb +166 -0
- data/lib/daytona_toolbox_api_client/models/system_metrics.rb +228 -0
- data/lib/daytona_toolbox_api_client/version.rb +1 -1
- data/lib/daytona_toolbox_api_client.rb +14 -1
- metadata +15 -2
|
@@ -0,0 +1,79 @@
|
|
|
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 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaToolboxApiClient
|
|
16
|
+
class SystemApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get sandbox resource metrics
|
|
23
|
+
# Latest CPU/memory/disk usage snapshot for the sandbox. cpuUsedPct is the average CPU usage as a percentage of the CPU limit over the last sample window (0 until the first sample completes). Byte fields are in bytes.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [SystemMetrics]
|
|
26
|
+
def get_system_metrics(opts = {})
|
|
27
|
+
data, _status_code, _headers = get_system_metrics_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get sandbox resource metrics
|
|
32
|
+
# Latest CPU/memory/disk usage snapshot for the sandbox. cpuUsedPct is the average CPU usage as a percentage of the CPU limit over the last sample window (0 until the first sample completes). Byte fields are in bytes.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(SystemMetrics, Integer, Hash)>] SystemMetrics data, response status code and response headers
|
|
35
|
+
def get_system_metrics_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: SystemApi.get_system_metrics ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/system/metrics'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'SystemMetrics'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || []
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"SystemApi.get_system_metrics",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: SystemApi#get_system_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -30,6 +30,9 @@ module DaytonaToolboxApiClient
|
|
|
30
30
|
|
|
31
31
|
attr_accessor :owner
|
|
32
32
|
|
|
33
|
+
# Full path of the entry
|
|
34
|
+
attr_accessor :path
|
|
35
|
+
|
|
33
36
|
attr_accessor :permissions
|
|
34
37
|
|
|
35
38
|
attr_accessor :size
|
|
@@ -44,6 +47,7 @@ module DaytonaToolboxApiClient
|
|
|
44
47
|
:'modified_at' => :'modifiedAt',
|
|
45
48
|
:'name' => :'name',
|
|
46
49
|
:'owner' => :'owner',
|
|
50
|
+
:'path' => :'path',
|
|
47
51
|
:'permissions' => :'permissions',
|
|
48
52
|
:'size' => :'size'
|
|
49
53
|
}
|
|
@@ -69,6 +73,7 @@ module DaytonaToolboxApiClient
|
|
|
69
73
|
:'modified_at' => :'String',
|
|
70
74
|
:'name' => :'String',
|
|
71
75
|
:'owner' => :'String',
|
|
76
|
+
:'path' => :'String',
|
|
72
77
|
:'permissions' => :'String',
|
|
73
78
|
:'size' => :'Integer'
|
|
74
79
|
}
|
|
@@ -138,6 +143,10 @@ module DaytonaToolboxApiClient
|
|
|
138
143
|
self.owner = nil
|
|
139
144
|
end
|
|
140
145
|
|
|
146
|
+
if attributes.key?(:'path')
|
|
147
|
+
self.path = attributes[:'path']
|
|
148
|
+
end
|
|
149
|
+
|
|
141
150
|
if attributes.key?(:'permissions')
|
|
142
151
|
self.permissions = attributes[:'permissions']
|
|
143
152
|
else
|
|
@@ -313,6 +322,7 @@ module DaytonaToolboxApiClient
|
|
|
313
322
|
modified_at == o.modified_at &&
|
|
314
323
|
name == o.name &&
|
|
315
324
|
owner == o.owner &&
|
|
325
|
+
path == o.path &&
|
|
316
326
|
permissions == o.permissions &&
|
|
317
327
|
size == o.size
|
|
318
328
|
end
|
|
@@ -326,7 +336,7 @@ module DaytonaToolboxApiClient
|
|
|
326
336
|
# Calculates hash code according to all attributes.
|
|
327
337
|
# @return [Integer] Hash code
|
|
328
338
|
def hash
|
|
329
|
-
[group, is_dir, mod_time, mode, modified_at, name, owner, permissions, size].hash
|
|
339
|
+
[group, is_dir, mod_time, mode, modified_at, name, owner, path, permissions, size].hash
|
|
330
340
|
end
|
|
331
341
|
|
|
332
342
|
# Builds the object from hash
|
|
@@ -0,0 +1,236 @@
|
|
|
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 GitAddRemoteRequest < ApiModelBase
|
|
18
|
+
# Fetch fetches from the remote immediately after adding it.
|
|
19
|
+
attr_accessor :fetch
|
|
20
|
+
|
|
21
|
+
attr_accessor :name
|
|
22
|
+
|
|
23
|
+
# Overwrite replaces an existing remote with the same name.
|
|
24
|
+
attr_accessor :overwrite
|
|
25
|
+
|
|
26
|
+
attr_accessor :path
|
|
27
|
+
|
|
28
|
+
attr_accessor :url
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'fetch' => :'fetch',
|
|
34
|
+
:'name' => :'name',
|
|
35
|
+
:'overwrite' => :'overwrite',
|
|
36
|
+
:'path' => :'path',
|
|
37
|
+
:'url' => :'url'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'fetch' => :'Boolean',
|
|
55
|
+
:'name' => :'String',
|
|
56
|
+
:'overwrite' => :'Boolean',
|
|
57
|
+
:'path' => :'String',
|
|
58
|
+
:'url' => :'String'
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# List of attributes with nullable: true
|
|
63
|
+
def self.openapi_nullable
|
|
64
|
+
Set.new([
|
|
65
|
+
])
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Initializes the object
|
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
if (!attributes.is_a?(Hash))
|
|
72
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaToolboxApiClient::GitAddRemoteRequest` initialize method"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
77
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
78
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaToolboxApiClient::GitAddRemoteRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
80
|
+
end
|
|
81
|
+
h[k.to_sym] = v
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'fetch')
|
|
85
|
+
self.fetch = attributes[:'fetch']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'name')
|
|
89
|
+
self.name = attributes[:'name']
|
|
90
|
+
else
|
|
91
|
+
self.name = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'overwrite')
|
|
95
|
+
self.overwrite = attributes[:'overwrite']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'path')
|
|
99
|
+
self.path = attributes[:'path']
|
|
100
|
+
else
|
|
101
|
+
self.path = nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'url')
|
|
105
|
+
self.url = attributes[:'url']
|
|
106
|
+
else
|
|
107
|
+
self.url = nil
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
if @name.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @path.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "path", path cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @url.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
invalid_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Check to see if the all the properties in the model are valid
|
|
132
|
+
# @return true if the model is valid
|
|
133
|
+
def valid?
|
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
|
+
return false if @name.nil?
|
|
136
|
+
return false if @path.nil?
|
|
137
|
+
return false if @url.nil?
|
|
138
|
+
true
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Custom attribute writer method with validation
|
|
142
|
+
# @param [Object] name Value to be assigned
|
|
143
|
+
def name=(name)
|
|
144
|
+
if name.nil?
|
|
145
|
+
fail ArgumentError, 'name cannot be nil'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@name = name
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] path Value to be assigned
|
|
153
|
+
def path=(path)
|
|
154
|
+
if path.nil?
|
|
155
|
+
fail ArgumentError, 'path cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
@path = path
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Custom attribute writer method with validation
|
|
162
|
+
# @param [Object] url Value to be assigned
|
|
163
|
+
def url=(url)
|
|
164
|
+
if url.nil?
|
|
165
|
+
fail ArgumentError, 'url cannot be nil'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
@url = url
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Checks equality by comparing each attribute.
|
|
172
|
+
# @param [Object] Object to be compared
|
|
173
|
+
def ==(o)
|
|
174
|
+
return true if self.equal?(o)
|
|
175
|
+
self.class == o.class &&
|
|
176
|
+
fetch == o.fetch &&
|
|
177
|
+
name == o.name &&
|
|
178
|
+
overwrite == o.overwrite &&
|
|
179
|
+
path == o.path &&
|
|
180
|
+
url == o.url
|
|
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
|
+
[fetch, name, overwrite, path, url].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
|
|
@@ -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 GitAuthenticateRequest < ApiModelBase
|
|
18
|
+
# Host defaults to github.com.
|
|
19
|
+
attr_accessor :host
|
|
20
|
+
|
|
21
|
+
attr_accessor :password
|
|
22
|
+
|
|
23
|
+
# Protocol defaults to https.
|
|
24
|
+
attr_accessor :protocol
|
|
25
|
+
|
|
26
|
+
attr_accessor :username
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'host' => :'host',
|
|
32
|
+
:'password' => :'password',
|
|
33
|
+
:'protocol' => :'protocol',
|
|
34
|
+
:'username' => :'username'
|
|
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
|
+
:'host' => :'String',
|
|
52
|
+
:'password' => :'String',
|
|
53
|
+
:'protocol' => :'String',
|
|
54
|
+
:'username' => :'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::GitAuthenticateRequest` 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::GitAuthenticateRequest`. 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?(:'host')
|
|
81
|
+
self.host = attributes[:'host']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'password')
|
|
85
|
+
self.password = attributes[:'password']
|
|
86
|
+
else
|
|
87
|
+
self.password = nil
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'protocol')
|
|
91
|
+
self.protocol = attributes[:'protocol']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'username')
|
|
95
|
+
self.username = attributes[:'username']
|
|
96
|
+
else
|
|
97
|
+
self.username = 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 @password.nil?
|
|
107
|
+
invalid_properties.push('invalid value for "password", password cannot be nil.')
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if @username.nil?
|
|
111
|
+
invalid_properties.push('invalid value for "username", username 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 @password.nil?
|
|
122
|
+
return false if @username.nil?
|
|
123
|
+
true
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Custom attribute writer method with validation
|
|
127
|
+
# @param [Object] password Value to be assigned
|
|
128
|
+
def password=(password)
|
|
129
|
+
if password.nil?
|
|
130
|
+
fail ArgumentError, 'password cannot be nil'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
@password = password
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method with validation
|
|
137
|
+
# @param [Object] username Value to be assigned
|
|
138
|
+
def username=(username)
|
|
139
|
+
if username.nil?
|
|
140
|
+
fail ArgumentError, 'username cannot be nil'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
@username = username
|
|
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
|
+
host == o.host &&
|
|
152
|
+
password == o.password &&
|
|
153
|
+
protocol == o.protocol &&
|
|
154
|
+
username == o.username
|
|
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
|
+
[host, password, protocol, username].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
|
|
@@ -19,6 +19,9 @@ module DaytonaToolboxApiClient
|
|
|
19
19
|
|
|
20
20
|
attr_accessor :commit_id
|
|
21
21
|
|
|
22
|
+
# Depth creates a shallow clone truncated to the given number of commits.
|
|
23
|
+
attr_accessor :depth
|
|
24
|
+
|
|
22
25
|
# 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
26
|
attr_accessor :insecure_skip_tls
|
|
24
27
|
|
|
@@ -35,6 +38,7 @@ module DaytonaToolboxApiClient
|
|
|
35
38
|
{
|
|
36
39
|
:'branch' => :'branch',
|
|
37
40
|
:'commit_id' => :'commit_id',
|
|
41
|
+
:'depth' => :'depth',
|
|
38
42
|
:'insecure_skip_tls' => :'insecure_skip_tls',
|
|
39
43
|
:'password' => :'password',
|
|
40
44
|
:'path' => :'path',
|
|
@@ -58,6 +62,7 @@ module DaytonaToolboxApiClient
|
|
|
58
62
|
{
|
|
59
63
|
:'branch' => :'String',
|
|
60
64
|
:'commit_id' => :'String',
|
|
65
|
+
:'depth' => :'Integer',
|
|
61
66
|
:'insecure_skip_tls' => :'Boolean',
|
|
62
67
|
:'password' => :'String',
|
|
63
68
|
:'path' => :'String',
|
|
@@ -96,6 +101,10 @@ module DaytonaToolboxApiClient
|
|
|
96
101
|
self.commit_id = attributes[:'commit_id']
|
|
97
102
|
end
|
|
98
103
|
|
|
104
|
+
if attributes.key?(:'depth')
|
|
105
|
+
self.depth = attributes[:'depth']
|
|
106
|
+
end
|
|
107
|
+
|
|
99
108
|
if attributes.key?(:'insecure_skip_tls')
|
|
100
109
|
self.insecure_skip_tls = attributes[:'insecure_skip_tls']
|
|
101
110
|
end
|
|
@@ -173,6 +182,7 @@ module DaytonaToolboxApiClient
|
|
|
173
182
|
self.class == o.class &&
|
|
174
183
|
branch == o.branch &&
|
|
175
184
|
commit_id == o.commit_id &&
|
|
185
|
+
depth == o.depth &&
|
|
176
186
|
insecure_skip_tls == o.insecure_skip_tls &&
|
|
177
187
|
password == o.password &&
|
|
178
188
|
path == o.path &&
|
|
@@ -189,7 +199,7 @@ module DaytonaToolboxApiClient
|
|
|
189
199
|
# Calculates hash code according to all attributes.
|
|
190
200
|
# @return [Integer] Hash code
|
|
191
201
|
def hash
|
|
192
|
-
[branch, commit_id, insecure_skip_tls, password, path, url, username].hash
|
|
202
|
+
[branch, commit_id, depth, insecure_skip_tls, password, path, url, username].hash
|
|
193
203
|
end
|
|
194
204
|
|
|
195
205
|
# Builds the object from hash
|