daytona_api_client 0.190.1 → 0.192.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.
@@ -33,6 +33,9 @@ module DaytonaApiClient
33
33
 
34
34
  attr_accessor :volume_quota
35
35
 
36
+ # Maximum number of snapshots an organization can process (building or pulling) concurrently. Excess are queued. <= 0 means unlimited.
37
+ attr_accessor :max_concurrent_snapshot_processing
38
+
36
39
  # Attribute mapping from ruby-style variable name to JSON key.
37
40
  def self.attribute_map
38
41
  {
@@ -44,7 +47,8 @@ module DaytonaApiClient
44
47
  :'max_disk_per_sandbox' => :'maxDiskPerSandbox',
45
48
  :'snapshot_quota' => :'snapshotQuota',
46
49
  :'max_snapshot_size' => :'maxSnapshotSize',
47
- :'volume_quota' => :'volumeQuota'
50
+ :'volume_quota' => :'volumeQuota',
51
+ :'max_concurrent_snapshot_processing' => :'maxConcurrentSnapshotProcessing'
48
52
  }
49
53
  end
50
54
 
@@ -69,7 +73,8 @@ module DaytonaApiClient
69
73
  :'max_disk_per_sandbox' => :'Float',
70
74
  :'snapshot_quota' => :'Float',
71
75
  :'max_snapshot_size' => :'Float',
72
- :'volume_quota' => :'Float'
76
+ :'volume_quota' => :'Float',
77
+ :'max_concurrent_snapshot_processing' => :'Float'
73
78
  }
74
79
  end
75
80
 
@@ -130,6 +135,10 @@ module DaytonaApiClient
130
135
  if attributes.key?(:'volume_quota')
131
136
  self.volume_quota = attributes[:'volume_quota']
132
137
  end
138
+
139
+ if attributes.key?(:'max_concurrent_snapshot_processing')
140
+ self.max_concurrent_snapshot_processing = attributes[:'max_concurrent_snapshot_processing']
141
+ end
133
142
  end
134
143
 
135
144
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -160,7 +169,8 @@ module DaytonaApiClient
160
169
  max_disk_per_sandbox == o.max_disk_per_sandbox &&
161
170
  snapshot_quota == o.snapshot_quota &&
162
171
  max_snapshot_size == o.max_snapshot_size &&
163
- volume_quota == o.volume_quota
172
+ volume_quota == o.volume_quota &&
173
+ max_concurrent_snapshot_processing == o.max_concurrent_snapshot_processing
164
174
  end
165
175
 
166
176
  # @see the `==` method
@@ -172,7 +182,7 @@ module DaytonaApiClient
172
182
  # Calculates hash code according to all attributes.
173
183
  # @return [Integer] Hash code
174
184
  def hash
175
- [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].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
176
186
  end
177
187
 
178
188
  # Builds the object from hash
@@ -78,6 +78,9 @@ module DaytonaApiClient
78
78
  # ID or name of an existing sandbox to link the new sandbox to. The new sandbox will be scheduled on the same runner as the linked sandbox so a local network can be established between them. Linked sandboxes must be ephemeral (autoDeleteInterval=0) and cannot themselves be linked to another sandbox.
79
79
  attr_accessor :linked_sandbox
80
80
 
81
+ # Secrets to mount in this sandbox. Each entry maps an env var name to a vault secret name.
82
+ attr_accessor :secrets
83
+
81
84
  # Attribute mapping from ruby-style variable name to JSON key.
82
85
  def self.attribute_map
83
86
  {
@@ -101,7 +104,8 @@ module DaytonaApiClient
101
104
  :'auto_delete_interval' => :'autoDeleteInterval',
102
105
  :'volumes' => :'volumes',
103
106
  :'build_info' => :'buildInfo',
104
- :'linked_sandbox' => :'linkedSandbox'
107
+ :'linked_sandbox' => :'linkedSandbox',
108
+ :'secrets' => :'secrets'
105
109
  }
106
110
  end
107
111
 
@@ -138,7 +142,8 @@ module DaytonaApiClient
138
142
  :'auto_delete_interval' => :'Integer',
139
143
  :'volumes' => :'Array<SandboxVolume>',
140
144
  :'build_info' => :'CreateBuildInfo',
141
- :'linked_sandbox' => :'String'
145
+ :'linked_sandbox' => :'String',
146
+ :'secrets' => :'Array<Hash<String, String>>'
142
147
  }
143
148
  end
144
149
 
@@ -255,6 +260,12 @@ module DaytonaApiClient
255
260
  if attributes.key?(:'linked_sandbox')
256
261
  self.linked_sandbox = attributes[:'linked_sandbox']
257
262
  end
