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
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. -
#from_checkpoint_id ⇒ String
Returns the value of the
from_checkpoint_idattribute. -
#from_checkpoint_id=(value) ⇒ Object
Sets the value of the
from_checkpoint_idattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Backup
constructor
Creates a new instance of the Backup class.
-
#modification_date ⇒ DateTime
Returns the value of the
modification_dateattribute. -
#modification_date=(value) ⇒ Object
Sets the value of the
modification_dateattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#phase ⇒ BackupPhase
Returns the value of the
phaseattribute. -
#phase=(value) ⇒ Object
Sets the value of the
phaseattribute. -
#snapshot ⇒ Snapshot
Returns the value of the
snapshotattribute. -
#snapshot=(value) ⇒ Object
Sets the value of the
snapshotattribute. -
#to_checkpoint_id ⇒ String
Returns the value of the
to_checkpoint_idattribute. -
#to_checkpoint_id=(value) ⇒ Object
Sets the value of the
to_checkpoint_idattribute. -
#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 = {}) ⇒ Backup
Creates a new instance of the OvirtSDK4::Backup class.
32902 32903 32904 32905 32906 32907 32908 32909 32910 32911 32912 32913 |
# File 'lib/ovirtsdk4/types.rb', line 32902 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.modification_date = opts[:modification_date] self.phase = opts[:phase] self.snapshot = opts[:snapshot] 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.
32918 32919 32920 32921 32922 32923 32924 32925 32926 32927 32928 32929 |
# File 'lib/ovirtsdk4/types.rb', line 32918 def ==(other) super && @creation_date == other.creation_date && @disks == other.disks && @from_checkpoint_id == other.from_checkpoint_id && @host == other.host && @modification_date == other.modification_date && @phase == other.phase && @snapshot == other.snapshot && @to_checkpoint_id == other.to_checkpoint_id && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment attribute.
32610 32611 32612 |
# File 'lib/ovirtsdk4/types.rb', line 32610 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
32619 32620 32621 |
# File 'lib/ovirtsdk4/types.rb', line 32619 def comment=(value) @comment = value end |
#creation_date ⇒ DateTime
Returns the value of the creation_date attribute.
32628 32629 32630 |
# File 'lib/ovirtsdk4/types.rb', line 32628 def creation_date @creation_date end |
#creation_date=(value) ⇒ Object
Sets the value of the creation_date attribute.
32637 32638 32639 |
# File 'lib/ovirtsdk4/types.rb', line 32637 def creation_date=(value) @creation_date = value end |
#description ⇒ String
Returns the value of the description attribute.
32646 32647 32648 |
# File 'lib/ovirtsdk4/types.rb', line 32646 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
32655 32656 32657 |
# File 'lib/ovirtsdk4/types.rb', line 32655 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks attribute.
32664 32665 32666 |
# File 'lib/ovirtsdk4/types.rb', line 32664 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks attribute.
32673 32674 32675 32676 32677 32678 32679 32680 32681 32682 32683 |
# File 'lib/ovirtsdk4/types.rb', line 32673 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.
32690 32691 32692 |
# File 'lib/ovirtsdk4/types.rb', line 32690 def from_checkpoint_id @from_checkpoint_id end |
#from_checkpoint_id=(value) ⇒ Object
Sets the value of the from_checkpoint_id attribute.
32699 32700 32701 |
# File 'lib/ovirtsdk4/types.rb', line 32699 def from_checkpoint_id=(value) @from_checkpoint_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
32934 32935 32936 32937 32938 32939 32940 32941 32942 32943 32944 32945 |
# File 'lib/ovirtsdk4/types.rb', line 32934 def hash super + @creation_date.hash + @disks.hash + @from_checkpoint_id.hash + @host.hash + @modification_date.hash + @phase.hash + @snapshot.hash + @to_checkpoint_id.hash + @vm.hash end |
#host ⇒ Host
Returns the value of the host attribute.
32708 32709 32710 |
# File 'lib/ovirtsdk4/types.rb', line 32708 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.
32721 32722 32723 32724 32725 32726 |
# File 'lib/ovirtsdk4/types.rb', line 32721 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.
32733 32734 32735 |
# File 'lib/ovirtsdk4/types.rb', line 32733 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
32742 32743 32744 |
# File 'lib/ovirtsdk4/types.rb', line 32742 def id=(value) @id = value end |
#modification_date ⇒ DateTime
Returns the value of the modification_date attribute.
32751 32752 32753 |
# File 'lib/ovirtsdk4/types.rb', line 32751 def modification_date @modification_date end |
#modification_date=(value) ⇒ Object
Sets the value of the modification_date attribute.
32760 32761 32762 |
# File 'lib/ovirtsdk4/types.rb', line 32760 def modification_date=(value) @modification_date = value end |
#name ⇒ String
Returns the value of the name attribute.
32769 32770 32771 |
# File 'lib/ovirtsdk4/types.rb', line 32769 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
32778 32779 32780 |
# File 'lib/ovirtsdk4/types.rb', line 32778 def name=(value) @name = value end |
#phase ⇒ BackupPhase
Returns the value of the phase attribute.
32787 32788 32789 |
# File 'lib/ovirtsdk4/types.rb', line 32787 def phase @phase end |
#phase=(value) ⇒ Object
Sets the value of the phase attribute.
32796 32797 32798 |
# File 'lib/ovirtsdk4/types.rb', line 32796 def phase=(value) @phase = value end |
#snapshot ⇒ Snapshot
Returns the value of the snapshot attribute.
32805 32806 32807 |
# File 'lib/ovirtsdk4/types.rb', line 32805 def snapshot @snapshot end |
#snapshot=(value) ⇒ Object
Sets the value of the snapshot attribute.
The value parameter can be an instance of Snapshot 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.
32818 32819 32820 32821 32822 32823 |
# File 'lib/ovirtsdk4/types.rb', line 32818 def snapshot=(value) if value.is_a?(Hash) value = Snapshot.new(value) end @snapshot = value end |
#to_checkpoint_id ⇒ String
Returns the value of the to_checkpoint_id attribute.
32830 32831 32832 |
# File 'lib/ovirtsdk4/types.rb', line 32830 def to_checkpoint_id @to_checkpoint_id end |
#to_checkpoint_id=(value) ⇒ Object
Sets the value of the to_checkpoint_id attribute.
32839 32840 32841 |
# File 'lib/ovirtsdk4/types.rb', line 32839 def to_checkpoint_id=(value) @to_checkpoint_id = value end |
#vm ⇒ Vm
Returns the value of the vm attribute.
32848 32849 32850 |
# File 'lib/ovirtsdk4/types.rb', line 32848 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.
32861 32862 32863 32864 32865 32866 |
# File 'lib/ovirtsdk4/types.rb', line 32861 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |