Class: OvirtSDK4::MDevType

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

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

Options Hash (opts):

  • :available_instances (Integer)

    The value of attribute available_instances.

  • :description (String)

    The value of attribute description.

  • :human_readable_name (String)

    The value of attribute human_readable_name.

  • :name (String)

    The value of attribute name.



9530
9531
9532
9533
9534
9535
9536
# File 'lib/ovirtsdk4/types.rb', line 9530

def initialize(opts = {})
  super(opts)
  self.available_instances = opts[:available_instances]
  self.description = opts[:description]
  self.human_readable_name = opts[:human_readable_name]
  self.name = opts[:name]
end

Instance Method Details

#==(other) ⇒ Object

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



9541
9542
9543
9544
9545
9546
9547
# File 'lib/ovirtsdk4/types.rb', line 9541

def ==(other)
  super &&
  @available_instances == other.available_instances &&
  @description == other.description &&
  @human_readable_name == other.human_readable_name &&
  @name == other.name
end

#available_instancesInteger

Returns the value of the available_instances attribute.



9447
9448
9449
# File 'lib/ovirtsdk4/types.rb', line 9447

def available_instances
  @available_instances
end

#available_instances=(value) ⇒ Object

Sets the value of the available_instances attribute.



9456
9457
9458
# File 'lib/ovirtsdk4/types.rb', line 9456

def available_instances=(value)
  @available_instances = value
end

#descriptionString

Returns the value of the description attribute.



9465
9466
9467
# File 'lib/ovirtsdk4/types.rb', line 9465

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



9474
9475
9476
# File 'lib/ovirtsdk4/types.rb', line 9474

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



9552
9553
9554
9555
9556
9557
9558
# File 'lib/ovirtsdk4/types.rb', line 9552

def hash
  super +
  @available_instances.hash +
  @description.hash +
  @human_readable_name.hash +
  @name.hash
end

#human_readable_nameString

Returns the value of the human_readable_name attribute.



9483
9484
9485
# File 'lib/ovirtsdk4/types.rb', line 9483

def human_readable_name
  @human_readable_name
end

#human_readable_name=(value) ⇒ Object

Sets the value of the human_readable_name attribute.



9492
9493
9494
# File 'lib/ovirtsdk4/types.rb', line 9492

def human_readable_name=(value)
  @human_readable_name = value
end

#nameString

Returns the value of the name attribute.



9501
9502
9503
# File 'lib/ovirtsdk4/types.rb', line 9501

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



9510
9511
9512
# File 'lib/ovirtsdk4/types.rb', line 9510

def name=(value)
  @name = value
end