daytona_api_client 0.152.1 → 0.153.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: 766ad24a379bd10cd819ae176bce5fef52b3acc4c4823f12cc5f6078c98adc32
4
- data.tar.gz: c375f906a5b767e641d1a15e3cf500b4fdfeaac4d34e8617cf077cb103e2b366
3
+ metadata.gz: 7e8a932a38b4a650ab357cdcb824bf5362421eaed3c62264edb2866192161078
4
+ data.tar.gz: cb53d369980bb8d2c3c6e36fcf62ea60f2c5a161293ea00181b42769cb18eb49
5
5
  SHA512:
6
- metadata.gz: 6de72b462a1b114228b5183f5e07c4096c95a09936185b8adfd8394705795759968879b05a421d32350d693a8e505c27fe5659c0d002b2d42fd268b1b31f4e9f
7
- data.tar.gz: f713b8f381eee442556bd724754b4f6b369b647d1f226b5e58c644c2bee1a2f96377f645eaa2ea2441e47ae298d692b10f76fb30e4f94805ab79cfeffc72e8a7
6
+ metadata.gz: 3066869b0c5958c9ff471d67e8e732a5420a9bd0ebd22a4d1c4ebd2ff6402de5ec85cdd0c986669e5a94d53ef23c0627042a27c70cfb8a2ca34dbd53d56a5802
7
+ data.tar.gz: 71cc43e9b31165806b2fa18fa819b66be6fe7158a7b0722701ef08c6d13004d7236173d1930a26e9cbb7bf407407df7902549f817b924fbf3e48ab3f3a0bcbbf
@@ -152,6 +152,7 @@ lib/daytona_api_client/models/runner.rb
152
152
  lib/daytona_api_client/models/runner_full.rb
153
153
  lib/daytona_api_client/models/runner_health_metrics.rb
154
154
  lib/daytona_api_client/models/runner_healthcheck.rb
155
+ lib/daytona_api_client/models/runner_service_health.rb
155
156
  lib/daytona_api_client/models/runner_snapshot_dto.rb
156
157
  lib/daytona_api_client/models/runner_state.rb
157
158
  lib/daytona_api_client/models/sandbox.rb
@@ -18,6 +18,9 @@ module DaytonaApiClient
18
18
  # Runner metrics
19
19
  attr_accessor :metrics
20
20
 
21
+ # Health status of individual services on the runner
22
+ attr_accessor :service_health
23
+
21
24
  # Runner domain
22
25
  attr_accessor :domain
23
26
 
@@ -34,6 +37,7 @@ module DaytonaApiClient
34
37
  def self.attribute_map
