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.
33060 33061 33062 33063 33064 33065 |
# File 'lib/ovirtsdk4/types.rb', line 33060 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.
33070 33071 33072 33073 33074 33075 |
# File 'lib/ovirtsdk4/types.rb', line 33070 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.
32893 32894 32895 |
# File 'lib/ovirtsdk4/types.rb', line 32893 def cluster_features @cluster_features end |
#cluster_features=(list) ⇒ Object
Sets the value of the cluster_features
attribute.
32902 32903 32904 32905 32906 32907 32908 32909 32910 32911 32912 |
# File 'lib/ovirtsdk4/types.rb', line 32902 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.
32919 32920 32921 |
# File 'lib/ovirtsdk4/types.rb', line 32919 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
32928 32929 32930 |
# File 'lib/ovirtsdk4/types.rb', line 32928 def comment=(value) @comment = value end |
#cpu_types ⇒ Array<CpuType>
Returns the value of the cpu_types
attribute.
32937 32938 32939 |
# File 'lib/ovirtsdk4/types.rb', line 32937 def cpu_types @cpu_types end |
#cpu_types=(list) ⇒ Object
Sets the value of the cpu_types
attribute.
32946 32947 32948 32949 32950 32951 32952 32953 32954 32955 32956 |
# File 'lib/ovirtsdk4/types.rb', line 32946 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.
32963 32964 32965 |
# File 'lib/ovirtsdk4/types.rb', line 32963 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
32972 32973 32974 |
# File 'lib/ovirtsdk4/types.rb', line 32972 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
33080 33081 33082 33083 33084 33085 |
# File 'lib/ovirtsdk4/types.rb', line 33080 def hash super + @cluster_features.hash + @cpu_types.hash + @permits.hash end |
#id ⇒ String
Returns the value of the id
attribute.
32981 32982 32983 |
# File 'lib/ovirtsdk4/types.rb', line 32981 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
32990 32991 32992 |
# File 'lib/ovirtsdk4/types.rb', line 32990 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
32999 33000 33001 |
# File 'lib/ovirtsdk4/types.rb', line 32999 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
33008 33009 33010 |
# File 'lib/ovirtsdk4/types.rb', line 33008 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits
attribute.
33017 33018 33019 |
# File 'lib/ovirtsdk4/types.rb', line 33017 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits
attribute.
33026 33027 33028 33029 33030 33031 33032 33033 33034 33035 33036 |
# File 'lib/ovirtsdk4/types.rb', line 33026 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 |