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.
18647 18648 18649 18650 18651 18652 18653 |
# File 'lib/ovirtsdk4/types.rb', line 18647 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.
18658 18659 18660 18661 18662 18663 18664 |
# File 'lib/ovirtsdk4/types.rb', line 18658 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.
18469 18470 18471 |
# File 'lib/ovirtsdk4/types.rb', line 18469 def administrative @administrative end |
#administrative=(value) ⇒ Object
Sets the value of the administrative
attribute.
18478 18479 18480 |
# File 'lib/ovirtsdk4/types.rb', line 18478 def administrative=(value) @administrative = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
18487 18488 18489 |
# File 'lib/ovirtsdk4/types.rb', line 18487 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
18496 18497 18498 |
# File 'lib/ovirtsdk4/types.rb', line 18496 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
18505 18506 18507 |
# File 'lib/ovirtsdk4/types.rb', line 18505 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
18514 18515 18516 |
# File 'lib/ovirtsdk4/types.rb', line 18514 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
18669 18670 18671 18672 18673 18674 18675 |
# File 'lib/ovirtsdk4/types.rb', line 18669 def hash super + @administrative.hash + @mutable.hash + @permits.hash + @user.hash end |
#id ⇒ String
Returns the value of the id
attribute.
18523 18524 18525 |
# File 'lib/ovirtsdk4/types.rb', line 18523 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
18532 18533 18534 |
# File 'lib/ovirtsdk4/types.rb', line 18532 def id=(value) @id = value end |
#mutable ⇒ Boolean
Returns the value of the mutable
attribute.
18541 18542 18543 |
# File 'lib/ovirtsdk4/types.rb', line 18541 def mutable @mutable end |
#mutable=(value) ⇒ Object
Sets the value of the mutable
attribute.
18550 18551 18552 |
# File 'lib/ovirtsdk4/types.rb', line 18550 def mutable=(value) @mutable = value end |
#name ⇒ String
Returns the value of the name
attribute.
18559 18560 18561 |
# File 'lib/ovirtsdk4/types.rb', line 18559 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
18568 18569 18570 |
# File 'lib/ovirtsdk4/types.rb', line 18568 def name=(value) @name = value end |
#permits ⇒ Array<Permit>
Returns the value of the permits
attribute.
18577 18578 18579 |
# File 'lib/ovirtsdk4/types.rb', line 18577 def permits @permits end |
#permits=(list) ⇒ Object
Sets the value of the permits
attribute.
18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 |
# File 'lib/ovirtsdk4/types.rb', line 18586 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.
18603 18604 18605 |
# File 'lib/ovirtsdk4/types.rb', line 18603 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.
18616 18617 18618 18619 18620 18621 |
# File 'lib/ovirtsdk4/types.rb', line 18616 def user=(value) if value.is_a?(Hash) value = User.new(value) end @user = value end |