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.
40935 40936 40937 40938 40939 40940 40941 40942 40943 |
# File 'lib/ovirtsdk4/types.rb', line 40935 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.
40948 40949 40950 40951 40952 40953 40954 40955 40956 |
# File 'lib/ovirtsdk4/types.rb', line 40948 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.
40701 40702 40703 |
# File 'lib/ovirtsdk4/types.rb', line 40701 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
40710 40711 40712 |
# File 'lib/ovirtsdk4/types.rb', line 40710 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
40719 40720 40721 |
# File 'lib/ovirtsdk4/types.rb', line 40719 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
40728 40729 40730 |
# File 'lib/ovirtsdk4/types.rb', line 40728 def description=(value) @description = value end |
#domain ⇒ Domain
Returns the value of the domain
attribute.
40737 40738 40739 |
# File 'lib/ovirtsdk4/types.rb', line 40737 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.
40750 40751 40752 40753 40754 40755 |
# File 'lib/ovirtsdk4/types.rb', line 40750 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.
40762 40763 40764 |
# File 'lib/ovirtsdk4/types.rb', line 40762 def domain_entry_id @domain_entry_id end |
#domain_entry_id=(value) ⇒ Object
Sets the value of the domain_entry_id
attribute.
40771 40772 40773 |
# File 'lib/ovirtsdk4/types.rb', line 40771 def domain_entry_id=(value) @domain_entry_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
40961 40962 40963 40964 40965 40966 40967 40968 40969 |
# File 'lib/ovirtsdk4/types.rb', line 40961 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.
40780 40781 40782 |
# File 'lib/ovirtsdk4/types.rb', line 40780 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
40789 40790 40791 |
# File 'lib/ovirtsdk4/types.rb', line 40789 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
40798 40799 40800 |
# File 'lib/ovirtsdk4/types.rb', line 40798 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
40807 40808 40809 |
# File 'lib/ovirtsdk4/types.rb', line 40807 def name=(value) @name = value end |
#namespace ⇒ String
Returns the value of the namespace
attribute.
40816 40817 40818 |
# File 'lib/ovirtsdk4/types.rb', line 40816 def namespace @namespace end |
#namespace=(value) ⇒ Object
Sets the value of the namespace
attribute.
40825 40826 40827 |
# File 'lib/ovirtsdk4/types.rb', line 40825 def namespace=(value) @namespace = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
40834 40835 40836 |
# File 'lib/ovirtsdk4/types.rb', line 40834 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
40843 40844 40845 40846 40847 40848 40849 40850 40851 40852 40853 |
# File 'lib/ovirtsdk4/types.rb', line 40843 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.
40860 40861 40862 |
# File 'lib/ovirtsdk4/types.rb', line 40860 def roles @roles end |
#roles=(list) ⇒ Object
Sets the value of the roles
attribute.
40869 40870 40871 40872 40873 40874 40875 40876 40877 40878 40879 |
# File 'lib/ovirtsdk4/types.rb', line 40869 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.
40886 40887 40888 |
# File 'lib/ovirtsdk4/types.rb', line 40886 def @tags end |
#tags=(list) ⇒ Object
Sets the value of the tags
attribute.
40895 40896 40897 40898 40899 40900 40901 40902 40903 40904 40905 |
# File 'lib/ovirtsdk4/types.rb', line 40895 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 |