Class: OvirtSDK4::ProfileDetail

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (ProfileDetail) initialize(opts = {})

Creates a new instance of the OvirtSDK4::ProfileDetail class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :block_statistics (Array<BlockStatistic>, Array<Hash>)

    The values of attribute block_statistics.

  • :duration (Integer)

    The value of attribute duration.

  • :fop_statistics (Array<FopStatistic>, Array<Hash>)

    The values of attribute fop_statistics.

  • :profile_type (String)

    The value of attribute profile_type.

  • :statistics (Array<Statistic>, Array<Hash>)

    The values of attribute statistics.



11046
11047
11048
11049
11050
11051
11052
11053
# File 'lib/ovirtsdk4/types.rb', line 11046

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

Instance Method Details

- (Array<BlockStatistic>) block_statistics

Returns the value of the block_statistics attribute.

Returns:



10922
10923
10924
# File 'lib/ovirtsdk4/types.rb', line 10922

def block_statistics
  return @block_statistics
end

- (Object) block_statistics=(list)

Sets the value of the block_statistics attribute.

Parameters:



10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
# File 'lib/ovirtsdk4/types.rb', line 10930

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

- (Integer) duration

Returns the value of the duration attribute.

Returns:

  • (Integer)


10947
10948
10949
# File 'lib/ovirtsdk4/types.rb', line 10947

def duration
  return @duration
end

- (Object) duration=(value)

Sets the value of the duration attribute.

Parameters:

  • value (Integer)


10956
10957
10958
# File 'lib/ovirtsdk4/types.rb', line 10956

def duration=(value)
  @duration = value
end

- (Array<FopStatistic>) fop_statistics

Returns the value of the fop_statistics attribute.

Returns:



10965
10966
10967
# File 'lib/ovirtsdk4/types.rb', line 10965

def fop_statistics
  return @fop_statistics
end

- (Object) fop_statistics=(list)

Sets the value of the fop_statistics attribute.

Parameters:



10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
# File 'lib/ovirtsdk4/types.rb', line 10973

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

- (String) profile_type

Returns the value of the profile_type attribute.

Returns:

  • (String)


10990
10991
10992
# File 'lib/ovirtsdk4/types.rb', line 10990

def profile_type
  return @profile_type
end

- (Object) profile_type=(value)

Sets the value of the profile_type attribute.

Parameters:

  • value (String)


10999
11000
11001
# File 'lib/ovirtsdk4/types.rb', line 10999

def profile_type=(value)
  @profile_type = value
end

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



11008
11009
11010
# File 'lib/ovirtsdk4/types.rb', line 11008

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
# File 'lib/ovirtsdk4/types.rb', line 11016

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