Class: OvirtSDK4::Cdrom
- Inherits:
-
Device
- Object
- Struct
- Identified
- Device
- OvirtSDK4::Cdrom
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#file ⇒ File
Returns the value of the
fileattribute. -
#file=(value) ⇒ Object
Sets the value of the
fileattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Cdrom
constructor
Creates a new instance of the Cdrom class.
-
#instance_type ⇒ InstanceType
Returns the value of the
instance_typeattribute. -
#instance_type=(value) ⇒ Object
Sets the value of the
instance_typeattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#template ⇒ Template
Returns the value of the
templateattribute. -
#template=(value) ⇒ Object
Sets the value of the
templateattribute. -
#vm ⇒ Vm
Returns the value of the
vmattribute. -
#vm=(value) ⇒ Object
Sets the value of the
vmattribute. -
#vms ⇒ Array<Vm>
Returns the value of the
vmsattribute. -
#vms=(list) ⇒ Object
Sets the value of the
vmsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Cdrom
Creates a new instance of the OvirtSDK4::Cdrom class.
54228 54229 54230 54231 |
# File 'lib/ovirtsdk4/types.rb', line 54228 def initialize(opts = {}) super(opts) self.file = opts[:file] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
54236 54237 54238 54239 |
# File 'lib/ovirtsdk4/types.rb', line 54236 def ==(other) super && @file == other.file end |
#comment ⇒ String
Returns the value of the comment attribute.
54009 54010 54011 |
# File 'lib/ovirtsdk4/types.rb', line 54009 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
54018 54019 54020 |
# File 'lib/ovirtsdk4/types.rb', line 54018 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
54027 54028 54029 |
# File 'lib/ovirtsdk4/types.rb', line 54027 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
54036 54037 54038 |
# File 'lib/ovirtsdk4/types.rb', line 54036 def description=(value) @description = value end |
#file ⇒ File
Returns the value of the file attribute.
54045 54046 54047 |
# File 'lib/ovirtsdk4/types.rb', line 54045 def file @file end |
#file=(value) ⇒ Object
Sets the value of the file attribute.
The value parameter can be an instance of 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.
54058 54059 54060 54061 54062 54063 |
# File 'lib/ovirtsdk4/types.rb', line 54058 def file=(value) if value.is_a?(Hash) value = File.new(value) end @file = value end |
#hash ⇒ Object
Generates a hash value for this object.
54244 54245 54246 54247 |
# File 'lib/ovirtsdk4/types.rb', line 54244 def hash super + @file.hash end |
#id ⇒ String
Returns the value of the id attribute.
54070 54071 54072 |
# File 'lib/ovirtsdk4/types.rb', line 54070 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
54079 54080 54081 |
# File 'lib/ovirtsdk4/types.rb', line 54079 def id=(value) @id = value end |
#instance_type ⇒ InstanceType
Returns the value of the instance_type attribute.
54088 54089 54090 |
# File 'lib/ovirtsdk4/types.rb', line 54088 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.
54101 54102 54103 54104 54105 54106 |
# File 'lib/ovirtsdk4/types.rb', line 54101 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.
54113 54114 54115 |
# File 'lib/ovirtsdk4/types.rb', line 54113 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
54122 54123 54124 |
# File 'lib/ovirtsdk4/types.rb', line 54122 def name=(value) @name = value end |
#template ⇒ Template
Returns the value of the template attribute.
54131 54132 54133 |
# File 'lib/ovirtsdk4/types.rb', line 54131 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.
54144 54145 54146 54147 54148 54149 |
# File 'lib/ovirtsdk4/types.rb', line 54144 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.
54156 54157 54158 |
# File 'lib/ovirtsdk4/types.rb', line 54156 def vm @vm end |
#vm=(value) ⇒ Object
Sets the value of the vm attribute.
The value parameter can be an instance of 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.
54169 54170 54171 54172 54173 54174 |
# File 'lib/ovirtsdk4/types.rb', line 54169 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.
54181 54182 54183 |
# File 'lib/ovirtsdk4/types.rb', line 54181 def vms @vms end |
#vms=(list) ⇒ Object
Sets the value of the vms attribute.
54190 54191 54192 54193 54194 54195 54196 54197 54198 54199 54200 |
# File 'lib/ovirtsdk4/types.rb', line 54190 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 |