class OvirtSDK4::ProfileDetail

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {ProfileDetail} 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<BlockStatistic>, Array<Hash>] :block_statistics The values of attribute `block_statistics`.

@option opts [Integer] :duration The value of attribute `duration`.

@option opts [Array<FopStatistic>, Array<Hash>] :fop_statistics The values of attribute `fop_statistics`.

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

@option opts [Array<Statistic>, Array<Hash>] :statistics The values of attribute `statistics`.

Calls superclass method OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 15413
def initialize(opts = {})
  super(opts)
  self.block_statistics = opts[:block_statistics]
  self.duration = opts[:duration]
  self.fop_statistics = opts[:fop_statistics]
  self.profile_type = opts[:profile_type]
  self.statistics = opts[:statistics]
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 15425
def ==(other)
  super &&
  @block_statistics == other.block_statistics &&
  @duration == other.duration &&
  @fop_statistics == other.fop_statistics &&
  @profile_type == other.profile_type &&
  @statistics == other.statistics
end
block_statistics() click to toggle source

Returns the value of the `block_statistics` attribute.

@return [Array<BlockStatistic>]

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

Sets the value of the `block_statistics` attribute.

@param list [Array<BlockStatistic>]

# File lib/ovirtsdk4/types.rb, line 15295
def block_statistics=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = BlockStatistic.new(value)
      end
    end
  end
  @block_statistics = list
end
duration() click to toggle source

Returns the value of the `duration` attribute.

@return [Integer]

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

Sets the value of the `duration` attribute.

@param value [Integer]

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

Returns the value of the `fop_statistics` attribute.

@return [Array<FopStatistic>]

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

Sets the value of the `fop_statistics` attribute.

@param list [Array<FopStatistic>]

# File lib/ovirtsdk4/types.rb, line 15339
def fop_statistics=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = FopStatistic.new(value)
      end
    end
  end
  @fop_statistics = 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 15437
def hash
  super +
  @block_statistics.hash +
  @duration.hash +
  @fop_statistics.hash +
  @profile_type.hash +
  @statistics.hash
end
profile_type() click to toggle source

Returns the value of the `profile_type` attribute.

@return [String]

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

Sets the value of the `profile_type` attribute.

@param value [String]

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

Returns the value of the `statistics` attribute.

@return [Array<Statistic>]

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

Sets the value of the `statistics` attribute.

@param list [Array<Statistic>]

# File lib/ovirtsdk4/types.rb, line 15383
def statistics=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Statistic.new(value)
      end
    end
  end
  @statistics = list
end