263
+
264
+ if attributes.key?(:'secrets')
265
+ if (value = attributes[:'secrets']).is_a?(Array)
266
+ self.secrets = value
267
+ end
268
+ end
258
269
  end
259
270
 
260
271
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -297,7 +308,8 @@ module DaytonaApiClient
297
308
  auto_delete_interval == o.auto_delete_interval &&
298
309
  volumes == o.volumes &&
299
310
  build_info == o.build_info &&
300
- linked_sandbox == o.linked_sandbox
311
+ linked_sandbox == o.linked_sandbox &&
312
+ secrets == o.secrets
301
313
  end
302
314
 
303
315
  # @see the `==` method
@@ -309,7 +321,7 @@ module DaytonaApiClient
309
321
  # Calculates hash code according to all attributes.
310
322
  # @return [Integer] Hash code
311
323
  def hash
312
- [name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, linked_sandbox].hash
324
+ [name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, linked_sandbox, secrets].hash
313
325
  end
314
326
 
315
327
  # Builds the object from hash
@@ -0,0 +1,214 @@
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 CreateSecret < ApiModelBase
18
+ # Secret name (alphanumeric, hyphens, underscores)
19
+ attr_accessor :name
20
+
21
+ # Secret value
22
+ attr_accessor :value
23
+
24
+ # Optional description of the secret
25
+ attr_accessor :description
26
+
27
+ # Allowed hosts this secret may be sent to
28
+ attr_accessor :hosts
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'name' => :'name',
34
+ :'value' => :'value',
35
+ :'description' => :'description',
36
+ :'hosts' => :'hosts'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'name' => :'String',
54
+ :'value' => :'String',
55
+ :'description' => :'String',
56
+ :'hosts' => :'Array<String>'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::CreateSecret` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::CreateSecret`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ else
85
+ self.name = nil
86
+ end
87
+
88
+ if attributes.key?(:'value')
89
+ self.value = attributes[:'value']
90
+ else
91
+ self.value = nil
92
+ end
93
+
94
+ if attributes.key?(:'description')
95
+ self.description = attributes[:'description']
96
+ end
97
+
98
+ if attributes.key?(:'hosts')
99
+ if (value = attributes[:'hosts']).is_a?(Array)
100
+ self.hosts = value
101
+ end
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ if @name.nil?
111
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
112
+ end
113
+
114
+ if @value.nil?
115
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
116
+ end
117
+
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ return false if @name.nil?
126
+ return false if @value.nil?
127
+ true
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] name Value to be assigned
132
+ def name=(name)
133
+ if name.nil?
134
+ fail ArgumentError, 'name cannot be nil'
135
+ end
136
+
137
+ @name = name
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] value Value to be assigned
142
+ def value=(value)
143
+ if value.nil?
144
+ fail ArgumentError, 'value cannot be nil'
145
+ end
146
+
147
+ @value = value
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ name == o.name &&
156
+ value == o.value &&
157
+ description == o.description &&
158
+ hosts == o.hosts
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [name, value, description, hosts].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
179
+ transformed_hash = {}
180
+ openapi_types.each_pair do |key, type|
181
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
+ transformed_hash["#{key}"] = nil
183
+ elsif type =~ /\AArray<(.*)>/i
184
+ # check to ensure the input is an array given that the attribute
185
+ # is documented as an array but the input is not
186
+ if attributes[attribute_map[key]].is_a?(Array)
187
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
+ end
189
+ elsif !attributes[attribute_map[key]].nil?
190
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
+ end
192
+ end
193
+ new(transformed_hash)
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -0,0 +1,178 @@
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 DateFilter < ApiModelBase
18
+ # Match values greater than or equal to this timestamp (ISO 8601).
19
+ attr_accessor :gte
20
+
21
+ # Match values less than or equal to this timestamp (ISO 8601).
22
+ attr_accessor :lte
23
+
24
+ # Match values strictly greater than this timestamp (ISO 8601).
25
+ attr_accessor :gt
26
+
27
+ # Match values strictly less than this timestamp (ISO 8601).
28
+ attr_accessor :lt
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'gte' => :'gte',
34
+ :'lte' => :'lte',
35
+ :'gt' => :'gt',
36
+ :'lt' => :'lt'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'gte' => :'Time',
54
+ :'lte' => :'Time',
55
+ :'gt' => :'Time',
56
+ :'lt' => :'Time'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::DateFilter` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::DateFilter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'gte')
83
+ self.gte = attributes[:'gte']
84
+ end
85
+
86
+ if attributes.key?(:'lte')
87
+ self.lte = attributes[:'lte']
88
+ end
89
+
90
+ if attributes.key?(:'gt')
91
+ self.gt = attributes[:'gt']
92
+ end
93
+
94
+ if attributes.key?(:'lt')
95
+ self.lt = attributes[:'lt']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ gte == o.gte &&
120
+ lte == o.lte &&
121
+ gt == o.gt &&
122
+ lt == o.lt
123
+ end
124
+
125
+ # @see the `==` method
126
+ # @param [Object] Object to be compared
127
+ def eql?(o)
128
+ self == o
129
+ end
130
+
131
+ # Calculates hash code according to all attributes.
132
+ # @return [Integer] Hash code
133
+ def hash
134
+ [gte, lte, gt, lt].hash
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def self.build_from_hash(attributes)
141
+ return nil unless attributes.is_a?(Hash)
142
+ attributes = attributes.transform_keys(&:to_sym)
143
+ transformed_hash = {}
144
+ openapi_types.each_pair do |key, type|
145
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = nil
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[attribute_map[key]].is_a?(Array)
151
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
152
+ end
153
+ elsif !attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
155
+ end
156
+ end
157
+ new(transformed_hash)
158
+ end
159
+
160
+ # Returns the object in the form of hash
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_hash
163
+ hash = {}
164
+ self.class.attribute_map.each_pair do |attr, param|
165
+ value = self.send(attr)
166
+ if value.nil?
167
+ is_nullable = self.class.openapi_nullable.include?(attr)
168
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
169
+ end
170
+
171
+ hash[param] = _to_hash(value)
172
+ end
173
+ hash
174
+ end
175
+
176
+ end
177
+
178
+ end
@@ -60,6 +60,9 @@ module DaytonaApiClient
60
60
  # Analytics API URL
61
61
  attr_accessor :analytics_api_url
62
62
 
63
+ # Stripe publishable key for client-side Stripe.js
64
+ attr_accessor :stripe_publishable_key
65
+
63
66
  # SSH Gateway command
64
67
  attr_accessor :ssh_gateway_command
65
68
 
@@ -87,6 +90,7 @@ module DaytonaApiClient
87
90
  :'environment' => :'environment',
88
91
  :'billing_api_url' => :'billingApiUrl',
89
92
  :'analytics_api_url' => :'analyticsApiUrl',
93
+ :'stripe_publishable_key' => :'stripePublishableKey',
90
94
  :'ssh_gateway_command' => :'sshGatewayCommand',
91
95
  :'ssh_gateway_public_key' => :'sshGatewayPublicKey',
92
96
  :'rate_limit' => :'rateLimit'
@@ -121,6 +125,7 @@ module DaytonaApiClient
121
125
  :'environment' => :'String',
122
126
  :'billing_api_url' => :'String',
123
127
  :'analytics_api_url' => :'String',
128
+ :'stripe_publishable_key' => :'String',
124
129
  :'ssh_gateway_command' => :'String',
125
130
  :'ssh_gateway_public_key' => :'String',
126
131
  :'rate_limit' => :'RateLimitConfig'
@@ -233,6 +238,10 @@ module DaytonaApiClient
233
238
  self.analytics_api_url = attributes[:'analytics_api_url']
234
239
  end
235
240
 
241
+ if attributes.key?(:'stripe_publishable_key')
242
+ self.stripe_publishable_key = attributes[:'stripe_publishable_key']
243
+ end
244
+
236
245
  if attributes.key?(:'ssh_gateway_command')
237
246
  self.ssh_gateway_command = attributes[:'ssh_gateway_command']
238
247
  end
@@ -446,6 +455,7 @@ module DaytonaApiClient
446
455
  environment == o.environment &&
447
456
  billing_api_url == o.billing_api_url &&
448
457
  analytics_api_url == o.analytics_api_url &&
458
+ stripe_publishable_key == o.stripe_publishable_key &&
449
459
  ssh_gateway_command == o.ssh_gateway_command &&
450
460
  ssh_gateway_public_key == o.ssh_gateway_public_key &&
451
461
  rate_limit == o.rate_limit
@@ -460,7 +470,7 @@ module DaytonaApiClient
460
470
  # Calculates hash code according to all attributes.
461
471
  # @return [Integer] Hash code
462
472
  def hash
463
- [version, posthog, oidc, linked_accounts_enabled, announcements, pylon_app_id, proxy_template_url, proxy_toolbox_url, default_snapshot, dashboard_url, max_auto_archive_interval, maintanance_mode, environment, billing_api_url, analytics_api_url, ssh_gateway_command, ssh_gateway_public_key, rate_limit].hash
473
+ [version, posthog, oidc, linked_accounts_enabled, announcements, pylon_app_id, proxy_template_url, proxy_toolbox_url, default_snapshot, dashboard_url, max_auto_archive_interval, maintanance_mode, environment, billing_api_url, analytics_api_url, stripe_publishable_key, ssh_gateway_command, ssh_gateway_public_key, rate_limit].hash
464
474
  end
465
475
 
466
476
  # Builds the object from hash