Class: OvirtSDK4::Device
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Device
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary (collapse)
-
- (String) comment
Returns the value of the
comment
attribute. -
- (Object) comment=(value)
Sets the value of the
comment
attribute. -
- (String) description
Returns the value of the
description
attribute. -
- (Object) description=(value)
Sets the value of the
description
attribute. -
- (String) id
Returns the value of the
id
attribute. -
- (Object) id=(value)
Sets the value of the
id
attribute. -
- (Device) initialize(opts = {})
constructor
Creates a new instance of the Device class.
-
- (InstanceType) instance_type
Returns the value of the
instance_type
attribute. -
- (Object) instance_type=(value)
Sets the value of the
instance_type
attribute. -
- (String) name
Returns the value of the
name
attribute. -
- (Object) name=(value)
Sets the value of the
name
attribute. -
- (Template) template
Returns the value of the
template
attribute. -
- (Object) template=(value)
Sets the value of the
template
attribute. -
- (Vm) vm
Returns the value of the
vm
attribute. -
- (Object) vm=(value)
Sets the value of the
vm
attribute. -
- (Array<Vm>) vms
Returns the value of the
vms
attribute. -
- (Object) vms=(list)
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
- (Device) initialize(opts = {})
Creates a new instance of the OvirtSDK4::Device class.
25728 25729 25730 25731 25732 25733 25734 25735 25736 25737 25738 |
# File 'lib/ovirtsdk4/types.rb', line 25728 def initialize(opts = {}) super(opts) self.comment = opts[:comment] self.description = opts[:description] self.id = opts[:id] self.instance_type = opts[:instance_type] self.name = opts[:name] self.template = opts[:template] self.vm = opts[:vm] self.vms = opts[:vms] end |
Instance Method Details
- (String) comment
Returns the value of the comment
attribute.
25537 25538 25539 |
# File 'lib/ovirtsdk4/types.rb', line 25537 def comment return @comment end |
- (Object) comment=(value)
Sets the value of the comment
attribute.
25546 25547 25548 |
# File 'lib/ovirtsdk4/types.rb', line 25546 def comment=(value) @comment = value end |
- (String) description
Returns the value of the description
attribute.
25555 25556 25557 |
# File 'lib/ovirtsdk4/types.rb', line 25555 def description return @description end |
- (Object) description=(value)
Sets the value of the description
attribute.
25564 25565 25566 |
# File 'lib/ovirtsdk4/types.rb', line 25564 def description=(value) @description = value end |
- (String) id
Returns the value of the id
attribute.
25573 25574 25575 |
# File 'lib/ovirtsdk4/types.rb', line 25573 def id return @id end |
- (Object) id=(value)
Sets the value of the id
attribute.
25582 25583 25584 |
# File 'lib/ovirtsdk4/types.rb', line 25582 def id=(value) @id = value end |
- (InstanceType) instance_type
Returns the value of the instance_type
attribute.
25591 25592 25593 |
# File 'lib/ovirtsdk4/types.rb', line 25591 def instance_type return @instance_type end |
- (Object) instance_type=(value)
Sets the value of the instance_type
attribute.
The value
parameter can be an instance of InstanceType or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
25604 25605 25606 25607 25608 25609 |
# File 'lib/ovirtsdk4/types.rb', line 25604 def instance_type=(value) if value.is_a?(Hash) value = InstanceType.new(value) end @instance_type = value end |
- (String) name
Returns the value of the name
attribute.
25616 25617 25618 |
# File 'lib/ovirtsdk4/types.rb', line 25616 def name return @name end |
- (Object) name=(value)
Sets the value of the name
attribute.
25625 25626 25627 |
# File 'lib/ovirtsdk4/types.rb', line 25625 def name=(value) @name = value end |
- (Template) template
Returns the value of the template
attribute.
25634 25635 25636 |
# File 'lib/ovirtsdk4/types.rb', line 25634 def template return @template end |
- (Object) template=(value)
Sets the value of the template
attribute.
The value
parameter can be an instance of Template or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
25647 25648 25649 25650 25651 25652 |
# File 'lib/ovirtsdk4/types.rb', line 25647 def template=(value) if value.is_a?(Hash) value = Template.new(value) end @template = value end |
- (Vm) vm
Returns the value of the vm
attribute.
25659 25660 25661 |
# File 'lib/ovirtsdk4/types.rb', line 25659 def vm return @vm end |
- (Object) vm=(value)
Sets the value of the vm
attribute.
The value
parameter can be an instance of Vm or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
25672 25673 25674 25675 25676 25677 |
# File 'lib/ovirtsdk4/types.rb', line 25672 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |
- (Array<Vm>) vms
Returns the value of the vms
attribute.
25684 25685 25686 |
# File 'lib/ovirtsdk4/types.rb', line 25684 def vms return @vms end |
- (Object) vms=(list)
Sets the value of the vms
attribute.
25692 25693 25694 25695 25696 25697 25698 25699 25700 25701 25702 |
# File 'lib/ovirtsdk4/types.rb', line 25692 def vms=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Vm.new(value) end end end @vms = list end |