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.
36851 36852 36853 36854 36855 36856 |
# File 'lib/ovirtsdk4/types.rb', line 36851 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.
36861 36862 36863 36864 36865 36866 |
# File 'lib/ovirtsdk4/types.rb', line 36861 def ==(other) super && @permissions == other. && @qos == other.qos && @storage_domain == other.storage_domain end |
#comment ⇒ String
Returns the value of the comment
attribute.
36686 36687 36688 |
# File 'lib/ovirtsdk4/types.rb', line 36686 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
36695 36696 36697 |
# File 'lib/ovirtsdk4/types.rb', line 36695 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
36704 36705 36706 |
# File 'lib/ovirtsdk4/types.rb', line 36704 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
36713 36714 36715 |
# File 'lib/ovirtsdk4/types.rb', line 36713 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
36871 36872 36873 36874 36875 36876 |
# File 'lib/ovirtsdk4/types.rb', line 36871 def hash super + @permissions.hash + @qos.hash + @storage_domain.hash end |
#id ⇒ String
Returns the value of the id
attribute.
36722 36723 36724 |
# File 'lib/ovirtsdk4/types.rb', line 36722 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
36731 36732 36733 |
# File 'lib/ovirtsdk4/types.rb', line 36731 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
36740 36741 36742 |
# File 'lib/ovirtsdk4/types.rb', line 36740 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
36749 36750 36751 |
# File 'lib/ovirtsdk4/types.rb', line 36749 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
36758 36759 36760 |
# File 'lib/ovirtsdk4/types.rb', line 36758 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
36767 36768 36769 36770 36771 36772 36773 36774 36775 36776 36777 |
# File 'lib/ovirtsdk4/types.rb', line 36767 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.
36784 36785 36786 |
# File 'lib/ovirtsdk4/types.rb', line 36784 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.
36797 36798 36799 36800 36801 36802 |
# File 'lib/ovirtsdk4/types.rb', line 36797 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.
36809 36810 36811 |
# File 'lib/ovirtsdk4/types.rb', line 36809 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.
36822 36823 36824 36825 36826 36827 |
# File 'lib/ovirtsdk4/types.rb', line 36822 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end |