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.
-
#modification_date ⇒ DateTime
Returns the value of the
modification_date
attribute. -
#modification_date=(value) ⇒ Object
Sets the value of the
modification_date
attribute. -
#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. -
#snapshot ⇒ Snapshot
Returns the value of the
snapshot
attribute. -
#snapshot=(value) ⇒ Object
Sets the value of the
snapshot
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.
32609 32610 32611 32612 32613 32614 32615 32616 32617 32618 32619 32620 |
# File 'lib/ovirtsdk4/types.rb', line 32609 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.
32625 32626 32627 32628 32629 32630 32631 32632 32633 32634 32635 32636 |
# File 'lib/ovirtsdk4/types.rb', line 32625 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.
32317 32318 32319 |
# File 'lib/ovirtsdk4/types.rb', line 32317 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
32326 32327 32328 |
# File 'lib/ovirtsdk4/types.rb', line 32326 def comment=(value) @comment = value end |
#creation_date ⇒ DateTime
Returns the value of the creation_date
attribute.
32335 32336 32337 |
# File 'lib/ovirtsdk4/types.rb', line 32335 def creation_date @creation_date end |
#creation_date=(value) ⇒ Object
Sets the value of the creation_date
attribute.
32344 32345 32346 |
# File 'lib/ovirtsdk4/types.rb', line 32344 def creation_date=(value) @creation_date = value end |
#description ⇒ String
Returns the value of the description
attribute.
32353 32354 32355 |
# File 'lib/ovirtsdk4/types.rb', line 32353 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
32362 32363 32364 |
# File 'lib/ovirtsdk4/types.rb', line 32362 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
32371 32372 32373 |
# File 'lib/ovirtsdk4/types.rb', line 32371 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
32380 32381 32382 32383 32384 32385 32386 32387 32388 32389 32390 |
# File 'lib/ovirtsdk4/types.rb', line 32380 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.
32397 32398 32399 |
# File 'lib/ovirtsdk4/types.rb', line 32397 def from_checkpoint_id @from_checkpoint_id end |
#from_checkpoint_id=(value) ⇒ Object
Sets the value of the from_checkpoint_id
attribute.
32406 32407 32408 |
# File 'lib/ovirtsdk4/types.rb', line 32406 def from_checkpoint_id=(value) @from_checkpoint_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
32641 32642 32643 32644 32645 32646 32647 32648 32649 32650 32651 32652 |
# File 'lib/ovirtsdk4/types.rb', line 32641 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.
32415 32416 32417 |
# File 'lib/ovirtsdk4/types.rb', line 32415 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.
32428 32429 32430 32431 32432 32433 |
# File 'lib/ovirtsdk4/types.rb', line 32428 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.
32440 32441 32442 |
# File 'lib/ovirtsdk4/types.rb', line 32440 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
32449 32450 32451 |
# File 'lib/ovirtsdk4/types.rb', line 32449 def id=(value) @id = value end |
#modification_date ⇒ DateTime
Returns the value of the modification_date
attribute.
32458 32459 32460 |
# File 'lib/ovirtsdk4/types.rb', line 32458 def modification_date @modification_date end |
#modification_date=(value) ⇒ Object
Sets the value of the modification_date
attribute.
32467 32468 32469 |
# File 'lib/ovirtsdk4/types.rb', line 32467 def modification_date=(value) @modification_date = value end |
#name ⇒ String
Returns the value of the name
attribute.
32476 32477 32478 |
# File 'lib/ovirtsdk4/types.rb', line 32476 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
32485 32486 32487 |
# File 'lib/ovirtsdk4/types.rb', line 32485 def name=(value) @name = value end |
#phase ⇒ BackupPhase
Returns the value of the phase
attribute.
32494 32495 32496 |
# File 'lib/ovirtsdk4/types.rb', line 32494 def phase @phase end |
#phase=(value) ⇒ Object
Sets the value of the phase
attribute.
32503 32504 32505 |
# File 'lib/ovirtsdk4/types.rb', line 32503 def phase=(value) @phase = value end |
#snapshot ⇒ Snapshot
Returns the value of the snapshot
attribute.
32512 32513 32514 |
# File 'lib/ovirtsdk4/types.rb', line 32512 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.
32525 32526 32527 32528 32529 32530 |
# File 'lib/ovirtsdk4/types.rb', line 32525 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.
32537 32538 32539 |
# File 'lib/ovirtsdk4/types.rb', line 32537 def to_checkpoint_id @to_checkpoint_id end |
#to_checkpoint_id=(value) ⇒ Object
Sets the value of the to_checkpoint_id
attribute.
32546 32547 32548 |
# File 'lib/ovirtsdk4/types.rb', line 32546 def to_checkpoint_id=(value) @to_checkpoint_id = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
32555 32556 32557 |
# File 'lib/ovirtsdk4/types.rb', line 32555 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.
32568 32569 32570 32571 32572 32573 |
# File 'lib/ovirtsdk4/types.rb', line 32568 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |