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. -
#state ⇒ CheckpointState
Returns the value of the
state
attribute. -
#state=(value) ⇒ Object
Sets the value of the
state
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.
33431 33432 33433 33434 33435 33436 33437 33438 |
# File 'lib/ovirtsdk4/types.rb', line 33431 def initialize(opts = {}) super(opts) self.creation_date = opts[:creation_date] self.disks = opts[:disks] self.parent_id = opts[:parent_id] self.state = opts[:state] self.vm = opts[:vm] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
33443 33444 33445 33446 33447 33448 33449 33450 |
# File 'lib/ovirtsdk4/types.rb', line 33443 def ==(other) super && @creation_date == other.creation_date && @disks == other.disks && @parent_id == other.parent_id && @state == other.state && @vm == other.vm end |
#comment ⇒ String
Returns the value of the comment
attribute.
33233 33234 33235 |
# File 'lib/ovirtsdk4/types.rb', line 33233 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
33242 33243 33244 |
# File 'lib/ovirtsdk4/types.rb', line 33242 def comment=(value) @comment = value end |
#creation_date ⇒ DateTime
Returns the value of the creation_date
attribute.
33251 33252 33253 |
# File 'lib/ovirtsdk4/types.rb', line 33251 def creation_date @creation_date end |
#creation_date=(value) ⇒ Object
Sets the value of the creation_date
attribute.
33260 33261 33262 |
# File 'lib/ovirtsdk4/types.rb', line 33260 def creation_date=(value) @creation_date = value end |
#description ⇒ String
Returns the value of the description
attribute.
33269 33270 33271 |
# File 'lib/ovirtsdk4/types.rb', line 33269 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
33278 33279 33280 |
# File 'lib/ovirtsdk4/types.rb', line 33278 def description=(value) @description = value end |
#disks ⇒ Array<Disk>
Returns the value of the disks
attribute.
33287 33288 33289 |
# File 'lib/ovirtsdk4/types.rb', line 33287 def disks @disks end |
#disks=(list) ⇒ Object
Sets the value of the disks
attribute.
33296 33297 33298 33299 33300 33301 33302 33303 33304 33305 33306 |
# File 'lib/ovirtsdk4/types.rb', line 33296 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.
33455 33456 33457 33458 33459 33460 33461 33462 |
# File 'lib/ovirtsdk4/types.rb', line 33455 def hash super + @creation_date.hash + @disks.hash + @parent_id.hash + @state.hash + @vm.hash end |
#id ⇒ String
Returns the value of the id
attribute.
33313 33314 33315 |
# File 'lib/ovirtsdk4/types.rb', line 33313 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
33322 33323 33324 |
# File 'lib/ovirtsdk4/types.rb', line 33322 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
33331 33332 33333 |
# File 'lib/ovirtsdk4/types.rb', line 33331 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
33340 33341 33342 |
# File 'lib/ovirtsdk4/types.rb', line 33340 def name=(value) @name = value end |
#parent_id ⇒ String
Returns the value of the parent_id
attribute.
33349 33350 33351 |
# File 'lib/ovirtsdk4/types.rb', line 33349 def parent_id @parent_id end |
#parent_id=(value) ⇒ Object
Sets the value of the parent_id
attribute.
33358 33359 33360 |
# File 'lib/ovirtsdk4/types.rb', line 33358 def parent_id=(value) @parent_id = value end |
#state ⇒ CheckpointState
Returns the value of the state
attribute.
33367 33368 33369 |
# File 'lib/ovirtsdk4/types.rb', line 33367 def state @state end |
#state=(value) ⇒ Object
Sets the value of the state
attribute.
33376 33377 33378 |
# File 'lib/ovirtsdk4/types.rb', line 33376 def state=(value) @state = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
33385 33386 33387 |
# File 'lib/ovirtsdk4/types.rb', line 33385 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.
33398 33399 33400 33401 33402 33403 |
# File 'lib/ovirtsdk4/types.rb', line 33398 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |