Class: OvirtSDK4::Checkpoint
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Checkpoint
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#creation_date ⇒ DateTime
Returns the value of the
creation_dateattribute. -
#creation_date=(value) ⇒ Object
Sets the value of the
creation_dateattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#disks ⇒ Array<Disk>
Returns the value of the
disksattribute. -
#disks=(list) ⇒ Object
Sets the value of the
disksattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Checkpoint
constructor
Creates a new instance of the Checkpoint class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#parent_id ⇒ String
Returns the value of the
parent_idattribute. -
#parent_id=(value) ⇒ Object
Sets the value of the
parent_idattribute. -
#state ⇒ CheckpointState
Returns the value of the
stateattribute. -
#state=(value) ⇒ Object
Sets the value of the
stateattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Checkpoint
Creates a new instance of the OvirtSDK4::Checkpoint class.
33724 33725 33726 33727 33728 33729 33730 33731 |
# File 'lib/ovirtsdk4/types.rb', line 33724 def initialize(opts = {}) super(opts) self.creation_date = opts[:creation_date] self.disks = opts[:disks] self.parent_id = opts[:parent_id] self.state = opts[:state] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
33736 33737 33738 33739 33740 33741 33742 33743 |
# File 'lib/ovirtsdk4/types.rb', line 33736 def ==(other) super && @creation_date == other.creation_date && @disks == other.disks && @parent_id == other.parent_id && @state == other.state && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment attribute.
33526 33527 33528 |
# File 'lib/ovirtsdk4/types.rb', line 33526 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
33535 33536 33537 |
# File 'lib/ovirtsdk4/types.rb', line 33535 def comment=(value) @comment = value end |
#creation_date ⇒ DateTime
Returns the value of the creation_date attribute.
33544 33545 33546 |
# File 'lib/ovirtsdk4/types.rb', line 33544 def creation_date @creation_date end |
#creation_date=(value) ⇒ Object
Sets the value of the creation_date attribute.
33553 33554 33555 |
# File 'lib/ovirtsdk4/types.rb', line 33553 def creation_date=(value) @creation_date = value end |
#description ⇒ String
Returns the value of the description attribute.
33562 33563 33564 |
# File 'lib/ovirtsdk4/types.rb', line 33562 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
33571 33572 33573 |
# File 'lib/ovirtsdk4/types.rb', line 33571 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks attribute.
33580 33581 33582 |
# File 'lib/ovirtsdk4/types.rb', line 33580 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks attribute.
33589 33590 33591 33592 33593 33594 33595 33596 33597 33598 33599 |
# File 'lib/ovirtsdk4/types.rb', line 33589 def disks=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Disk.new(value) end end end @disks = list end |
#hash ⇒ Object
Generates a hash value for this object.
33748 33749 33750 33751 33752 33753 33754 33755 |
# File 'lib/ovirtsdk4/types.rb', line 33748 def hash super + @creation_date.hash + @disks.hash + @parent_id.hash + @state.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id attribute.
33606 33607 33608 |
# File 'lib/ovirtsdk4/types.rb', line 33606 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
33615 33616 33617 |
# File 'lib/ovirtsdk4/types.rb', line 33615 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
33624 33625 33626 |
# File 'lib/ovirtsdk4/types.rb', line 33624 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
33633 33634 33635 |
# File 'lib/ovirtsdk4/types.rb', line 33633 def name=(value) @name = value end |
#parent_id ⇒ String
Returns the value of the parent_id attribute.
33642 33643 33644 |
# File 'lib/ovirtsdk4/types.rb', line 33642 def parent_id @parent_id end |
#parent_id=(value) ⇒ Object
Sets the value of the parent_id attribute.
33651 33652 33653 |
# File 'lib/ovirtsdk4/types.rb', line 33651 def parent_id=(value) @parent_id = value end |
#state ⇒ CheckpointState
Returns the value of the state attribute.
33660 33661 33662 |
# File 'lib/ovirtsdk4/types.rb', line 33660 def state @state end |
#state=(value) ⇒ Object
Sets the value of the state attribute.
33669 33670 33671 |
# File 'lib/ovirtsdk4/types.rb', line 33669 def state=(value) @state = value end |
#vm ⇒ Vm
Returns the value of the vm attribute.
33678 33679 33680 |
# File 'lib/ovirtsdk4/types.rb', line 33678 def vm @vm end |
#vm=(value) ⇒ Object
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.
33691 33692 33693 33694 33695 33696 |
# File 'lib/ovirtsdk4/types.rb', line 33691 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |