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.
37999 38000 38001 38002 38003 38004 |
# File 'lib/ovirtsdk4/types.rb', line 37999 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.
38009 38010 38011 38012 38013 38014 |
# File 'lib/ovirtsdk4/types.rb', line 38009 def ==(other) super && == other. && @qos == other.qos && @storage_domain == other.storage_domain end |
#comment ⇒ String
Returns the value of the comment attribute.
37834 37835 37836 |
# File 'lib/ovirtsdk4/types.rb', line 37834 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
37843 37844 37845 |
# File 'lib/ovirtsdk4/types.rb', line 37843 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
37852 37853 37854 |
# File 'lib/ovirtsdk4/types.rb', line 37852 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
37861 37862 37863 |
# File 'lib/ovirtsdk4/types.rb', line 37861 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
38019 38020 38021 38022 38023 38024 |
# File 'lib/ovirtsdk4/types.rb', line 38019 def hash super + .hash + @qos.hash + @storage_domain.hash end |
#id ⇒ String
Returns the value of the id attribute.
37870 37871 37872 |
# File 'lib/ovirtsdk4/types.rb', line 37870 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
37879 37880 37881 |
# File 'lib/ovirtsdk4/types.rb', line 37879 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name attribute.
37888 37889 37890 |
# File 'lib/ovirtsdk4/types.rb', line 37888 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
37897 37898 37899 |
# File 'lib/ovirtsdk4/types.rb', line 37897 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions attribute.
37906 37907 37908 |
# File 'lib/ovirtsdk4/types.rb', line 37906 def end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
37915 37916 37917 37918 37919 37920 37921 37922 37923 37924 37925 |
# File 'lib/ovirtsdk4/types.rb', line 37915 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 = list end |
#qos ⇒ Qos
Returns the value of the qos attribute.
37932 37933 37934 |
# File 'lib/ovirtsdk4/types.rb', line 37932 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.
37945 37946 37947 37948 37949 37950 |
# File 'lib/ovirtsdk4/types.rb', line 37945 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.
37957 37958 37959 |
# File 'lib/ovirtsdk4/types.rb', line 37957 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.
37970 37971 37972 37973 37974 37975 |
# File 'lib/ovirtsdk4/types.rb', line 37970 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end |