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
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ DiskProfile
constructor
Creates a new instance of the DiskProfile class.
-
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissionsattribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissionsattribute. -
#qos ⇒ Qos
Returns the value of the
qosattribute. -
#qos=(value) ⇒ Object
Sets the value of the
qosattribute. -
#storage_domain ⇒ StorageDomain
Returns the value of the
storage_domainattribute. -
#storage_domain=(value) ⇒ Object
Sets the value of the
storage_domainattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ DiskProfile
Creates a new instance of the OvirtSDK4::DiskProfile class.
34960 34961 34962 34963 34964 34965 |
# File 'lib/ovirtsdk4/types.rb', line 34960 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.
34970 34971 34972 34973 34974 34975 |
# File 'lib/ovirtsdk4/types.rb', line 34970 def ==(other) super && @permissions == other. && @qos == other.qos && @storage_domain == other.storage_domain end |
#comment ⇒ String
Returns the value of the comment attribute.
34795 34796 34797 |
# File 'lib/ovirtsdk4/types.rb', line 34795 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
34804 34805 34806 |
# File 'lib/ovirtsdk4/types.rb', line 34804 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
34813 34814 34815 |
# File 'lib/ovirtsdk4/types.rb', line 34813 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
34822 34823 34824 |
# File 'lib/ovirtsdk4/types.rb', line 34822 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
34980 34981 34982 34983 34984 34985 |
# File 'lib/ovirtsdk4/types.rb', line 34980 def hash super + @permissions.hash + @qos.hash + @storage_domain.hash end |
#id ⇒ String
Returns the value of the id attribute.
34831 34832 34833 |
# File 'lib/ovirtsdk4/types.rb', line 34831 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
34840 34841 34842 |
# File 'lib/ovirtsdk4/types.rb', line 34840 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
34849 34850 34851 |
# File 'lib/ovirtsdk4/types.rb', line 34849 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
34858 34859 34860 |
# File 'lib/ovirtsdk4/types.rb', line 34858 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions attribute.
34867 34868 34869 |
# File 'lib/ovirtsdk4/types.rb', line 34867 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
34876 34877 34878 34879 34880 34881 34882 34883 34884 34885 34886 |
# File 'lib/ovirtsdk4/types.rb', line 34876 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.
34893 34894 34895 |
# File 'lib/ovirtsdk4/types.rb', line 34893 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.
34906 34907 34908 34909 34910 34911 |
# File 'lib/ovirtsdk4/types.rb', line 34906 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.
34918 34919 34920 |
# File 'lib/ovirtsdk4/types.rb', line 34918 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.
34931 34932 34933 34934 34935 34936 |
# File 'lib/ovirtsdk4/types.rb', line 34931 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end |