Class: OvirtSDK4::SystemOption

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

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

  • :values (Array<SystemOptionValue>, Array<Hash>)

    The values of attribute values.


22345
22346
22347
22348
# File 'lib/ovirtsdk4/types.rb', line 22345

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

Instance Method Details

#==(other) ⇒ Object

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


22353
22354
22355
22356
# File 'lib/ovirtsdk4/types.rb', line 22353

def ==(other)
  super &&
  @values == other.values
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

22234
22235
22236
# File 'lib/ovirtsdk4/types.rb', line 22234

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

22243
22244
22245
# File 'lib/ovirtsdk4/types.rb', line 22243

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

22252
22253
22254
# File 'lib/ovirtsdk4/types.rb', line 22252

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

22261
22262
22263
# File 'lib/ovirtsdk4/types.rb', line 22261

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


22361
22362
22363
22364
# File 'lib/ovirtsdk4/types.rb', line 22361

def hash
  super +
  @values.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

22270
22271
22272
# File 'lib/ovirtsdk4/types.rb', line 22270

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

22279
22280
22281
# File 'lib/ovirtsdk4/types.rb', line 22279

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

22288
22289
22290
# File 'lib/ovirtsdk4/types.rb', line 22288

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

22297
22298
22299
# File 'lib/ovirtsdk4/types.rb', line 22297

def name=(value)
  @name = value
end

#valuesArray<SystemOptionValue>

Returns the value of the values attribute.

Returns:


22306
22307
22308
# File 'lib/ovirtsdk4/types.rb', line 22306

def values
  @values
end

#values=(list) ⇒ Object

Sets the value of the values attribute.

Parameters:


22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
# File 'lib/ovirtsdk4/types.rb', line 22315

def values=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = SystemOptionValue.new(value)
      end
    end
  end
  @values = list
end