Class: OvirtSDK4::Api

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Api) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Api class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :product_info (ProductInfo, Hash)

    The value of attribute product_info.

  • :special_objects (SpecialObjects, Hash)

    The value of attribute special_objects.

  • :summary (ApiSummary, Hash)

    The value of attribute summary.

  • :time (DateTime)

    The value of attribute time.



846
847
848
849
850
851
852
# File 'lib/ovirtsdk4/types.rb', line 846

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

Instance Method Details

- (ProductInfo) product_info

Returns the value of the product_info attribute.

Returns:



742
743
744
# File 'lib/ovirtsdk4/types.rb', line 742

def product_info
  return @product_info
end

- (Object) product_info=(value)

Sets the value of the product_info attribute.

The value parameter can be an instance of 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.

Parameters:



755
756
757
758
759
760
# File 'lib/ovirtsdk4/types.rb', line 755

def product_info=(value)
  if value.is_a?(Hash)
    value = ProductInfo.new(value)
  end
  @product_info = value
end

- (SpecialObjects) special_objects

Returns the value of the special_objects attribute.

Returns:



767
768
769
# File 'lib/ovirtsdk4/types.rb', line 767

def special_objects
  return @special_objects
end

- (Object) special_objects=(value)

Sets the value of the special_objects attribute.

The value parameter can be an instance of 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.

Parameters:



780
781
782
783
784
785
# File 'lib/ovirtsdk4/types.rb', line 780

def special_objects=(value)
  if value.is_a?(Hash)
    value = SpecialObjects.new(value)
  end
  @special_objects = value
end

- (ApiSummary) summary

Returns the value of the summary attribute.

Returns:



792
793
794
# File 'lib/ovirtsdk4/types.rb', line 792

def summary
  return @summary
end

- (Object) summary=(value)

Sets the value of the summary attribute.

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.

Parameters:



805
806
807
808
809
810
# File 'lib/ovirtsdk4/types.rb', line 805

def summary=(value)
  if value.is_a?(Hash)
    value = ApiSummary.new(value)
  end
  @summary = value
end

- (DateTime) time

Returns the value of the time attribute.

Returns:

  • (DateTime)


817
818
819
# File 'lib/ovirtsdk4/types.rb', line 817

def time
  return @time
end

- (Object) time=(value)

Sets the value of the time attribute.

Parameters:

  • value (DateTime)


826
827
828
# File 'lib/ovirtsdk4/types.rb', line 826

def time=(value)
  @time = value
end