Class: OvirtSDK4::OperatingSystemInfo

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 = {}) ⇒ OperatingSystemInfo

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

  • :id (String)

    The value of attribute id.

  • :large_icon (Icon, Hash)

    The value of attribute large_icon.

  • :name (String)

    The value of attribute name.

  • :small_icon (Icon, Hash)

    The value of attribute small_icon.



12932
12933
12934
12935
12936
# File 'lib/ovirtsdk4/types.rb', line 12932

def initialize(opts = {})
  super(opts)
  self.large_icon = opts[:large_icon]
  self.small_icon = opts[:small_icon]
end

Instance Method Details

#==(other) ⇒ Object

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



12941
12942
12943
12944
12945
# File 'lib/ovirtsdk4/types.rb', line 12941

def ==(other)
  super &&
  @large_icon == other.large_icon &&
  @small_icon == other.small_icon
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


12795
12796
12797
# File 'lib/ovirtsdk4/types.rb', line 12795

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


12804
12805
12806
# File 'lib/ovirtsdk4/types.rb', line 12804

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


12813
12814
12815
# File 'lib/ovirtsdk4/types.rb', line 12813

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


12822
12823
12824
# File 'lib/ovirtsdk4/types.rb', line 12822

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



12950
12951
12952
12953
12954
# File 'lib/ovirtsdk4/types.rb', line 12950

def hash
  super +
  @large_icon.hash +
  @small_icon.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


12831
12832
12833
# File 'lib/ovirtsdk4/types.rb', line 12831

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


12840
12841
12842
# File 'lib/ovirtsdk4/types.rb', line 12840

def id=(value)
  @id = value
end

#large_iconIcon

Returns the value of the large_icon attribute.

Returns:



12849
12850
12851
# File 'lib/ovirtsdk4/types.rb', line 12849

def large_icon
  @large_icon
end

#large_icon=(value) ⇒ Object

Sets the value of the large_icon attribute.

The value parameter can be an instance of Icon 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 (Icon, Hash)


12862
12863
12864
12865
12866
12867
# File 'lib/ovirtsdk4/types.rb', line 12862

def large_icon=(value)
  if value.is_a?(Hash)
    value = Icon.new(value)
  end
  @large_icon = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


12874
12875
12876
# File 'lib/ovirtsdk4/types.rb', line 12874

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


12883
12884
12885
# File 'lib/ovirtsdk4/types.rb', line 12883

def name=(value)
  @name = value
end

#small_iconIcon

Returns the value of the small_icon attribute.

Returns:



12892
12893
12894
# File 'lib/ovirtsdk4/types.rb', line 12892

def small_icon
  @small_icon
end

#small_icon=(value) ⇒ Object

Sets the value of the small_icon attribute.

The value parameter can be an instance of Icon 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 (Icon, Hash)


12905
12906
12907
12908
12909
12910
# File 'lib/ovirtsdk4/types.rb', line 12905

def small_icon=(value)
  if value.is_a?(Hash)
    value = Icon.new(value)
  end
  @small_icon = value
end