daytona_api_client 0.144.0 → 1.0.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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +101 -0
  4. data/daytona_api_client.gemspec +2 -2
  5. data/lib/daytona_api_client/api/audit_api.rb +66 -18
  6. data/lib/daytona_api_client/api/docker_registry_api.rb +0 -3
  7. data/lib/daytona_api_client/api/health_api.rb +1 -52
  8. data/lib/daytona_api_client/api/organizations_api.rb +121 -973
  9. data/lib/daytona_api_client/api/preview_api.rb +5 -74
  10. data/lib/daytona_api_client/api/runners_api.rb +20 -407
  11. data/lib/daytona_api_client/api/sandbox_api.rb +189 -961
  12. data/lib/daytona_api_client/api/snapshots_api.rb +0 -66
  13. data/lib/daytona_api_client/api/toolbox_api.rb +711 -711
  14. data/lib/daytona_api_client/api/workspace_api.rb +3 -3
  15. data/lib/daytona_api_client/models/build_info.rb +4 -31
  16. data/lib/daytona_api_client/models/{job.rb → create_audit_log.rb} +79 -166
  17. data/lib/daytona_api_client/models/create_organization.rb +4 -31
  18. data/lib/daytona_api_client/models/create_runner.rb +315 -31
  19. data/lib/daytona_api_client/models/create_sandbox.rb +1 -11
  20. data/lib/daytona_api_client/models/create_snapshot.rb +4 -14
  21. data/lib/daytona_api_client/models/create_user.rb +1 -10
  22. data/lib/daytona_api_client/models/daytona_configuration.rb +4 -41
  23. data/lib/daytona_api_client/models/organization.rb +85 -119
  24. data/lib/daytona_api_client/models/organization_suspension.rb +5 -7
  25. data/lib/daytona_api_client/models/organization_usage_overview.rb +146 -18
  26. data/lib/daytona_api_client/models/paginated_audit_logs.rb +4 -14
  27. data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +4 -4
  28. data/lib/daytona_api_client/models/port_preview_url.rb +14 -31
  29. data/lib/daytona_api_client/models/region.rb +4 -178
  30. data/lib/daytona_api_client/models/runner.rb +117 -79
  31. data/lib/daytona_api_client/models/runner_snapshot_dto.rb +17 -0
  32. data/lib/daytona_api_client/models/sandbox.rb +14 -51
  33. data/lib/daytona_api_client/models/sandbox_state.rb +1 -2
  34. data/lib/daytona_api_client/models/sandbox_volume.rb +4 -14
  35. data/lib/daytona_api_client/models/snapshot_dto.rb +4 -36
  36. data/lib/daytona_api_client/models/snapshot_state.rb +4 -1
  37. data/lib/daytona_api_client/models/ssh_access_dto.rb +4 -31
  38. data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +24 -4
  39. data/lib/daytona_api_client/models/update_organization_quota.rb +41 -77
  40. data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +6 -26
  41. data/lib/daytona_api_client/models/workspace.rb +35 -45
  42. data/lib/daytona_api_client/version.rb +1 -1
  43. data/lib/daytona_api_client.rb +1 -40
  44. data/project.json +8 -56
  45. metadata +7 -53
  46. data/.gitignore +0 -39
  47. data/.openapi-generator/FILES +0 -204
  48. data/.openapi-generator/VERSION +0 -1
  49. data/.openapi-generator-ignore +0 -31
  50. data/.rspec +0 -2
  51. data/.rubocop.yml +0 -148
  52. data/fix-gemspec.sh +0 -11
  53. data/lib/daytona_api_client/api/admin_api.rb +0 -386
  54. data/lib/daytona_api_client/api/jobs_api.rb +0 -299
  55. data/lib/daytona_api_client/api/regions_api.rb +0 -77
  56. data/lib/daytona_api_client/models/admin_create_runner.rb +0 -385
  57. data/lib/daytona_api_client/models/create_region.rb +0 -269
  58. data/lib/daytona_api_client/models/create_region_response.rb +0 -280
  59. data/lib/daytona_api_client/models/create_runner_response.rb +0 -263
  60. data/lib/daytona_api_client/models/job_status.rb +0 -42
  61. data/lib/daytona_api_client/models/job_type.rb +0 -50
  62. data/lib/daytona_api_client/models/log_entry.rb +0 -405
  63. data/lib/daytona_api_client/models/metric_data_point.rb +0 -263
  64. data/lib/daytona_api_client/models/metric_series.rb +0 -265
  65. data/lib/daytona_api_client/models/metrics_response.rb +0 -238
  66. data/lib/daytona_api_client/models/otel_config.rb +0 -249
  67. data/lib/daytona_api_client/models/paginated_logs.rb +0 -319
  68. data/lib/daytona_api_client/models/paginated_traces.rb +0 -319
  69. data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -238
  70. data/lib/daytona_api_client/models/rate_limit_config.rb +0 -249
  71. data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -229
  72. data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -236
  73. data/lib/daytona_api_client/models/region_quota.rb +0 -339
  74. data/lib/daytona_api_client/models/region_type.rb +0 -41
  75. data/lib/daytona_api_client/models/region_usage_overview.rb +0 -391
  76. data/lib/daytona_api_client/models/resize_sandbox.rb +0 -296
  77. data/lib/daytona_api_client/models/runner_full.rb +0 -779
  78. data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -533
  79. data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -276
  80. data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -317
  81. data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -263
  82. data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -236
  83. data/lib/daytona_api_client/models/trace_span.rb +0 -403
  84. data/lib/daytona_api_client/models/trace_summary.rb +0 -381
  85. data/lib/daytona_api_client/models/update_job_status.rb +0 -278
  86. data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -236
  87. data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -245
  88. data/lib/daytona_api_client/models/update_region.rb +0 -242
  89. data/lib/daytona_api_client/models/url.rb +0 -236
  90. data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -263
