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.
9554 9555 9556 9557 9558 9559 9560 |
# File 'lib/ovirtsdk4/types.rb', line 9554 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.
9565 9566 9567 9568 9569 9570 9571 |
# File 'lib/ovirtsdk4/types.rb', line 9565 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.
9375 9376 9377 |
# File 'lib/ovirtsdk4/types.rb', line 9375 def allow_duplicates @allow_duplicates end |
#allow_duplicates=(value) ⇒ Object
Sets the value of the allow_duplicates
attribute.
9384 9385 9386 |
# File 'lib/ovirtsdk4/types.rb', line 9384 def allow_duplicates=(value) @allow_duplicates = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
9393 9394 9395 |
# File 'lib/ovirtsdk4/types.rb', line 9393 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
9402 9403 9404 |
# File 'lib/ovirtsdk4/types.rb', line 9402 def comment=(value) @comment = value end |
#default_pool ⇒ Boolean
Returns the value of the default_pool
attribute.
9411 9412 9413 |
# File 'lib/ovirtsdk4/types.rb', line 9411 def default_pool @default_pool end |
#default_pool=(value) ⇒ Object
Sets the value of the default_pool
attribute.
9420 9421 9422 |
# File 'lib/ovirtsdk4/types.rb', line 9420 def default_pool=(value) @default_pool = value end |
#description ⇒ String
Returns the value of the description
attribute.
9429 9430 9431 |
# File 'lib/ovirtsdk4/types.rb', line 9429 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
9438 9439 9440 |
# File 'lib/ovirtsdk4/types.rb', line 9438 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
9576 9577 9578 9579 9580 9581 9582 |
# File 'lib/ovirtsdk4/types.rb', line 9576 def hash super + @allow_duplicates.hash + @default_pool.hash + @permissions.hash + @ranges.hash end |
#id ⇒ String
Returns the value of the id
attribute.
9447 9448 9449 |
# File 'lib/ovirtsdk4/types.rb', line 9447 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
9456 9457 9458 |
# File 'lib/ovirtsdk4/types.rb', line 9456 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
9465 9466 9467 |
# File 'lib/ovirtsdk4/types.rb', line 9465 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
9474 9475 9476 |
# File 'lib/ovirtsdk4/types.rb', line 9474 def name=(value) @name = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
9483 9484 9485 |
# File 'lib/ovirtsdk4/types.rb', line 9483 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 |
# File 'lib/ovirtsdk4/types.rb', line 9492 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.
9509 9510 9511 |
# File 'lib/ovirtsdk4/types.rb', line 9509 def ranges @ranges end |
#ranges=(list) ⇒ Object
Sets the value of the ranges
attribute.
9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 |
# File 'lib/ovirtsdk4/types.rb', line 9518 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 |