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.
40988 40989 40990 40991 40992 40993 40994 40995 40996 |
# File 'lib/ovirtsdk4/types.rb', line 40988 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.
41001 41002 41003 41004 41005 41006 41007 41008 41009 |
# File 'lib/ovirtsdk4/types.rb', line 41001 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.
40754 40755 40756 |
# File 'lib/ovirtsdk4/types.rb', line 40754 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
40763 40764 40765 |
# File 'lib/ovirtsdk4/types.rb', line 40763 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
40772 40773 40774 |
# File 'lib/ovirtsdk4/types.rb', line 40772 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
40781 40782 40783 |
# File 'lib/ovirtsdk4/types.rb', line 40781 def description=(value) @description = value end |
#domain ⇒ Domain
Returns the value of the domain
attribute.
40790 40791 40792 |
# File 'lib/ovirtsdk4/types.rb', line 40790 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.
40803 40804 40805 40806 40807 40808 |
# File 'lib/ovirtsdk4/types.rb', line 40803 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.
40815 40816 40817 |
# File 'lib/ovirtsdk4/types.rb', line 40815 def domain_entry_id @domain_entry_id end |
#domain_entry_id=(value) ⇒ Object
Sets the value of the domain_entry_id
attribute.
40824 40825 40826 |
# File 'lib/ovirtsdk4/types.rb', line 40824 def domain_entry_id=(value) @domain_entry_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
41014 41015 41016 41017 41018 41019 41020 41021 41022 |
# File 'lib/ovirtsdk4/types.rb', line 41014 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.
40833 40834 40835 |
# File 'lib/ovirtsdk4/types.rb', line 40833 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
40842 40843 40844 |
# File 'lib/ovirtsdk4/types.rb', line 40842 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
40851 40852 40853 |
# File 'lib/ovirtsdk4/types.rb', line 40851 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
40860 40861 40862 |
# File 'lib/ovirtsdk4/types.rb', line 40860 def name=(value) @name = value end |
#namespace ⇒ String
Returns the value of the namespace
attribute.
40869 40870 40871 |
# File 'lib/ovirtsdk4/types.rb', line 40869 def namespace @namespace end |
#namespace=(value) ⇒ Object
Sets the value of the namespace
attribute.
40878 40879 40880 |
# File 'lib/ovirtsdk4/types.rb', line 40878 def namespace=(value) @namespace = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
40887 40888 40889 |
# File 'lib/ovirtsdk4/types.rb', line 40887 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
40896 40897 40898 40899 40900 40901 40902 40903 40904 40905 40906 |
# File 'lib/ovirtsdk4/types.rb', line 40896 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.
40913 40914 40915 |
# File 'lib/ovirtsdk4/types.rb', line 40913 def roles @roles end |
#roles=(list) ⇒ Object
Sets the value of the roles
attribute.
40922 40923 40924 40925 40926 40927 40928 40929 40930 40931 40932 |
# File 'lib/ovirtsdk4/types.rb', line 40922 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.
40939 40940 40941 |
# File 'lib/ovirtsdk4/types.rb', line 40939 def @tags end |
#tags=(list) ⇒ Object
Sets the value of the tags
attribute.
40948 40949 40950 40951 40952 40953 40954 40955 40956 40957 40958 |
# File 'lib/ovirtsdk4/types.rb', line 40948 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 |