@@ -15,7 +15,17 @@ require 'time'
15
15
 
16
16
  module DaytonaApiClient
17
17
  class OrganizationUsageOverview
18
- attr_accessor :region_usage
18
+ attr_accessor :total_cpu_quota
19
+
20
+ attr_accessor :total_memory_quota
21
+
22
+ attr_accessor :total_disk_quota
23
+
24
+ attr_accessor :current_cpu_usage
25
+
26
+ attr_accessor :current_memory_usage
27
+
28
+ attr_accessor :current_disk_usage
19
29
 
20
30
  attr_accessor :total_snapshot_quota
21
31
 
@@ -28,7 +38,12 @@ module DaytonaApiClient
28
38
  # Attribute mapping from ruby-style variable name to JSON key.
29
39
  def self.attribute_map
30
40
  {
31
- :'region_usage' => :'regionUsage',
41
+ :'total_cpu_quota' => :'totalCpuQuota',
42
+ :'total_memory_quota' => :'totalMemoryQuota',
43
+ :'total_disk_quota' => :'totalDiskQuota',
44
+ :'current_cpu_usage' => :'currentCpuUsage',
45
+ :'current_memory_usage' => :'currentMemoryUsage',
46
+ :'current_disk_usage' => :'currentDiskUsage',
32
47
  :'total_snapshot_quota' => :'totalSnapshotQuota',
33
48
  :'current_snapshot_usage' => :'currentSnapshotUsage',
34
49
  :'total_volume_quota' => :'totalVolumeQuota',
@@ -49,7 +64,12 @@ module DaytonaApiClient
49
64
  # Attribute type mapping.
50
65
  def self.openapi_types
51
66
  {
52
- :'region_usage' => :'Array<RegionUsageOverview>',
67
+ :'total_cpu_quota' => :'Float',
68
+ :'total_memory_quota' => :'Float',
69
+ :'total_disk_quota' => :'Float',
70
+ :'current_cpu_usage' => :'Float',
71
+ :'current_memory_usage' => :'Float',
72
+ :'current_disk_usage' => :'Float',
53
73
  :'total_snapshot_quota' => :'Float',
54
74
  :'current_snapshot_usage' => :'Float',
55
75
  :'total_volume_quota' => :'Float',
@@ -79,12 +99,40 @@ module DaytonaApiClient
79
99
  h[k.to_sym] = v
80
100
  }
81
101
 
82
- if attributes.key?(:'region_usage')
83
- if (value = attributes[:'region_usage']).is_a?(Array)
84
- self.region_usage = value
85
- end
102
+ if attributes.key?(:'total_cpu_quota')
103
+ self.total_cpu_quota = attributes[:'total_cpu_quota']
104
+ else
105
+ self.total_cpu_quota = nil
106
+ end
107
+
108
+ if attributes.key?(:'total_memory_quota')
109
+ self.total_memory_quota = attributes[:'total_memory_quota']
110
+ else
111
+ self.total_memory_quota = nil
112
+ end
113
+
114
+ if attributes.key?(:'total_disk_quota')
115
+ self.total_disk_quota = attributes[:'total_disk_quota']
116
+ else
117
+ self.total_disk_quota = nil
118
+ end
119
+
120
+ if attributes.key?(:'current_cpu_usage')
121
+ self.current_cpu_usage = attributes[:'current_cpu_usage']
122
+ else
123
+ self.current_cpu_usage = nil
124
+ end
125
+
126
+ if attributes.key?(:'current_memory_usage')
127
+ self.current_memory_usage = attributes[:'current_memory_usage']
128
+ else
129
+ self.current_memory_usage = nil
130
+ end
131
+
132
+ if attributes.key?(:'current_disk_usage')
133
+ self.current_disk_usage = attributes[:'current_disk_usage']
86
134
  else
87
- self.region_usage = nil
135
+ self.current_disk_usage = nil
88
136
  end
89
137
 
90
138
  if attributes.key?(:'total_snapshot_quota')
@@ -117,8 +165,28 @@ module DaytonaApiClient
117
165
  def list_invalid_properties
118
166
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
167
  invalid_properties = Array.new
120
- if @region_usage.nil?
121
- invalid_properties.push('invalid value for "region_usage", region_usage cannot be nil.')
168
+ if @total_cpu_quota.nil?
169
+ invalid_properties.push('invalid value for "total_cpu_quota", total_cpu_quota cannot be nil.')
170
+ end
171
+
172
+ if @total_memory_quota.nil?
173
+ invalid_properties.push('invalid value for "total_memory_quota", total_memory_quota cannot be nil.')
174
+ end
175
+
176
+ if @total_disk_quota.nil?
177
+ invalid_properties.push('invalid value for "total_disk_quota", total_disk_quota cannot be nil.')
178
+ end
179
+
180
+ if @current_cpu_usage.nil?
181
+ invalid_properties.push('invalid value for "current_cpu_usage", current_cpu_usage cannot be nil.')
182
+ end
183
+
184
+ if @current_memory_usage.nil?
185
+ invalid_properties.push('invalid value for "current_memory_usage", current_memory_usage cannot be nil.')
186
+ end
187
+
188
+ if @current_disk_usage.nil?
189
+ invalid_properties.push('invalid value for "current_disk_usage", current_disk_usage cannot be nil.')
122
190
  end
123
191
 
124
192
  if @total_snapshot_quota.nil?
@@ -144,7 +212,12 @@ module DaytonaApiClient
144
212
  # @return true if the model is valid
145
213
  def valid?
146
214
  warn '[DEPRECATED] the `valid?` method is obsolete'
147
- return false if @region_usage.nil?
215
+ return false if @total_cpu_quota.nil?
216
+ return false if @total_memory_quota.nil?
217
+ return false if @total_disk_quota.nil?
218
+ return false if @current_cpu_usage.nil?
219
+ return false if @current_memory_usage.nil?
220
+ return false if @current_disk_usage.nil?
148
221
  return false if @total_snapshot_quota.nil?
149
222
  return false if @current_snapshot_usage.nil?
150
223
  return false if @total_volume_quota.nil?
@@ -153,13 +226,63 @@ module DaytonaApiClient
153
226
  end
154
227
 
155
228
  # Custom attribute writer method with validation
156
- # @param [Object] region_usage Value to be assigned
157
- def region_usage=(region_usage)
158
- if region_usage.nil?
159
- fail ArgumentError, 'region_usage cannot be nil'
229
+ # @param [Object] total_cpu_quota Value to be assigned
230
+ def total_cpu_quota=(total_cpu_quota)
231
+ if total_cpu_quota.nil?
232
+ fail ArgumentError, 'total_cpu_quota cannot be nil'
233
+ end
234
+
235
+ @total_cpu_quota = total_cpu_quota
236
+ end
237
+
238
+ # Custom attribute writer method with validation
239
+ # @param [Object] total_memory_quota Value to be assigned
240
+ def total_memory_quota=(total_memory_quota)
241
+ if total_memory_quota.nil?
242
+ fail ArgumentError, 'total_memory_quota cannot be nil'
243
+ end
244
+
245
+ @total_memory_quota = total_memory_quota
246
+ end
247
+
248
+ # Custom attribute writer method with validation
249
+ # @param [Object] total_disk_quota Value to be assigned
250
+ def total_disk_quota=(total_disk_quota)
251
+ if total_disk_quota.nil?
252
+ fail ArgumentError, 'total_disk_quota cannot be nil'
253
+ end
254
+
255
+ @total_disk_quota = total_disk_quota
256
+ end
257
+
258
+ # Custom attribute writer method with validation
259
+ # @param [Object] current_cpu_usage Value to be assigned
260
+ def current_cpu_usage=(current_cpu_usage)
261
+ if current_cpu_usage.nil?
262
+ fail ArgumentError, 'current_cpu_usage cannot be nil'
263
+ end
264
+
265
+ @current_cpu_usage = current_cpu_usage
266
+ end
267
+
268
+ # Custom attribute writer method with validation
269
+ # @param [Object] current_memory_usage Value to be assigned
270
+ def current_memory_usage=(current_memory_usage)
271
+ if current_memory_usage.nil?
272
+ fail ArgumentError, 'current_memory_usage cannot be nil'
273
+ end
274
+
275
+ @current_memory_usage = current_memory_usage
276
+ end
277
+
278
+ # Custom attribute writer method with validation
279
+ # @param [Object] current_disk_usage Value to be assigned
280
+ def current_disk_usage=(current_disk_usage)
281
+ if current_disk_usage.nil?
282
+ fail ArgumentError, 'current_disk_usage cannot be nil'
160
283
  end
161
284
 
162
- @region_usage = region_usage
285
+ @current_disk_usage = current_disk_usage
163
286
  end
164
287
 
165
288
  # Custom attribute writer method with validation
@@ -207,7 +330,12 @@ module DaytonaApiClient
207
330
  def ==(o)
208
331
  return true if self.equal?(o)
209
332
  self.class == o.class &&
210
- region_usage == o.region_usage &&
333
+ total_cpu_quota == o.total_cpu_quota &&
334
+ total_memory_quota == o.total_memory_quota &&
335
+ total_disk_quota == o.total_disk_quota &&
336
+ current_cpu_usage == o.current_cpu_usage &&
337
+ current_memory_usage == o.current_memory_usage &&
338
+ current_disk_usage == o.current_disk_usage &&
211
339
  total_snapshot_quota == o.total_snapshot_quota &&
212
340
  current_snapshot_usage == o.current_snapshot_usage &&
213
341
  total_volume_quota == o.total_volume_quota &&
@@ -223,7 +351,7 @@ module DaytonaApiClient
223
351
  # Calculates hash code according to all attributes.
224
352
  # @return [Integer] Hash code
225
353
  def hash
226
- [region_usage, total_snapshot_quota, current_snapshot_usage, total_volume_quota, current_volume_usage].hash
354
+ [total_cpu_quota, total_memory_quota, total_disk_quota, current_cpu_usage, current_memory_usage, current_disk_usage, total_snapshot_quota, current_snapshot_usage, total_volume_quota, current_volume_usage].hash
227
355
  end
228
356
 
229
357
  # Builds the object from hash
@@ -23,17 +23,13 @@ module DaytonaApiClient
23
23
 
24
24
  attr_accessor :total_pages
25
25
 
26
- # Token for next page in cursor-based pagination
27
- attr_accessor :next_token
28
-
29
26
  # Attribute mapping from ruby-style variable name to JSON key.
30
27
  def self.attribute_map
31
28
  {
32
29
  :'items' => :'items',
33
30
  :'total' => :'total',
34
31
  :'page' => :'page',
35
- :'total_pages' => :'totalPages',
36
- :'next_token' => :'nextToken'
32
+ :'total_pages' => :'totalPages'
37
33
  }
38
34
  end
39
35
 
@@ -53,8 +49,7 @@ module DaytonaApiClient
53
49
  :'items' => :'Array<AuditLog>',
54
50
  :'total' => :'Float',
55
51
  :'page' => :'Float',
56
- :'total_pages' => :'Float',
57
- :'next_token' => :'String'
52
+ :'total_pages' => :'Float'
58
53
  }
59
54
  end
60
55
 
@@ -105,10 +100,6 @@ module DaytonaApiClient
105
100
  else
106
101
  self.total_pages = nil
107
102
  end
108
-
109
- if attributes.key?(:'next_token')
110
- self.next_token = attributes[:'next_token']
111
- end
112
103
  end
113
104
 
114
105
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -194,8 +185,7 @@ module DaytonaApiClient
194
185
  items == o.items &&
195
186
  total == o.total &&
196
187
  page == o.page &&
197
- total_pages == o.total_pages &&
198
- next_token == o.next_token
188
+ total_pages == o.total_pages
199
189
  end
200
190
 
201
191
  # @see the `==` method
@@ -207,7 +197,7 @@ module DaytonaApiClient
207
197
  # Calculates hash code according to all attributes.
208
198
  # @return [Integer] Hash code
209
199
  def hash
210
- [items, total, page, total_pages, next_token].hash
200
+ [items, total, page, total_pages].hash
211
201
  end
212
202
 
213
203
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DaytonaApiClient
17
- class PaginatedJobs
17
+ class PaginatedSnapshotsDto
18
18
  attr_accessor :items
19
19
 
20
20
  attr_accessor :total
@@ -46,7 +46,7 @@ module DaytonaApiClient
46
46
  # Attribute type mapping.
