Class: OvirtSDK4::Icon

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

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

  • :data (String)

    The value of attribute data.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :media_type (String)

    The value of attribute media_type.

  • :name (String)

    The value of attribute name.


46797
46798
46799
46800
46801
# File 'lib/ovirtsdk4/types.rb', line 46797

def initialize(opts = {})
  super(opts)
  self.data = opts[:data]
  self.media_type = opts[:media_type]
end

Instance Method Details

#==(other) ⇒ Object

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


46806
46807
46808
46809
46810
# File 'lib/ovirtsdk4/types.rb', line 46806

def ==(other)
  super &&
  @data == other.data &&
  @media_type == other.media_type
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

46674
46675
46676
# File 'lib/ovirtsdk4/types.rb', line 46674

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

46683
46684
46685
# File 'lib/ovirtsdk4/types.rb', line 46683

def comment=(value)
  @comment = value
end

#dataString

Returns the value of the data attribute.

Returns:

  • (String)

46692
46693
46694
# File 'lib/ovirtsdk4/types.rb', line 46692

def data
  @data
end

#data=(value) ⇒ Object

Sets the value of the data attribute.

Parameters:

  • value (String)

46701
46702
46703
# File 'lib/ovirtsdk4/types.rb', line 46701

def data=(value)
  @data = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

46710
46711
46712
# File 'lib/ovirtsdk4/types.rb', line 46710

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

46719
46720
46721
# File 'lib/ovirtsdk4/types.rb', line 46719

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


46815
46816
46817
46818
46819
# File 'lib/ovirtsdk4/types.rb', line 46815

def hash
  super +
  @data.hash +
  @media_type.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

46728
46729
46730
# File 'lib/ovirtsdk4/types.rb', line 46728

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

46737
46738
46739
# File 'lib/ovirtsdk4/types.rb', line 46737

def id=(value)
  @id = value
end

#media_typeString

Returns the value of the media_type attribute.

Returns:

  • (String)

46746
46747
46748
# File 'lib/ovirtsdk4/types.rb', line 46746

def media_type
  @media_type
end

#media_type=(value) ⇒ Object

Sets the value of the media_type attribute.

Parameters:

  • value (String)

46755
46756
46757
# File 'lib/ovirtsdk4/types.rb', line 46755

def media_type=(value)
  @media_type = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

46764
46765
46766
# File 'lib/ovirtsdk4/types.rb', line 46764

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

46773
46774
46775
# File 'lib/ovirtsdk4/types.rb', line 46773

def name=(value)
  @name = value
end