Class: OvirtSDK4::Usb

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

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

  • :enabled (Boolean)

    The value of attribute enabled.

  • :type (UsbType)

    The value of attribute type.


23265
23266
23267
23268
23269
# File 'lib/ovirtsdk4/types.rb', line 23265

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

Instance Method Details

#==(other) ⇒ Object

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


23274
23275
23276
23277
23278
# File 'lib/ovirtsdk4/types.rb', line 23274

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

#enabledBoolean

Returns the value of the enabled attribute.

Returns:

  • (Boolean)

23222
23223
23224
# File 'lib/ovirtsdk4/types.rb', line 23222

def enabled
  @enabled
end

#enabled=(value) ⇒ Object

Sets the value of the enabled attribute.

Parameters:

  • value (Boolean)

23231
23232
23233
# File 'lib/ovirtsdk4/types.rb', line 23231

def enabled=(value)
  @enabled = value
end

#hashObject

Generates a hash value for this object.


23283
23284
23285
23286
23287
# File 'lib/ovirtsdk4/types.rb', line 23283

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

#typeUsbType

Returns the value of the type attribute.

Returns:


23240
23241
23242
# File 'lib/ovirtsdk4/types.rb', line 23240

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:


23249
23250
23251
# File 'lib/ovirtsdk4/types.rb', line 23249

def type=(value)
  @type = value
end