Class: OvirtSDK4::Backup
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Backup
- 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. -
#from_checkpoint_id ⇒ String
Returns the value of the
from_checkpoint_id
attribute. -
#from_checkpoint_id=(value) ⇒ Object
Sets the value of the
from_checkpoint_id
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ Backup
constructor
Creates a new instance of the Backup class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#phase ⇒ BackupPhase
Returns the value of the
phase
attribute. -
#phase=(value) ⇒ Object
Sets the value of the
phase
attribute. -
#to_checkpoint_id ⇒ String
Returns the value of the
to_checkpoint_id
attribute. -
#to_checkpoint_id=(value) ⇒ Object
Sets the value of the
to_checkpoint_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 = {}) ⇒ Backup
Creates a new instance of the OvirtSDK4::Backup class.
31852 31853 31854 31855 31856 31857 31858 31859 31860 31861 |
# File 'lib/ovirtsdk4/types.rb', line 31852 def initialize(opts = {}) super(opts) self.creation_date = opts[:creation_date] self.disks = opts[:disks] self.from_checkpoint_id = opts[:from_checkpoint_id] self.host = opts[:host] self.phase = opts[:phase] self.to_checkpoint_id = opts[:to_checkpoint_id] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
31866 31867 31868 31869 31870 31871 31872 31873 31874 31875 |
# File 'lib/ovirtsdk4/types.rb', line 31866 def ==(other) super && @creation_date == other.creation_date && @disks == other.disks && @from_checkpoint_id == other.from_checkpoint_id && @host == other.host && @phase == other.phase && @to_checkpoint_id == other.to_checkpoint_id && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
31607 31608 31609 |
# File 'lib/ovirtsdk4/types.rb', line 31607 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
31616 31617 31618 |
# File 'lib/ovirtsdk4/types.rb', line 31616 def comment=(value) @comment = value end |
#creation_date ⇒ DateTime
Returns the value of the creation_date
attribute.
31625 31626 31627 |
# File 'lib/ovirtsdk4/types.rb', line 31625 def creation_date @creation_date end |
#creation_date=(value) ⇒ Object
Sets the value of the creation_date
attribute.
31634 31635 31636 |
# File 'lib/ovirtsdk4/types.rb', line 31634 def creation_date=(value) @creation_date = value end |
#description ⇒ String
Returns the value of the description
attribute.
31643 31644 31645 |
# File 'lib/ovirtsdk4/types.rb', line 31643 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
31652 31653 31654 |
# File 'lib/ovirtsdk4/types.rb', line 31652 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
31661 31662 31663 |
# File 'lib/ovirtsdk4/types.rb', line 31661 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
31670 31671 31672 31673 31674 31675 31676 31677 31678 31679 31680 |
# File 'lib/ovirtsdk4/types.rb', line 31670 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 |
#from_checkpoint_id ⇒ String
Returns the value of the from_checkpoint_id
attribute.
31687 31688 31689 |
# File 'lib/ovirtsdk4/types.rb', line 31687 def from_checkpoint_id @from_checkpoint_id end |
#from_checkpoint_id=(value) ⇒ Object
Sets the value of the from_checkpoint_id
attribute.
31696 31697 31698 |
# File 'lib/ovirtsdk4/types.rb', line 31696 def from_checkpoint_id=(value) @from_checkpoint_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
31880 31881 31882 31883 31884 31885 31886 31887 31888 31889 |
# File 'lib/ovirtsdk4/types.rb', line 31880 def hash super + @creation_date.hash + @disks.hash + @from_checkpoint_id.hash + @host.hash + @phase.hash + @to_checkpoint_id.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
31705 31706 31707 |
# File 'lib/ovirtsdk4/types.rb', line 31705 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host
attribute.
The value
parameter can be an instance of Host 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.
31718 31719 31720 31721 31722 31723 |
# File 'lib/ovirtsdk4/types.rb', line 31718 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#id ⇒ String
Returns the value of the id
attribute.
31730 31731 31732 |
# File 'lib/ovirtsdk4/types.rb', line 31730 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
31739 31740 31741 |
# File 'lib/ovirtsdk4/types.rb', line 31739 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
31748 31749 31750 |
# File 'lib/ovirtsdk4/types.rb', line 31748 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
31757 31758 31759 |
# File 'lib/ovirtsdk4/types.rb', line 31757 def name=(value) @name = value end |
#phase ⇒ BackupPhase
Returns the value of the phase
attribute.
31766 31767 31768 |
# File 'lib/ovirtsdk4/types.rb', line 31766 def phase @phase end |
#phase=(value) ⇒ Object
Sets the value of the phase
attribute.
31775 31776 31777 |
# File 'lib/ovirtsdk4/types.rb', line 31775 def phase=(value) @phase = value end |
#to_checkpoint_id ⇒ String
Returns the value of the to_checkpoint_id
attribute.
31784 31785 31786 |
# File 'lib/ovirtsdk4/types.rb', line 31784 def to_checkpoint_id @to_checkpoint_id end |
#to_checkpoint_id=(value) ⇒ Object
Sets the value of the to_checkpoint_id
attribute.
31793 31794 31795 |
# File 'lib/ovirtsdk4/types.rb', line 31793 def to_checkpoint_id=(value) @to_checkpoint_id = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
31802 31803 31804 |
# File 'lib/ovirtsdk4/types.rb', line 31802 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.
31815 31816 31817 31818 31819 31820 |
# File 'lib/ovirtsdk4/types.rb', line 31815 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |