Class: OvirtSDK4::EntityProfileDetail

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Direct Known Subclasses

BrickProfileDetail, NfsProfileDetail

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ EntityProfileDetail

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

  • :profile_details (Array<ProfileDetail>, Array<Hash>)

    The values of attribute profile_details.


3353
3354
3355
3356
# File 'lib/ovirtsdk4/types.rb', line 3353

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

Instance Method Details

#==(other) ⇒ Object

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


3361
3362
3363
3364
# File 'lib/ovirtsdk4/types.rb', line 3361

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

#hashObject

Generates a hash value for this object.


3369
3370
3371
3372
# File 'lib/ovirtsdk4/types.rb', line 3369

def hash
  super +
  @profile_details.hash
end

#profile_detailsArray<ProfileDetail>

Returns the value of the profile_details attribute.

Returns:


3322
3323
3324
# File 'lib/ovirtsdk4/types.rb', line 3322

def profile_details
  @profile_details
end

#profile_details=(list) ⇒ Object

Sets the value of the profile_details attribute.

Parameters:


3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
# File 'lib/ovirtsdk4/types.rb', line 3331

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