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.
35029 35030 35031 35032 35033 35034 |
# File 'lib/ovirtsdk4/types.rb', line 35029 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.
35039 35040 35041 35042 35043 35044 |
# File 'lib/ovirtsdk4/types.rb', line 35039 def ==(other) super && @permissions == other. && @qos == other.qos && @storage_domain == other.storage_domain end |
#comment ⇒ String
Returns the value of the comment
attribute.
34864 34865 34866 |
# File 'lib/ovirtsdk4/types.rb', line 34864 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
34873 34874 34875 |
# File 'lib/ovirtsdk4/types.rb', line 34873 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
34882 34883 34884 |
# File 'lib/ovirtsdk4/types.rb', line 34882 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
34891 34892 34893 |
# File 'lib/ovirtsdk4/types.rb', line 34891 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
35049 35050 35051 35052 35053 35054 |
# File 'lib/ovirtsdk4/types.rb', line 35049 def hash super + @permissions.hash + @qos.hash + @storage_domain.hash end |
#id ⇒ String
Returns the value of the id
attribute.
34900 34901 34902 |
# File 'lib/ovirtsdk4/types.rb', line 34900 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
34909 34910 34911 |
# File 'lib/ovirtsdk4/types.rb', line 34909 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
34918 34919 34920 |
# File 'lib/ovirtsdk4/types.rb', line 34918 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
34927 34928 34929 |
# File 'lib/ovirtsdk4/types.rb', line 34927 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
34936 34937 34938 |
# File 'lib/ovirtsdk4/types.rb', line 34936 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
34945 34946 34947 34948 34949 34950 34951 34952 34953 34954 34955 |
# File 'lib/ovirtsdk4/types.rb', line 34945 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.
34962 34963 34964 |
# File 'lib/ovirtsdk4/types.rb', line 34962 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.
34975 34976 34977 34978 34979 34980 |
# File 'lib/ovirtsdk4/types.rb', line 34975 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.
34987 34988 34989 |
# File 'lib/ovirtsdk4/types.rb', line 34987 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.
35000 35001 35002 35003 35004 35005 |
# File 'lib/ovirtsdk4/types.rb', line 35000 def storage_domain=(value) if value.is_a?(Hash) value = StorageDomain.new(value) end @storage_domain = value end |