Class: OvirtSDK4::VmMediatedDevice
- Inherits:
-
Device
- Object
- Struct
- Identified
- Device
- OvirtSDK4::VmMediatedDevice
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ VmMediatedDevice
constructor
Creates a new instance of the VmMediatedDevice class.
-
#instance_type ⇒ InstanceType
Returns the value of the
instance_type
attribute. -
#instance_type=(value) ⇒ Object
Sets the value of the
instance_type
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#spec_params ⇒ Array<Property>
Returns the value of the
spec_params
attribute. -
#spec_params=(list) ⇒ Object
Sets the value of the
spec_params
attribute. -
#template ⇒ Template
Returns the value of the
template
attribute. -
#template=(value) ⇒ Object
Sets the value of the
template
attribute. -
#vm ⇒ Vm
Returns the value of the
vm
attribute. -
#vm=(value) ⇒ Object
Sets the value of the
vm
attribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vms
attribute. -
#vms=(list) ⇒ Object
Sets the value of the
vms
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ VmMediatedDevice
Creates a new instance of the OvirtSDK4::VmMediatedDevice class.
53421 53422 53423 53424 |
# File 'lib/ovirtsdk4/types.rb', line 53421 def initialize(opts = {}) super(opts) self.spec_params = opts[:spec_params] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
53429 53430 53431 53432 |
# File 'lib/ovirtsdk4/types.rb', line 53429 def ==(other) super && @spec_params == other.spec_params end |
#comment ⇒ String
Returns the value of the comment
attribute.
53201 53202 53203 |
# File 'lib/ovirtsdk4/types.rb', line 53201 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
53210 53211 53212 |
# File 'lib/ovirtsdk4/types.rb', line 53210 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
53219 53220 53221 |
# File 'lib/ovirtsdk4/types.rb', line 53219 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
53228 53229 53230 |
# File 'lib/ovirtsdk4/types.rb', line 53228 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
53437 53438 53439 53440 |
# File 'lib/ovirtsdk4/types.rb', line 53437 def hash super + @spec_params.hash end |
#id ⇒ String
Returns the value of the id
attribute.
53237 53238 53239 |
# File 'lib/ovirtsdk4/types.rb', line 53237 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
53246 53247 53248 |
# File 'lib/ovirtsdk4/types.rb', line 53246 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type
attribute.
53255 53256 53257 |
# File 'lib/ovirtsdk4/types.rb', line 53255 def instance_type @instance_type end |
#instance_type=(value) ⇒ Object
Sets the value of the instance_type
attribute.
The value
parameter can be an instance of InstanceType 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.
53268 53269 53270 53271 53272 53273 |
# File 'lib/ovirtsdk4/types.rb', line 53268 def instance_type=(value) if value.is_a?(Hash) value = InstanceType.new(value) end @instance_type = value end |
#name ⇒ String
Returns the value of the name
attribute.
53280 53281 53282 |
# File 'lib/ovirtsdk4/types.rb', line 53280 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
53289 53290 53291 |
# File 'lib/ovirtsdk4/types.rb', line 53289 def name=(value) @name = value end |
#spec_params ⇒ Array<Property>
Returns the value of the spec_params
attribute.
53298 53299 53300 |
# File 'lib/ovirtsdk4/types.rb', line 53298 def spec_params @spec_params end |
#spec_params=(list) ⇒ Object
Sets the value of the spec_params
attribute.
53307 53308 53309 53310 53311 53312 53313 53314 53315 53316 53317 |
# File 'lib/ovirtsdk4/types.rb', line 53307 def spec_params=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Property.new(value) end end end @spec_params = list end |
#template ⇒ Template
Returns the value of the template
attribute.
53324 53325 53326 |
# File 'lib/ovirtsdk4/types.rb', line 53324 def template @template end |
#template=(value) ⇒ Object
Sets the value of the template
attribute.
The value
parameter can be an instance of Template 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.
53337 53338 53339 53340 53341 53342 |
# File 'lib/ovirtsdk4/types.rb', line 53337 def template=(value) if value.is_a?(Hash) value = Template.new(value) end @template = value end |
#vm ⇒ Vm
Returns the value of the vm
attribute.
53349 53350 53351 |
# File 'lib/ovirtsdk4/types.rb', line 53349 def vm @vm end |
#vm=(value) ⇒ Object
Sets the value of the vm
attribute.
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.
53362 53363 53364 53365 53366 53367 |
# File 'lib/ovirtsdk4/types.rb', line 53362 def vm=(value) if value.is_a?(Hash) value = Vm.new(value) end @vm = value end |
#vms ⇒ Array<Vm>
Returns the value of the vms
attribute.
53374 53375 53376 |
# File 'lib/ovirtsdk4/types.rb', line 53374 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms
attribute.
53383 53384 53385 53386 53387 53388 53389 53390 53391 53392 53393 |
# File 'lib/ovirtsdk4/types.rb', line 53383 def vms=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Vm.new(value) end end end @vms = list end |