class OvirtSDK4::Group

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {Group} class.

@param opts [Hash] A hash containing the attributes of the object. The keys of the hash

should be symbols corresponding to the names of the attributes. The values of the hash
should be the values of the attributes.

@option opts [String] :comment The value of attribute `comment`.

@option opts [String] :description The value of attribute `description`.

@option opts [Domain, Hash] :domain The value of attribute `domain`.

@option opts [String] :domain_entry_id The value of attribute `domain_entry_id`.

@option opts [String] :id The value of attribute `id`.

@option opts [String] :name The value of attribute `name`.

@option opts [String] :namespace The value of attribute `namespace`.

@option opts [Array<Permission>, Array<Hash>] :permissions The values of attribute `permissions`.

@option opts [Array<Role>, Array<Hash>] :roles The values of attribute `roles`.

@option opts [Array<Tag>, Array<Hash>] :tags The values of attribute `tags`.

Calls superclass method OvirtSDK4::Identified.new
# File lib/ovirtsdk4/types.rb, line 37936
def initialize(opts = {})
  super(opts)
  self.domain = opts[:domain]
  self.domain_entry_id = opts[:domain_entry_id]
  self.namespace = opts[:namespace]
  self.permissions = opts[:permissions]
  self.roles = opts[:roles]
  self.tags = opts[:tags]
end

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 37949
def ==(other)
  super &&
  @domain == other.domain &&
  @domain_entry_id == other.domain_entry_id &&
  @namespace == other.namespace &&
  @permissions == other.permissions &&
  @roles == other.roles &&
  @tags == other.tags
end
comment() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 37702
def comment
  @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 37711
def comment=(value)
  @comment = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 37720
def description
  @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 37729
def description=(value)
  @description = value
end
domain() click to toggle source

Returns the value of the `domain` attribute.

@return [Domain]

# File lib/ovirtsdk4/types.rb, line 37738
def domain
  @domain
end
domain=(value) click to toggle source

Sets the value of the `domain` attribute.

@param value [Domain, Hash]

The `value` parameter can be an instance of {OvirtSDK4::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.

# File lib/ovirtsdk4/types.rb, line 37751
def domain=(value)
  if value.is_a?(Hash)
    value = Domain.new(value)
  end
  @domain = value
end
domain_entry_id() click to toggle source

Returns the value of the `domain_entry_id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 37763
def domain_entry_id
  @domain_entry_id
end
domain_entry_id=(value) click to toggle source

Sets the value of the `domain_entry_id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 37772
def domain_entry_id=(value)
  @domain_entry_id = value
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 37962
def hash
  super +
  @domain.hash +
  @domain_entry_id.hash +
  @namespace.hash +
  @permissions.hash +
  @roles.hash +
  @tags.hash
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 37781
def id
  @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 37790
def id=(value)
  @id = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 37799
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 37808
def name=(value)
  @name = value
end
namespace() click to toggle source

Returns the value of the `namespace` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 37817
def namespace
  @namespace
end
namespace=(value) click to toggle source

Sets the value of the `namespace` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 37826
def namespace=(value)
  @namespace = value
end
permissions() click to toggle source

Returns the value of the `permissions` attribute.

@return [Array<Permission>]

# File lib/ovirtsdk4/types.rb, line 37835
def permissions
  @permissions
end
permissions=(list) click to toggle source

Sets the value of the `permissions` attribute.

@param list [Array<Permission>]

# File lib/ovirtsdk4/types.rb, line 37844
def permissions=(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() click to toggle source

Returns the value of the `roles` attribute.

@return [Array<Role>]

# File lib/ovirtsdk4/types.rb, line 37861
def roles
  @roles
end
roles=(list) click to toggle source

Sets the value of the `roles` attribute.

@param list [Array<Role>]

# File lib/ovirtsdk4/types.rb, line 37870
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() click to toggle source

Returns the value of the `tags` attribute.

@return [Array<Tag>]

# File lib/ovirtsdk4/types.rb, line 37887
def tags
  @tags
end
tags=(list) click to toggle source

Sets the value of the `tags` attribute.

@param list [Array<Tag>]

# File lib/ovirtsdk4/types.rb, line 37896
def tags=(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