daytona_api_client 0.183.0 → 0.184.0.alpha.1

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: da30964da694521d23dde79a4dfc52507fcf2eaaa0e5d779ad16e2478994ee2b
4
- data.tar.gz: 2f6faab4e9e97f30a39954e2a3858366c9bb984f5b1c757678ba537e1248e880
3
+ metadata.gz: 877c8b3e0802c0a1fa8ba5c5e9ac9ef3627cfc949d82c3b8080794380b78e2b2
4
+ data.tar.gz: 6e4f25286aaf711e0b8eceea80af086052aa77c3f5117e803f281bbfa04c87ee
5
5
  SHA512:
6
- metadata.gz: 59f7cbcdbba7f4ad63810542dc6dd5f2e99377871c6e33595d1928a7f8f914ba125054ebfc721b3d59ba9bf48f754f8b75bf6dbe21d1f7f1a54787a883348895
7
- data.tar.gz: 1c313cc190458f7353b12ac37911e6d9a5c57a45622b5a1251e49eb168aa0639d1c8721e6721e284f8ae478eabe774fbb614906b4668ec61704044bbc49f23f6
6
+ metadata.gz: 9d3fe730575d4763150825a866a495042c53f028e9e00c71367d45df2ea7715ed670c2f94aacb1e70ada4aeeabb6b698b10f1f4c64f4a85e76647613c5c36160
7
+ data.tar.gz: b67d41b963d55f4d5222e6b3e38e7e8223b9ed193248672409572f052759defd479e743868f4a2657456496893a9058dd47f920cae90cdaab5fa27b1ec75c546
@@ -49,7 +49,6 @@ lib/daytona_api_client/models/create_linked_account.rb
49
49
  lib/daytona_api_client/models/create_organization.rb
50
50
  lib/daytona_api_client/models/create_organization_invitation.rb
51
51
  lib/daytona_api_client/models/create_organization_quota.rb
52
- lib/daytona_api_client/models/create_organization_region_quota.rb
53
52
  lib/daytona_api_client/models/create_organization_role.rb
54
53
  lib/daytona_api_client/models/create_region.rb
55
54
  lib/daytona_api_client/models/create_region_response.rb
@@ -81,84 +81,6 @@ module DaytonaApiClient
81
81
  return data, status_code, headers
82
82
  end
83
83
 
84
- # Create organization region quota
85
- # @param organization_id [String] Organization ID
86
- # @param region_id [String] ID of the region the new quota applies to
87
- # @param create_organization_region_quota [CreateOrganizationRegionQuota]
88
- # @param [Hash] opts the optional parameters
89
- # @return [RegionQuota]
90
- def admin_create_organization_region_quota(organization_id, region_id, create_organization_region_quota, opts = {})
91
- data, _status_code, _headers = admin_create_organization_region_quota_with_http_info(organization_id, region_id, create_organization_region_quota, opts)
92
- data
93
- end
94
-
95
- # Create organization region quota
96
- # @param organization_id [String] Organization ID
97
- # @param region_id [String] ID of the region the new quota applies to
98
- # @param create_organization_region_quota [CreateOrganizationRegionQuota]
99
- # @param [Hash] opts the optional parameters
100
- # @return [Array<(RegionQuota, Integer, Hash)>] RegionQuota data, response status code and response headers
101
- def admin_create_organization_region_quota_with_http_info(organization_id, region_id, create_organization_region_quota, opts = {})
102
- if @api_client.config.debugging
103
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_create_organization_region_quota ...'
104
- end
105
- # verify the required parameter 'organization_id' is set
106
- if @api_client.config.client_side_validation && organization_id.nil?
107
- fail ArgumentError, "Missing the required parameter 'organization_id' when calling AdminApi.admin_create_organization_region_quota"
108
- end
109
- # verify the required parameter 'region_id' is set
110
- if @api_client.config.client_side_validation && region_id.nil?
111
- fail ArgumentError, "Missing the required parameter 'region_id' when calling AdminApi.admin_create_organization_region_quota"
112
- end
113
- # verify the required parameter 'create_organization_region_quota' is set
114
- if @api_client.config.client_side_validation && create_organization_region_quota.nil?
115
- fail ArgumentError, "Missing the required parameter 'create_organization_region_quota' when calling AdminApi.admin_create_organization_region_quota"
116
- end
117
- # resource path
118
- local_var_path = '/admin/organizations/{organizationId}/quota/{regionId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s))
119
-
120
- # query parameters
121
- query_params = opts[:query_params] || {}
122
-
123
- # header parameters
124
- header_params = opts[:header_params] || {}
125
- # HTTP header 'Accept' (if needed)
126
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
127
- # HTTP header 'Content-Type'
128
- content_type = @api_client.select_header_content_type(['application/json'])
129
- if !content_type.nil?
130
- header_params['Content-Type'] = content_type
131
- end
132
-
133
- # form parameters
134
- form_params = opts[:form_params] || {}
135
-
136
- # http body (model)
137
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_region_quota)
138
-
139
- # return_type
140
- return_type = opts[:debug_return_type] || 'RegionQuota'
141
-
142
- # auth_names
143
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
144
-
145
- new_options = opts.merge(
146
- :operation => :"AdminApi.admin_create_organization_region_quota",
147
- :header_params => header_params,
148
- :query_params => query_params,
149
- :form_params => form_params,
150
- :body => post_body,
151
- :auth_names => auth_names,
152
- :return_type => return_type
153
- )
154
-
155
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
156
- if @api_client.config.debugging
157
- @api_client.config.logger.debug "API called: AdminApi#admin_create_organization_region_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
158
- end
159
- return data, status_code, headers
160
- end
161
-
162
84
  # Create runner
163
85
  # @param admin_create_runner [AdminCreateRunner]
164
86
  # @param [Hash] opts the optional parameters
@@ -289,77 +211,6 @@ module DaytonaApiClient
289
211
  return data, status_code, headers
290
212
  end
291
213
 
292
- # Delete organization region quota
293
- # @param organization_id [String] Organization ID
294
- # @param region_id [String] Region ID
295
- # @param sandbox_class [SandboxClass] Sandbox class
296
- # @param [Hash] opts the optional parameters
297
- # @return [nil]
298
- def admin_delete_organization_region_quota(organization_id, region_id, sandbox_class, opts = {})
299
- admin_delete_organization_region_quota_with_http_info(organization_id, region_id, sandbox_class, opts)
300
- nil
301
- end
302
-
303
- # Delete organization region quota
304
- # @param organization_id [String] Organization ID
305
- # @param region_id [String] Region ID
306
- # @param sandbox_class [SandboxClass] Sandbox class
307
- # @param [Hash] opts the optional parameters
308
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
309
- def admin_delete_organization_region_quota_with_http_info(organization_id, region_id, sandbox_class, opts = {})
310
- if @api_client.config.debugging
311
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_organization_region_quota ...'
312
- end
313
- # verify the required parameter 'organization_id' is set
314
- if @api_client.config.client_side_validation && organization_id.nil?
315
- fail ArgumentError, "Missing the required parameter 'organization_id' when calling AdminApi.admin_delete_organization_region_quota"
316
- end
317
- # verify the required parameter 'region_id' is set
318
- if @api_client.config.client_side_validation && region_id.nil?
319
- fail ArgumentError, "Missing the required parameter 'region_id' when calling AdminApi.admin_delete_organization_region_quota"
320
- end
321
- # verify the required parameter 'sandbox_class' is set
322
- if @api_client.config.client_side_validation && sandbox_class.nil?
323
- fail ArgumentError, "Missing the required parameter 'sandbox_class' when calling AdminApi.admin_delete_organization_region_quota"
324
- end
325
- # resource path
326
- local_var_path = '/admin/organizations/{organizationId}/quota/{regionId}/{sandboxClass}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s)).sub('{' + 'sandboxClass' + '}', CGI.escape(sandbox_class.to_s))
327
-
328
- # query parameters
329
- query_params = opts[:query_params] || {}
330
-
331
- # header parameters
332
- header_params = opts[:header_params] || {}
333
-
334
- # form parameters
335
- form_params = opts[:form_params] || {}
336
-
337
- # http body (model)
338
- post_body = opts[:debug_body]
339
-
340
- # return_type
341
- return_type = opts[:debug_return_type]
342
-
343
- # auth_names
344
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
345
-
346
- new_options = opts.merge(
347
- :operation => :"AdminApi.admin_delete_organization_region_quota",
348
- :header_params => header_params,
349
- :query_params => query_params,
350
- :form_params => form_params,
351
- :body => post_body,
352
- :auth_names => auth_names,
353
- :return_type => return_type
354
- )
355
-
356
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
357
- if @api_client.config.debugging
358
- @api_client.config.logger.debug "API called: AdminApi#admin_delete_organization_region_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
359
- end
360
- return data, status_code, headers
361
- end
362
-
363
214
  # Delete runner
364
215
  # @param id [String] Runner ID
365
216
  # @param [Hash] opts the optional parameters
@@ -568,79 +419,6 @@ module DaytonaApiClient
568
419
  return data, status_code, headers
569
420
  end
570
421
 
571
- # Get organization region quota
572
- # @param organization_id [String] Organization ID
573
- # @param region_id [String] Region ID
574
- # @param sandbox_class [SandboxClass] Sandbox class
575
- # @param [Hash] opts the optional parameters
576
- # @return [RegionQuota]
577
- def admin_get_organization_region_quota(organization_id, region_id, sandbox_class, opts = {})
578
- data, _status_code, _headers = admin_get_organization_region_quota_with_http_info(organization_id, region_id, sandbox_class, opts)
579
- data
580
- end
581
-
582
- # Get organization region quota
583
- # @param organization_id [String] Organization ID
584
- # @param region_id [String] Region ID
585
- # @param sandbox_class [SandboxClass] Sandbox class
586
- # @param [Hash] opts the optional parameters
587
- # @return [Array<(RegionQuota, Integer, Hash)>] RegionQuota data, response status code and response headers
588
- def admin_get_organization_region_quota_with_http_info(organization_id, region_id, sandbox_class, opts = {})
589
- if @api_client.config.debugging
590
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_get_organization_region_quota ...'
591
- end
592
- # verify the required parameter 'organization_id' is set
593
- if @api_client.config.client_side_validation && organization_id.nil?
594
- fail ArgumentError, "Missing the required parameter 'organization_id' when calling AdminApi.admin_get_organization_region_quota"
595
- end
596
- # verify the required parameter 'region_id' is set
597
- if @api_client.config.client_side_validation && region_id.nil?
598
- fail ArgumentError, "Missing the required parameter 'region_id' when calling AdminApi.admin_get_organization_region_quota"
599
- end
600
- # verify the required parameter 'sandbox_class' is set
601
- if @api_client.config.client_side_validation && sandbox_class.nil?
602
- fail ArgumentError, "Missing the required parameter 'sandbox_class' when calling AdminApi.admin_get_organization_region_quota"
603
- end
604
- # resource path
605
- local_var_path = '/admin/organizations/{organizationId}/quota/{regionId}/{sandboxClass}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s)).sub('{' + 'sandboxClass' + '}', CGI.escape(sandbox_class.to_s))
606
-
607
- # query parameters
608
- query_params = opts[:query_params] || {}
609
-
610
- # header parameters
611
- header_params = opts[:header_params] || {}
612
- # HTTP header 'Accept' (if needed)
613
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
614
-
615
- # form parameters
616
- form_params = opts[:form_params] || {}
617
-
618
- # http body (model)
619
- post_body = opts[:debug_body]
620
-
621
- # return_type
622
- return_type = opts[:debug_return_type] || 'RegionQuota'
623
-
624
- # auth_names
625
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
626
-
627
- new_options = opts.merge(
628
- :operation => :"AdminApi.admin_get_organization_region_quota",
629
- :header_params => header_params,
630
- :query_params => query_params,
631
- :form_params => form_params,
632
- :body => post_body,
633
- :auth_names => auth_names,
634
- :return_type => return_type
635
- )
636
-
637
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
638
- if @api_client.config.debugging
639
- @api_client.config.logger.debug "API called: AdminApi#admin_get_organization_region_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
640
- end
641
- return data, status_code, headers
642
- end
643
-
644
422
  # Get runner by ID
645
423
  # @param id [String] Runner ID
646
424
  # @param [Hash] opts the optional parameters
@@ -1311,82 +1089,6 @@ module DaytonaApiClient
1311
1089
  return data, status_code, headers
1312
1090
  end
1313
1091
 
1314
- # Update organization region quota
1315
- # @param organization_id [String] Organization ID
1316
- # @param region_id [String] Region ID
1317
- # @param update_organization_region_quota [UpdateOrganizationRegionQuota]
1318
- # @param [Hash] opts the optional parameters
1319
- # @return [nil]
1320
- def admin_update_organization_region_quota(organization_id, region_id, update_organization_region_quota, opts = {})
1321
- admin_update_organization_region_quota_with_http_info(organization_id, region_id, update_organization_region_quota, opts)
1322
- nil
1323
- end
1324
-
1325
- # Update organization region quota
1326
- # @param organization_id [String] Organization ID
1327
- # @param region_id [String] Region ID
1328
- # @param update_organization_region_quota [UpdateOrganizationRegionQuota]
1329
- # @param [Hash] opts the optional parameters
1330
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1331
- def admin_update_organization_region_quota_with_http_info(organization_id, region_id, update_organization_region_quota, opts = {})
1332
- if @api_client.config.debugging
1333
- @api_client.config.logger.debug 'Calling API: AdminApi.admin_update_organization_region_quota ...'
1334
- end
1335
- # verify the required parameter 'organization_id' is set
1336
- if @api_client.config.client_side_validation && organization_id.nil?
1337
- fail ArgumentError, "Missing the required parameter 'organization_id' when calling AdminApi.admin_update_organization_region_quota"
1338
- end
1339
- # verify the required parameter 'region_id' is set
1340
- if @api_client.config.client_side_validation && region_id.nil?
1341
- fail ArgumentError, "Missing the required parameter 'region_id' when calling AdminApi.admin_update_organization_region_quota"
1342
- end
1343
- # verify the required parameter 'update_organization_region_quota' is set
1344
- if @api_client.config.client_side_validation && update_organization_region_quota.nil?
1345
- fail ArgumentError, "Missing the required parameter 'update_organization_region_quota' when calling AdminApi.admin_update_organization_region_quota"
1346
- end
1347
- # resource path
1348
- local_var_path = '/admin/organizations/{organizationId}/quota/{regionId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'regionId' + '}', CGI.escape(region_id.to_s))
1349
-
1350
- # query parameters
1351
- query_params = opts[:query_params] || {}
1352
-
1353
- # header parameters
1354
- header_params = opts[:header_params] || {}
1355
- # HTTP header 'Content-Type'
1356
- content_type = @api_client.select_header_content_type(['application/json'])
1357
- if !content_type.nil?
1358
- header_params['Content-Type'] = content_type
1359
- end
1360
-
1361
- # form parameters
1362
- form_params = opts[:form_params] || {}
1363
-
1364
- # http body (model)
1365
- post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_region_quota)
1366
-
1367
- # return_type
1368
- return_type = opts[:debug_return_type]
1369
-
1370
- # auth_names
1371
- auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1372
-
1373
- new_options = opts.merge(
1374
- :operation => :"AdminApi.admin_update_organization_region_quota",
1375
- :header_params => header_params,
1376
- :query_params => query_params,
1377
- :form_params => form_params,
1378
- :body => post_body,
1379
- :auth_names => auth_names,
1380
- :return_type => return_type
1381
- )
1382
-
1383
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1384
- if @api_client.config.debugging
1385
- @api_client.config.logger.debug "API called: AdminApi#admin_update_organization_region_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1386
- end
1387
- return data, status_code, headers
1388
- end
1389
-
1390
1092
  # Update runner scheduling status
