Class: OvirtSDK4::KatelloErratum

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ KatelloErratum

Creates a new instance of the OvirtSDK4::KatelloErratum 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):

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :issued (DateTime)

    The value of attribute issued.

  • :name (String)

    The value of attribute name.

  • :packages (Array<Package>, Array<Hash>)

    The values of attribute packages.

  • :severity (String)

    The value of attribute severity.

  • :solution (String)

    The value of attribute solution.

  • :summary (String)

    The value of attribute summary.

  • :title (String)

    The value of attribute title.

  • :type (String)

    The value of attribute type.

  • :vm (Vm, Hash)

    The value of attribute vm.


7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
# File 'lib/ovirtsdk4/types.rb', line 7923

def initialize(opts = {})
  super(opts)
  self.host = opts[:host]
  self.issued = opts[:issued]
  self.packages = opts[:packages]
  self.severity = opts[:severity]
  self.solution = opts[:solution]
  self.summary = opts[:summary]
  self.title = opts[:title]
  self.type = opts[:type]
  self.vm = opts[:vm]
end

Instance Method Details

#==(other) ⇒ Object

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


7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
# File 'lib/ovirtsdk4/types.rb', line 7939

def ==(other)
  super &&
  @host == other.host &&
  @issued == other.issued &&
  @packages == other.packages &&
  @severity == other.severity &&
  @solution == other.solution &&
  @summary == other.summary &&
  @title == other.title &&
  @type == other.type &&
  @vm == other.vm
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

7638
7639
7640
# File 'lib/ovirtsdk4/types.rb', line 7638

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

7647
7648
7649
# File 'lib/ovirtsdk4/types.rb', line 7647

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

7656
7657
7658
# File 'lib/ovirtsdk4/types.rb', line 7656

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

7665
7666
7667
# File 'lib/ovirtsdk4/types.rb', line 7665

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
# File 'lib/ovirtsdk4/types.rb', line 7955

def hash
  super +
  @host.hash +
  @issued.hash +
  @packages.hash +
  @severity.hash +
  @solution.hash +
  @summary.hash +
  @title.hash +
  @type.hash +
  @vm.hash
end

#hostHost

Returns the value of the host attribute.

Returns:


7674
7675
7676
# File 'lib/ovirtsdk4/types.rb', line 7674

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

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

  • value (Host, Hash)

7687
7688
7689
7690
7691
7692
# File 'lib/ovirtsdk4/types.rb', line 7687

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

7699
7700
7701
# File 'lib/ovirtsdk4/types.rb', line 7699

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

7708
7709
7710
# File 'lib/ovirtsdk4/types.rb', line 7708

def id=(value)
  @id = value
end

#issuedDateTime

Returns the value of the issued attribute.

Returns:

  • (DateTime)

7717
7718
7719
# File 'lib/ovirtsdk4/types.rb', line 7717

def issued
  @issued
end

#issued=(value) ⇒ Object

Sets the value of the issued attribute.

Parameters:

  • value (DateTime)

7726
7727
7728
# File 'lib/ovirtsdk4/types.rb', line 7726

def issued=(value)
  @issued = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

7735
7736
7737
# File 'lib/ovirtsdk4/types.rb', line 7735

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

7744
7745
7746
# File 'lib/ovirtsdk4/types.rb', line 7744

def name=(value)
  @name = value
end

#packagesArray<Package>

Returns the value of the packages attribute.

Returns:


7753
7754
7755
# File 'lib/ovirtsdk4/types.rb', line 7753

def packages
  @packages
end

#packages=(list) ⇒ Object

Sets the value of the packages attribute.

Parameters:


7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
# File 'lib/ovirtsdk4/types.rb', line 7762

def packages=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Package.new(value)
      end
    end
  end
  @packages = list
end

#severityString

Returns the value of the severity attribute.

Returns:

  • (String)

7779
7780
7781
# File 'lib/ovirtsdk4/types.rb', line 7779

def severity
  @severity
end

#severity=(value) ⇒ Object

Sets the value of the severity attribute.

Parameters:

  • value (String)

7788
7789
7790
# File 'lib/ovirtsdk4/types.rb', line 7788

def severity=(value)
  @severity = value
end

#solutionString

Returns the value of the solution attribute.

Returns:

  • (String)

7797
7798
7799
# File 'lib/ovirtsdk4/types.rb', line 7797

def solution
  @solution
end

#solution=(value) ⇒ Object

Sets the value of the solution attribute.

Parameters:

  • value (String)

7806
7807
7808
# File 'lib/ovirtsdk4/types.rb', line 7806

def solution=(value)
  @solution = value
end

#summaryString

Returns the value of the summary attribute.

Returns:

  • (String)

7815
7816
7817
# File 'lib/ovirtsdk4/types.rb', line 7815

def summary
  @summary
end

#summary=(value) ⇒ Object

Sets the value of the summary attribute.

Parameters:

  • value (String)

7824
7825
7826
# File 'lib/ovirtsdk4/types.rb', line 7824

def summary=(value)
  @summary = value
end

#titleString

Returns the value of the title attribute.

Returns:

  • (String)

7833
7834
7835
# File 'lib/ovirtsdk4/types.rb', line 7833

def title
  @title
end

#title=(value) ⇒ Object

Sets the value of the title attribute.

Parameters:

  • value (String)

7842
7843
7844
# File 'lib/ovirtsdk4/types.rb', line 7842

def title=(value)
  @title = value
end

#typeString

Returns the value of the type attribute.

Returns:

  • (String)

7851
7852
7853
# File 'lib/ovirtsdk4/types.rb', line 7851

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:

  • value (String)

7860
7861
7862
# File 'lib/ovirtsdk4/types.rb', line 7860

def type=(value)
  @type = value
end

#vmVm

Returns the value of the vm attribute.

Returns:


7869
7870
7871
# File 'lib/ovirtsdk4/types.rb', line 7869

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

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

  • value (Vm, Hash)

7882
7883
7884
7885
7886
7887
# File 'lib/ovirtsdk4/types.rb', line 7882

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end