Class: OvirtSDK4::ImageTransfer

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ ImageTransfer

Creates a new instance of the OvirtSDK4::ImageTransfer class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :active (Boolean)

    The value of attribute active.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :direction (ImageTransferDirection)

    The value of attribute direction.

  • :disk (Disk, Hash)

    The value of attribute disk.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :image (Image, Hash)

    The value of attribute image.

  • :name (String)

    The value of attribute name.

  • :phase (ImageTransferPhase)

    The value of attribute phase.

  • :proxy_url (String)

    The value of attribute proxy_url.

  • :signed_ticket (String)

    The value of attribute signed_ticket.

  • :snapshot (DiskSnapshot, Hash)

    The value of attribute snapshot.

  • :transfer_url (String)

    The value of attribute transfer_url.

  • :transferred (Integer)

    The value of attribute transferred.



5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
# File 'lib/ovirtsdk4/types.rb', line 5719

def initialize(opts = {})
  super(opts)
  self.active = opts[:active]
  self.direction = opts[:direction]
  self.disk = opts[:disk]
  self.host = opts[:host]
  self.image = opts[:image]
  self.phase = opts[:phase]
  self.proxy_url = opts[:proxy_url]
  self.signed_ticket = opts[:signed_ticket]
  self.snapshot = opts[:snapshot]
  self.transfer_url = opts[:transfer_url]
  self.transferred = opts[:transferred]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
# File 'lib/ovirtsdk4/types.rb', line 5737

def ==(other)
  super &&
  @active == other.active &&
  @direction == other.direction &&
  @disk == other.disk &&
  @host == other.host &&
  @image == other.image &&
  @phase == other.phase &&
  @proxy_url == other.proxy_url &&
  @signed_ticket == other.signed_ticket &&
  @snapshot == other.snapshot &&
  @transfer_url == other.transfer_url &&
  @transferred == other.transferred
end

#activeBoolean

Returns the value of the active attribute.

Returns:

  • (Boolean)


5388
5389
5390
# File 'lib/ovirtsdk4/types.rb', line 5388

def active
  @active
end

#active=(value) ⇒ Object

Sets the value of the active attribute.

Parameters:

  • value (Boolean)


5397
5398
5399
# File 'lib/ovirtsdk4/types.rb', line 5397

def active=(value)
  @active = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


5406
5407
5408
# File 'lib/ovirtsdk4/types.rb', line 5406

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


5415
5416
5417
# File 'lib/ovirtsdk4/types.rb', line 5415

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


5424
5425
5426
# File 'lib/ovirtsdk4/types.rb', line 5424

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


5433
5434
5435
# File 'lib/ovirtsdk4/types.rb', line 5433

def description=(value)
  @description = value
end

#directionImageTransferDirection

Returns the value of the direction attribute.



5442
5443
5444
# File 'lib/ovirtsdk4/types.rb', line 5442

def direction
  @direction
end

#direction=(value) ⇒ Object

Sets the value of the direction attribute.

Parameters:



5451
5452
5453
# File 'lib/ovirtsdk4/types.rb', line 5451

def direction=(value)
  @direction = value
end

#diskDisk

Returns the value of the disk attribute.

Returns:



5460
5461
5462
# File 'lib/ovirtsdk4/types.rb', line 5460

def disk
  @disk
end

#disk=(value) ⇒ Object

Sets the value of the disk attribute.

The value parameter can be an instance of Disk 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.

Parameters:

  • value (Disk, Hash)


5473
5474
5475
5476
5477
5478
# File 'lib/ovirtsdk4/types.rb', line 5473

def disk=(value)
  if value.is_a?(Hash)
    value = Disk.new(value)
  end
  @disk = value
end

#hashObject

Generates a hash value for this object.



5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
# File 'lib/ovirtsdk4/types.rb', line 5755

def hash
  super +
  @active.hash +
  @direction.hash +
  @disk.hash +
  @host.hash +
  @image.hash +
  @phase.hash +
  @proxy_url.hash +
  @signed_ticket.hash +
  @snapshot.hash +
  @transfer_url.hash +
  @transferred.hash
end

#hostHost

Returns the value of the host attribute.

Returns:



5485
5486
5487
# File 'lib/ovirtsdk4/types.rb', line 5485

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.

Parameters:

  • value (Host, Hash)


5498
5499
5500
5501
5502
5503
# File 'lib/ovirtsdk4/types.rb', line 5498

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


5510
5511
5512
# File 'lib/ovirtsdk4/types.rb', line 5510

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


5519
5520
5521
# File 'lib/ovirtsdk4/types.rb', line 5519

def id=(value)
  @id = value
end

#imageImage

Returns the value of the image attribute.

Returns:



5528
5529
5530
# File 'lib/ovirtsdk4/types.rb', line 5528

def image
  @image
end

#image=(value) ⇒ Object

Sets the value of the image attribute.

The value parameter can be an instance of OvirtSDK4::Image 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.

Parameters:



5541
5542
5543
5544
5545
5546
# File 'lib/ovirtsdk4/types.rb', line 5541

def image=(value)
  if value.is_a?(Hash)
    value = Image.new(value)
  end
  @image = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


5553
5554
5555
# File 'lib/ovirtsdk4/types.rb', line 5553

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


5562
5563
5564
# File 'lib/ovirtsdk4/types.rb', line 5562

def name=(value)
  @name = value
end

#phaseImageTransferPhase

Returns the value of the phase attribute.

Returns:



5571
5572
5573
# File 'lib/ovirtsdk4/types.rb', line 5571

def phase
  @phase
end

#phase=(value) ⇒ Object

Sets the value of the phase attribute.

Parameters:



5580
5581
5582
# File 'lib/ovirtsdk4/types.rb', line 5580

def phase=(value)
  @phase = value
end

#proxy_urlString

Returns the value of the proxy_url attribute.

Returns:

  • (String)


5589
5590
5591
# File 'lib/ovirtsdk4/types.rb', line 5589

def proxy_url
  @proxy_url
end

#proxy_url=(value) ⇒ Object

Sets the value of the proxy_url attribute.

Parameters:

  • value (String)


5598
5599
5600
# File 'lib/ovirtsdk4/types.rb', line 5598

def proxy_url=(value)
  @proxy_url = value
end

#signed_ticketString

Returns the value of the signed_ticket attribute.

Returns:

  • (String)


5607
5608
5609
# File 'lib/ovirtsdk4/types.rb', line 5607

def signed_ticket
  @signed_ticket
end

#signed_ticket=(value) ⇒ Object

Sets the value of the signed_ticket attribute.

Parameters:

  • value (String)


5616
5617
5618
# File 'lib/ovirtsdk4/types.rb', line 5616

def signed_ticket=(value)
  @signed_ticket = value
end

#snapshotDiskSnapshot

Returns the value of the snapshot attribute.

Returns:



5625
5626
5627
# File 'lib/ovirtsdk4/types.rb', line 5625

def snapshot
  @snapshot
end

#snapshot=(value) ⇒ Object

Sets the value of the snapshot attribute.

The value parameter can be an instance of DiskSnapshot 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.

Parameters:



5638
5639
5640
5641
5642
5643
# File 'lib/ovirtsdk4/types.rb', line 5638

def snapshot=(value)
  if value.is_a?(Hash)
    value = DiskSnapshot.new(value)
  end
  @snapshot = value
end

#transfer_urlString

Returns the value of the transfer_url attribute.

Returns:

  • (String)


5650
5651
5652
# File 'lib/ovirtsdk4/types.rb', line 5650

def transfer_url
  @transfer_url
end

#transfer_url=(value) ⇒ Object

Sets the value of the transfer_url attribute.

Parameters:

  • value (String)


5659
5660
5661
# File 'lib/ovirtsdk4/types.rb', line 5659

def transfer_url=(value)
  @transfer_url = value
end

#transferredInteger

Returns the value of the transferred attribute.

Returns:

  • (Integer)


5668
5669
5670
# File 'lib/ovirtsdk4/types.rb', line 5668

def transferred
  @transferred
end

#transferred=(value) ⇒ Object

Sets the value of the transferred attribute.

Parameters:

  • value (Integer)


5677
5678
5679
# File 'lib/ovirtsdk4/types.rb', line 5677

def transferred=(value)
  @transferred = value
end