1391
1093
  # @param id [String]
1392
1094
  # @param [Hash] opts the optional parameters
@@ -1709,7 +1709,6 @@ module DaytonaApiClient
1709
1709
  # @option opts [Array<SandboxState>] :states List of states to filter by.
1710
1710
  # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1711
1711
  # @option opts [Array<String>] :region_ids List of regions IDs to filter by
1712
- # @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
1713
1712
  # @option opts [Float] :min_cpu Minimum CPU
1714
1713
  # @option opts [Float] :max_cpu Maximum CPU
1715
1714
  # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
@@ -1743,7 +1742,6 @@ module DaytonaApiClient
1743
1742
  # @option opts [Array<SandboxState>] :states List of states to filter by.
1744
1743
  # @option opts [Array<String>] :snapshots List of snapshot names to filter by
1745
1744
  # @option opts [Array<String>] :region_ids List of regions IDs to filter by
1746
- # @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
1747
1745
  # @option opts [Float] :min_cpu Minimum CPU
1748
1746
  # @option opts [Float] :max_cpu Maximum CPU
1749
1747
  # @option opts [Float] :min_memory_gi_b Minimum memory in GiB
@@ -1809,7 +1807,6 @@ module DaytonaApiClient
1809
1807
  query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
1810
1808
  query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
1811
1809
  query_params[:'regionIds'] = @api_client.build_collection_param(opts[:'region_ids'], :multi) if !opts[:'region_ids'].nil?
1812
- query_params[:'sandboxClasses'] = @api_client.build_collection_param(opts[:'sandbox_classes'], :multi) if !opts[:'sandbox_classes'].nil?
1813
1810
  query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
1814
1811
  query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
1815
1812
  query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
@@ -39,6 +39,9 @@ module DaytonaApiClient
39
39
  # Comma-separated list of allowed CIDR network addresses for the sandbox
40
40
  attr_accessor :network_allow_list
41
41
 
42
+ # The sandbox class type
43
+ attr_accessor :_class
44
+
42
45
  # The target (region) where the sandbox will be created
43
46
  attr_accessor :target
44
47
 
@@ -69,8 +72,27 @@ module DaytonaApiClient
69
72
  # Build information for the sandbox
70
73
  attr_accessor :build_info
71
74
 
72
- # 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.
73
- attr_accessor :linked_sandbox
75
+ class EnumAttributeValidator
76
+ attr_reader :datatype
77
+ attr_reader :allowable_values
78
+
79
+ def initialize(datatype, allowable_values)
80
+ @allowable_values = allowable_values.map do |value|
81
+ case datatype.to_s
82
+ when /Integer/i
83
+ value.to_i
84
+ when /Float/i
85
+ value.to_f
86
+ else
87
+ value
88
+ end
89
+ end
90
+ end
91
+
92
+ def valid?(value)
93
+ !value || allowable_values.include?(value)
94
+ end
95
+ end
74
96
 
75
97
  # Attribute mapping from ruby-style variable name to JSON key.
76
98
  def self.attribute_map
@@ -83,6 +105,7 @@ module DaytonaApiClient
83
105
  :'public' => :'public',
84
106
  :'network_block_all' => :'networkBlockAll',
