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.



44539
44540
44541
44542
44543
# File 'lib/ovirtsdk4/types.rb', line 44539

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.



44548
44549
44550
44551
44552
# File 'lib/ovirtsdk4/types.rb', line 44548

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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


44416
44417
44418
# File 'lib/ovirtsdk4/types.rb', line 44416

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


44425
44426
44427
# File 'lib/ovirtsdk4/types.rb', line 44425

def comment=(value)
  @comment = value
end

#dataString

Returns the value of the data attribute.

Returns:

  • (String)


44434
44435
44436
# File 'lib/ovirtsdk4/types.rb', line 44434

def data
  @data
end

#data=(value) ⇒ Object

Sets the value of the data attribute.

Parameters:

  • value (String)


44443
44444
44445
# File 'lib/ovirtsdk4/types.rb', line 44443

def data=(value)
  @data = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


44452
44453
44454
# File 'lib/ovirtsdk4/types.rb', line 44452

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


44461
44462
44463
# File 'lib/ovirtsdk4/types.rb', line 44461

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



44557
44558
44559
44560
44561
# File 'lib/ovirtsdk4/types.rb', line 44557

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


44470
44471
44472
# File 'lib/ovirtsdk4/types.rb', line 44470

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


44479
44480
44481
# File 'lib/ovirtsdk4/types.rb', line 44479

def id=(value)
  @id = value
end

#media_typeString

Returns the value of the media_type attribute.

Returns:

  • (String)


44488
44489
44490
# File 'lib/ovirtsdk4/types.rb', line 44488

def media_type
  @media_type
end

#media_type=(value) ⇒ Object

Sets the value of the media_type attribute.

Parameters:

  • value (String)


44497
44498
44499
# File 'lib/ovirtsdk4/types.rb', line 44497

def media_type=(value)
  @media_type = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


44506
44507
44508
# File 'lib/ovirtsdk4/types.rb', line 44506

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


44515
44516
44517
# File 'lib/ovirtsdk4/types.rb', line 44515

def name=(value)
  @name = value
end