Class: OvirtSDK4::User

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ User

Creates a new instance of the OvirtSDK4::User class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :comment (String)

    The value of attribute comment.

  • :department (String)

    The value of attribute department.

  • :description (String)

    The value of attribute description.

  • :domain (Domain, Hash)

    The value of attribute domain.

  • :domain_entry_id (String)

    The value of attribute domain_entry_id.

  • :email (String)

    The value of attribute email.

  • :groups (Array<Group>, Array<Hash>)

    The values of attribute groups.

  • :id (String)

    The value of attribute id.

  • :last_name (String)

    The value of attribute last_name.

  • :logged_in (Boolean)

    The value of attribute logged_in.

  • :name (String)

    The value of attribute name.

  • :namespace (String)

    The value of attribute namespace.

  • :options (Array<UserOption>, Array<Hash>)

    The values of attribute options.

  • :password (String)

    The value of attribute password.

  • :permissions (Array<Permission>, Array<Hash>)

    The values of attribute permissions.

  • :principal (String)

    The value of attribute principal.

  • :roles (Array<Role>, Array<Hash>)

    The values of attribute roles.

  • :ssh_public_keys (Array<SshPublicKey>, Array<Hash>)

    The values of attribute ssh_public_keys.

  • :tags (Array<Tag>, Array<Hash>)

    The values of attribute tags.

  • :user_name (String)

    The value of attribute user_name.

  • :user_options (Array<Property>, Array<Hash>)

    The values of attribute user_options.



24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
# File 'lib/ovirtsdk4/types.rb', line 24386

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

Instance Method Details

#==(other) ⇒ Object

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



24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
# File 'lib/ovirtsdk4/types.rb', line 24410

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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


23900
23901
23902
# File 'lib/ovirtsdk4/types.rb', line 23900

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


23909
23910
23911
# File 'lib/ovirtsdk4/types.rb', line 23909

def comment=(value)
  @comment = value
end

#departmentString

Returns the value of the department attribute.

Returns:

  • (String)


23918
23919
23920
# File 'lib/ovirtsdk4/types.rb', line 23918

def department
  @department
end

#department=(value) ⇒ Object

Sets the value of the department attribute.

Parameters:

  • value (String)


23927
23928
23929
# File 'lib/ovirtsdk4/types.rb', line 23927

def department=(value)
  @department = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


23936
23937
23938
# File 'lib/ovirtsdk4/types.rb', line 23936

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


23945
23946
23947
# File 'lib/ovirtsdk4/types.rb', line 23945

def description=(value)
  @description = value
end

#domainDomain

Returns the value of the domain attribute.

Returns:



23954
23955
23956
# File 'lib/ovirtsdk4/types.rb', line 23954

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.

Parameters:



23967
23968
23969
23970
23971
23972
# File 'lib/ovirtsdk4/types.rb', line 23967

def domain=(value)
  if value.is_a?(Hash)
    value = Domain.new(value)
  end
  @domain = value
end

#domain_entry_idString

Returns the value of the domain_entry_id attribute.

Returns:

  • (String)


23979
23980
23981
# File 'lib/ovirtsdk4/types.rb', line 23979

def domain_entry_id
  @domain_entry_id
end

#domain_entry_id=(value) ⇒ Object

Sets the value of the domain_entry_id attribute.

Parameters:

  • value (String)


23988
23989
23990
# File 'lib/ovirtsdk4/types.rb', line 23988

def domain_entry_id=(value)
  @domain_entry_id = value
end

#emailString

Returns the value of the email attribute.

Returns:

  • (String)


23997
23998
23999
# File 'lib/ovirtsdk4/types.rb', line 23997

def email
  @email
end

#email=(value) ⇒ Object

Sets the value of the email attribute.

Parameters:

  • value (String)


24006
24007
24008
# File 'lib/ovirtsdk4/types.rb', line 24006

def email=(value)
  @email = value
end

#groupsArray<Group>

Returns the value of the groups attribute.

Returns:



24015
24016
24017
# File 'lib/ovirtsdk4/types.rb', line 24015

def groups
  @groups
end

#groups=(list) ⇒ Object

Sets the value of the groups attribute.

Parameters:



24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
# File 'lib/ovirtsdk4/types.rb', line 24024

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

#hashObject

Generates a hash value for this object.



24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
# File 'lib/ovirtsdk4/types.rb', line 24434

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


24041
24042
24043
# File 'lib/ovirtsdk4/types.rb', line 24041

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


24050
24051
24052
# File 'lib/ovirtsdk4/types.rb', line 24050

def id=(value)
  @id = value
end

#last_nameString

Returns the value of the last_name attribute.

Returns:

  • (String)


