Class: OvirtSDK4::BrickProfileDetail
- Inherits:
-
EntityProfileDetail
- Object
- Struct
- EntityProfileDetail
- OvirtSDK4::BrickProfileDetail
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#brick ⇒ GlusterBrick
Returns the value of the
brick
attribute. -
#brick=(value) ⇒ Object
Sets the value of the
brick
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#initialize(opts = {}) ⇒ BrickProfileDetail
constructor
Creates a new instance of the BrickProfileDetail class.
-
#profile_details ⇒ Array<ProfileDetail>
Returns the value of the
profile_details
attribute. -
#profile_details=(list) ⇒ Object
Sets the value of the
profile_details
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ BrickProfileDetail
Creates a new instance of the OvirtSDK4::BrickProfileDetail class.
30587 30588 30589 30590 |
# File 'lib/ovirtsdk4/types.rb', line 30587 def initialize(opts = {}) super(opts) self.brick = opts[:brick] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
30595 30596 30597 30598 |
# File 'lib/ovirtsdk4/types.rb', line 30595 def ==(other) super && @brick == other.brick end |
#brick ⇒ GlusterBrick
Returns the value of the brick
attribute.
30529 30530 30531 |
# File 'lib/ovirtsdk4/types.rb', line 30529 def brick @brick end |
#brick=(value) ⇒ Object
Sets the value of the brick
attribute.
The value
parameter can be an instance of GlusterBrick or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
30542 30543 30544 30545 30546 30547 |
# File 'lib/ovirtsdk4/types.rb', line 30542 def brick=(value) if value.is_a?(Hash) value = GlusterBrick.new(value) end @brick = value end |
#hash ⇒ Object
Generates a hash value for this object.
30603 30604 30605 30606 |
# File 'lib/ovirtsdk4/types.rb', line 30603 def hash super + @brick.hash end |
#profile_details ⇒ Array<ProfileDetail>
Returns the value of the profile_details
attribute.
30554 30555 30556 |
# File 'lib/ovirtsdk4/types.rb', line 30554 def profile_details @profile_details end |
#profile_details=(list) ⇒ Object
Sets the value of the profile_details
attribute.
30563 30564 30565 30566 30567 30568 30569 30570 30571 30572 30573 |
# File 'lib/ovirtsdk4/types.rb', line 30563 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 |