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
true
ifself
andother
have the same attributes and values. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#creation_date ⇒ DateTime
Returns the value of the
creation_date
attribute. -
#creation_date=(value) ⇒ Object
Sets the value of the
creation_date
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#disks ⇒ Array<Disk>
Returns the value of the
disks
attribute. -
#disks=(list) ⇒ Object
Sets the value of the
disks
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Checkpoint
constructor
Creates a new instance of the Checkpoint class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#parent_id ⇒ String
Returns the value of the
parent_id
attribute. -
#parent_id=(value) ⇒ Object
Sets the value of the
parent_id
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Checkpoint
Creates a new instance of the OvirtSDK4::Checkpoint class.
32648 32649 32650 32651 32652 32653 32654 |
# File 'lib/ovirtsdk4/types.rb', line 32648 def initialize(opts = {}) super(opts) self.creation_date = opts[:creation_date] self.disks = opts[:disks] self.parent_id = opts[:parent_id] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
32659 32660 32661 32662 32663 32664 32665 |
# File 'lib/ovirtsdk4/types.rb', line 32659 def ==(other) super && @creation_date == other.creation_date && @disks == other.disks && @parent_id == other.parent_id && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
32470 32471 32472 |
# File 'lib/ovirtsdk4/types.rb', line 32470 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
32479 32480 32481 |
# File 'lib/ovirtsdk4/types.rb', line 32479 def comment=(value) @comment = value end |
#creation_date ⇒ DateTime
Returns the value of the creation_date
attribute.
32488 32489 32490 |
# File 'lib/ovirtsdk4/types.rb', line 32488 def creation_date @creation_date end |
#creation_date=(value) ⇒ Object
Sets the value of the creation_date
attribute.
32497 32498 32499 |
# File 'lib/ovirtsdk4/types.rb', line 32497 def creation_date=(value) @creation_date = value end |
#description ⇒ String
Returns the value of the description
attribute.
32506 32507 32508 |
# File 'lib/ovirtsdk4/types.rb', line 32506 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
32515 32516 32517 |
# File 'lib/ovirtsdk4/types.rb', line 32515 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
32524 32525 32526 |
# File 'lib/ovirtsdk4/types.rb', line 32524 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
32533 32534 32535 32536 32537 32538 32539 32540 32541 32542 32543 |
# File 'lib/ovirtsdk4/types.rb', line 32533 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.
32670 32671 32672 32673 32674 32675 32676 |
# File 'lib/ovirtsdk4/types.rb', line 32670 def hash super + @creation_date.hash + @disks.hash + @parent_id.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
32550 32551 32552 |
# File 'lib/ovirtsdk4/types.rb', line 32550 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
32559 32560 32561 |
# File 'lib/ovirtsdk4/types.rb', line 32559 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
32568 32569 32570 |
# File 'lib/ovirtsdk4/types.rb', line 32568 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
32577 32578 32579 |
# File 'lib/ovirtsdk4/types.rb', line 32577 def name=(value) @name = value end |
#parent_id ⇒ String
Returns the value of the parent_id
attribute.
32586 32587 32588 |
# File 'lib/ovirtsdk4/types.rb', line 32586 def parent_id @parent_id end |
#parent_id=(value) ⇒ Object
Sets the value of the parent_id
attribute.
32595 32596 32597 |
# File 'lib/ovirtsdk4/types.rb', line 32595 def parent_id=(value) @parent_id = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
32604 32605 32606 |
# File 'lib/ovirtsdk4/types.rb', line 32604 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.
32617 32618 32619 32620 32621 32622 |
# File 'lib/ovirtsdk4/types.rb', line 32617 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |