daytona_api_client 0.194.0 → 0.196.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: d0e0d4c20c786a06915c3c3eb8007d19bf0d3a4bcaa012d4d4ae6d7cabcfadeb
4
- data.tar.gz: f19f9f5d0d9bbd612737c4d889ac56305be25e06aeaf125a9c972f537f366b9a
3
+ metadata.gz: e13d25e06515edcd44894d5a4cf279544af6bc7b5aeeed9d13630c2712cc7196
4
+ data.tar.gz: '08811eac1491e7028349a6eff6740a32be4c73894ca9890fce98cbb16579b458'
5
5
  SHA512:
6
- metadata.gz: 6d32dbab2196e0d0e0492554da4de6d82c5ad8de905498407cdc1ce2e6a3df92ec9aa12e502cc442df4b441d1bdc69ba03a9fca5d17df109d0d3e18ac2036192
7
- data.tar.gz: 3277b04b4ac22cc08973b0a0347dd0f7d5a2f0e78ab1dd820822f9386e01f3cefdc9af3de2bb88ea3954e3907702b4440f4083e56e1623b20c4026cb9086a3ba
6
+ metadata.gz: 71100c273a103c1067f864603c85d89bf392959a2f11896a5af89efdf2918f1021ab90bcf9345b16a048106855b18ba3711328e02f45968031fa1b6ed65ac441
7
+ data.tar.gz: da2d69d5c965ff0a776b870bd04baa7ad1b7c9b61ce346929165ba47f28b1235c2ee011817660fb8168ba86918b867385bbe98c4354de2290fdc16cff8016abc
@@ -206,6 +206,7 @@ lib/daytona_api_client/models/update_organization_region_quota.rb
206
206
  lib/daytona_api_client/models/update_organization_role.rb
207
207
  lib/daytona_api_client/models/update_region.rb
208
208
  lib/daytona_api_client/models/update_sandbox_network_settings.rb
209
+ lib/daytona_api_client/models/update_sandbox_secrets.rb
209
210
  lib/daytona_api_client/models/update_sandbox_state_dto.rb
210
211
  lib/daytona_api_client/models/update_secret.rb
211
212
  lib/daytona_api_client/models/url.rb
@@ -2987,6 +2987,83 @@ module DaytonaApiClient
2987
2987
  return data, status_code, headers
2988
2988
  end
2989
2989
 
2990
+ # Update sandbox secrets
2991
+ # Replaces the set of vault secrets mounted in the sandbox. Attached, detached and rotated secrets take effect for outbound requests within seconds. New env vars become visible to processes spawned after the update; a sandbox created without any secrets must be restarted for newly attached secrets to work.
2992
+ # @param sandbox_id_or_name [String] ID or name of the sandbox
2993
+ # @param update_sandbox_secrets [UpdateSandboxSecrets]
2994
+ # @param [Hash] opts the optional parameters
2995
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
2996
+ # @return [Sandbox]
2997
+ def update_sandbox_secrets(sandbox_id_or_name, update_sandbox_secrets, opts = {})
2998
+ data, _status_code, _headers = update_sandbox_secrets_with_http_info(sandbox_id_or_name, update_sandbox_secrets, opts)
2999
+ data
3000
+ end
3001
+
3002
+ # Update sandbox secrets
3003
+ # Replaces the set of vault secrets mounted in the sandbox. Attached, detached and rotated secrets take effect for outbound requests within seconds. New env vars become visible to processes spawned after the update; a sandbox created without any secrets must be restarted for newly attached secrets to work.
3004
+ # @param sandbox_id_or_name [String] ID or name of the sandbox
3005
+ # @param update_sandbox_secrets [UpdateSandboxSecrets]
3006
+ # @param [Hash] opts the optional parameters
3007
+ # @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
3008
+ # @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
3009
+ def update_sandbox_secrets_with_http_info(sandbox_id_or_name, update_sandbox_secrets, opts = {})
3010
+ if @api_client.config.debugging
3011
+ @api_client.config.logger.debug 'Calling API: SandboxApi.update_sandbox_secrets ...'
3012
+ end
3013
+ # verify the required parameter 'sandbox_id_or_name' is set
3014
+ if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
3015
+ fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_sandbox_secrets"
3016
+ end
3017
+ # verify the required parameter 'update_sandbox_secrets' is set
3018
+ if @api_client.config.client_side_validation && update_sandbox_secrets.nil?
3019
+ fail ArgumentError, "Missing the required parameter 'update_sandbox_secrets' when calling SandboxApi.update_sandbox_secrets"
3020
+ end
3021
+ # resource path
3022
+ local_var_path = '/sandbox/{sandboxIdOrName}/secrets'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
3023
+
3024
+ # query parameters
3025
+ query_params = opts[:query_params] || {}
3026
+
3027
+ # header parameters
3028
+ header_params = opts[:header_params] || {}
3029
+ # HTTP header 'Accept' (if needed)
3030
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3031
+ # HTTP header 'Content-Type'
3032
+ content_type = @api_client.select_header_content_type(['application/json'])
3033
+ if !content_type.nil?
3034
+ header_params['Content-Type'] = content_type
3035
+ end
3036
+ header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
3037
+
3038
+ # form parameters
3039
+ form_params = opts[:form_params] || {}
3040
+
3041
+ # http body (model)
3042
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_secrets)
3043
+
3044
+ # return_type
3045
+ return_type = opts[:debug_return_type] || 'Sandbox'
3046
+
3047
+ # auth_names
3048
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
3049
+
3050
+ new_options = opts.merge(
3051
+ :operation => :"SandboxApi.update_sandbox_secrets",
3052
+ :header_params => header_params,
3053
+ :query_params => query_params,
3054
+ :form_params => form_params,
3055
+ :body => post_body,
3056
+ :auth_names => auth_names,
3057
+ :return_type => return_type
3058
+ )
3059
+
3060
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3061
+ if @api_client.config.debugging
3062
+ @api_client.config.logger.debug "API called: SandboxApi#update_sandbox_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3063
+ end
3064
+ return data, status_code, headers
3065
+ end
3066
+
2990
3067
  # Update sandbox state
