Class: OvirtSDK4::GlusterVolumeProfileDetails

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

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

  • :brick_profile_details (Array<BrickProfileDetail>, Array<Hash>)

    The values of attribute brick_profile_details.

  • :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.

  • :nfs_profile_details (Array<NfsProfileDetail>, Array<Hash>)

    The values of attribute nfs_profile_details.


41665
41666
41667
41668
41669
# File 'lib/ovirtsdk4/types.rb', line 41665

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

Instance Method Details

#==(other) ⇒ Object

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


41674
41675
41676
41677
41678
# File 'lib/ovirtsdk4/types.rb', line 41674

def ==(other)
  super &&
  @brick_profile_details == other.brick_profile_details &&
  @nfs_profile_details == other.nfs_profile_details
end

#brick_profile_detailsArray<BrickProfileDetail>

Returns the value of the brick_profile_details attribute.

Returns:


41526
41527
41528
# File 'lib/ovirtsdk4/types.rb', line 41526

def brick_profile_details
  @brick_profile_details
end

#brick_profile_details=(list) ⇒ Object

Sets the value of the brick_profile_details attribute.

Parameters:


41535
41536
41537
41538
41539
41540
41541
41542
41543
41544
41545
# File 'lib/ovirtsdk4/types.rb', line 41535

def brick_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] = BrickProfileDetail.new(value)
      end
    end
  end
  @brick_profile_details = list
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

41552
41553
41554
# File 'lib/ovirtsdk4/types.rb', line 41552

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

41561
41562
41563
# File 'lib/ovirtsdk4/types.rb', line 41561

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

41570
41571
41572
# File 'lib/ovirtsdk4/types.rb', line 41570

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

41579
41580
41581
# File 'lib/ovirtsdk4/types.rb', line 41579

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


41683
41684
41685
41686
41687
# File 'lib/ovirtsdk4/types.rb', line 41683

def hash
  super +
  @brick_profile_details.hash +
  @nfs_profile_details.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

41588
41589
41590
# File 'lib/ovirtsdk4/types.rb', line 41588

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

41597
41598
41599
# File 'lib/ovirtsdk4/types.rb', line 41597

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

41606
41607
41608
# File 'lib/ovirtsdk4/types.rb', line 41606

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

41615
41616
41617
# File 'lib/ovirtsdk4/types.rb', line 41615

def name=(value)
  @name = value
end

#nfs_profile_detailsArray<NfsProfileDetail>

Returns the value of the nfs_profile_details attribute.

Returns:


41624
41625
41626
# File 'lib/ovirtsdk4/types.rb', line 41624

def nfs_profile_details
  @nfs_profile_details
end

#nfs_profile_details=(list) ⇒ Object

Sets the value of the nfs_profile_details attribute.

Parameters:


41633
41634
41635
41636
41637
41638
41639
41640
41641
41642
41643
# File 'lib/ovirtsdk4/types.rb', line 41633

def nfs_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] = NfsProfileDetail.new(value)
      end
    end
  end
  @nfs_profile_details = list
end