Class: OvirtSDK4::ProductInfo
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ ProductInfo
constructor
Creates a new instance of the ProductInfo class.
-
#instance_id ⇒ String
Returns the value of the
instance_idattribute. -
#instance_id=(value) ⇒ Object
Sets the value of the
instance_idattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#vendor ⇒ String
Returns the value of the
vendorattribute. -
#vendor=(value) ⇒ Object
Sets the value of the
vendorattribute. -
#version ⇒ Version
Returns the value of the
versionattribute. -
#version=(value) ⇒ Object
Sets the value of the
versionattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ProductInfo
Creates a new instance of the OvirtSDK4::ProductInfo class.
15517 15518 15519 15520 15521 15522 15523 |
# File 'lib/ovirtsdk4/types.rb', line 15517 def initialize(opts = {}) super(opts) self.instance_id = opts[:instance_id] self.name = opts[:name] self.vendor = opts[:vendor] self.version = opts[:version] end |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
15528 15529 15530 15531 15532 15533 15534 |
# File 'lib/ovirtsdk4/types.rb', line 15528 def ==(other) super && @instance_id == other.instance_id && @name == other.name && @vendor == other.vendor && @version == other.version end |
#hash ⇒ Object
Generates a hash value for this object.
15539 15540 15541 15542 15543 15544 15545 |
# File 'lib/ovirtsdk4/types.rb', line 15539 def hash super + @instance_id.hash + @name.hash + @vendor.hash + @version.hash end |
#instance_id ⇒ String
Returns the value of the instance_id attribute.
15427 15428 15429 |
# File 'lib/ovirtsdk4/types.rb', line 15427 def instance_id @instance_id end |
#instance_id=(value) ⇒ Object
Sets the value of the instance_id attribute.
15436 15437 15438 |
# File 'lib/ovirtsdk4/types.rb', line 15436 def instance_id=(value) @instance_id = value end |
#name ⇒ String
Returns the value of the name attribute.
15445 15446 15447 |
# File 'lib/ovirtsdk4/types.rb', line 15445 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
15454 15455 15456 |
# File 'lib/ovirtsdk4/types.rb', line 15454 def name=(value) @name = value end |
#vendor ⇒ String
Returns the value of the vendor attribute.
15463 15464 15465 |
# File 'lib/ovirtsdk4/types.rb', line 15463 def vendor @vendor end |
#vendor=(value) ⇒ Object
Sets the value of the vendor attribute.
15472 15473 15474 |
# File 'lib/ovirtsdk4/types.rb', line 15472 def vendor=(value) @vendor = value end |
#version ⇒ Version
Returns the value of the version attribute.
15481 15482 15483 |
# File 'lib/ovirtsdk4/types.rb', line 15481 def version @version end |
#version=(value) ⇒ Object
Sets the value of the version attribute.
The value parameter can be an instance of Version 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.
15494 15495 15496 15497 15498 15499 |
# File 'lib/ovirtsdk4/types.rb', line 15494 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |