Class: DaytonaApiClient::RunnerFull
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- DaytonaApiClient::RunnerFull
- Defined in:
- lib/daytona_api_client/models/runner_full.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_class ⇒ Object
The class of the runner.
-
#api_key ⇒ Object
The API key for the runner.
-
#api_url ⇒ Object
The API URL of the runner.
-
#api_version ⇒ Object
The api version of the runner.
-
#app_version ⇒ Object
The app version of the runner.
-
#availability_score ⇒ Object
Runner availability score.
-
#cpu ⇒ Object
The CPU capacity of the runner.
-
#created_at ⇒ Object
The creation timestamp of the runner.
-
#current_allocated_cpu ⇒ Object
Current allocated CPU.
-
#current_allocated_disk_gi_b ⇒ Object
Current allocated disk in GiB.
-
#current_allocated_memory_gi_b ⇒ Object
Current allocated memory in GiB.
-
#current_cpu_usage_percentage ⇒ Object
Current CPU usage percentage.
-
#current_disk_usage_percentage ⇒ Object
Current disk usage percentage.
-
#current_memory_usage_percentage ⇒ Object
Current RAM usage percentage.
-
#current_snapshot_count ⇒ Object
Current snapshot count.
-
#current_started_sandboxes ⇒ Object
Current number of started sandboxes.
-
#disk ⇒ Object
The disk capacity of the runner in GiB.
-
#domain ⇒ Object
The domain of the runner.
-
#gpu ⇒ Object
The GPU capacity of the runner.
-
#gpu_type ⇒ Object
The type of GPU.
-
#id ⇒ Object
The ID of the runner.
-
#last_checked ⇒ Object
The last time the runner was checked.
-
#memory ⇒ Object
The memory capacity of the runner in GiB.
-
#name ⇒ Object
The name of the runner.
-
#proxy_url ⇒ Object
The proxy URL of the runner.
-
#region ⇒ Object
The region of the runner.
-
#region_type ⇒ Object
The region type of the runner.
-
#runner_class ⇒ Object
The class of the runner.
-
#state ⇒ Object
The state of the runner.
-
#unschedulable ⇒ Object
Whether the runner is unschedulable.
-
#updated_at ⇒ Object
The last update timestamp of the runner.
-
#version ⇒ Object
The version of the runner (deprecated in favor of apiVersion).
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ RunnerFull
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ RunnerFull
Initializes the object
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 230 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::RunnerFull` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::RunnerFull`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'domain') self.domain = attributes[:'domain'] end if attributes.key?(:'api_url') self.api_url = attributes[:'api_url'] end if attributes.key?(:'proxy_url') self.proxy_url = attributes[:'proxy_url'] end if attributes.key?(:'cpu') self.cpu = attributes[:'cpu'] else self.cpu = nil end if attributes.key?(:'memory') self.memory = attributes[:'memory'] else self.memory = nil end if attributes.key?(:'disk') self.disk = attributes[:'disk'] else self.disk = nil end if attributes.key?(:'gpu') self.gpu = attributes[:'gpu'] end if attributes.key?(:'gpu_type') self.gpu_type = attributes[:'gpu_type'] end if attributes.key?(:'_class') self._class = attributes[:'_class'] else self._class = nil end if attributes.key?(:'current_cpu_usage_percentage') self.current_cpu_usage_percentage = attributes[:'current_cpu_usage_percentage'] end if attributes.key?(:'current_memory_usage_percentage') self.current_memory_usage_percentage = attributes[:'current_memory_usage_percentage'] end if attributes.key?(:'current_disk_usage_percentage') self.current_disk_usage_percentage = attributes[:'current_disk_usage_percentage'] end if attributes.key?(:'current_allocated_cpu') self.current_allocated_cpu = attributes[:'current_allocated_cpu'] end if attributes.key?(:'current_allocated_memory_gi_b') self.current_allocated_memory_gi_b = attributes[:'current_allocated_memory_gi_b'] end if attributes.key?(:'current_allocated_disk_gi_b') self.current_allocated_disk_gi_b = attributes[:'current_allocated_disk_gi_b'] end if attributes.key?(:'current_snapshot_count') self.current_snapshot_count = attributes[:'current_snapshot_count'] end if attributes.key?(:'current_started_sandboxes') self.current_started_sandboxes = attributes[:'current_started_sandboxes'] end if attributes.key?(:'availability_score') self.availability_score = attributes[:'availability_score'] end if attributes.key?(:'region') self.region = attributes[:'region'] else self.region = nil end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'state') self.state = attributes[:'state'] else self.state = nil end if attributes.key?(:'last_checked') self.last_checked = attributes[:'last_checked'] end if attributes.key?(:'unschedulable') self.unschedulable = attributes[:'unschedulable'] else self.unschedulable = nil end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else self.created_at = nil end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] else self.updated_at = nil end if attributes.key?(:'version') self.version = attributes[:'version'] else self.version = nil end if attributes.key?(:'api_version') self.api_version = attributes[:'api_version'] else self.api_version = nil end if attributes.key?(:'runner_class') self.runner_class = attributes[:'runner_class'] else self.runner_class = nil end if attributes.key?(:'app_version') self.app_version = attributes[:'app_version'] end if attributes.key?(:'api_key') self.api_key = attributes[:'api_key'] else self.api_key = nil end if attributes.key?(:'region_type') self.region_type = attributes[:'region_type'] end end |
Instance Attribute Details
#_class ⇒ Object
The class of the runner
46 47 48 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 46 def _class @_class end |
#api_key ⇒ Object
The API key for the runner
109 110 111 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 109 def api_key @api_key end |
#api_url ⇒ Object
The API URL of the runner
25 26 27 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 25 def api_url @api_url end |
#api_version ⇒ Object
The api version of the runner
100 101 102 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 100 def api_version @api_version end |
#app_version ⇒ Object
The app version of the runner
106 107 108 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 106 def app_version @app_version end |
#availability_score ⇒ Object
Runner availability score
73 74 75 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 73 def availability_score @availability_score end |
#cpu ⇒ Object
The CPU capacity of the runner
31 32 33 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 31 def cpu @cpu end |
#created_at ⇒ Object
The creation timestamp of the runner
91 92 93 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 91 def created_at @created_at end |
#current_allocated_cpu ⇒ Object
Current allocated CPU
58 59 60 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 58 def current_allocated_cpu @current_allocated_cpu end |
#current_allocated_disk_gi_b ⇒ Object
Current allocated disk in GiB
64 65 66 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 64 def current_allocated_disk_gi_b @current_allocated_disk_gi_b end |
#current_allocated_memory_gi_b ⇒ Object
Current allocated memory in GiB
61 62 63 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 61 def current_allocated_memory_gi_b @current_allocated_memory_gi_b end |
#current_cpu_usage_percentage ⇒ Object
Current CPU usage percentage
49 50 51 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 49 def current_cpu_usage_percentage @current_cpu_usage_percentage end |
#current_disk_usage_percentage ⇒ Object
Current disk usage percentage
55 56 57 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 55 def current_disk_usage_percentage @current_disk_usage_percentage end |
#current_memory_usage_percentage ⇒ Object
Current RAM usage percentage
52 53 54 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 52 def current_memory_usage_percentage @current_memory_usage_percentage end |
#current_snapshot_count ⇒ Object
Current snapshot count
67 68 69 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 67 def current_snapshot_count @current_snapshot_count end |
#current_started_sandboxes ⇒ Object
Current number of started sandboxes
70 71 72 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 70 def current_started_sandboxes @current_started_sandboxes end |
#disk ⇒ Object
The disk capacity of the runner in GiB
37 38 39 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 37 def disk @disk end |
#domain ⇒ Object
The domain of the runner
22 23 24 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 22 def domain @domain end |
#gpu ⇒ Object
The GPU capacity of the runner
40 41 42 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 40 def gpu @gpu end |
#gpu_type ⇒ Object
The type of GPU
43 44 45 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 43 def gpu_type @gpu_type end |
#id ⇒ Object
The ID of the runner
19 20 21 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 19 def id @id end |
#last_checked ⇒ Object
The last time the runner was checked
85 86 87 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 85 def last_checked @last_checked end |
#memory ⇒ Object
The memory capacity of the runner in GiB
34 35 36 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 34 def memory @memory end |
#name ⇒ Object
The name of the runner
79 80 81 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 79 def name @name end |
#proxy_url ⇒ Object
The proxy URL of the runner
28 29 30 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 28 def proxy_url @proxy_url end |
#region ⇒ Object
The region of the runner
76 77 78 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 76 def region @region end |
#region_type ⇒ Object
The region type of the runner
112 113 114 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 112 def region_type @region_type end |
#runner_class ⇒ Object
The class of the runner
103 104 105 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 103 def runner_class @runner_class end |
#state ⇒ Object
The state of the runner
82 83 84 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 82 def state @state end |
#unschedulable ⇒ Object
Whether the runner is unschedulable
88 89 90 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 88 def unschedulable @unschedulable end |
#updated_at ⇒ Object
The last update timestamp of the runner
94 95 96 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 94 def updated_at @updated_at end |
#version ⇒ Object
The version of the runner (deprecated in favor of apiVersion)
97 98 99 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 97 def version @version end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
175 176 177 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 175 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
180 181 182 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 180 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 137 def self.attribute_map { :'id' => :'id', :'domain' => :'domain', :'api_url' => :'apiUrl', :'proxy_url' => :'proxyUrl', :'cpu' => :'cpu', :'memory' => :'memory', :'disk' => :'disk', :'gpu' => :'gpu', :'gpu_type' => :'gpuType', :'_class' => :'class', :'current_cpu_usage_percentage' => :'currentCpuUsagePercentage', :'current_memory_usage_percentage' => :'currentMemoryUsagePercentage', :'current_disk_usage_percentage' => :'currentDiskUsagePercentage', :'current_allocated_cpu' => :'currentAllocatedCpu', :'current_allocated_memory_gi_b' => :'currentAllocatedMemoryGiB', :'current_allocated_disk_gi_b' => :'currentAllocatedDiskGiB', :'current_snapshot_count' => :'currentSnapshotCount', :'current_started_sandboxes' => :'currentStartedSandboxes', :'availability_score' => :'availabilityScore', :'region' => :'region', :'name' => :'name', :'state' => :'state', :'last_checked' => :'lastChecked', :'unschedulable' => :'unschedulable', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', :'version' => :'version', :'api_version' => :'apiVersion', :'runner_class' => :'runnerClass', :'app_version' => :'appVersion', :'api_key' => :'apiKey', :'region_type' => :'regionType' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 697 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
223 224 225 226 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 223 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 185 def self.openapi_types { :'id' => :'String', :'domain' => :'String', :'api_url' => :'String', :'proxy_url' => :'String', :'cpu' => :'Float', :'memory' => :'Float', :'disk' => :'Float', :'gpu' => :'Float', :'gpu_type' => :'String', :'_class' => :'SandboxClass', :'current_cpu_usage_percentage' => :'Float', :'current_memory_usage_percentage' => :'Float', :'current_disk_usage_percentage' => :'Float', :'current_allocated_cpu' => :'Float', :'current_allocated_memory_gi_b' => :'Float', :'current_allocated_disk_gi_b' => :'Float', :'current_snapshot_count' => :'Float', :'current_started_sandboxes' => :'Float', :'availability_score' => :'Float', :'region' => :'String', :'name' => :'String', :'state' => :'RunnerState', :'last_checked' => :'String', :'unschedulable' => :'Boolean', :'created_at' => :'String', :'updated_at' => :'String', :'version' => :'String', :'api_version' => :'String', :'runner_class' => :'RunnerClass', :'app_version' => :'String', :'api_key' => :'String', :'region_type' => :'RegionType' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 645 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && domain == o.domain && api_url == o.api_url && proxy_url == o.proxy_url && cpu == o.cpu && memory == o.memory && disk == o.disk && gpu == o.gpu && gpu_type == o.gpu_type && _class == o._class && current_cpu_usage_percentage == o.current_cpu_usage_percentage && current_memory_usage_percentage == o.current_memory_usage_percentage && current_disk_usage_percentage == o.current_disk_usage_percentage && current_allocated_cpu == o.current_allocated_cpu && current_allocated_memory_gi_b == o.current_allocated_memory_gi_b && current_allocated_disk_gi_b == o.current_allocated_disk_gi_b && current_snapshot_count == o.current_snapshot_count && current_started_sandboxes == o.current_started_sandboxes && availability_score == o.availability_score && region == o.region && name == o.name && state == o.state && last_checked == o.last_checked && unschedulable == o.unschedulable && created_at == o.created_at && updated_at == o.updated_at && version == o.version && api_version == o.api_version && runner_class == o.runner_class && app_version == o.app_version && api_key == o.api_key && region_type == o.region_type end |
#eql?(o) ⇒ Boolean
684 685 686 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 684 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
690 691 692 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 690 def hash [id, domain, api_url, proxy_url, cpu, memory, disk, gpu, gpu_type, _class, current_cpu_usage_percentage, current_memory_usage_percentage, current_disk_usage_percentage, current_allocated_cpu, current_allocated_memory_gi_b, current_allocated_disk_gi_b, current_snapshot_count, current_started_sandboxes, availability_score, region, name, state, last_checked, unschedulable, created_at, updated_at, version, api_version, runner_class, app_version, api_key, region_type].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 405 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @cpu.nil? invalid_properties.push('invalid value for "cpu", cpu cannot be nil.') end if @memory.nil? invalid_properties.push('invalid value for "memory", memory cannot be nil.') end if @disk.nil? invalid_properties.push('invalid value for "disk", disk cannot be nil.') end if @_class.nil? invalid_properties.push('invalid value for "_class", _class cannot be nil.') end if @region.nil? invalid_properties.push('invalid value for "region", region cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @state.nil? invalid_properties.push('invalid value for "state", state cannot be nil.') end if @unschedulable.nil? invalid_properties.push('invalid value for "unschedulable", unschedulable cannot be nil.') end if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end if @version.nil? invalid_properties.push('invalid value for "version", version cannot be nil.') end if @api_version.nil? invalid_properties.push('invalid value for "api_version", api_version cannot be nil.') end if @runner_class.nil? invalid_properties.push('invalid value for "runner_class", runner_class cannot be nil.') end if @api_key.nil? invalid_properties.push('invalid value for "api_key", api_key cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
719 720 721 722 723 724 725 726 727 728 729 730 731 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 719 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/daytona_api_client/models/runner_full.rb', line 473 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @cpu.nil? return false if @memory.nil? return false if @disk.nil? return false if @_class.nil? return false if @region.nil? return false if @name.nil? return false if @state.nil? return false if @unschedulable.nil? return false if @created_at.nil? return false if @updated_at.nil? return false if @version.nil? return false if @api_version.nil? return false if @runner_class.nil? return false if @api_key.nil? true end |