2991
3068
  # @param sandbox_id [String] ID of the sandbox
2992
3069
  # @param update_sandbox_state_dto [UpdateSandboxStateDto]
@@ -21,6 +21,8 @@ module DaytonaApiClient
21
21
 
22
22
  attr_accessor :total_disk_quota
23
23
 
24
+ attr_accessor :total_gpu_quota
25
+
24
26
  attr_accessor :max_cpu_per_sandbox
25
27
 
26
28
  attr_accessor :max_memory_per_sandbox
@@ -42,6 +44,7 @@ module DaytonaApiClient
42
44
  :'total_cpu_quota' => :'totalCpuQuota',
43
45
  :'total_memory_quota' => :'totalMemoryQuota',
44
46
  :'total_disk_quota' => :'totalDiskQuota',
47
+ :'total_gpu_quota' => :'totalGpuQuota',
45
48
  :'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
46
49
  :'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
47
50
  :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
@@ -68,6 +71,7 @@ module DaytonaApiClient
68
71
  :'total_cpu_quota' => :'Float',
69
72
  :'total_memory_quota' => :'Float',
70
73
  :'total_disk_quota' => :'Float',
74
+ :'total_gpu_quota' => :'Float',
71
75
  :'max_cpu_per_sandbox' => :'Float',
72
76
  :'max_memory_per_sandbox' => :'Float',
73
77
  :'max_disk_per_sandbox' => :'Float',
@@ -112,6 +116,10 @@ module DaytonaApiClient
112
116
  self.total_disk_quota = attributes[:'total_disk_quota']
113
117
  end
114
118
 
119
+ if attributes.key?(:'total_gpu_quota')
120
+ self.total_gpu_quota = attributes[:'total_gpu_quota']
121
+ end
122
+
115
123
  if attributes.key?(:'max_cpu_per_sandbox')
116
124
  self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
117
125
  end
@@ -164,6 +172,7 @@ module DaytonaApiClient
164
172
  total_cpu_quota == o.total_cpu_quota &&
165
173
  total_memory_quota == o.total_memory_quota &&
166
174
  total_disk_quota == o.total_disk_quota &&
175
+ total_gpu_quota == o.total_gpu_quota &&
167
176
  max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
168
177
  max_memory_per_sandbox == o.max_memory_per_sandbox &&
169
178
  max_disk_per_sandbox == o.max_disk_per_sandbox &&
@@ -182,7 +191,7 @@ module DaytonaApiClient
182
191
  # Calculates hash code according to all attributes.
183
192
  # @return [Integer] Hash code
184
193
  def hash
185
- [total_cpu_quota, total_memory_quota, total_disk_quota, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota, max_concurrent_snapshot_processing].hash
194
+ [total_cpu_quota, total_memory_quota, total_disk_quota, total_gpu_quota, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, snapshot_quota, max_snapshot_size, volume_quota, max_concurrent_snapshot_processing].hash
186
195
  end
187
196
 
188
197
  # Builds the object from hash
@@ -27,13 +27,14 @@ module DaytonaApiClient
27
27
  INSPECT_SNAPSHOT_IN_REGISTRY = "INSPECT_SNAPSHOT_IN_REGISTRY".freeze
28
28
  REMOVE_SNAPSHOT = "REMOVE_SNAPSHOT".freeze
