class OvirtSDK4::Api

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {Api} 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 [ProductInfo, Hash] :product_info The value of attribute `product_info`.

@option opts [SpecialObjects, Hash] :special_objects The value of attribute `special_objects`.

@option opts [ApiSummary, Hash] :summary The value of attribute `summary`.

@option opts [DateTime] :time The value of attribute `time`.

Calls superclass method OvirtSDK4::Struct.new
# File lib/ovirtsdk4/types.rb, line 849
def initialize(opts = {})
  super(opts)
  self.product_info = opts[:product_info]
  self.special_objects = opts[:special_objects]
  self.summary = opts[:summary]
  self.time = opts[:time]
end

Public Instance Methods

product_info() click to toggle source

Returns the value of the `product_info` attribute.

@return [ProductInfo]

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

Sets the value of the `product_info` attribute.

@param value [ProductInfo, Hash]

The `value` parameter can be an instance of {OvirtSDK4::ProductInfo} 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 758
def product_info=(value)
  if value.is_a?(Hash)
    value = ProductInfo.new(value)
  end
  @product_info = value
end
special_objects() click to toggle source

Returns the value of the `special_objects` attribute.

@return [SpecialObjects]

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

Sets the value of the `special_objects` attribute.

@param value [SpecialObjects, Hash]

The `value` parameter can be an instance of {OvirtSDK4::SpecialObjects} 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 783
def special_objects=(value)
  if value.is_a?(Hash)
    value = SpecialObjects.new(value)
  end
  @special_objects = value
end
summary() click to toggle source

Returns the value of the `summary` attribute.

@return [ApiSummary]

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

Sets the value of the `summary` attribute.

@param value [ApiSummary, Hash]

The `value` parameter can be an instance of {OvirtSDK4::ApiSummary} 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 808
def summary=(value)
  if value.is_a?(Hash)
    value = ApiSummary.new(value)
  end
  @summary = value
end
time() click to toggle source

Returns the value of the `time` attribute.

@return [DateTime]

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

Sets the value of the `time` attribute.

@param value [DateTime]

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