24059
24060
24061
# File 'lib/ovirtsdk4/types.rb', line 24059

def last_name
  @last_name
end

#last_name=(value) ⇒ Object

Sets the value of the last_name attribute.

Parameters:

  • value (String)


24068
24069
24070
# File 'lib/ovirtsdk4/types.rb', line 24068

def last_name=(value)
  @last_name = value
end

#logged_inBoolean

Returns the value of the logged_in attribute.

Returns:

  • (Boolean)


24077
24078
24079
# File 'lib/ovirtsdk4/types.rb', line 24077

def logged_in
  @logged_in
end

#logged_in=(value) ⇒ Object

Sets the value of the logged_in attribute.

Parameters:

  • value (Boolean)


24086
24087
24088
# File 'lib/ovirtsdk4/types.rb', line 24086

def logged_in=(value)
  @logged_in = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


24095
24096
24097
# File 'lib/ovirtsdk4/types.rb', line 24095

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


24104
24105
24106
# File 'lib/ovirtsdk4/types.rb', line 24104

def name=(value)
  @name = value
end

#namespaceString

Returns the value of the namespace attribute.

Returns:

  • (String)


24113
24114
24115
# File 'lib/ovirtsdk4/types.rb', line 24113

def namespace
  @namespace
end

#namespace=(value) ⇒ Object

Sets the value of the namespace attribute.

Parameters:

  • value (String)


24122
24123
24124
# File 'lib/ovirtsdk4/types.rb', line 24122

def namespace=(value)
  @namespace = value
end

#optionsArray<UserOption>

Returns the value of the options attribute.

Returns:



24131
24132
24133
# File 'lib/ovirtsdk4/types.rb', line 24131

def options
  @options
end

#options=(list) ⇒ Object

Sets the value of the options attribute.

Parameters:



24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
# File 'lib/ovirtsdk4/types.rb', line 24140

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

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


24157
24158
24159
# File 'lib/ovirtsdk4/types.rb', line 24157

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


24166
24167
24168
# File 'lib/ovirtsdk4/types.rb', line 24166

def password=(value)
  @password = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:



24175
24176
24177
# File 'lib/ovirtsdk4/types.rb', line 24175

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
# File 'lib/ovirtsdk4/types.rb', line 24184

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

#principalString

Returns the value of the principal attribute.

Returns:

  • (String)


24201
24202
24203
# File 'lib/ovirtsdk4/types.rb', line 24201

def principal
  @principal
end

#principal=(value) ⇒ Object

Sets the value of the principal attribute.

Parameters:

  • value (String)


24210
24211
24212
# File 'lib/ovirtsdk4/types.rb', line 24210

def principal=(value)
  @principal = value
end

#rolesArray<Role>

Returns the value of the roles attribute.

Returns:



24219
24220
24221
# File 'lib/ovirtsdk4/types.rb', line 24219

def roles
  @roles
end

#roles=(list) ⇒ Object

Sets the value of the roles attribute.

Parameters:

  • list (Array<Role>)


24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
# File 'lib/ovirtsdk4/types.rb', line 24228

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

#ssh_public_keysArray<SshPublicKey>

Returns the value of the ssh_public_keys attribute.

Returns:



24245
24246
24247
# File 'lib/ovirtsdk4/types.rb', line 24245

def ssh_public_keys
  @ssh_public_keys
end

#ssh_public_keys=(list) ⇒ Object

Sets the value of the ssh_public_keys attribute.

Parameters:



24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
# File 'lib/ovirtsdk4/types.rb', line 24254

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

#tagsArray<Tag>

Returns the value of the tags attribute.

Returns:



24271
24272
24273
# File 'lib/ovirtsdk4/types.rb', line 24271

def tags
  @tags
end

#tags=(list) ⇒ Object

Sets the value of the tags attribute.

Parameters:

  • list (Array<Tag>)


24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
# File 'lib/ovirtsdk4/types.rb', line 24280

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

#user_nameString

Returns the value of the user_name attribute.

Returns:

  • (String)


24297
24298
24299
# File 'lib/ovirtsdk4/types.rb', line 24297

def user_name
  @user_name
end

#user_name=(value) ⇒ Object

Sets the value of the user_name attribute.

Parameters:

  • value (String)


24306
24307
24308
# File 'lib/ovirtsdk4/types.rb', line 24306

def user_name=(value)
  @user_name = value
end

#user_optionsArray<Property>

Returns the value of the user_options attribute.

Returns:



24315
24316
24317
# File 'lib/ovirtsdk4/types.rb', line 24315

def user_options
  @user_options
end

#user_options=(list) ⇒ Object

Sets the value of the user_options attribute.

Parameters:



24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
# File 'lib/ovirtsdk4/types.rb', line 24324

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