daytona_api_client 0.168.0 → 0.169.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9a0661c719c3572f1749ac93bf0205126488bacc2651a13dac11b3173ab57fb
|
|
4
|
+
data.tar.gz: 7ea3d9f4f7e3aafc9d1f9f9c87f2dcbd144003595993f56b90054c0504774ff9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c38452fde00ff3057705f6bccc27bb87eba2c7816fd69a255373c61b1ddefd020e521d34044ea4dd8b1049e2fe6bf2d71e66bd931a8048ffa9af43c5e2a02fce
|
|
7
|
+
data.tar.gz: a6cad1172a499ac68c97fb7121012315e1b93d12a15e8189f6ee93bf0365807f8a7b550ea4c6c6e16a9dd3ba71e1faf3d587af4755cd3e98b1f4d06b52ba8241
|
data/.openapi-generator/FILES
CHANGED
|
@@ -192,6 +192,7 @@ lib/daytona_api_client/models/update_organization_quota.rb
|
|
|
192
192
|
lib/daytona_api_client/models/update_organization_region_quota.rb
|
|
193
193
|
lib/daytona_api_client/models/update_organization_role.rb
|
|
194
194
|
lib/daytona_api_client/models/update_region.rb
|
|
195
|
+
lib/daytona_api_client/models/update_sandbox_network_settings.rb
|
|
195
196
|
lib/daytona_api_client/models/update_sandbox_state_dto.rb
|
|
196
197
|
lib/daytona_api_client/models/url.rb
|
|
197
198
|
lib/daytona_api_client/models/user.rb
|
|
@@ -2610,6 +2610,83 @@ module DaytonaApiClient
|
|
|
2610
2610
|
return data, status_code, headers
|
|
2611
2611
|
end
|
|
2612
2612
|
|
|
2613
|
+
# Update sandbox network settings
|
|
2614
|
+
# Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
|
|
2615
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2616
|
+
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
2617
|
+
# @param [Hash] opts the optional parameters
|
|
2618
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2619
|
+
# @return [Sandbox]
|
|
2620
|
+
def update_network_settings(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
|
|
2621
|
+
data, _status_code, _headers = update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts)
|
|
2622
|
+
data
|
|
2623
|
+
end
|
|
2624
|
+
|
|
2625
|
+
# Update sandbox network settings
|
|
2626
|
+
# Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
|
|
2627
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2628
|
+
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
2629
|
+
# @param [Hash] opts the optional parameters
|
|
2630
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2631
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2632
|
+
def update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
|
|
2633
|
+
if @api_client.config.debugging
|
|
2634
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.update_network_settings ...'
|
|
2635
|
+
end
|
|
2636
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2637
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2638
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_network_settings"
|
|
2639
|
+
end
|
|
2640
|
+
# verify the required parameter 'update_sandbox_network_settings' is set
|
|
2641
|
+
if @api_client.config.client_side_validation && update_sandbox_network_settings.nil?
|
|
2642
|
+
fail ArgumentError, "Missing the required parameter 'update_sandbox_network_settings' when calling SandboxApi.update_network_settings"
|
|
2643
|
+
end
|
|
2644
|
+
# resource path
|
|
2645
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/network-settings'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2646
|
+
|
|
2647
|
+
# query parameters
|
|
2648
|
+
query_params = opts[:query_params] || {}
|
|
2649
|
+
|
|
2650
|
+
# header parameters
|
|
2651
|
+
header_params = opts[:header_params] || {}
|
|
2652
|
+
# HTTP header 'Accept' (if needed)
|
|
2653
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2654
|
+
# HTTP header 'Content-Type'
|
|
2655
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2656
|
+
if !content_type.nil?
|
|
2657
|
+
header_params['Content-Type'] = content_type
|
|
2658
|
+
end
|
|
2659
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2660
|
+
|
|
2661
|
+
# form parameters
|
|
2662
|
+
form_params = opts[:form_params] || {}
|
|
2663
|
+
|
|
2664
|
+
# http body (model)
|
|
2665
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_network_settings)
|
|
2666
|
+
|
|
2667
|
+
# return_type
|
|
2668
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2669
|
+
|
|
2670
|
+
# auth_names
|
|
2671
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2672
|
+
|
|
2673
|
+
new_options = opts.merge(
|
|
2674
|
+
:operation => :"SandboxApi.update_network_settings",
|
|
2675
|
+
:header_params => header_params,
|
|
2676
|
+
:query_params => query_params,
|
|
2677
|
+
:form_params => form_params,
|
|
2678
|
+
:body => post_body,
|
|
2679
|
+
:auth_names => auth_names,
|
|
2680
|
+
:return_type => return_type
|
|
2681
|
+
)
|
|
2682
|
+
|
|
2683
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2684
|
+
if @api_client.config.debugging
|
|
2685
|
+
@api_client.config.logger.debug "API called: SandboxApi#update_network_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2686
|
+
end
|
|
2687
|
+
return data, status_code, headers
|
|
2688
|
+
end
|
|
2689
|
+
|
|
2613
2690
|
# Update public status
|
|
2614
2691
|
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2615
2692
|
# @param is_public [Boolean] Public status to set
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class UpdateSandboxNetworkSettings
|
|
18
|
+
# Whether to block all network access for the sandbox
|
|
19
|
+
attr_accessor :network_block_all
|
|
20
|
+
|
|
21
|
+
# Comma-separated list of allowed CIDR network addresses for the sandbox
|
|
22
|
+
attr_accessor :network_allow_list
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'network_block_all' => :'networkBlockAll',
|
|
28
|
+
:'network_allow_list' => :'networkAllowList'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'network_block_all' => :'Boolean',
|
|
46
|
+
:'network_allow_list' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::UpdateSandboxNetworkSettings` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::UpdateSandboxNetworkSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'network_block_all')
|
|
73
|
+
self.network_block_all = attributes[:'network_block_all']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'network_allow_list')
|
|
77
|
+
self.network_allow_list = attributes[:'network_allow_list']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
+
true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Checks equality by comparing each attribute.
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def ==(o)
|
|
99
|
+
return true if self.equal?(o)
|
|
100
|
+
self.class == o.class &&
|
|
101
|
+
network_block_all == o.network_block_all &&
|
|
102
|
+
network_allow_list == o.network_allow_list
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Integer] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[network_block_all, network_allow_list].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def self.build_from_hash(attributes)
|
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
123
|
+
transformed_hash = {}
|
|
124
|
+
openapi_types.each_pair do |key, type|
|
|
125
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
126
|
+
transformed_hash["#{key}"] = nil
|
|
127
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
128
|
+
# check to ensure the input is an array given that the attribute
|
|
129
|
+
# is documented as an array but the input is not
|
|
130
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
131
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
132
|
+
end
|
|
133
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
new(transformed_hash)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Deserializes the data based on type
|
|
141
|
+
# @param string type Data type
|
|
142
|
+
# @param string value Value to be deserialized
|
|
143
|
+
# @return [Object] Deserialized data
|
|
144
|
+
def self._deserialize(type, value)
|
|
145
|
+
case type.to_sym
|
|
146
|
+
when :Time
|
|
147
|
+
Time.parse(value)
|
|
148
|
+
when :Date
|
|
149
|
+
Date.parse(value)
|
|
150
|
+
when :String
|
|
151
|
+
value.to_s
|
|
152
|
+
when :Integer
|
|
153
|
+
value.to_i
|
|
154
|
+
when :Float
|
|
155
|
+
value.to_f
|
|
156
|
+
when :Boolean
|
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
158
|
+
true
|
|
159
|
+
else
|
|
160
|
+
false
|
|
161
|
+
end
|
|
162
|
+
when :Object
|
|
163
|
+
# generic object (usually a Hash), return directly
|
|
164
|
+
value
|
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
|
171
|
+
{}.tap do |hash|
|
|
172
|
+
value.each do |k, v|
|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
else # model
|
|
177
|
+
# models (e.g. Pet) or oneOf
|
|
178
|
+
klass = DaytonaApiClient.const_get(type)
|
|
179
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns the string representation of the object
|
|
184
|
+
# @return [String] String presentation of the object
|
|
185
|
+
def to_s
|
|
186
|
+
to_hash.to_s
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
|
191
|
+
def to_body
|
|
192
|
+
to_hash
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Returns the object in the form of hash
|
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
|
197
|
+
def to_hash
|
|
198
|
+
hash = {}
|
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
200
|
+
value = self.send(attr)
|
|
201
|
+
if value.nil?
|
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
hash[param] = _to_hash(value)
|
|
207
|
+
end
|
|
208
|
+
hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Outputs non-array value in the form of hash
|
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
213
|
+
# @param [Object] value Any valid value
|
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
|
215
|
+
def _to_hash(value)
|
|
216
|
+
if value.is_a?(Array)
|
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
|
218
|
+
elsif value.is_a?(Hash)
|
|
219
|
+
{}.tap do |hash|
|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
221
|
+
end
|
|
222
|
+
elsif value.respond_to? :to_hash
|
|
223
|
+
value.to_hash
|
|
224
|
+
else
|
|
225
|
+
value
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
end
|
data/lib/daytona_api_client.rb
CHANGED
|
@@ -183,6 +183,7 @@ require 'daytona_api_client/models/update_organization_quota'
|
|
|
183
183
|
require 'daytona_api_client/models/update_organization_region_quota'
|
|
184
184
|
require 'daytona_api_client/models/update_organization_role'
|
|
185
185
|
require 'daytona_api_client/models/update_region'
|
|
186
|
+
require 'daytona_api_client/models/update_sandbox_network_settings'
|
|
186
187
|
require 'daytona_api_client/models/update_sandbox_state_dto'
|
|
187
188
|
require 'daytona_api_client/models/url'
|
|
188
189
|
require 'daytona_api_client/models/user'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: daytona_api_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.169.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- daytonaio
|
|
@@ -254,6 +254,7 @@ files:
|
|
|
254
254
|
- lib/daytona_api_client/models/update_organization_region_quota.rb
|
|
255
255
|
- lib/daytona_api_client/models/update_organization_role.rb
|
|
256
256
|
- lib/daytona_api_client/models/update_region.rb
|
|
257
|
+
- lib/daytona_api_client/models/update_sandbox_network_settings.rb
|
|
257
258
|
- lib/daytona_api_client/models/update_sandbox_state_dto.rb
|
|
258
259
|
- lib/daytona_api_client/models/url.rb
|
|
259
260
|
- lib/daytona_api_client/models/user.rb
|