Class: OvirtSDK4::Identified

Inherits:
Struct
  • Object
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 = {}) ⇒ Identified

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

  • :name (String)

    The value of attribute name.



5166
5167
5168
5169
5170
5171
5172
# File 'lib/ovirtsdk4/types.rb', line 5166

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.id = opts[:id]
  self.name = opts[:name]
end

Instance Method Details

#==(other) ⇒ Object

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



5177
5178
5179
5180
5181
5182
5183
# File 'lib/ovirtsdk4/types.rb', line 5177

def ==(other)
  super &&
  @comment == other.comment &&
  @description == other.description &&
  @id == other.id &&
  @name == other.name
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


5083
5084
5085
# File 'lib/ovirtsdk4/types.rb', line 5083

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


5092
5093
5094
# File 'lib/ovirtsdk4/types.rb', line 5092

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


5101
5102
5103
# File 'lib/ovirtsdk4/types.rb', line 5101

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


5110
5111
5112
# File 'lib/ovirtsdk4/types.rb', line 5110

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



5188
5189
5190
5191
5192
5193
5194
# File 'lib/ovirtsdk4/types.rb', line 5188

def hash
  super +
  @comment.hash +
  @description.hash +
  @id.hash +
  @name.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


5119
5120
5121
# File 'lib/ovirtsdk4/types.rb', line 5119

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


5128
5129
5130
# File 'lib/ovirtsdk4/types.rb', line 5128

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


5137
5138
5139
# File 'lib/ovirtsdk4/types.rb', line 5137

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


5146
5147
5148
# File 'lib/ovirtsdk4/types.rb', line 5146

def name=(value)
  @name = value
end