Class: VersSdk::VmCreateVmConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/vers_sdk/models.rb

Overview

Struct representing configuration options common to all VMs

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json_str) ⇒ Object



1566
1567
1568
1569
# File 'lib/vers_sdk/models.rb', line 1566

def self.from_json(json_str)
  obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
  new(obj)
end

Instance Method Details

#to_hObject



1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
# File 'lib/vers_sdk/models.rb', line 1571

def to_h
  {
    "fs_size_mib" => @vm_create_vm_config,
    "image_name" => @vm_create_vm_config,
    "kernel_name" => @vm_create_vm_config,
    "labels" => @vm_create_vm_config,
    "mem_size_mib" => @vm_create_vm_config,
    "vcpu_count" => @vm_create_vm_config,
  }
end

#to_json(*args) ⇒ Object



1582
1583
1584
# File 'lib/vers_sdk/models.rb', line 1582

def to_json(*args)
  to_h.to_json(*args)
end