Class: OvirtSDK4::Role
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Role
- 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. -
#administrative ⇒ Boolean
Returns the value of the
administrative
attribute. -
#administrative=(value) ⇒ Object
Sets the value of the
administrative
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
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 = {}) ⇒ Role
constructor
Creates a new instance of the Role class.
-
#mutable ⇒ Boolean
Returns the value of the
mutable
attribute. -
#mutable=(value) ⇒ Object
Sets the value of the
mutable
attribute. -
#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. -
#user ⇒ User
Returns the value of the
user
attribute. -
#user=(value) ⇒ Object
Sets the value of the
user
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Role
Creates a new instance of the OvirtSDK4::Role class.
17769 17770 17771 17772 17773 17774 17775 |
# File 'lib/ovirtsdk4/types.rb', line 17769 def initialize(opts = {}) super(opts) self.administrative = opts[:administrative] self.mutable = opts[:mutable] self.permits = opts[:permits] self.user = opts[:user] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
17780 17781 17782 17783 17784 17785 17786 |
# File 'lib/ovirtsdk4/types.rb', line 17780 def ==(other) super && @administrative == other.administrative && @mutable == other.mutable && @permits == other.permits && @user == other.user end |
#administrative ⇒ Boolean
Returns the value of the administrative
attribute.
17591 17592 17593 |
# File 'lib/ovirtsdk4/types.rb', line 17591 def administrative @administrative end |
#administrative=(value) ⇒ Object
Sets the value of the administrative
attribute.
17600 17601 17602 |
# File 'lib/ovirtsdk4/types.rb', line 17600 def administrative=(value) @administrative = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
17609 17610 17611 |
# File 'lib/ovirtsdk4/types.rb', line 17609 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
17618 17619 17620 |
# File 'lib/ovirtsdk4/types.rb', line 17618 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
17627 17628 17629 |
# File 'lib/ovirtsdk4/types.rb', line 17627 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
17636 17637 17638 |
# File 'lib/ovirtsdk4/types.rb', line 17636 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
17791 17792 17793 17794 17795 17796 17797 |
# File 'lib/ovirtsdk4/types.rb', line 17791 def hash super + @administrative.hash + @mutable.hash + @permits.hash + @user.hash end |
#id ⇒ String
Returns the value of the id
attribute.
17645 17646 17647 |
# File 'lib/ovirtsdk4/types.rb', line 17645 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
17654 17655 17656 |
# File 'lib/ovirtsdk4/types.rb', line 17654 def id=(value) @id = value end |
#mutable ⇒ Boolean
Returns the value of the mutable
attribute.
17663 17664 17665 |
# File 'lib/ovirtsdk4/types.rb', line 17663 def mutable @mutable end |
#mutable=(value) ⇒ Object
Sets the value of the mutable
attribute.
17672 17673 17674 |
# File 'lib/ovirtsdk4/types.rb', line 17672 def mutable=(value) @mutable = value end |
#name ⇒ String
Returns the value of the name
attribute.
17681 17682 17683 |
# File 'lib/ovirtsdk4/types.rb', line 17681 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
17690 17691 17692 |
# File 'lib/ovirtsdk4/types.rb', line 17690 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits
attribute.
17699 17700 17701 |
# File 'lib/ovirtsdk4/types.rb', line 17699 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits
attribute.
17708 17709 17710 17711 17712 17713 17714 17715 17716 17717 17718 |
# File 'lib/ovirtsdk4/types.rb', line 17708 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 |
#user ⇒ User
Returns the value of the user
attribute.
17725 17726 17727 |
# File 'lib/ovirtsdk4/types.rb', line 17725 def user @user end |
#user=(value) ⇒ Object
Sets the value of the user
attribute.
The value
parameter can be an instance of User or a hash.
If it is a hash then a new instance will be created passing the hash as the
opts
parameter to the constructor.
17738 17739 17740 17741 17742 17743 |
# File 'lib/ovirtsdk4/types.rb', line 17738 def user=(value) if value.is_a?(Hash) value = User.new(value) end @user = value end |