35
38
  {
36
39
  :'metrics' => :'metrics',
40
+ :'service_health' => :'serviceHealth',
37
41
  :'domain' => :'domain',
38
42
  :'proxy_url' => :'proxyUrl',
39
43
  :'api_url' => :'apiUrl',
@@ -55,6 +59,7 @@ module DaytonaApiClient
55
59
  def self.openapi_types
56
60
  {
57
61
  :'metrics' => :'RunnerHealthMetrics',
62
+ :'service_health' => :'Array<RunnerServiceHealth>',
58
63
  :'domain' => :'String',
59
64
  :'proxy_url' => :'String',
60
65
  :'api_url' => :'String',
@@ -88,6 +93,12 @@ module DaytonaApiClient
88
93
  self.metrics = attributes[:'metrics']
89
94
  end
90
95
 
96
+ if attributes.key?(:'service_health')
97
+ if (value = attributes[:'service_health']).is_a?(Array)
98
+ self.service_health = value
99
+ end
100
+ end
101
+
91
102
  if attributes.key?(:'domain')
92
103
  self.domain = attributes[:'domain']
93
104
  end
@@ -143,6 +154,7 @@ module DaytonaApiClient
143
154
  return true if self.equal?(o)
144
155
  self.class == o.class &&
145
156
  metrics == o.metrics &&
157
+ service_health == o.service_health &&
146
158
  domain == o.domain &&
147
159
  proxy_url == o.proxy_url &&
148
160
  api_url == o.api_url &&
@@ -158,7 +170,7 @@ module DaytonaApiClient
158
170
  # Calculates hash code according to all attributes.
159
171
  # @return [Integer] Hash code
160
172
  def hash
161
- [metrics, domain, proxy_url, api_url, app_version].hash
173
+ [metrics, service_health, domain, proxy_url, api_url, app_version].hash
162
174
  end
163
175
 
164
176
  # Builds the object from hash
@@ -0,0 +1,275 @@
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 RunnerServiceHealth
18
+ # Name of the service being checked
19
+ attr_accessor :service_name
20
+
21
+ # Whether the service is healthy
22
+ attr_accessor :healthy
23
+
24
+ # Error reason if the service is unhealthy
25
+ attr_accessor :error_reason
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'service_name' => :'serviceName',
31
+ :'healthy' => :'healthy',
32
+ :'error_reason' => :'errorReason'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'service_name' => :'String',
50
+ :'healthy' => :'Boolean',
51
+ :'error_reason' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RunnerServiceHealth` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::RunnerServiceHealth`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'service_name')
78
+ self.service_name = attributes[:'service_name']
79
+ else
80
+ self.service_name = nil
81
+ end
82
+
83
+ if attributes.key?(:'healthy')
84
+ self.healthy = attributes[:'healthy']
85
+ else
86
+ self.healthy = nil
87
+ end
88
+
89
+ if attributes.key?(:'error_reason')
90
+ self.error_reason = attributes[:'error_reason']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ if @service_name.nil?
100
+ invalid_properties.push('invalid value for "service_name", service_name cannot be nil.')
101
+ end
102
+
103
+ if @healthy.nil?
104
+ invalid_properties.push('invalid value for "healthy", healthy cannot be nil.')
105
+ end
106
+
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
+ return false if @service_name.nil?
115
+ return false if @healthy.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] service_name Value to be assigned
121
+ def service_name=(service_name)
122
+ if service_name.nil?
123
+ fail ArgumentError, 'service_name cannot be nil'
124
+ end
125
+
126
+ @service_name = service_name
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param [Object] healthy Value to be assigned
131
+ def healthy=(healthy)
132
+ if healthy.nil?
133
+ fail ArgumentError, 'healthy cannot be nil'
134
+ end
135
+
136
+ @healthy = healthy
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ service_name == o.service_name &&
145
+ healthy == o.healthy &&
146
+ error_reason == o.error_reason
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [service_name, healthy, error_reason].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Deserializes the data based on type
185
+ # @param string type Data type
186
+ # @param string value Value to be deserialized
187
+ # @return [Object] Deserialized data
188
+ def self._deserialize(type, value)
189
+ case type.to_sym
190
+ when :Time
191
+ Time.parse(value)
192
+ when :Date
193
+ Date.parse(value)
194
+ when :String
195
+ value.to_s
196
+ when :Integer
197
+ value.to_i
198
+ when :Float
199
+ value.to_f
200
+ when :Boolean
201
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
202
+ true
203
+ else
204
+ false
205
+ end
206
+ when :Object
207
+ # generic object (usually a Hash), return directly
208
+ value
209
+ when /\AArray<(?<inner_type>.+)>\z/
210
+ inner_type = Regexp.last_match[:inner_type]
211
+ value.map { |v| _deserialize(inner_type, v) }
212
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
213
+ k_type = Regexp.last_match[:k_type]
214
+ v_type = Regexp.last_match[:v_type]
215
+ {}.tap do |hash|
216
+ value.each do |k, v|
217
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
218
+ end
219
+ end
220
+ else # model
221
+ # models (e.g. Pet) or oneOf
222
+ klass = DaytonaApiClient.const_get(type)
223
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
224
+ end
225
+ end
226
+
227
+ # Returns the string representation of the object
228
+ # @return [String] String presentation of the object
229
+ def to_s
230
+ to_hash.to_s
231
+ end
232
+
233
+ # to_body is an alias to to_hash (backward compatibility)
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_body
236
+ to_hash
237
+ end
238
+
239
+ # Returns the object in the form of hash
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_hash
242
+ hash = {}
243
+ self.class.attribute_map.each_pair do |attr, param|
244
+ value = self.send(attr)
245
+ if value.nil?
246
+ is_nullable = self.class.openapi_nullable.include?(attr)
247
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
248
+ end
249
+
250
+ hash[param] = _to_hash(value)
251
+ end
252
+ hash
253
+ end
254
+
255
+ # Outputs non-array value in the form of hash
256
+ # For object, use to_hash. Otherwise, just return the value
257
+ # @param [Object] value Any valid value
258
+ # @return [Hash] Returns the value in the form of hash
259
+ def _to_hash(value)
260
+ if value.is_a?(Array)
261
+ value.compact.map { |v| _to_hash(v) }
262
+ elsif value.is_a?(Hash)
263
+ {}.tap do |hash|
264
+ value.each { |k, v| hash[k] = _to_hash(v) }
265
+ end
266
+ elsif value.respond_to? :to_hash
267
+ value.to_hash
268
+ else
269
+ value
270
+ end
271
+ end
272
+
273
+ end
274
+
275
+ end
@@ -11,5 +11,5 @@ Generator version: 7.12.0
11
11
  =end
12
12
 
13
13
  module DaytonaApiClient
14
- VERSION = '0.152.1'
14
+ VERSION = '0.153.0'
15
15
  end
@@ -143,6 +143,7 @@ require 'daytona_api_client/models/runner'
143
143
  require 'daytona_api_client/models/runner_full'
144
144
  require 'daytona_api_client/models/runner_health_metrics'
145
145
  require 'daytona_api_client/models/runner_healthcheck'
146
+ require 'daytona_api_client/models/runner_service_health'
146
147
  require 'daytona_api_client/models/runner_snapshot_dto'
147
148
  require 'daytona_api_client/models/runner_state'
148
149
  require 'daytona_api_client/models/sandbox'
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.152.1
4
+ version: 0.153.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - daytonaio
@@ -214,6 +214,7 @@ files:
214
214
  - lib/daytona_api_client/models/runner_full.rb
215
215
  - lib/daytona_api_client/models/runner_health_metrics.rb
216
216
  - lib/daytona_api_client/models/runner_healthcheck.rb
217
+ - lib/daytona_api_client/models/runner_service_health.rb
217
218
  - lib/daytona_api_client/models/runner_snapshot_dto.rb
218
219
  - lib/daytona_api_client/models/runner_state.rb
219
220
  - lib/daytona_api_client/models/sandbox.rb