Creates a new instance of the {TemplateVersion} class.
@param opts [Hash] 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.
@option opts [Template, Hash] :base_template The value of attribute `base_template`.
@option opts [String] :version_name The value of attribute `version_name`.
@option opts [Integer] :version_number The value of attribute `version_number`.
# File lib/ovirtsdk4/types.rb, line 20768 def initialize(opts = {}) super(opts) self.base_template = opts[:base_template] self.version_name = opts[:version_name] self.version_number = opts[:version_number] end
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 20778 def ==(other) super && @base_template == other.base_template && @version_name == other.version_name && @version_number == other.version_number end
Returns the value of the `base_template` attribute.
@return [Template]
# File lib/ovirtsdk4/types.rb, line 20698 def base_template @base_template end
Sets the value of the `base_template` attribute.
@param value [Template, Hash]
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.
# File lib/ovirtsdk4/types.rb, line 20711 def base_template=(value) if value.is_a?(Hash) value = Template.new(value) end @base_template = value end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 20788 def hash super + @base_template.hash + @version_name.hash + @version_number.hash end
Returns the value of the `version_name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 20723 def version_name @version_name end
Sets the value of the `version_name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 20732 def version_name=(value) @version_name = value end
Returns the value of the `version_number` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 20741 def version_number @version_number end
Sets the value of the `version_number` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 20750 def version_number=(value) @version_number = value end