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.
41511 41512 41513 41514 41515 41516 41517 41518 41519 |
# File 'lib/ovirtsdk4/types.rb', line 41511 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.
41524 41525 41526 41527 41528 41529 41530 41531 41532 |
# File 'lib/ovirtsdk4/types.rb', line 41524 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.
41277 41278 41279 |
# File 'lib/ovirtsdk4/types.rb', line 41277 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
41286 41287 41288 |
# File 'lib/ovirtsdk4/types.rb', line 41286 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
41295 41296 41297 |
# File 'lib/ovirtsdk4/types.rb', line 41295 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
41304 41305 41306 |
# File 'lib/ovirtsdk4/types.rb', line 41304 def description=(value) @description = value end |
#domain ⇒ Domain
Returns the value of the domain
attribute.
41313 41314 41315 |
# File 'lib/ovirtsdk4/types.rb', line 41313 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.
41326 41327 41328 41329 41330 41331 |
# File 'lib/ovirtsdk4/types.rb', line 41326 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.
41338 41339 41340 |
# File 'lib/ovirtsdk4/types.rb', line 41338 def domain_entry_id @domain_entry_id end |
#domain_entry_id=(value) ⇒ Object
Sets the value of the domain_entry_id
attribute.
41347 41348 41349 |
# File 'lib/ovirtsdk4/types.rb', line 41347 def domain_entry_id=(value) @domain_entry_id = value end |
#hash ⇒ Object
Generates a hash value for this object.
41537 41538 41539 41540 41541 41542 41543 41544 41545 |
# File 'lib/ovirtsdk4/types.rb', line 41537 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.
41356 41357 41358 |
# File 'lib/ovirtsdk4/types.rb', line 41356 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
41365 41366 41367 |
# File 'lib/ovirtsdk4/types.rb', line 41365 def id=(value) @id = value end |
#name ⇒ String
Returns the value of the name
attribute.
41374 41375 41376 |
# File 'lib/ovirtsdk4/types.rb', line 41374 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
41383 41384 41385 |
# File 'lib/ovirtsdk4/types.rb', line 41383 def name=(value) @name = value end |
#namespace ⇒ String
Returns the value of the namespace
attribute.
41392 41393 41394 |
# File 'lib/ovirtsdk4/types.rb', line 41392 def namespace @namespace end |
#namespace=(value) ⇒ Object
Sets the value of the namespace
attribute.
41401 41402 41403 |
# File 'lib/ovirtsdk4/types.rb', line 41401 def namespace=(value) @namespace = value end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
41410 41411 41412 |
# File 'lib/ovirtsdk4/types.rb', line 41410 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
41419 41420 41421 41422 41423 41424 41425 41426 41427 41428 41429 |
# File 'lib/ovirtsdk4/types.rb', line 41419 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.
41436 41437 41438 |
# File 'lib/ovirtsdk4/types.rb', line 41436 def roles @roles end |
#roles=(list) ⇒ Object
Sets the value of the roles
attribute.
41445 41446 41447 41448 41449 41450 41451 41452 41453 41454 41455 |
# File 'lib/ovirtsdk4/types.rb', line 41445 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.
41462 41463 41464 |
# File 'lib/ovirtsdk4/types.rb', line 41462 def @tags end |
#tags=(list) ⇒ Object
Sets the value of the tags
attribute.
41471 41472 41473 41474 41475 41476 41477 41478 41479 41480 41481 |
# File 'lib/ovirtsdk4/types.rb', line 41471 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 |