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.
17917 17918 17919 17920 17921 17922 17923 |
# File 'lib/ovirtsdk4/types.rb', line 17917 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.
17928 17929 17930 17931 17932 17933 17934 |
# File 'lib/ovirtsdk4/types.rb', line 17928 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.
17739 17740 17741 |
# File 'lib/ovirtsdk4/types.rb', line 17739 def administrative @administrative end |
#administrative=(value) ⇒ Object
Sets the value of the administrative
attribute.
17748 17749 17750 |
# File 'lib/ovirtsdk4/types.rb', line 17748 def administrative=(value) @administrative = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
17757 17758 17759 |
# File 'lib/ovirtsdk4/types.rb', line 17757 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
17766 17767 17768 |
# File 'lib/ovirtsdk4/types.rb', line 17766 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
17775 17776 17777 |
# File 'lib/ovirtsdk4/types.rb', line 17775 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
17784 17785 17786 |
# File 'lib/ovirtsdk4/types.rb', line 17784 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
17939 17940 17941 17942 17943 17944 17945 |
# File 'lib/ovirtsdk4/types.rb', line 17939 def hash super + @administrative.hash + @mutable.hash + @permits.hash + @user.hash end |
#id ⇒ String
Returns the value of the id
attribute.
17793 17794 17795 |
# File 'lib/ovirtsdk4/types.rb', line 17793 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
17802 17803 17804 |
# File 'lib/ovirtsdk4/types.rb', line 17802 def id=(value) @id = value end |
#mutable ⇒ Boolean
Returns the value of the mutable
attribute.
17811 17812 17813 |
# File 'lib/ovirtsdk4/types.rb', line 17811 def mutable @mutable end |
#mutable=(value) ⇒ Object
Sets the value of the mutable
attribute.
17820 17821 17822 |
# File 'lib/ovirtsdk4/types.rb', line 17820 def mutable=(value) @mutable = value end |
#name ⇒ String
Returns the value of the name
attribute.
17829 17830 17831 |
# File 'lib/ovirtsdk4/types.rb', line 17829 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
17838 17839 17840 |
# File 'lib/ovirtsdk4/types.rb', line 17838 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits
attribute.
17847 17848 17849 |
# File 'lib/ovirtsdk4/types.rb', line 17847 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits
attribute.
17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 |
# File 'lib/ovirtsdk4/types.rb', line 17856 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.
17873 17874 17875 |
# File 'lib/ovirtsdk4/types.rb', line 17873 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.
17886 17887 17888 17889 17890 17891 |
# File 'lib/ovirtsdk4/types.rb', line 17886 def user=(value) if value.is_a?(Hash) value = User.new(value) end @user = value end |