Class: OvirtSDK4::Payload
- 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. -
#files ⇒ Array<File>
Returns the value of the
files
attribute. -
#files=(list) ⇒ Object
Sets the value of the
files
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ Payload
constructor
Creates a new instance of the Payload class.
-
#type ⇒ VmDeviceType
Returns the value of the
type
attribute. -
#type=(value) ⇒ Object
Sets the value of the
type
attribute. -
#volume_id ⇒ String
Returns the value of the
volume_id
attribute. -
#volume_id=(value) ⇒ Object
Sets the value of the
volume_id
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Payload
Creates a new instance of the OvirtSDK4::Payload class.
13237 13238 13239 13240 13241 13242 |
# File 'lib/ovirtsdk4/types.rb', line 13237 def initialize(opts = {}) super(opts) self.files = opts[:files] self.type = opts[:type] self.volume_id = opts[:volume_id] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
13247 13248 13249 13250 13251 13252 |
# File 'lib/ovirtsdk4/types.rb', line 13247 def ==(other) super && @files == other.files && @type == other.type && @volume_id == other.volume_id end |
#files ⇒ Array<File>
Returns the value of the files
attribute.
13166 13167 13168 |
# File 'lib/ovirtsdk4/types.rb', line 13166 def files @files end |
#files=(list) ⇒ Object
Sets the value of the files
attribute.
13175 13176 13177 13178 13179 13180 13181 13182 13183 13184 13185 |
# File 'lib/ovirtsdk4/types.rb', line 13175 def files=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = File.new(value) end end end @files = list end |
#hash ⇒ Object
Generates a hash value for this object.
13257 13258 13259 13260 13261 13262 |
# File 'lib/ovirtsdk4/types.rb', line 13257 def hash super + @files.hash + @type.hash + @volume_id.hash end |
#type ⇒ VmDeviceType
Returns the value of the type
attribute.
13192 13193 13194 |
# File 'lib/ovirtsdk4/types.rb', line 13192 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
13201 13202 13203 |
# File 'lib/ovirtsdk4/types.rb', line 13201 def type=(value) @type = value end |
#volume_id ⇒ String
Returns the value of the volume_id
attribute.
13210 13211 13212 |
# File 'lib/ovirtsdk4/types.rb', line 13210 def volume_id @volume_id end |
#volume_id=(value) ⇒ Object
Sets the value of the volume_id
attribute.
13219 13220 13221 |
# File 'lib/ovirtsdk4/types.rb', line 13219 def volume_id=(value) @volume_id = value end |