Class: OvirtSDK4::ClusterLevel
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::ClusterLevel
- 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. -
#cluster_features ⇒ Array<ClusterFeature>
Returns the value of the
cluster_features
attribute. -
#cluster_features=(list) ⇒ Object
Sets the value of the
cluster_features
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#cpu_types ⇒ Array<CpuType>
Returns the value of the
cpu_types
attribute. -
#cpu_types=(list) ⇒ Object
Sets the value of the
cpu_types
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 = {}) ⇒ ClusterLevel
constructor
Creates a new instance of the ClusterLevel class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#permits ⇒ Array<Permit>
Returns the value of the
permits
attribute. -
#permits=(list) ⇒ Object
Sets the value of the
permits
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ ClusterLevel
Creates a new instance of the OvirtSDK4::ClusterLevel class.
35104 35105 35106 35107 35108 35109 |
# File 'lib/ovirtsdk4/types.rb', line 35104 def initialize(opts = {}) super(opts) self.cluster_features = opts[:cluster_features] self.cpu_types = opts[:cpu_types] self.permits = opts[:permits] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
35114 35115 35116 35117 35118 35119 |
# File 'lib/ovirtsdk4/types.rb', line 35114 def ==(other) super && @cluster_features == other.cluster_features && @cpu_types == other.cpu_types && @permits == other.permits end |
#cluster_features ⇒ Array<ClusterFeature>
Returns the value of the cluster_features
attribute.
34937 34938 34939 |
# File 'lib/ovirtsdk4/types.rb', line 34937 def cluster_features @cluster_features end |
#cluster_features=(list) ⇒ Object
Sets the value of the cluster_features
attribute.
34946 34947 34948 34949 34950 34951 34952 34953 34954 34955 34956 |
# File 'lib/ovirtsdk4/types.rb', line 34946 def cluster_features=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = ClusterFeature.new(value) end end end @cluster_features = list end |
#comment ⇒ String
Returns the value of the comment
attribute.
34963 34964 34965 |
# File 'lib/ovirtsdk4/types.rb', line 34963 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
34972 34973 34974 |
# File 'lib/ovirtsdk4/types.rb', line 34972 def comment=(value) @comment = value end |
#cpu_types ⇒ Array<CpuType>
Returns the value of the cpu_types
attribute.
34981 34982 34983 |
# File 'lib/ovirtsdk4/types.rb', line 34981 def cpu_types @cpu_types end |
#cpu_types=(list) ⇒ Object
Sets the value of the cpu_types
attribute.
34990 34991 34992 34993 34994 34995 34996 34997 34998 34999 35000 |
# File 'lib/ovirtsdk4/types.rb', line 34990 def cpu_types=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = CpuType.new(value) end end end @cpu_types = list end |
#description ⇒ String
Returns the value of the description
attribute.
35007 35008 35009 |
# File 'lib/ovirtsdk4/types.rb', line 35007 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
35016 35017 35018 |
# File 'lib/ovirtsdk4/types.rb', line 35016 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
35124 35125 35126 35127 35128 35129 |
# File 'lib/ovirtsdk4/types.rb', line 35124 def hash super + @cluster_features.hash + @cpu_types.hash + @permits.hash end |
#id ⇒ String
Returns the value of the id
attribute.
35025 35026 35027 |
# File 'lib/ovirtsdk4/types.rb', line 35025 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
35034 35035 35036 |
# File 'lib/ovirtsdk4/types.rb', line 35034 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
35043 35044 35045 |
# File 'lib/ovirtsdk4/types.rb', line 35043 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
35052 35053 35054 |
# File 'lib/ovirtsdk4/types.rb', line 35052 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits
attribute.
35061 35062 35063 |
# File 'lib/ovirtsdk4/types.rb', line 35061 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits
attribute.
35070 35071 35072 35073 35074 35075 35076 35077 35078 35079 35080 |
# File 'lib/ovirtsdk4/types.rb', line 35070 def permits=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Permit.new(value) end end end @permits = list end |