29
29
  UPDATE_SANDBOX_NETWORK_SETTINGS = "UPDATE_SANDBOX_NETWORK_SETTINGS".freeze
30
+ UPDATE_SANDBOX_SECRETS = "UPDATE_SANDBOX_SECRETS".freeze
30
31
  SNAPSHOT_SANDBOX = "SNAPSHOT_SANDBOX".freeze
31
32
  FORK_SANDBOX = "FORK_SANDBOX".freeze
32
33
  PAUSE_SANDBOX = "PAUSE_SANDBOX".freeze
33
34
  UNKNOWN_DEFAULT_OPEN_API = "unknown_default_open_api".freeze
34
35
 
35
36
  def self.all_vars
36
- @all_vars ||= [CREATE_SANDBOX, START_SANDBOX, STOP_SANDBOX, DESTROY_SANDBOX, RESIZE_SANDBOX, CREATE_BACKUP, BUILD_SNAPSHOT, PULL_SNAPSHOT, RECOVER_SANDBOX, INSPECT_SNAPSHOT_IN_REGISTRY, REMOVE_SNAPSHOT, UPDATE_SANDBOX_NETWORK_SETTINGS, SNAPSHOT_SANDBOX, FORK_SANDBOX, PAUSE_SANDBOX, UNKNOWN_DEFAULT_OPEN_API].freeze
37
+ @all_vars ||= [CREATE_SANDBOX, START_SANDBOX, STOP_SANDBOX, DESTROY_SANDBOX, RESIZE_SANDBOX, CREATE_BACKUP, BUILD_SNAPSHOT, PULL_SNAPSHOT, RECOVER_SANDBOX, INSPECT_SNAPSHOT_IN_REGISTRY, REMOVE_SNAPSHOT, UPDATE_SANDBOX_NETWORK_SETTINGS, UPDATE_SANDBOX_SECRETS, SNAPSHOT_SANDBOX, FORK_SANDBOX, PAUSE_SANDBOX, UNKNOWN_DEFAULT_OPEN_API].freeze
37
38
  end
38
39
 
39
40
  # Builds the enum from string
@@ -0,0 +1,167 @@
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.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class UpdateSandboxSecrets < ApiModelBase
18
+ # Secrets to mount in this sandbox, replacing the previously mounted set. Each entry maps an env var name to a vault secret name. Pass an empty array to detach all secrets.
19
+ attr_accessor :secrets
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'secrets' => :'secrets'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'secrets' => :'Array<Hash<String, String>>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::UpdateSandboxSecrets` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::UpdateSandboxSecrets`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'secrets')
68
+ if (value = attributes[:'secrets']).is_a?(Array)
69
+ self.secrets = value
70
+ end
71
+ else
72
+ self.secrets = nil
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
80
+ invalid_properties = Array.new
81
+ if @secrets.nil?
82
+ invalid_properties.push('invalid value for "secrets", secrets cannot be nil.')
83
+ end
84
+
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ warn '[DEPRECATED] the `valid?` method is obsolete'
92
+ return false if @secrets.nil?
93
+ true
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param [Object] secrets Value to be assigned
98
+ def secrets=(secrets)
99
+ if secrets.nil?
100
+ fail ArgumentError, 'secrets cannot be nil'
101
+ end
102
+
103
+ @secrets = secrets
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ secrets == o.secrets
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [secrets].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end
@@ -11,5 +11,5 @@ Generator version: 7.21.0
11
11
  =end
12
12
 
13
13
  module DaytonaApiClient
14
- VERSION = '0.194.0'
14
+ VERSION = '0.196.0'
15
15
  end
@@ -197,6 +197,7 @@ require 'daytona_api_client/models/update_organization_region_quota'
197
197
  require 'daytona_api_client/models/update_organization_role'
198
198
  require 'daytona_api_client/models/update_region'
199
199
  require 'daytona_api_client/models/update_sandbox_network_settings'
200
+ require 'daytona_api_client/models/update_sandbox_secrets'
200
201
  require 'daytona_api_client/models/update_sandbox_state_dto'
201
202
  require 'daytona_api_client/models/update_secret'
202
203
  require 'daytona_api_client/models/url'
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.194.0
4
+ version: 0.196.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - daytona
@@ -268,6 +268,7 @@ files:
268
268
  - lib/daytona_api_client/models/update_organization_role.rb
269
269
  - lib/daytona_api_client/models/update_region.rb
270
270
  - lib/daytona_api_client/models/update_sandbox_network_settings.rb
271
+ - lib/daytona_api_client/models/update_sandbox_secrets.rb
271
272
  - lib/daytona_api_client/models/update_sandbox_state_dto.rb
272
273
  - lib/daytona_api_client/models/update_secret.rb
273
274
  - lib/daytona_api_client/models/url.rb