Class: OvirtSDK4::ApiSummaryItem

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 = {}) ⇒ ApiSummaryItem

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

  • :total (Integer)

    The value of attribute total.



1350
1351
1352
1353
1354
# File 'lib/ovirtsdk4/types.rb', line 1350

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

Instance Method Details

#==(other) ⇒ Object

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



1359
1360
1361
1362
1363
# File 'lib/ovirtsdk4/types.rb', line 1359

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

#activeInteger

Returns the value of the active attribute.

Returns:

  • (Integer)


1307
1308
1309
# File 'lib/ovirtsdk4/types.rb', line 1307

def active
  @active
end

#active=(value) ⇒ Object

Sets the value of the active attribute.

Parameters:

  • value (Integer)


1316
1317
1318
# File 'lib/ovirtsdk4/types.rb', line 1316

def active=(value)
  @active = value
end

#hashObject

Generates a hash value for this object.



1368
1369
1370
1371
1372
# File 'lib/ovirtsdk4/types.rb', line 1368

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

#totalInteger

Returns the value of the total attribute.

Returns:

  • (Integer)


1325
1326
1327
# File 'lib/ovirtsdk4/types.rb', line 1325

def total
  @total
end

#total=(value) ⇒ Object

Sets the value of the total attribute.

Parameters:

  • value (Integer)


1334
1335
1336
# File 'lib/ovirtsdk4/types.rb', line 1334

def total=(value)
  @total = value
end