class OvirtSDK4::ImageTransfer
Public Class Methods
Creates a new instance of the {ImageTransfer} class.
@param opts [Hash] 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.
@option opts [Boolean] :active The value of attribute `active`.
@option opts [Backup, Hash] :backup The value of attribute `backup`.
@option opts [String] :comment The value of attribute `comment`.
@option opts [String] :description The value of attribute `description`.
@option opts [ImageTransferDirection] :direction The value of attribute `direction`.
@option opts [Disk, Hash] :disk The value of attribute `disk`.
@option opts [DiskFormat] :format The value of attribute `format`.
@option opts [Host, Hash] :host The value of attribute `host`.
@option opts [String] :id The value of attribute `id`.
@option opts [Image, Hash] :image The value of attribute `image`.
@option opts [Integer] :inactivity_timeout The value of attribute `inactivity_timeout`.
@option opts [String] :name The value of attribute `name`.
@option opts [ImageTransferPhase] :phase The value of attribute `phase`.
@option opts [String] :proxy_url The value of attribute `proxy_url`.
@option opts [Boolean] :shallow The value of attribute `shallow`.
@option opts [DiskSnapshot, Hash] :snapshot The value of attribute `snapshot`.
@option opts [ImageTransferTimeoutPolicy] :timeout_policy The value of attribute `timeout_policy`.
@option opts [String] :transfer_url The value of attribute `transfer_url`.
@option opts [Integer] :transferred The value of attribute `transferred`.
OvirtSDK4::Identified::new
# File lib/ovirtsdk4/types.rb, line 6452 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.shallow = opts[:shallow] self.snapshot = opts[:snapshot] self.timeout_policy = opts[:timeout_policy] self.transfer_url = opts[:transfer_url] self.transferred = opts[:transferred] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 6474 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 && @shallow == other.shallow && @snapshot == other.snapshot && @timeout_policy == other.timeout_policy && @transfer_url == other.transfer_url && @transferred == other.transferred end
Returns the value of the `active` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 6034 def active @active end
Sets the value of the `active` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 6043 def active=(value) @active = value end
Returns the value of the `backup` attribute.
@return [Backup]
# File lib/ovirtsdk4/types.rb, line 6052 def backup @backup end
Sets the value of the `backup` attribute.
@param value [Backup, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 6065 def backup=(value) if value.is_a?(Hash) value = Backup.new(value) end @backup = value end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 6077 def comment @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 6086 def comment=(value) @comment = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 6095 def description @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 6104 def description=(value) @description = value end
Returns the value of the `direction` attribute.
@return [ImageTransferDirection]
# File lib/ovirtsdk4/types.rb, line 6113 def direction @direction end
Sets the value of the `direction` attribute.
@param value [ImageTransferDirection]
# File lib/ovirtsdk4/types.rb, line 6122 def direction=(value) @direction = value end
Returns the value of the `disk` attribute.
@return [Disk]
# File lib/ovirtsdk4/types.rb, line 6131 def disk @disk end
Sets the value of the `disk` attribute.
@param value [Disk, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 6144 def disk=(value) if value.is_a?(Hash) value = Disk.new(value) end @disk = value end
Returns the value of the `format` attribute.
@return [DiskFormat]
# File lib/ovirtsdk4/types.rb, line 6156 def format @format end
Sets the value of the `format` attribute.
@param value [DiskFormat]
# File lib/ovirtsdk4/types.rb, line 6165 def format=(value) @format = value end
Generates a hash value for this object.
OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 6496 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 + @shallow.hash + @snapshot.hash + @timeout_policy.hash + @transfer_url.hash + @transferred.hash end
Returns the value of the `host` attribute.
@return [Host]
# File lib/ovirtsdk4/types.rb, line 6174 def host @host end
Sets the value of the `host` attribute.
@param value [Host, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 6187 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 6199 def id @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 6208 def id=(value) @id = value end
Returns the value of the `image` attribute.
@return [Image]
# File lib/ovirtsdk4/types.rb, line 6217 def image @image end
Sets the value of the `image` attribute.
@param value [Image, Hash]
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.
# File lib/ovirtsdk4/types.rb, line 6230 def image=(value) if value.is_a?(Hash) value = Image.new(value) end @image = value end
Returns the value of the `inactivity_timeout` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 6242 def inactivity_timeout @inactivity_timeout end
Sets the value of the `inactivity_timeout` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 6251 def inactivity_timeout=(value) @inactivity_timeout = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 6260 def name @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 6269 def name=(value) @name = value end
Returns the value of the `phase` attribute.
@return [ImageTransferPhase]
# File lib/ovirtsdk4/types.rb, line 6278 def phase @phase end
Sets the value of the `phase` attribute.
@param value [ImageTransferPhase]
# File lib/ovirtsdk4/types.rb, line 6287 def phase=(value) @phase = value end
Returns the value of the `proxy_url` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 6296 def proxy_url @proxy_url end
Sets the value of the `proxy_url` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 6305 def proxy_url=(value) @proxy_url = value end
Returns the value of the `shallow` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 6314 def shallow @shallow end
Sets the value of the `shallow` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 6323 def shallow=(value) @shallow = value end
Returns the value of the `snapshot` attribute.
@return [DiskSnapshot]
# File lib/ovirtsdk4/types.rb, line 6332 def snapshot @snapshot end
Sets the value of the `snapshot` attribute.
@param value [DiskSnapshot, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 6345 def snapshot=(value) if value.is_a?(Hash) value = DiskSnapshot.new(value) end @snapshot = value end
Returns the value of the `timeout_policy` attribute.
@return [ImageTransferTimeoutPolicy]
# File lib/ovirtsdk4/types.rb, line 6357 def timeout_policy @timeout_policy end
Sets the value of the `timeout_policy` attribute.
@param value [ImageTransferTimeoutPolicy]
# File lib/ovirtsdk4/types.rb, line 6366 def timeout_policy=(value) @timeout_policy = value end
Returns the value of the `transfer_url` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 6375 def transfer_url @transfer_url end
Sets the value of the `transfer_url` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 6384 def transfer_url=(value) @transfer_url = value end
Returns the value of the `transferred` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 6393 def transferred @transferred end
Sets the value of the `transferred` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 6402 def transferred=(value) @transferred = value end