class OvirtSDK4::Payload

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {Payload} 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 [Array<File>, Array<Hash>] :files The values of attribute `files`.

@option opts [VmDeviceType] :type The value of attribute `type`.

@option opts [String] :volume_id The value of attribute `volume_id`.

Calls superclass method OvirtSDK4::Struct.new
# File lib/ovirtsdk4/types.rb, line 13490
def initialize(opts = {})
  super(opts)
  self.files = opts[:files]
  self.type = opts[:type]
  self.volume_id = opts[:volume_id]
end

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Struct#==
# File lib/ovirtsdk4/types.rb, line 13500
def ==(other)
  super &&
  @files == other.files &&
  @type == other.type &&
  @volume_id == other.volume_id
end
files() click to toggle source

Returns the value of the `files` attribute.

@return [Array<File>]

# File lib/ovirtsdk4/types.rb, line 13419
def files
  @files
end
files=(list) click to toggle source

Sets the value of the `files` attribute.

@param list [Array<File>]

# File lib/ovirtsdk4/types.rb, line 13428
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() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 13510
def hash
  super +
  @files.hash +
  @type.hash +
  @volume_id.hash
end
type() click to toggle source

Returns the value of the `type` attribute.

@return [VmDeviceType]

# File lib/ovirtsdk4/types.rb, line 13445
def type
  @type
end
type=(value) click to toggle source

Sets the value of the `type` attribute.

@param value [VmDeviceType]

# File lib/ovirtsdk4/types.rb, line 13454
def type=(value)
  @type = value
end
volume_id() click to toggle source

Returns the value of the `volume_id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 13463
def volume_id
  @volume_id
end
volume_id=(value) click to toggle source

Sets the value of the `volume_id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 13472
def volume_id=(value)
  @volume_id = value
end