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.



45147
45148
45149
45150
45151
# File 'lib/ovirtsdk4/types.rb', line 45147

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.



45156
45157
45158
45159
45160
# File 'lib/ovirtsdk4/types.rb', line 45156

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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


45024
45025
45026
# File 'lib/ovirtsdk4/types.rb', line 45024

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


45033
45034
45035
# File 'lib/ovirtsdk4/types.rb', line 45033

def comment=(value)
  @comment = value
end

#dataString

Returns the value of the data attribute.

Returns:

  • (String)


45042
45043
45044
# File 'lib/ovirtsdk4/types.rb', line 45042

def data
  @data
end

#data=(value) ⇒ Object

Sets the value of the data attribute.

Parameters:

  • value (String)


45051
45052
45053
# File 'lib/ovirtsdk4/types.rb', line 45051

def data=(value)
  @data = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


45060
45061
45062
# File 'lib/ovirtsdk4/types.rb', line 45060

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


45069
45070
45071
# File 'lib/ovirtsdk4/types.rb', line 45069

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



45165
45166
45167
45168
45169
# File 'lib/ovirtsdk4/types.rb', line 45165

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


45078
45079
45080
# File 'lib/ovirtsdk4/types.rb', line 45078

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


45087
45088
45089
# File 'lib/ovirtsdk4/types.rb', line 45087

def id=(value)
  @id = value
end

#media_typeString

Returns the value of the media_type attribute.

Returns:

  • (String)


45096
45097
45098
# File 'lib/ovirtsdk4/types.rb', line 45096

def media_type
  @media_type
end

#media_type=(value) ⇒ Object

Sets the value of the media_type attribute.

Parameters:

  • value (String)


45105
45106
45107
# File 'lib/ovirtsdk4/types.rb', line 45105

def media_type=(value)
  @media_type = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


45114
45115
45116
# File 'lib/ovirtsdk4/types.rb', line 45114

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


45123
45124
45125
# File 'lib/ovirtsdk4/types.rb', line 45123

def name=(value)
  @name = value
end