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.

  • :inactivity_timeout (Integer)

    The value of attribute inactivity_timeout.

  • :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.



5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
# File 'lib/ovirtsdk4/types.rb', line 5742

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.inactivity_timeout = opts[:inactivity_timeout]
  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.



5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
# File 'lib/ovirtsdk4/types.rb', line 5761

def ==(other)
  super &&
  @active == other.active &&
  @direction == other.direction &&
  @disk == other.disk &&
  @host == other.host &&
  @image == other.image &&
  @inactivity_timeout == other.inactivity_timeout &&
  @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)


5391
5392
5393
# File 'lib/ovirtsdk4/types.rb', line 5391

def active
  @active
end

#active=(value) ⇒ Object

Sets the value of the active attribute.

Parameters:

  • value (Boolean)


5400
5401
5402
# File 'lib/ovirtsdk4/types.rb', line 5400

def active=(value)
  @active = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


5409
5410
5411
# File 'lib/ovirtsdk4/types.rb', line 5409

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


5418
5419
5420
# File 'lib/ovirtsdk4/types.rb', line 5418

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


5427
5428
5429
# File 'lib/ovirtsdk4/types.rb', line 5427

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


5436
5437
5438
# File 'lib/ovirtsdk4/types.rb', line 5436

def description=(value)
  @description = value
end

#directionImageTransferDirection

Returns the value of the direction attribute.



5445
5446
5447
# File 'lib/ovirtsdk4/types.rb', line 5445

def direction
  @direction
end

#direction=(value) ⇒ Object

Sets the value of the direction attribute.

Parameters:



5454
5455
5456
# File 'lib/ovirtsdk4/types.rb', line 5454

def direction=(value)
  @direction = value
end

#diskDisk

Returns the value of the disk attribute.

Returns:



5463
5464
5465
# File 'lib/ovirtsdk4/types.rb', line 5463

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)


5476
5477
5478
5479
5480
5481
# File 'lib/ovirtsdk4/types.rb', line 5476

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

#hashObject

Generates a hash value for this object.



5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
# File 'lib/ovirtsdk4/types.rb', line 5780

def hash
  super +
  @active.hash +
  @direction.hash +
  @disk.hash +
  @host.hash +
  @image.hash +
  @inactivity_timeout.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:



5488
5489
5490
# File 'lib/ovirtsdk4/types.rb', line 5488

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)


5501
5502
5503
5504
5505
5506
# File 'lib/ovirtsdk4/types.rb', line 5501

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)


5513
5514
5515
# File 'lib/ovirtsdk4/types.rb', line 5513

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


5522
5523
5524
# File 'lib/ovirtsdk4/types.rb', line 5522

def id=(value)
  @id = value
end

#imageImage

Returns the value of the image attribute.

Returns:



5531
5532
5533
# File 'lib/ovirtsdk4/types.rb', line 5531

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:



5544
5545
5546
5547
5548
5549
# File 'lib/ovirtsdk4/types.rb', line 5544

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

#inactivity_timeoutInteger

Returns the value of the inactivity_timeout attribute.

Returns:

  • (Integer)


5556
5557
5558
# File 'lib/ovirtsdk4/types.rb', line 5556

def inactivity_timeout
  @inactivity_timeout
end

#inactivity_timeout=(value) ⇒ Object

Sets the value of the inactivity_timeout attribute.

Parameters:

  • value (Integer)


5565
5566
5567
# File 'lib/ovirtsdk4/types.rb', line 5565

def inactivity_timeout=(value)
  @inactivity_timeout = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


5574
5575
5576
# File 'lib/ovirtsdk4/types.rb', line 5574

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


5583
5584
5585
# File 'lib/ovirtsdk4/types.rb', line 5583

def name=(value)
  @name = value
end

#phaseImageTransferPhase

Returns the value of the phase attribute.

Returns:



5592
5593
5594
# File 'lib/ovirtsdk4/types.rb', line 5592

def phase
  @phase
end

#phase=(value) ⇒ Object

Sets the value of the phase attribute.

Parameters:



5601
5602
5603
# File 'lib/ovirtsdk4/types.rb', line 5601

def phase=(value)
  @phase = value
end

#proxy_urlString

Returns the value of the proxy_url attribute.

Returns:

  • (String)


5610
5611
5612
# File 'lib/ovirtsdk4/types.rb', line 5610

def proxy_url
  @proxy_url
end

#proxy_url=(value) ⇒ Object

Sets the value of the proxy_url attribute.

Parameters:

  • value (String)


5619
5620
5621
# File 'lib/ovirtsdk4/types.rb', line 5619

def proxy_url=(value)
  @proxy_url = value
end

#signed_ticketString

Returns the value of the signed_ticket attribute.

Returns:

  • (String)


5628
5629
5630
# File 'lib/ovirtsdk4/types.rb', line 5628

def signed_ticket
  @signed_ticket
end

#signed_ticket=(value) ⇒ Object

Sets the value of the signed_ticket attribute.

Parameters:

  • value (String)


5637
5638
5639
# File 'lib/ovirtsdk4/types.rb', line 5637

def signed_ticket=(value)
  @signed_ticket = value
end

#snapshotDiskSnapshot

Returns the value of the snapshot attribute.

Returns:



5646
5647
5648
# File 'lib/ovirtsdk4/types.rb', line 5646

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:



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

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)


5671
5672
5673
# File 'lib/ovirtsdk4/types.rb', line 5671

def transfer_url
  @transfer_url
end

#transfer_url=(value) ⇒ Object

Sets the value of the transfer_url attribute.

Parameters:

  • value (String)


5680
5681
5682
# File 'lib/ovirtsdk4/types.rb', line 5680

def transfer_url=(value)
  @transfer_url = value
end

#transferredInteger

Returns the value of the transferred attribute.

Returns:

  • (Integer)


5689
5690
5691
# File 'lib/ovirtsdk4/types.rb', line 5689

def transferred
  @transferred
end

#transferred=(value) ⇒ Object

Sets the value of the transferred attribute.

Parameters:

  • value (Integer)


5698
5699
5700
# File 'lib/ovirtsdk4/types.rb', line 5698

def transferred=(value)
  @transferred = value
end