47
47
  def self.openapi_types
48
48
  {
49
- :'items' => :'Array<Job>',
49
+ :'items' => :'Array<SnapshotDto>',
50
50
  :'total' => :'Float',
51
51
  :'page' => :'Float',
52
52
  :'total_pages' => :'Float'
@@ -63,14 +63,14 @@ module DaytonaApiClient
63
63
  # @param [Hash] attributes Model attributes in the form of hash
64
64
  def initialize(attributes = {})
65
65
  if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::PaginatedJobs` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::PaginatedSnapshotsDto` initialize method"
67
67
  end
68
68
 
69
69
  # check to see if the attribute exists and convert string to symbol for hash key
70
70
  acceptable_attribute_map = self.class.acceptable_attribute_map
71
71
  attributes = attributes.each_with_object({}) { |(k, v), h|
72
72
  if (!acceptable_attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::PaginatedJobs`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::PaginatedSnapshotsDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
74
  end
75
75
  h[k.to_sym] = v
76
76
  }
@@ -15,21 +15,21 @@ require 'time'
15
15
 
16
16
  module DaytonaApiClient
17
17
  class PortPreviewUrl
18
- # ID of the sandbox
19
- attr_accessor :sandbox_id
20
-
21
18
  # Preview url
22
19
  attr_accessor :url
23
20
 
24
21
  # Access token
25
22
  attr_accessor :token
26
23
 
24
+ # Legacy preview url using runner domain
25
+ attr_accessor :legacy_proxy_url
26
+
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
28
28
  def self.attribute_map
29
29
  {
30
- :'sandbox_id' => :'sandboxId',
31
30
  :'url' => :'url',
32
- :'token' => :'token'
31
+ :'token' => :'token',
32
+ :'legacy_proxy_url' => :'legacyProxyUrl'
33
33
  }
34
34
  end
35
35
 
@@ -46,9 +46,9 @@ module DaytonaApiClient
46
46
  # Attribute type mapping.
47
47
  def self.openapi_types
48
48
  {
49
- :'sandbox_id' => :'String',
50
49
  :'url' => :'String',
51
- :'token' => :'String'
50
+ :'token' => :'String',
51
+ :'legacy_proxy_url' => :'String'
52
52
  }
53
53
  end
54
54
 
@@ -74,12 +74,6 @@ module DaytonaApiClient
74
74
  h[k.to_sym] = v
75
75
  }
76
76
 
77
- if attributes.key?(:'sandbox_id')
78
- self.sandbox_id = attributes[:'sandbox_id']
79
- else
80
- self.sandbox_id = nil
81
- end
82
-
83
77
  if attributes.key?(:'url')
84
78
  self.url = attributes[:'url']
85
79
  else
@@ -91,6 +85,10 @@ module DaytonaApiClient
91
85
  else
92
86
  self.token = nil
93
87
  end
88
+
89
+ if attributes.key?(:'legacy_proxy_url')
90
+ self.legacy_proxy_url = attributes[:'legacy_proxy_url']
91
+ end
94
92
  end
95
93
 
96
94
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -98,10 +96,6 @@ module DaytonaApiClient
98
96
  def list_invalid_properties
99
97
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
98
  invalid_properties = Array.new
101
- if @sandbox_id.nil?
102
- invalid_properties.push('invalid value for "sandbox_id", sandbox_id cannot be nil.')
103
- end
104
-
105
99
  if @url.nil?
106
100
  invalid_properties.push('invalid value for "url", url cannot be nil.')
107
101
  end
@@ -117,22 +111,11 @@ module DaytonaApiClient
117
111
  # @return true if the model is valid
118
112
  def valid?
119
113
  warn '[DEPRECATED] the `valid?` method is obsolete'
120
- return false if @sandbox_id.nil?
121
114
  return false if @url.nil?
122
115
  return false if @token.nil?
123
116
  true
124
117
  end
125
118
 
126
- # Custom attribute writer method with validation
127
- # @param [Object] sandbox_id Value to be assigned
128
- def sandbox_id=(sandbox_id)
129
- if sandbox_id.nil?
130
- fail ArgumentError, 'sandbox_id cannot be nil'
131
- end
132
-
133
- @sandbox_id = sandbox_id
134
- end
135
-
136
119
  # Custom attribute writer method with validation
137
120
  # @param [Object] url Value to be assigned
138
121
  def url=(url)
@@ -158,9 +141,9 @@ module DaytonaApiClient
158
141
  def ==(o)
159
142
  return true if self.equal?(o)
160
143
  self.class == o.class &&
161
- sandbox_id == o.sandbox_id &&
162
144
  url == o.url &&
163
- token == o.token
145
+ token == o.token &&
146
+ legacy_proxy_url == o.legacy_proxy_url
164
147
  end
165
148
 
166
149
  # @see the `==` method
@@ -172,7 +155,7 @@ module DaytonaApiClient
172
155
  # Calculates hash code according to all attributes.
173
156
  # @return [Integer] Hash code
174
157
  def hash
175
- [sandbox_id, url, token].hash
158
+ [url, token, legacy_proxy_url].hash
176
159
  end
177
160
 
178
161
  # Builds the object from hash
@@ -15,67 +15,13 @@ require 'time'
15
15
 
16
16
  module DaytonaApiClient
17
17
  class Region
18
- # Region ID
19
- attr_accessor :id
20
-
21
18
  # Region name
22
19
  attr_accessor :name
23
20
 
24
- # Organization ID
25
- attr_accessor :organization_id
26
-
27
- # The type of the region
28
- attr_accessor :region_type
29
-
30
- # Creation timestamp
31
- attr_accessor :created_at
32
-
33
- # Last update timestamp
34
- attr_accessor :updated_at
35
-
36
- # Proxy URL for the region
37
- attr_accessor :proxy_url
38
-
39
- # SSH Gateway URL for the region
40
- attr_accessor :ssh_gateway_url
41
-
42
- # Snapshot Manager URL for the region
43
- attr_accessor :snapshot_manager_url
44
-
45
- class EnumAttributeValidator
46
- attr_reader :datatype
47
- attr_reader :allowable_values
48
-
49
- def initialize(datatype, allowable_values)
50
- @allowable_values = allowable_values.map do |value|
51
- case datatype.to_s
52
- when /Integer/i
53
- value.to_i
54
- when /Float/i
55
- value.to_f
56
- else
57
- value
58
- end
59
- end
60
- end
61
-
62
- def valid?(value)
63
- !value || allowable_values.include?(value)
64
- end
65
- end
66
-
67
21
  # Attribute mapping from ruby-style variable name to JSON key.
68
22
  def self.attribute_map
69
23
  {
70
- :'id' => :'id',
71
- :'name' => :'name',
72
- :'organization_id' => :'organizationId',
73
- :'region_type' => :'regionType',
74
- :'created_at' => :'createdAt',
75
- :'updated_at' => :'updatedAt',
76
- :'proxy_url' => :'proxyUrl',
77
- :'ssh_gateway_url' => :'sshGatewayUrl',
78
- :'snapshot_manager_url' => :'snapshotManagerUrl'
24
+ :'name' => :'name'
79
25
  }
80
26
  end
81
27
 
@@ -92,25 +38,13 @@ module DaytonaApiClient
92
38
  # Attribute type mapping.
93
39
  def self.openapi_types
94
40
  {
95
- :'id' => :'String',
96
- :'name' => :'String',
97
- :'organization_id' => :'String',
98
- :'region_type' => :'RegionType',
99
- :'created_at' => :'String',
100
- :'updated_at' => :'String',
101
- :'proxy_url' => :'String',
102
- :'ssh_gateway_url' => :'String',
103
- :'snapshot_manager_url' => :'String'
41
+ :'name' => :'String'
104
42
  }
105
43
  end
106
44
 
107
45
  # List of attributes with nullable: true
108
46
  def self.openapi_nullable
109
47
  Set.new([
110
- :'organization_id',
111
- :'proxy_url',
112
- :'ssh_gateway_url',
113
- :'snapshot_manager_url'
114
48
  ])
115
49
  end
116
50
 
@@ -130,51 +64,11 @@ module DaytonaApiClient
130
64
  h[k.to_sym] = v
131
65
  }
132
66
 
133
- if attributes.key?(:'id')
134
- self.id = attributes[:'id']
135
- else
136
- self.id = nil
137
- end
138
-
139
67
  if attributes.key?(:'name')
140
68
  self.name = attributes[:'name']
141
69
  else
142
70
  self.name = nil
143
71
  end
144
-
145
- if attributes.key?(:'organization_id')
146
- self.organization_id = attributes[:'organization_id']
147
- end
148
-
149
- if attributes.key?(:'region_type')
150
- self.region_type = attributes[:'region_type']
151
- else
152
- self.region_type = nil
153
- end
154
-
155
- if attributes.key?(:'created_at')
156
- self.created_at = attributes[:'created_at']
157
- else
158
- self.created_at = nil
159
- end
160
-
161
- if attributes.key?(:'updated_at')
162
- self.updated_at = attributes[:'updated_at']
163
- else
164
- self.updated_at = nil
165
- end
166
-
167
- if attributes.key?(:'proxy_url')
168
- self.proxy_url = attributes[:'proxy_url']
169
- end
170
-
171
- if attributes.key?(:'ssh_gateway_url')
172
- self.ssh_gateway_url = attributes[:'ssh_gateway_url']
173
- end
174
-
175
- if attributes.key?(:'snapshot_manager_url')
176
- self.snapshot_manager_url = attributes[:'snapshot_manager_url']
177
- end
178
72
  end
179
73
 
180
74
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -182,26 +76,10 @@ module DaytonaApiClient
182
76
  def list_invalid_properties
183
77
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
184
78
  invalid_properties = Array.new
185
- if @id.nil?
186
- invalid_properties.push('invalid value for "id", id cannot be nil.')
187
- end
188
-
189
79
  if @name.nil?
190
80
  invalid_properties.push('invalid value for "name", name cannot be nil.')
191
81
  end
192
82
 
193
- if @region_type.nil?
194
- invalid_properties.push('invalid value for "region_type", region_type cannot be nil.')
195
- end
196
-
197
- if @created_at.nil?
198
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
199
- end
200
-
201
- if @updated_at.nil?
202
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
203
- end
204
-
205
83
  invalid_properties
206
84
  end
207
85
 
@@ -209,24 +87,10 @@ module DaytonaApiClient
209
87
  # @return true if the model is valid
210
88
  def valid?
211
89
  warn '[DEPRECATED] the `valid?` method is obsolete'
212
- return false if @id.nil?
213
90
  return false if @name.nil?
214
- return false if @region_type.nil?
215
- return false if @created_at.nil?
216
- return false if @updated_at.nil?
217
91
  true
218
92
  end
219
93
 
220
- # Custom attribute writer method with validation
221
- # @param [Object] id Value to be assigned
222
- def id=(id)
223
- if id.nil?
224
- fail ArgumentError, 'id cannot be nil'
225
- end
226
-
227
- @id = id
228
- end
229
-
230
94
  # Custom attribute writer method with validation
231
95
  # @param [Object] name Value to be assigned
232
96
  def name=(name)
@@ -237,50 +101,12 @@ module DaytonaApiClient
237
101
  @name = name
238
102
  end
239
103
 
240
- # Custom attribute writer method with validation
241
- # @param [Object] region_type Value to be assigned
242
- def region_type=(region_type)
243
- if region_type.nil?
244
- fail ArgumentError, 'region_type cannot be nil'
245
- end
246
-
247
- @region_type = region_type
248
- end
249
-
250
- # Custom attribute writer method with validation
251
- # @param [Object] created_at Value to be assigned
252
- def created_at=(created_at)
253
- if created_at.nil?
254
- fail ArgumentError, 'created_at cannot be nil'
255
- end
256
-
257
- @created_at = created_at
258
- end
259
-
260
- # Custom attribute writer method with validation
261
- # @param [Object] updated_at Value to be assigned
262
- def updated_at=(updated_at)
263
- if updated_at.nil?
264
- fail ArgumentError, 'updated_at cannot be nil'
265
- end
266
-
267
- @updated_at = updated_at
268
- end
269
-
270
104
  # Checks equality by comparing each attribute.
271
105
  # @param [Object] Object to be compared
272
106
  def ==(o)
273
107
  return true if self.equal?(o)
274
108
  self.class == o.class &&
275
- id == o.id &&
276
- name == o.name &&
277
- organization_id == o.organization_id &&
278
- region_type == o.region_type &&
279
- created_at == o.created_at &&
280
- updated_at == o.updated_at &&
281
- proxy_url == o.proxy_url &&
282
- ssh_gateway_url == o.ssh_gateway_url &&
283
- snapshot_manager_url == o.snapshot_manager_url
109
+ name == o.name
284
110
  end
285
111
 
286
112
  # @see the `==` method
@@ -292,7 +118,7 @@ module DaytonaApiClient
292
118
  # Calculates hash code according to all attributes.
293
119
  # @return [Integer] Hash code
294
120
  def hash
295
- [id, name, organization_id, region_type, created_at, updated_at, proxy_url, ssh_gateway_url, snapshot_manager_url].hash
121
+ [name].hash
296
122
  end
297
123
 
298
124
  # Builds the object from hash