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.
14046 14047 14048 14049 14050 14051 |
# File 'lib/ovirtsdk4/types.rb', line 14046 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.
14056 14057 14058 14059 14060 14061 |
# File 'lib/ovirtsdk4/types.rb', line 14056 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.
13975 13976 13977 |
# File 'lib/ovirtsdk4/types.rb', line 13975 def files @files end |
#files=(list) ⇒ Object
Sets the value of the files
attribute.
13984 13985 13986 13987 13988 13989 13990 13991 13992 13993 13994 |
# File 'lib/ovirtsdk4/types.rb', line 13984 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.
14066 14067 14068 14069 14070 14071 |
# File 'lib/ovirtsdk4/types.rb', line 14066 def hash super + @files.hash + @type.hash + @volume_id.hash end |
#type ⇒ VmDeviceType
Returns the value of the type
attribute.
14001 14002 14003 |
# File 'lib/ovirtsdk4/types.rb', line 14001 def type @type end |
#type=(value) ⇒ Object
Sets the value of the type
attribute.
14010 14011 14012 |
# File 'lib/ovirtsdk4/types.rb', line 14010 def type=(value) @type = value end |
#volume_id ⇒ String
Returns the value of the volume_id
attribute.
14019 14020 14021 |
# File 'lib/ovirtsdk4/types.rb', line 14019 def volume_id @volume_id end |
#volume_id=(value) ⇒ Object
Sets the value of the volume_id
attribute.
14028 14029 14030 |
# File 'lib/ovirtsdk4/types.rb', line 14028 def volume_id=(value) @volume_id = value end |