85
107
  :'network_allow_list' => :'networkAllowList',
108
+ :'_class' => :'class',
86
109
  :'target' => :'target',
87
110
  :'cpu' => :'cpu',
88
111
  :'gpu' => :'gpu',
@@ -92,8 +115,7 @@ module DaytonaApiClient
92
115
  :'auto_archive_interval' => :'autoArchiveInterval',
93
116
  :'auto_delete_interval' => :'autoDeleteInterval',
94
117
  :'volumes' => :'volumes',
95
- :'build_info' => :'buildInfo',
96
- :'linked_sandbox' => :'linkedSandbox'
118
+ :'build_info' => :'buildInfo'
97
119
  }
98
120
  end
99
121
 
@@ -118,6 +140,7 @@ module DaytonaApiClient
118
140
  :'public' => :'Boolean',
119
141
  :'network_block_all' => :'Boolean',
120
142
  :'network_allow_list' => :'String',
143
+ :'_class' => :'String',
121
144
  :'target' => :'String',
122
145
  :'cpu' => :'Integer',
123
146
  :'gpu' => :'Integer',
@@ -127,8 +150,7 @@ module DaytonaApiClient
127
150
  :'auto_archive_interval' => :'Integer',
128
151
  :'auto_delete_interval' => :'Integer',
129
152
  :'volumes' => :'Array<SandboxVolume>',
130
- :'build_info' => :'CreateBuildInfo',
131
- :'linked_sandbox' => :'String'
153
+ :'build_info' => :'CreateBuildInfo'
132
154
  }
133
155
  end
134
156
 
@@ -190,6 +212,10 @@ module DaytonaApiClient
190
212
  self.network_allow_list = attributes[:'network_allow_list']
191
213
  end
192
214
 
215
+ if attributes.key?(:'_class')
216
+ self._class = attributes[:'_class']
217
+ end
218
+
193
219
  if attributes.key?(:'target')
194
220
  self.target = attributes[:'target']
195
221
  end
@@ -231,10 +257,6 @@ module DaytonaApiClient
231
257
  if attributes.key?(:'build_info')
232
258
  self.build_info = attributes[:'build_info']
233
259
  end
234
-
235
- if attributes.key?(:'linked_sandbox')
236
- self.linked_sandbox = attributes[:'linked_sandbox']
237
- end
238
260
  end
239
261
 
240
262
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -249,9 +271,21 @@ module DaytonaApiClient
249
271
  # @return true if the model is valid
250
272
  def valid?
251
273
  warn '[DEPRECATED] the `valid?` method is obsolete'
274
+ _class_validator = EnumAttributeValidator.new('String', ["small", "medium", "large", "unknown_default_open_api"])
275
+ return false unless _class_validator.valid?(@_class)
252
276
  true
253
277
  end
254
278
 
279
+ # Custom attribute writer method checking allowed values (enum).
280
+ # @param [Object] _class Object to be assigned
281
+ def _class=(_class)
282
+ validator = EnumAttributeValidator.new('String', ["small", "medium", "large", "unknown_default_open_api"])
283
+ unless validator.valid?(_class)
284
+ fail ArgumentError, "invalid value for \"_class\", must be one of #{validator.allowable_values}."
285
+ end
286
+ @_class = _class
287
+ end
288
+
255
289
  # Checks equality by comparing each attribute.
256
290
  # @param [Object] Object to be compared
257
291
  def ==(o)
@@ -265,6 +299,7 @@ module DaytonaApiClient
265
299
  public == o.public &&
266
300
  network_block_all == o.network_block_all &&
267
301
  network_allow_list == o.network_allow_list &&
302
+ _class == o._class &&
268
303
  target == o.target &&
269
304
  cpu == o.cpu &&
270
305
  gpu == o.gpu &&
@@ -274,8 +309,7 @@ module DaytonaApiClient
274
309
  auto_archive_interval == o.auto_archive_interval &&
275
310
  auto_delete_interval == o.auto_delete_interval &&
276
311
  volumes == o.volumes &&
277
- build_info == o.build_info &&
278
- linked_sandbox == o.linked_sandbox
312
+ build_info == o.build_info
279
313
  end
280
314
 
281
315
  # @see the `==` method
@@ -287,7 +321,7 @@ module DaytonaApiClient
287
321
  # Calculates hash code according to all attributes.
288
322
  # @return [Integer] Hash code
289
323
  def hash
290
- [name, snapshot, user, env, labels, public, network_block_all, network_allow_list, target, cpu, gpu, 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, _class, target, cpu, gpu, memory, disk, auto_stop_interval, auto_archive_interval, auto_delete_interval, volumes, build_info].hash
291
325
  end
292
326
 
293
327
  # Builds the object from hash
@@ -42,31 +42,6 @@ module DaytonaApiClient
42
42
  # ID of the region where the snapshot will be available. Defaults to organization default region if not specified.
43
43
  attr_accessor :region_id
44
44
 
45
- # Target sandbox class. Determines which runners can host sandboxes created from this snapshot.
46
- attr_accessor :sandbox_class
47
-
48
- class EnumAttributeValidator
49
- attr_reader :datatype
50
- attr_reader :allowable_values
51
-
52
- def initialize(datatype, allowable_values)
53
- @allowable_values = allowable_values.map do |value|
54
- case datatype.to_s
55
- when /Integer/i
56
- value.to_i
57
- when /Float/i
58
- value.to_f
59
- else
60
- value
61
- end
62
- end
63
- end
64
-
65
- def valid?(value)
66
- !value || allowable_values.include?(value)
67
- end
68
- end
69
-
70
45
  # Attribute mapping from ruby-style variable name to JSON key.
71
46
  def self.attribute_map
72
47
  {
@@ -78,8 +53,7 @@ module DaytonaApiClient
78
53
  :'memory' => :'memory',
79
54
  :'disk' => :'disk',
80
55
  :'build_info' => :'buildInfo',
81
- :'region_id' => :'regionId',
82
- :'sandbox_class' => :'sandboxClass'
56
+ :'region_id' => :'regionId'
83
57
  }
84
58
  end
85
59
 
@@ -104,8 +78,7 @@ module DaytonaApiClient
104
78
  :'memory' => :'Integer',
105
79
  :'disk' => :'Integer',
106
80
  :'build_info' => :'CreateBuildInfo',
107
- :'region_id' => :'String',
108
- :'sandbox_class' => :'SandboxClass'
81
+ :'region_id' => :'String'
109
82
  }
110
83
  end
111
84
 
@@ -170,10 +143,6 @@ module DaytonaApiClient
170
143
  if attributes.key?(:'region_id')
171
144
  self.region_id = attributes[:'region_id']
172
145
  end
173
-
174
- if attributes.key?(:'sandbox_class')
175
- self.sandbox_class = attributes[:'sandbox_class']
176
- end
177
146
  end
178
147
 
179
148
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -219,8 +188,7 @@ module DaytonaApiClient
219
188
  memory == o.memory &&
220
189
  disk == o.disk &&
221
190
  build_info == o.build_info &&
222
- region_id == o.region_id &&
223
- sandbox_class == o.sandbox_class
191
+ region_id == o.region_id
224
192
  end
225
193
 
226
194
  # @see the `==` method
@@ -232,7 +200,7 @@ module DaytonaApiClient
232
200
  # Calculates hash code according to all attributes.
233
201
  # @return [Integer] Hash code
234
202
  def hash
235
- [name, image_name, entrypoint, cpu, gpu, memory, disk, build_info, region_id, sandbox_class].hash
203
+ [name, image_name, entrypoint, cpu, gpu, memory, disk, build_info, region_id].hash
236
204
  end
237
205
 
238
206
  # Builds the object from hash