Class: OvirtSDK4::VmSummary

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

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ VmSummary

Creates a new instance of the OvirtSDK4::VmSummary 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):

  • :active (Integer)

    The value of attribute active.

  • :migrating (Integer)

    The value of attribute migrating.

  • :total (Integer)

    The value of attribute total.



26081
26082
26083
26084
26085
26086
# File 'lib/ovirtsdk4/types.rb', line 26081

def initialize(opts = {})
  super(opts)
  self.active = opts[:active]
  self.migrating = opts[:migrating]
  self.total = opts[:total]
end

Instance Method Details

#==(other) ⇒ Object

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



26091
26092
26093
26094
26095
26096
# File 'lib/ovirtsdk4/types.rb', line 26091

def ==(other)
  super &&
  @active == other.active &&
  @migrating == other.migrating &&
  @total == other.total
end

#activeInteger

Returns the value of the active attribute.

Returns:

  • (Integer)


26018
26019
26020
# File 'lib/ovirtsdk4/types.rb', line 26018

def active
  @active
end

#active=(value) ⇒ Object

Sets the value of the active attribute.

Parameters:

  • value (Integer)


26027
26028
26029
# File 'lib/ovirtsdk4/types.rb', line 26027

def active=(value)
  @active = value
end

#hashObject

Generates a hash value for this object.



26101
26102
26103
26104
26105
26106
# File 'lib/ovirtsdk4/types.rb', line 26101

def hash
  super +
  @active.hash +
  @migrating.hash +
  @total.hash
end

#migratingInteger

Returns the value of the migrating attribute.

Returns:

  • (Integer)


26036
26037
26038
# File 'lib/ovirtsdk4/types.rb', line 26036

def migrating
  @migrating
end

#migrating=(value) ⇒ Object

Sets the value of the migrating attribute.

Parameters:

  • value (Integer)


26045
26046
26047
# File 'lib/ovirtsdk4/types.rb', line 26045

def migrating=(value)
  @migrating = value
end

#totalInteger

Returns the value of the total attribute.

Returns:

  • (Integer)


26054
26055
26056
# File 'lib/ovirtsdk4/types.rb', line 26054

def total
  @total
end

#total=(value) ⇒ Object

Sets the value of the total attribute.

Parameters:

  • value (Integer)


26063
26064
26065
# File 'lib/ovirtsdk4/types.rb', line 26063

def total=(value)
  @total = value
end