class OvirtSDK4::TemplateVersion

Public Class Methods

new(opts = {}) click to toggle source

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`.

Calls superclass method OvirtSDK4::Struct.new
# File lib/ovirtsdk4/types.rb, line 20486
def initialize(opts = {})
  super(opts)
  self.base_template = opts[:base_template]
  self.version_name = opts[:version_name]
  self.version_number = opts[:version_number]
end

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Struct#==
# File lib/ovirtsdk4/types.rb, line 20496
def ==(other)
  super &&
  @base_template == other.base_template &&
  @version_name == other.version_name &&
  @version_number == other.version_number
end
base_template() click to toggle source

Returns the value of the `base_template` attribute.

@return [Template]

# File lib/ovirtsdk4/types.rb, line 20416
def base_template
  @base_template
end
base_template=(value) click to toggle source

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 20429
def base_template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @base_template = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 20506
def hash
  super +
  @base_template.hash +
  @version_name.hash +
  @version_number.hash
end
version_name() click to toggle source

Returns the value of the `version_name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 20441
def version_name
  @version_name
end
version_name=(value) click to toggle source

Sets the value of the `version_name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 20450
def version_name=(value)
  @version_name = value
end
version_number() click to toggle source

Returns the value of the `version_number` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 20459
def version_number
  @version_number
end
version_number=(value) click to toggle source

Sets the value of the `version_number` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 20468
def version_number=(value)
  @version_number = value
end