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.
-
#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.
30952 30953 30954 30955 30956 30957 30958 30959 30960 |
# File 'lib/ovirtsdk4/types.rb', line 30952 def initialize(opts = {}) super(opts) self.creation_date = opts[:creation_date] self.disks = opts[:disks] self.from_checkpoint_id = opts[:from_checkpoint_id] 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.
30965 30966 30967 30968 30969 30970 30971 30972 30973 |
# File 'lib/ovirtsdk4/types.rb', line 30965 def ==(other) super && @creation_date == other.creation_date && @disks == other.disks && @from_checkpoint_id == other.from_checkpoint_id && @phase == other.phase && @to_checkpoint_id == other.to_checkpoint_id && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
30734 30735 30736 |
# File 'lib/ovirtsdk4/types.rb', line 30734 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
30743 30744 30745 |
# File 'lib/ovirtsdk4/types.rb', line 30743 def comment=(value) @comment = value end |
#creation_date ⇒ DateTime
Returns the value of the creation_date
attribute.
30752 30753 30754 |
# File 'lib/ovirtsdk4/types.rb', line 30752 def creation_date @creation_date end |
#creation_date=(value) ⇒ Object
Sets the value of the creation_date
attribute.
30761 30762 30763 |
# File 'lib/ovirtsdk4/types.rb', line 30761 def creation_date=(value) @creation_date = value end |
#description ⇒ String
Returns the value of the description
attribute.
30770 30771 30772 |
# File 'lib/ovirtsdk4/types.rb', line 30770 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
30779 30780 30781 |
# File 'lib/ovirtsdk4/types.rb', line 30779 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
30788 30789 30790 |
# File 'lib/ovirtsdk4/types.rb', line 30788 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
30797 30798 30799 30800 30801 30802 30803 30804 30805 30806 30807 |
# File 'lib/ovirtsdk4/types.rb', line 30797 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.
30814 30815 30816 |
# File 'lib/ovirtsdk4/types.rb', line 30814 def from_checkpoint_id @from_checkpoint_id end |
#from_checkpoint_id=(value) ⇒ Object
Sets the value of the from_checkpoint_id
attribute.
30823 30824 30825 |
# File 'lib/ovirtsdk4/types.rb', line 30823 def from_checkpoint_id=(value) @from_checkpoint_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
30978 30979 30980 30981 30982 30983 30984 30985 30986 |
# File 'lib/ovirtsdk4/types.rb', line 30978 def hash super + @creation_date.hash + @disks.hash + @from_checkpoint_id.hash + @phase.hash + @to_checkpoint_id.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
30832 30833 30834 |
# File 'lib/ovirtsdk4/types.rb', line 30832 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
30841 30842 30843 |
# File 'lib/ovirtsdk4/types.rb', line 30841 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
30850 30851 30852 |
# File 'lib/ovirtsdk4/types.rb', line 30850 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
30859 30860 30861 |
# File 'lib/ovirtsdk4/types.rb', line 30859 def name=(value) @name = value end |
#phase ⇒ BackupPhase
Returns the value of the phase
attribute.
30868 30869 30870 |
# File 'lib/ovirtsdk4/types.rb', line 30868 def phase @phase end |
#phase=(value) ⇒ Object
Sets the value of the phase
attribute.
30877 30878 30879 |
# File 'lib/ovirtsdk4/types.rb', line 30877 def phase=(value) @phase = value end |
#to_checkpoint_id ⇒ String
Returns the value of the to_checkpoint_id
attribute.
30886 30887 30888 |
# File 'lib/ovirtsdk4/types.rb', line 30886 def to_checkpoint_id @to_checkpoint_id end |
#to_checkpoint_id=(value) ⇒ Object
Sets the value of the to_checkpoint_id
attribute.
30895 30896 30897 |
# File 'lib/ovirtsdk4/types.rb', line 30895 def to_checkpoint_id=(value) @to_checkpoint_id = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
30904 30905 30906 |
# File 'lib/ovirtsdk4/types.rb', line 30904 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.
30917 30918 30919 30920 30921 30922 |
# File 'lib/ovirtsdk4/types.rb', line 30917 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |