Class: OvirtSDK4::Bios

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

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

  • :boot_menu (BootMenu, Hash)

    The value of attribute boot_menu.

  • :type (BiosType)

    The value of attribute type.


1415
1416
1417
1418
1419
# File 'lib/ovirtsdk4/types.rb', line 1415

def initialize(opts = {})
  super(opts)
  self.boot_menu = opts[:boot_menu]
  self.type = opts[:type]
end

Instance Method Details

#==(other) ⇒ Object

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


1424
1425
1426
1427
1428
# File 'lib/ovirtsdk4/types.rb', line 1424

def ==(other)
  super &&
  @boot_menu == other.boot_menu &&
  @type == other.type
end

#boot_menuBootMenu

Returns the value of the boot_menu attribute.

Returns:


1365
1366
1367
# File 'lib/ovirtsdk4/types.rb', line 1365

def boot_menu
  @boot_menu
end

#boot_menu=(value) ⇒ Object

Sets the value of the boot_menu attribute.

The value parameter can be an instance of OvirtSDK4::BootMenu or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:


1378
1379
1380
1381
1382
1383
# File 'lib/ovirtsdk4/types.rb', line 1378

def boot_menu=(value)
  if value.is_a?(Hash)
    value = BootMenu.new(value)
  end
  @boot_menu = value
end

#hashObject

Generates a hash value for this object.


1433
1434
1435
1436
1437
# File 'lib/ovirtsdk4/types.rb', line 1433

def hash
  super +
  @boot_menu.hash +
  @type.hash
end

#typeBiosType

Returns the value of the type attribute.

Returns:


1390
1391
1392
# File 'lib/ovirtsdk4/types.rb', line 1390

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:


1399
1400
1401
# File 'lib/ovirtsdk4/types.rb', line 1399

def type=(value)
  @type = value
end