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.

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):

  • :available_instances (Integer)

    The value of attribute available_instances.

  • :description (String)

    The value of attribute description.

  • :name (String)

    The value of attribute name.



8882
8883
8884
8885
8886
8887
# File 'lib/ovirtsdk4/types.rb', line 8882

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

Instance Method Details

#==(other) ⇒ Object

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



8892
8893
8894
8895
8896
8897
# File 'lib/ovirtsdk4/types.rb', line 8892

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

#available_instancesInteger

Returns the value of the available_instances attribute.

Returns:

  • (Integer)


8819
8820
8821
# File 'lib/ovirtsdk4/types.rb', line 8819

def available_instances
  @available_instances
end

#available_instances=(value) ⇒ Object

Sets the value of the available_instances attribute.

Parameters:

  • value (Integer)


8828
8829
8830
# File 'lib/ovirtsdk4/types.rb', line 8828

def available_instances=(value)
  @available_instances = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


8837
8838
8839
# File 'lib/ovirtsdk4/types.rb', line 8837

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


8846
8847
8848
# File 'lib/ovirtsdk4/types.rb', line 8846

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



8902
8903
8904
8905
8906
8907
# File 'lib/ovirtsdk4/types.rb', line 8902

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

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


8855
8856
8857
# File 'lib/ovirtsdk4/types.rb', line 8855

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


8864
8865
8866
# File 'lib/ovirtsdk4/types.rb', line 8864

def name=(value)
  @name = value
end