Class: OvirtSDK4::DiskProfile
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::DiskProfile
- 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. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ DiskProfile
constructor
Creates a new instance of the DiskProfile class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissions
attribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissions
attribute. -
#qos ⇒ Qos
Returns the value of the
qos
attribute. -
#qos=(value) ⇒ Object
Sets the value of the
qos
attribute. -
#storage_domain ⇒ StorageDomain
Returns the value of the
storage_domain
attribute. -
#storage_domain=(value) ⇒ Object
Sets the value of the
storage_domain
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ DiskProfile
Creates a new instance of the OvirtSDK4::DiskProfile class.
37706 37707 37708 37709 37710 37711 |
# File 'lib/ovirtsdk4/types.rb', line 37706 def initialize(opts = {}) super(opts) self. = opts[:permissions] self.qos = opts[:qos] self.storage_domain = opts[:storage_domain] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
37716 37717 37718 37719 37720 37721 |
# File 'lib/ovirtsdk4/types.rb', line 37716 def ==(other) super && @permissions == other. && @qos == other.qos && @storage_domain == other.storage_domain end |
#comment ⇒ String
Returns the value of the comment
attribute.
37541 37542 37543 |
# File 'lib/ovirtsdk4/types.rb', line 37541 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
37550 37551 37552 |
# File 'lib/ovirtsdk4/types.rb', line 37550 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
37559 37560 37561 |
# File 'lib/ovirtsdk4/types.rb', line 37559 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
37568 37569 37570 |
# File 'lib/ovirtsdk4/types.rb', line 37568 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
37726 37727 37728 37729 37730 37731 |
# File 'lib/ovirtsdk4/types.rb', line 37726 def hash super + @permissions.hash + @qos.hash + @storage_domain.hash end |
#id ⇒ String
Returns the value of the id
attribute.
37577 37578 37579 |
# File 'lib/ovirtsdk4/types.rb', line 37577 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
37586 37587 37588 |
# File 'lib/ovirtsdk4/types.rb', line 37586 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
37595 37596 37597 |
# File 'lib/ovirtsdk4/types.rb', line 37595 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
37604 37605 37606 |
# File 'lib/ovirtsdk4/types.rb', line 37604 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
37613 37614 37615 |
# File 'lib/ovirtsdk4/types.rb', line 37613 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
37622 37623 37624 37625 37626 37627 37628 37629 37630 37631 37632 |
# File 'lib/ovirtsdk4/types.rb', line 37622 def (list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Permission.new(value) end end end @permissions = list end |
#qos ⇒ Qos
Returns the value of the qos
attribute.
37639 37640 37641 |
# File 'lib/ovirtsdk4/types.rb', line 37639 def qos @qos end |
#qos=(value) ⇒ Object
Sets the value of the qos
attribute.
The value
parameter can be an instance of Qos 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.
37652 37653 37654 37655 37656 37657 |
# File 'lib/ovirtsdk4/types.rb', line 37652 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |
#storage_domain ⇒ StorageDomain
Returns the value of the storage_domain
attribute.
37664 37665 37666 |
# File 'lib/ovirtsdk4/types.rb', line 37664 def storage_domain @storage_domain end |
#storage_domain=(value) ⇒ Object
Sets the value of the storage_domain
attribute.
The value
parameter can be an instance of StorageDomain 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.
37677 37678 37679 37680 37681 37682 |
# File 'lib/ovirtsdk4/types.rb', line 37677 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end |