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.

  • :human_readable_name (String)

    The value of attribute human_readable_name.

  • :name (String)

    The value of attribute name.



9283
9284
9285
9286
9287
9288
9289
# File 'lib/ovirtsdk4/types.rb', line 9283

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.



9294
9295
9296
9297
9298
9299
9300
# File 'lib/ovirtsdk4/types.rb', line 9294

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.

Returns:

  • (Integer)


9200
9201
9202
# File 'lib/ovirtsdk4/types.rb', line 9200

def available_instances
  @available_instances
end

#available_instances=(value) ⇒ Object

Sets the value of the available_instances attribute.

Parameters:

  • value (Integer)


9209
9210
9211
# File 'lib/ovirtsdk4/types.rb', line 9209

def available_instances=(value)
  @available_instances = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


9218
9219
9220
# File 'lib/ovirtsdk4/types.rb', line 9218

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


9227
9228
9229
# File 'lib/ovirtsdk4/types.rb', line 9227

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



9305
9306
9307
9308
9309
9310
9311
# File 'lib/ovirtsdk4/types.rb', line 9305

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.

Returns:

  • (String)


9236
9237
9238
# File 'lib/ovirtsdk4/types.rb', line 9236

def human_readable_name
  @human_readable_name
end

#human_readable_name=(value) ⇒ Object

Sets the value of the human_readable_name attribute.

Parameters:

  • value (String)


9245
9246
9247
# File 'lib/ovirtsdk4/types.rb', line 9245

def human_readable_name=(value)
  @human_readable_name = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


9254
9255
9256
# File 'lib/ovirtsdk4/types.rb', line 9254

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


9263
9264
9265
# File 'lib/ovirtsdk4/types.rb', line 9263

def name=(value)
  @name = value
end