class OvirtSDK4::User
Public Class Methods
Creates a new instance of the {User} 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] :department The value of attribute `department`.
@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] :email The value of attribute `email`.
@option opts [Array<Group>, Array<Hash>] :groups The values of attribute `groups`.
@option opts [String] :id The value of attribute `id`.
@option opts [String] :last_name The value of attribute `last_name`.
@option opts [Boolean] :logged_in The value of attribute `logged_in`.
@option opts [String] :name The value of attribute `name`.
@option opts [String] :namespace The value of attribute `namespace`.
@option opts [Array<UserOption>, Array<Hash>] :options The values of attribute `options`.
@option opts [String] :password The value of attribute `password`.
@option opts [Array<Permission>, Array<Hash>] :permissions The values of attribute `permissions`.
@option opts [String] :principal The value of attribute `principal`.
@option opts [Array<Role>, Array<Hash>] :roles The values of attribute `roles`.
@option opts [Array<SshPublicKey>, Array<Hash>] :ssh_public_keys The values of attribute `ssh_public_keys`.
@option opts [Array<Tag>, Array<Hash>] :tags The values of attribute `tags`.
@option opts [String] :user_name The value of attribute `user_name`.
@option opts [Array<Property>, Array<Hash>] :user_options The values of attribute `user_options`.
OvirtSDK4::Identified::new
# File lib/ovirtsdk4/types.rb, line 24656 def initialize(opts = {}) super(opts) self.department = opts[:department] self.domain = opts[:domain] self.domain_entry_id = opts[:domain_entry_id] self.email = opts[:email] self.groups = opts[:groups] self.last_name = opts[:last_name] self.logged_in = opts[:logged_in] self.namespace = opts[:namespace] self.options = opts[:options] self.password = opts[:password] self.permissions = opts[:permissions] self.principal = opts[:principal] self.roles = opts[:roles] self.ssh_public_keys = opts[:ssh_public_keys] self.tags = opts[:tags] self.user_name = opts[:user_name] self.user_options = opts[:user_options] end
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 24680 def ==(other) super && @department == other.department && @domain == other.domain && @domain_entry_id == other.domain_entry_id && @email == other.email && @groups == other.groups && @last_name == other.last_name && @logged_in == other.logged_in && @namespace == other.namespace && @options == other.options && @password == other.password && @permissions == other.permissions && @principal == other.principal && @roles == other.roles && @ssh_public_keys == other.ssh_public_keys && @tags == other.tags && @user_name == other.user_name && @user_options == other.user_options end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24170 def comment @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24179 def comment=(value) @comment = value end
Returns the value of the `department` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24188 def department @department end
Sets the value of the `department` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24197 def department=(value) @department = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24206 def description @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24215 def description=(value) @description = value end
Returns the value of the `domain` attribute.
@return [Domain]
# File lib/ovirtsdk4/types.rb, line 24224 def domain @domain end
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 24237 def domain=(value) if value.is_a?(Hash) value = Domain.new(value) end @domain = value end
Returns the value of the `domain_entry_id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24249 def domain_entry_id @domain_entry_id end
Sets the value of the `domain_entry_id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24258 def domain_entry_id=(value) @domain_entry_id = value end
Returns the value of the `email` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24267 def email @email end
Sets the value of the `email` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24276 def email=(value) @email = value end
Returns the value of the `groups` attribute.
@return [Array<Group>]
# File lib/ovirtsdk4/types.rb, line 24285 def groups @groups end
Sets the value of the `groups` attribute.
@param list [Array<Group>]
# File lib/ovirtsdk4/types.rb, line 24294 def groups=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Group.new(value) end end end @groups = list end
Generates a hash value for this object.
OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 24704 def hash super + @department.hash + @domain.hash + @domain_entry_id.hash + @email.hash + @groups.hash + @last_name.hash + @logged_in.hash + @namespace.hash + @options.hash + @password.hash + @permissions.hash + @principal.hash + @roles.hash + @ssh_public_keys.hash + @tags.hash + @user_name.hash + @user_options.hash end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24311 def id @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24320 def id=(value) @id = value end
Returns the value of the `last_name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24329 def last_name @last_name end
Sets the value of the `last_name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24338 def last_name=(value) @last_name = value end
Returns the value of the `logged_in` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 24347 def logged_in @logged_in end
Sets the value of the `logged_in` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 24356 def logged_in=(value) @logged_in = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24365 def name @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24374 def name=(value) @name = value end
Returns the value of the `namespace` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24383 def namespace @namespace end
Sets the value of the `namespace` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24392 def namespace=(value) @namespace = value end
Returns the value of the `options` attribute.
@return [Array<UserOption>]
# File lib/ovirtsdk4/types.rb, line 24401 def options @options end
Sets the value of the `options` attribute.
@param list [Array<UserOption>]
# File lib/ovirtsdk4/types.rb, line 24410 def options=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = UserOption.new(value) end end end @options = list end
Returns the value of the `password` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24427 def password @password end
Sets the value of the `password` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24436 def password=(value) @password = value end
Returns the value of the `permissions` attribute.
@return [Array<Permission>]
# File lib/ovirtsdk4/types.rb, line 24445 def permissions @permissions end
Sets the value of the `permissions` attribute.
@param list [Array<Permission>]
# File lib/ovirtsdk4/types.rb, line 24454 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
Returns the value of the `principal` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24471 def principal @principal end
Sets the value of the `principal` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24480 def principal=(value) @principal = value end
Returns the value of the `roles` attribute.
@return [Array<Role>]
# File lib/ovirtsdk4/types.rb, line 24489 def roles @roles end
Sets the value of the `roles` attribute.
@param list [Array<Role>]
# File lib/ovirtsdk4/types.rb, line 24498 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
Returns the value of the `ssh_public_keys` attribute.
@return [Array<SshPublicKey>]
# File lib/ovirtsdk4/types.rb, line 24515 def ssh_public_keys @ssh_public_keys end
Sets the value of the `ssh_public_keys` attribute.
@param list [Array<SshPublicKey>]
# File lib/ovirtsdk4/types.rb, line 24524 def ssh_public_keys=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = SshPublicKey.new(value) end end end @ssh_public_keys = list end
Returns the value of the `user_name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 24567 def user_name @user_name end
Sets the value of the `user_name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 24576 def user_name=(value) @user_name = value end
Returns the value of the `user_options` attribute.
@return [Array<Property>]
# File lib/ovirtsdk4/types.rb, line 24585 def user_options @user_options end
Sets the value of the `user_options` attribute.
@param list [Array<Property>]
# File lib/ovirtsdk4/types.rb, line 24594 def user_options=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Property.new(value) end end end @user_options = list end