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.
15247 15248 15249 15250 15251 15252 15253 |
# File 'lib/ovirtsdk4/types.rb', line 15247 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.
15258 15259 15260 15261 15262 15263 15264 |
# File 'lib/ovirtsdk4/types.rb', line 15258 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.
15269 15270 15271 15272 15273 15274 15275 |
# File 'lib/ovirtsdk4/types.rb', line 15269 def hash super + @instance_id.hash + @name.hash + @vendor.hash + @version.hash end |
#instance_id ⇒ String
Returns the value of the instance_id
attribute.
15157 15158 15159 |
# File 'lib/ovirtsdk4/types.rb', line 15157 def instance_id @instance_id end |
#instance_id=(value) ⇒ Object
Sets the value of the instance_id
attribute.
15166 15167 15168 |
# File 'lib/ovirtsdk4/types.rb', line 15166 def instance_id=(value) @instance_id = value end |
#name ⇒ String
Returns the value of the name
attribute.
15175 15176 15177 |
# File 'lib/ovirtsdk4/types.rb', line 15175 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
15184 15185 15186 |
# File 'lib/ovirtsdk4/types.rb', line 15184 def name=(value) @name = value end |
#vendor ⇒ String
Returns the value of the vendor
attribute.
15193 15194 15195 |
# File 'lib/ovirtsdk4/types.rb', line 15193 def vendor @vendor end |
#vendor=(value) ⇒ Object
Sets the value of the vendor
attribute.
15202 15203 15204 |
# File 'lib/ovirtsdk4/types.rb', line 15202 def vendor=(value) @vendor = value end |
#version ⇒ Version
Returns the value of the version
attribute.
15211 15212 15213 |
# File 'lib/ovirtsdk4/types.rb', line 15211 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.
15224 15225 15226 15227 15228 15229 |
# File 'lib/ovirtsdk4/types.rb', line 15224 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |