Class: OvirtSDK4::Group
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Group
- 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. -
#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. -
#domain ⇒ Domain
Returns the value of the
domain
attribute. -
#domain=(value) ⇒ Object
Sets the value of the
domain
attribute. -
#domain_entry_id ⇒ String
Returns the value of the
domain_entry_id
attribute. -
#domain_entry_id=(value) ⇒ Object
Sets the value of the
domain_entry_id
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 = {}) ⇒ Group
constructor
Creates a new instance of the Group class.
-
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#namespace ⇒ String
Returns the value of the
namespace
attribute. -
#namespace=(value) ⇒ Object
Sets the value of the
namespace
attribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissions
attribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissions
attribute. -
#roles ⇒ Array<Role>
Returns the value of the
roles
attribute. -
#roles=(list) ⇒ Object
Sets the value of the
roles
attribute. -
#tags ⇒ Array<Tag>
Returns the value of the
tags
attribute. -
#tags=(list) ⇒ Object
Sets the value of the
tags
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Group
Creates a new instance of the OvirtSDK4::Group class.
40806 40807 40808 40809 40810 40811 40812 40813 40814 |
# File 'lib/ovirtsdk4/types.rb', line 40806 def initialize(opts = {}) super(opts) self.domain = opts[:domain] self.domain_entry_id = opts[:domain_entry_id] self.namespace = opts[:namespace] self. = opts[:permissions] self.roles = opts[:roles] self. = opts[:tags] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
40819 40820 40821 40822 40823 40824 40825 40826 40827 |
# File 'lib/ovirtsdk4/types.rb', line 40819 def ==(other) super && @domain == other.domain && @domain_entry_id == other.domain_entry_id && @namespace == other.namespace && @permissions == other. && @roles == other.roles && @tags == other. end |
#comment ⇒ String
Returns the value of the comment
attribute.
40572 40573 40574 |
# File 'lib/ovirtsdk4/types.rb', line 40572 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
40581 40582 40583 |
# File 'lib/ovirtsdk4/types.rb', line 40581 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
40590 40591 40592 |
# File 'lib/ovirtsdk4/types.rb', line 40590 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
40599 40600 40601 |
# File 'lib/ovirtsdk4/types.rb', line 40599 def description=(value) @description = value end |
#domain ⇒ Domain
Returns the value of the domain
attribute.
40608 40609 40610 |
# File 'lib/ovirtsdk4/types.rb', line 40608 def domain @domain end |
#domain=(value) ⇒ Object
Sets the value of the domain
attribute.
The value
parameter can be an instance of Domain 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.
40621 40622 40623 40624 40625 40626 |
# File 'lib/ovirtsdk4/types.rb', line 40621 def domain=(value) if value.is_a?(Hash) value = Domain.new(value) end @domain = value end |
#domain_entry_id ⇒ String
Returns the value of the domain_entry_id
attribute.
40633 40634 40635 |
# File 'lib/ovirtsdk4/types.rb', line 40633 def domain_entry_id @domain_entry_id end |
#domain_entry_id=(value) ⇒ Object
Sets the value of the domain_entry_id
attribute.
40642 40643 40644 |
# File 'lib/ovirtsdk4/types.rb', line 40642 def domain_entry_id=(value) @domain_entry_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
40832 40833 40834 40835 40836 40837 40838 40839 40840 |
# File 'lib/ovirtsdk4/types.rb', line 40832 def hash super + @domain.hash + @domain_entry_id.hash + @namespace.hash + @permissions.hash + @roles.hash + @tags.hash end |
#id ⇒ String
Returns the value of the id
attribute.
40651 40652 40653 |
# File 'lib/ovirtsdk4/types.rb', line 40651 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
40660 40661 40662 |
# File 'lib/ovirtsdk4/types.rb', line 40660 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
40669 40670 40671 |
# File 'lib/ovirtsdk4/types.rb', line 40669 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
40678 40679 40680 |
# File 'lib/ovirtsdk4/types.rb', line 40678 def name=(value) @name = value end |
#namespace ⇒ String
Returns the value of the namespace
attribute.
40687 40688 40689 |
# File 'lib/ovirtsdk4/types.rb', line 40687 def namespace @namespace end |
#namespace=(value) ⇒ Object
Sets the value of the namespace
attribute.
40696 40697 40698 |
# File 'lib/ovirtsdk4/types.rb', line 40696 def namespace=(value) @namespace = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
40705 40706 40707 |
# File 'lib/ovirtsdk4/types.rb', line 40705 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
40714 40715 40716 40717 40718 40719 40720 40721 40722 40723 40724 |
# File 'lib/ovirtsdk4/types.rb', line 40714 def (list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Permission.new(value) end end end @permissions = list end |
#roles ⇒ Array<Role>
Returns the value of the roles
attribute.
40731 40732 40733 |
# File 'lib/ovirtsdk4/types.rb', line 40731 def roles @roles end |
#roles=(list) ⇒ Object
Sets the value of the roles
attribute.
40740 40741 40742 40743 40744 40745 40746 40747 40748 40749 40750 |
# File 'lib/ovirtsdk4/types.rb', line 40740 def roles=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Role.new(value) end end end @roles = list end |
#tags ⇒ Array<Tag>
Returns the value of the tags
attribute.
40757 40758 40759 |
# File 'lib/ovirtsdk4/types.rb', line 40757 def @tags end |
#tags=(list) ⇒ Object
Sets the value of the tags
attribute.
40766 40767 40768 40769 40770 40771 40772 40773 40774 40775 40776 |
# File 'lib/ovirtsdk4/types.rb', line 40766 def (list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Tag.new(value) end end end @tags = list end |