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.
43107 43108 43109 43110 43111 43112 43113 43114 43115 |
# File 'lib/ovirtsdk4/types.rb', line 43107 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.
43120 43121 43122 43123 43124 43125 43126 43127 43128 |
# File 'lib/ovirtsdk4/types.rb', line 43120 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.
42873 42874 42875 |
# File 'lib/ovirtsdk4/types.rb', line 42873 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
42882 42883 42884 |
# File 'lib/ovirtsdk4/types.rb', line 42882 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
42891 42892 42893 |
# File 'lib/ovirtsdk4/types.rb', line 42891 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
42900 42901 42902 |
# File 'lib/ovirtsdk4/types.rb', line 42900 def description=(value) @description = value end |
#domain ⇒ Domain
Returns the value of the domain
attribute.
42909 42910 42911 |
# File 'lib/ovirtsdk4/types.rb', line 42909 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.
42922 42923 42924 42925 42926 42927 |
# File 'lib/ovirtsdk4/types.rb', line 42922 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.
42934 42935 42936 |
# File 'lib/ovirtsdk4/types.rb', line 42934 def domain_entry_id @domain_entry_id end |
#domain_entry_id=(value) ⇒ Object
Sets the value of the domain_entry_id
attribute.
42943 42944 42945 |
# File 'lib/ovirtsdk4/types.rb', line 42943 def domain_entry_id=(value) @domain_entry_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
43133 43134 43135 43136 43137 43138 43139 43140 43141 |
# File 'lib/ovirtsdk4/types.rb', line 43133 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.
42952 42953 42954 |
# File 'lib/ovirtsdk4/types.rb', line 42952 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
42961 42962 42963 |
# File 'lib/ovirtsdk4/types.rb', line 42961 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
42970 42971 42972 |
# File 'lib/ovirtsdk4/types.rb', line 42970 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
42979 42980 42981 |
# File 'lib/ovirtsdk4/types.rb', line 42979 def name=(value) @name = value end |
#namespace ⇒ String
Returns the value of the namespace
attribute.
42988 42989 42990 |
# File 'lib/ovirtsdk4/types.rb', line 42988 def namespace @namespace end |
#namespace=(value) ⇒ Object
Sets the value of the namespace
attribute.
42997 42998 42999 |
# File 'lib/ovirtsdk4/types.rb', line 42997 def namespace=(value) @namespace = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
43006 43007 43008 |
# File 'lib/ovirtsdk4/types.rb', line 43006 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
43015 43016 43017 43018 43019 43020 43021 43022 43023 43024 43025 |
# File 'lib/ovirtsdk4/types.rb', line 43015 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.
43032 43033 43034 |
# File 'lib/ovirtsdk4/types.rb', line 43032 def roles @roles end |
#roles=(list) ⇒ Object
Sets the value of the roles
attribute.
43041 43042 43043 43044 43045 43046 43047 43048 43049 43050 43051 |
# File 'lib/ovirtsdk4/types.rb', line 43041 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.
43058 43059 43060 |
# File 'lib/ovirtsdk4/types.rb', line 43058 def @tags end |
#tags=(list) ⇒ Object
Sets the value of the tags
attribute.
43067 43068 43069 43070 43071 43072 43073 43074 43075 43076 43077 |
# File 'lib/ovirtsdk4/types.rb', line 43067 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 |