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.

  • :backup (Backup, Hash)

    The value of attribute backup.

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

  • :format (DiskFormat)

    The value of attribute format.

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



5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
# File 'lib/ovirtsdk4/types.rb', line 5815

def initialize(opts = {})
  super(opts)
  self.active = opts[:active]
  self.backup = opts[:backup]
  self.direction = opts[:direction]
  self.disk = opts[:disk]
  self.format = opts[:format]
  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.



5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
# File 'lib/ovirtsdk4/types.rb', line 5836

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


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

def active
  @active
end

#active=(value) ⇒ Object

Sets the value of the active attribute.

Parameters:

  • value (Boolean)


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

def active=(value)
  @active = value
end

#backupBackup

Returns the value of the backup attribute.

Returns:



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

def backup
  @backup
end

#backup=(value) ⇒ Object

Sets the value of the backup attribute.

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



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

def backup=(value)
  if value.is_a?(Hash)
    value = Backup.new(value)
  end
  @backup = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


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

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


5469
5470
5471
# File 'lib/ovirtsdk4/types.rb', line 5469

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


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

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


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

def description=(value)
  @description = value
end

#directionImageTransferDirection

Returns the value of the direction attribute.



5496
5497
5498
# File 'lib/ovirtsdk4/types.rb', line 5496

def direction
  @direction
end

#direction=(value) ⇒ Object

Sets the value of the direction attribute.

Parameters:



5505
5506
5507
# File 'lib/ovirtsdk4/types.rb', line 5505

def direction=(value)
  @direction = value
end

#diskDisk

Returns the value of the disk attribute.

Returns:



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

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)


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

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

#formatDiskFormat

Returns the value of the format attribute.

Returns:



5539
5540
5541
# File 'lib/ovirtsdk4/types.rb', line 5539

def format
  @format
end

#format=(value) ⇒ Object

Sets the value of the format attribute.

Parameters:



5548
5549
5550
# File 'lib/ovirtsdk4/types.rb', line 5548

def format=(value)
  @format = value
end

#hashObject

Generates a hash value for this object.



5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
# File 'lib/ovirtsdk4/types.rb', line 5857

def hash
  super +
  @active.hash +
  @backup.hash +
  @direction.hash +
  @disk.hash +
  @format.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:



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

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)


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

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)


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

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


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

def id=(value)
  @id = value
end

#imageImage

Returns the value of the image attribute.

Returns:



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

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:



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

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)


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

def inactivity_timeout
  @inactivity_timeout
end

#inactivity_timeout=(value) ⇒ Object

Sets the value of the inactivity_timeout attribute.

Parameters:

  • value (Integer)


5634
5635
5636
# File 'lib/ovirtsdk4/types.rb', line 5634

def inactivity_timeout=(value)
  @inactivity_timeout = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


5643
5644
5645
# File 'lib/ovirtsdk4/types.rb', line 5643

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


5652
5653
5654
# File 'lib/ovirtsdk4/types.rb', line 5652

def name=(value)
  @name = value
end

#phaseImageTransferPhase

Returns the value of the phase attribute.

Returns:



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

def phase
  @phase
end

#phase=(value) ⇒ Object

Sets the value of the phase attribute.

Parameters:



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

def phase=(value)
  @phase = value
end

#proxy_urlString

Returns the value of the proxy_url attribute.

Returns:

  • (String)


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

def proxy_url
  @proxy_url
end

#proxy_url=(value) ⇒ Object

Sets the value of the proxy_url attribute.

Parameters:

  • value (String)


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

def proxy_url=(value)
  @proxy_url = value
end

#signed_ticketString

Returns the value of the signed_ticket attribute.

Returns:

  • (String)


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

def signed_ticket
  @signed_ticket
end

#signed_ticket=(value) ⇒ Object

Sets the value of the signed_ticket attribute.

Parameters:

  • value (String)


5706
5707
5708
# File 'lib/ovirtsdk4/types.rb', line 5706

def signed_ticket=(value)
  @signed_ticket = value
end

#snapshotDiskSnapshot

Returns the value of the snapshot attribute.

Returns:



5715
5716
5717
# File 'lib/ovirtsdk4/types.rb', line 5715

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:



5728
5729
5730
5731
5732
5733
# File 'lib/ovirtsdk4/types.rb', line 5728

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)


5740
5741
5742
# File 'lib/ovirtsdk4/types.rb', line 5740

def transfer_url
  @transfer_url
end

#transfer_url=(value) ⇒ Object

Sets the value of the transfer_url attribute.

Parameters:

  • value (String)


5749
5750
5751
# File 'lib/ovirtsdk4/types.rb', line 5749

def transfer_url=(value)
  @transfer_url = value
end

#transferredInteger

Returns the value of the transferred attribute.

Returns:

  • (Integer)


5758
5759
5760
# File 'lib/ovirtsdk4/types.rb', line 5758

def transferred
  @transferred
end

#transferred=(value) ⇒ Object

Sets the value of the transferred attribute.

Parameters:

  • value (Integer)


5767
5768
5769
# File 'lib/ovirtsdk4/types.rb', line 5767

def transferred=(value)
  @transferred = value
end