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. -
#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.
8886 8887 8888 8889 8890 8891 |
# File 'lib/ovirtsdk4/types.rb', line 8886 def initialize(opts = {}) super(opts) self.allow_duplicates = opts[:allow_duplicates] self.default_pool = opts[:default_pool] self.ranges = opts[:ranges] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
8896 8897 8898 8899 8900 8901 |
# File 'lib/ovirtsdk4/types.rb', line 8896 def ==(other) super && @allow_duplicates == other.allow_duplicates && @default_pool == other.default_pool && @ranges == other.ranges end |
#allow_duplicates ⇒ Boolean
Returns the value of the allow_duplicates
attribute.
8735 8736 8737 |
# File 'lib/ovirtsdk4/types.rb', line 8735 def allow_duplicates @allow_duplicates end |
#allow_duplicates=(value) ⇒ Object
Sets the value of the allow_duplicates
attribute.
8744 8745 8746 |
# File 'lib/ovirtsdk4/types.rb', line 8744 def allow_duplicates=(value) @allow_duplicates = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
8753 8754 8755 |
# File 'lib/ovirtsdk4/types.rb', line 8753 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
8762 8763 8764 |
# File 'lib/ovirtsdk4/types.rb', line 8762 def comment=(value) @comment = value end |
#default_pool ⇒ Boolean
Returns the value of the default_pool
attribute.
8771 8772 8773 |
# File 'lib/ovirtsdk4/types.rb', line 8771 def default_pool @default_pool end |
#default_pool=(value) ⇒ Object
Sets the value of the default_pool
attribute.
8780 8781 8782 |
# File 'lib/ovirtsdk4/types.rb', line 8780 def default_pool=(value) @default_pool = value end |
#description ⇒ String
Returns the value of the description
attribute.
8789 8790 8791 |
# File 'lib/ovirtsdk4/types.rb', line 8789 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
8798 8799 8800 |
# File 'lib/ovirtsdk4/types.rb', line 8798 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
8906 8907 8908 8909 8910 8911 |
# File 'lib/ovirtsdk4/types.rb', line 8906 def hash super + @allow_duplicates.hash + @default_pool.hash + @ranges.hash end |
#id ⇒ String
Returns the value of the id
attribute.
8807 8808 8809 |
# File 'lib/ovirtsdk4/types.rb', line 8807 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
8816 8817 8818 |
# File 'lib/ovirtsdk4/types.rb', line 8816 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
8825 8826 8827 |
# File 'lib/ovirtsdk4/types.rb', line 8825 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
8834 8835 8836 |
# File 'lib/ovirtsdk4/types.rb', line 8834 def name=(value) @name = value end |
#ranges ⇒ Array<Range>
Returns the value of the ranges
attribute.
8843 8844 8845 |
# File 'lib/ovirtsdk4/types.rb', line 8843 def ranges @ranges end |
#ranges=(list) ⇒ Object
Sets the value of the ranges
attribute.
8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 |
# File 'lib/ovirtsdk4/types.rb', line 8852 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 |