Class: OvirtSDK4::ProductInfo
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have 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_id
attribute. -
#instance_id=(value) ⇒ Object
Sets the value of the
instance_id
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#vendor ⇒ String
Returns the value of the
vendor
attribute. -
#vendor=(value) ⇒ Object
Sets the value of the
vendor
attribute. -
#version ⇒ Version
Returns the value of the
version
attribute. -
#version=(value) ⇒ Object
Sets the value of the
version
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ProductInfo
Creates a new instance of the OvirtSDK4::ProductInfo class.
14774 14775 14776 14777 14778 14779 14780 |
# File 'lib/ovirtsdk4/types.rb', line 14774 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.
14785 14786 14787 14788 14789 14790 14791 |
# File 'lib/ovirtsdk4/types.rb', line 14785 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.
14796 14797 14798 14799 14800 14801 14802 |
# File 'lib/ovirtsdk4/types.rb', line 14796 def hash super + @instance_id.hash + @name.hash + @vendor.hash + @version.hash end |
#instance_id ⇒ String
Returns the value of the instance_id
attribute.
14684 14685 14686 |
# File 'lib/ovirtsdk4/types.rb', line 14684 def instance_id @instance_id end |
#instance_id=(value) ⇒ Object
Sets the value of the instance_id
attribute.
14693 14694 14695 |
# File 'lib/ovirtsdk4/types.rb', line 14693 def instance_id=(value) @instance_id = value end |
#name ⇒ String
Returns the value of the name
attribute.
14702 14703 14704 |
# File 'lib/ovirtsdk4/types.rb', line 14702 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
14711 14712 14713 |
# File 'lib/ovirtsdk4/types.rb', line 14711 def name=(value) @name = value end |
#vendor ⇒ String
Returns the value of the vendor
attribute.
14720 14721 14722 |
# File 'lib/ovirtsdk4/types.rb', line 14720 def vendor @vendor end |
#vendor=(value) ⇒ Object
Sets the value of the vendor
attribute.
14729 14730 14731 |
# File 'lib/ovirtsdk4/types.rb', line 14729 def vendor=(value) @vendor = value end |
#version ⇒ Version
Returns the value of the version
attribute.
14738 14739 14740 |
# File 'lib/ovirtsdk4/types.rb', line 14738 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.
14751 14752 14753 14754 14755 14756 |
# File 'lib/ovirtsdk4/types.rb', line 14751 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |