Class: OvirtSDK4::TemplateVersion
- 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. -
#base_template ⇒ Template
Returns the value of the
base_template
attribute. -
#base_template=(value) ⇒ Object
Sets the value of the
base_template
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ TemplateVersion
constructor
Creates a new instance of the TemplateVersion class.
-
#version_name ⇒ String
Returns the value of the
version_name
attribute. -
#version_name=(value) ⇒ Object
Sets the value of the
version_name
attribute. -
#version_number ⇒ Integer
Returns the value of the
version_number
attribute. -
#version_number=(value) ⇒ Object
Sets the value of the
version_number
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ TemplateVersion
Creates a new instance of the OvirtSDK4::TemplateVersion class.
22505 22506 22507 22508 22509 22510 |
# File 'lib/ovirtsdk4/types.rb', line 22505 def initialize(opts = {}) super(opts) self.base_template = opts[:base_template] self.version_name = opts[:version_name] self.version_number = opts[:version_number] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
22515 22516 22517 22518 22519 22520 |
# File 'lib/ovirtsdk4/types.rb', line 22515 def ==(other) super && @base_template == other.base_template && @version_name == other.version_name && @version_number == other.version_number end |
#base_template ⇒ Template
Returns the value of the base_template
attribute.
22435 22436 22437 |
# File 'lib/ovirtsdk4/types.rb', line 22435 def base_template @base_template end |
#base_template=(value) ⇒ Object
Sets the value of the base_template
attribute.
The value
parameter can be an instance of OvirtSDK4::Template 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.
22448 22449 22450 22451 22452 22453 |
# File 'lib/ovirtsdk4/types.rb', line 22448 def base_template=(value) if value.is_a?(Hash) value = Template.new(value) end @base_template = value end |
#hash ⇒ Object
Generates a hash value for this object.
22525 22526 22527 22528 22529 22530 |
# File 'lib/ovirtsdk4/types.rb', line 22525 def hash super + @base_template.hash + @version_name.hash + @version_number.hash end |
#version_name ⇒ String
Returns the value of the version_name
attribute.
22460 22461 22462 |
# File 'lib/ovirtsdk4/types.rb', line 22460 def version_name @version_name end |
#version_name=(value) ⇒ Object
Sets the value of the version_name
attribute.
22469 22470 22471 |
# File 'lib/ovirtsdk4/types.rb', line 22469 def version_name=(value) @version_name = value end |
#version_number ⇒ Integer
Returns the value of the version_number
attribute.
22478 22479 22480 |
# File 'lib/ovirtsdk4/types.rb', line 22478 def version_number @version_number end |
#version_number=(value) ⇒ Object
Sets the value of the version_number
attribute.
22487 22488 22489 |
# File 'lib/ovirtsdk4/types.rb', line 22487 def version_number=(value) @version_number = value end |