Class: OvirtSDK4::MacPool
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::MacPool
- 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. -
#allow_duplicates ⇒ Boolean
Returns the value of the
allow_duplicates
attribute. -
#allow_duplicates=(value) ⇒ Object
Sets the value of the
allow_duplicates
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#default_pool ⇒ Boolean
Returns the value of the
default_pool
attribute. -
#default_pool=(value) ⇒ Object
Sets the value of the
default_pool
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 = {}) ⇒ MacPool
constructor
Creates a new instance of the MacPool 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. -
#ranges ⇒ Array<Range>
Returns the value of the
ranges
attribute. -
#ranges=(list) ⇒ Object
Sets the value of the
ranges
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ MacPool
Creates a new instance of the OvirtSDK4::MacPool class.
9150 9151 9152 9153 9154 9155 9156 |
# File 'lib/ovirtsdk4/types.rb', line 9150 def initialize(opts = {}) super(opts) self.allow_duplicates = opts[:allow_duplicates] self.default_pool = opts[:default_pool] self. = opts[:permissions] self.ranges = opts[:ranges] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
9161 9162 9163 9164 9165 9166 9167 |
# File 'lib/ovirtsdk4/types.rb', line 9161 def ==(other) super && @allow_duplicates == other.allow_duplicates && @default_pool == other.default_pool && @permissions == other. && @ranges == other.ranges end |
#allow_duplicates ⇒ Boolean
Returns the value of the allow_duplicates
attribute.
8971 8972 8973 |
# File 'lib/ovirtsdk4/types.rb', line 8971 def allow_duplicates @allow_duplicates end |
#allow_duplicates=(value) ⇒ Object
Sets the value of the allow_duplicates
attribute.
8980 8981 8982 |
# File 'lib/ovirtsdk4/types.rb', line 8980 def allow_duplicates=(value) @allow_duplicates = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
8989 8990 8991 |
# File 'lib/ovirtsdk4/types.rb', line 8989 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
8998 8999 9000 |
# File 'lib/ovirtsdk4/types.rb', line 8998 def comment=(value) @comment = value end |
#default_pool ⇒ Boolean
Returns the value of the default_pool
attribute.
9007 9008 9009 |
# File 'lib/ovirtsdk4/types.rb', line 9007 def default_pool @default_pool end |
#default_pool=(value) ⇒ Object
Sets the value of the default_pool
attribute.
9016 9017 9018 |
# File 'lib/ovirtsdk4/types.rb', line 9016 def default_pool=(value) @default_pool = value end |
#description ⇒ String
Returns the value of the description
attribute.
9025 9026 9027 |
# File 'lib/ovirtsdk4/types.rb', line 9025 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
9034 9035 9036 |
# File 'lib/ovirtsdk4/types.rb', line 9034 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
9172 9173 9174 9175 9176 9177 9178 |
# File 'lib/ovirtsdk4/types.rb', line 9172 def hash super + @allow_duplicates.hash + @default_pool.hash + @permissions.hash + @ranges.hash end |
#id ⇒ String
Returns the value of the id
attribute.
9043 9044 9045 |
# File 'lib/ovirtsdk4/types.rb', line 9043 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
9052 9053 9054 |
# File 'lib/ovirtsdk4/types.rb', line 9052 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
9061 9062 9063 |
# File 'lib/ovirtsdk4/types.rb', line 9061 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
9070 9071 9072 |
# File 'lib/ovirtsdk4/types.rb', line 9070 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
9079 9080 9081 |
# File 'lib/ovirtsdk4/types.rb', line 9079 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 |
# File 'lib/ovirtsdk4/types.rb', line 9088 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 |
#ranges ⇒ Array<Range>
Returns the value of the ranges
attribute.
9105 9106 9107 |
# File 'lib/ovirtsdk4/types.rb', line 9105 def ranges @ranges end |
#ranges=(list) ⇒ Object
Sets the value of the ranges
attribute.
9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 |
# File 'lib/ovirtsdk4/types.rb', line 9114 def ranges=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Range.new(value) end end end @ranges = list end |