class OvirtSDK4::ExternalVmImport
Public Class Methods
Creates a new instance of the {ExternalVmImport} 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 [Cluster, Hash] :cluster The value of attribute `cluster`.
@option opts [CpuProfile, Hash] :cpu_profile The value of attribute `cpu_profile`.
@option opts [File, Hash] :drivers_iso The value of attribute `drivers_iso`.
@option opts [Host, Hash] :host The value of attribute `host`.
@option opts [String] :name The value of attribute `name`.
@option opts [String] :password The value of attribute `password`.
@option opts [ExternalVmProviderType] :provider The value of attribute `provider`.
@option opts [Quota, Hash] :quota The value of attribute `quota`.
@option opts [Boolean] :sparse The value of attribute `sparse`.
@option opts [StorageDomain, Hash] :storage_domain The value of attribute `storage_domain`.
@option opts [String] :url The value of attribute `url`.
@option opts [String] :username The value of attribute `username`.
@option opts [Vm, Hash] :vm The value of attribute `vm`.
OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 4135 def initialize(opts = {}) super(opts) self.cluster = opts[:cluster] self.cpu_profile = opts[:cpu_profile] self.drivers_iso = opts[:drivers_iso] self.host = opts[:host] self.name = opts[:name] self.password = opts[:password] self.provider = opts[:provider] self.quota = opts[:quota] self.sparse = opts[:sparse] self.storage_domain = opts[:storage_domain] self.url = opts[:url] self.username = opts[:username] self.vm = opts[:vm] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 4155 def ==(other) super && @cluster == other.cluster && @cpu_profile == other.cpu_profile && @drivers_iso == other.drivers_iso && @host == other.host && @name == other.name && @password == other.password && @provider == other.provider && @quota == other.quota && @sparse == other.sparse && @storage_domain == other.storage_domain && @url == other.url && @username == other.username && @vm == other.vm end
Returns the value of the `cluster` attribute.
@return [Cluster]
# File lib/ovirtsdk4/types.rb, line 3823 def cluster @cluster end
Sets the value of the `cluster` attribute.
@param value [Cluster, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Cluster} 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 3836 def cluster=(value) if value.is_a?(Hash) value = Cluster.new(value) end @cluster = value end
Returns the value of the `cpu_profile` attribute.
@return [CpuProfile]
# File lib/ovirtsdk4/types.rb, line 3848 def cpu_profile @cpu_profile end
Sets the value of the `cpu_profile` attribute.
@param value [CpuProfile, Hash]
The `value` parameter can be an instance of {OvirtSDK4::CpuProfile} 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 3861 def cpu_profile=(value) if value.is_a?(Hash) value = CpuProfile.new(value) end @cpu_profile = value end
Returns the value of the `drivers_iso` attribute.
@return [File]
# File lib/ovirtsdk4/types.rb, line 3873 def drivers_iso @drivers_iso end
Sets the value of the `drivers_iso` attribute.
@param value [File, Hash]
The `value` parameter can be an instance of {OvirtSDK4::File} 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 3886 def drivers_iso=(value) if value.is_a?(Hash) value = File.new(value) end @drivers_iso = value end
Generates a hash value for this object.
OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 4175 def hash super + @cluster.hash + @cpu_profile.hash + @drivers_iso.hash + @host.hash + @name.hash + @password.hash + @provider.hash + @quota.hash + @sparse.hash + @storage_domain.hash + @url.hash + @username.hash + @vm.hash end
Returns the value of the `host` attribute.
@return [Host]
# File lib/ovirtsdk4/types.rb, line 3898 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 3911 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 3923 def name @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 3932 def name=(value) @name = value end
Returns the value of the `password` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 3941 def password @password end
Sets the value of the `password` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 3950 def password=(value) @password = value end
Returns the value of the `provider` attribute.
@return [ExternalVmProviderType]
# File lib/ovirtsdk4/types.rb, line 3959 def provider @provider end
Sets the value of the `provider` attribute.
@param value [ExternalVmProviderType]
# File lib/ovirtsdk4/types.rb, line 3968 def provider=(value) @provider = value end
Returns the value of the `quota` attribute.
@return [Quota]
# File lib/ovirtsdk4/types.rb, line 3977 def quota @quota end
Sets the value of the `quota` attribute.
@param value [Quota, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Quota} 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 3990 def quota=(value) if value.is_a?(Hash) value = Quota.new(value) end @quota = value end
Returns the value of the `sparse` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 4002 def sparse @sparse end
Sets the value of the `sparse` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 4011 def sparse=(value) @sparse = value end
Returns the value of the `storage_domain` attribute.
@return [StorageDomain]
# File lib/ovirtsdk4/types.rb, line 4020 def storage_domain @storage_domain end
Sets the value of the `storage_domain` attribute.
@param value [StorageDomain, Hash]
The `value` parameter can be an instance of {OvirtSDK4::StorageDomain} 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 4033 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end
Returns the value of the `url` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 4045 def url @url end
Sets the value of the `url` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 4054 def url=(value) @url = value end
Returns the value of the `username` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 4063 def username @username end
Sets the value of the `username` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 4072 def username=(value) @username = value end
Returns the value of the `vm` attribute.
@return [Vm]
# File lib/ovirtsdk4/types.rb, line 4081 def vm @vm end
Sets the value of the `vm` attribute.
@param value [Vm, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 4094 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end