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
trueifselfandotherhave the same attributes and values. -
#administrative ⇒ Boolean
Returns the value of the
administrativeattribute. -
#administrative=(value) ⇒ Object
Sets the value of the
administrativeattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Role
constructor
Creates a new instance of the Role class.
-
#mutable ⇒ Boolean
Returns the value of the
mutableattribute. -
#mutable=(value) ⇒ Object
Sets the value of the
mutableattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#permits ⇒ Array<Permit>
Returns the value of the
permitsattribute. -
#permits=(list) ⇒ Object
Sets the value of the
permitsattribute. -
#user ⇒ User
Returns the value of the
userattribute. -
#user=(value) ⇒ Object
Sets the value of the
userattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Role
Creates a new instance of the OvirtSDK4::Role class.
18917 18918 18919 18920 18921 18922 18923 |
# File 'lib/ovirtsdk4/types.rb', line 18917 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.
18928 18929 18930 18931 18932 18933 18934 |
# File 'lib/ovirtsdk4/types.rb', line 18928 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.
18739 18740 18741 |
# File 'lib/ovirtsdk4/types.rb', line 18739 def administrative @administrative end |
#administrative=(value) ⇒ Object
Sets the value of the administrative attribute.
18748 18749 18750 |
# File 'lib/ovirtsdk4/types.rb', line 18748 def administrative=(value) @administrative = value end |
#comment ⇒ String
Returns the value of the comment attribute.
18757 18758 18759 |
# File 'lib/ovirtsdk4/types.rb', line 18757 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
18766 18767 18768 |
# File 'lib/ovirtsdk4/types.rb', line 18766 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
18775 18776 18777 |
# File 'lib/ovirtsdk4/types.rb', line 18775 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
18784 18785 18786 |
# File 'lib/ovirtsdk4/types.rb', line 18784 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
18939 18940 18941 18942 18943 18944 18945 |
# File 'lib/ovirtsdk4/types.rb', line 18939 def hash super + @administrative.hash + @mutable.hash + @permits.hash + @user.hash end |
#id ⇒ String
Returns the value of the id attribute.
18793 18794 18795 |
# File 'lib/ovirtsdk4/types.rb', line 18793 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
18802 18803 18804 |
# File 'lib/ovirtsdk4/types.rb', line 18802 def id=(value) @id = value end |
#mutable ⇒ Boolean
Returns the value of the mutable attribute.
18811 18812 18813 |
# File 'lib/ovirtsdk4/types.rb', line 18811 def mutable @mutable end |
#mutable=(value) ⇒ Object
Sets the value of the mutable attribute.
18820 18821 18822 |
# File 'lib/ovirtsdk4/types.rb', line 18820 def mutable=(value) @mutable = value end |
#name ⇒ String
Returns the value of the name attribute.
18829 18830 18831 |
# File 'lib/ovirtsdk4/types.rb', line 18829 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
18838 18839 18840 |
# File 'lib/ovirtsdk4/types.rb', line 18838 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits attribute.
18847 18848 18849 |
# File 'lib/ovirtsdk4/types.rb', line 18847 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits attribute.
18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 |
# File 'lib/ovirtsdk4/types.rb', line 18856 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.
18873 18874 18875 |
# File 'lib/ovirtsdk4/types.rb', line 18873 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.
18886 18887 18888 18889 18890 18891 |
# File 'lib/ovirtsdk4/types.rb', line 18886 def user=(value) if value.is_a?(Hash) value = User.new(value) end @user = value end |