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.

  • :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.



23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
# File 'lib/ovirtsdk4/types.rb', line 23422

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.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]
end

Instance Method Details

#==(other) ⇒ Object

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



23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
# File 'lib/ovirtsdk4/types.rb', line 23444

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 &&
  @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
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


22992
22993
22994
# File 'lib/ovirtsdk4/types.rb', line 22992

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


23001
23002
23003
# File 'lib/ovirtsdk4/types.rb', line 23001

def comment=(value)
  @comment = value
end

#departmentString

Returns the value of the department attribute.

Returns:

  • (String)


23010
23011
23012
# File 'lib/ovirtsdk4/types.rb', line 23010

def department
  @department
end

#department=(value) ⇒ Object

Sets the value of the department attribute.

Parameters:

  • value (String)


23019
23020
23021
# File 'lib/ovirtsdk4/types.rb', line 23019

def department=(value)
  @department = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


23028
23029
23030
# File 'lib/ovirtsdk4/types.rb', line 23028

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


23037
23038
23039
# File 'lib/ovirtsdk4/types.rb', line 23037

def description=(value)
  @description = value
end

#domainDomain

Returns the value of the domain attribute.

Returns:



23046
23047
23048
# File 'lib/ovirtsdk4/types.rb', line 23046

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:



23059
23060
23061
23062
23063
23064
# File 'lib/ovirtsdk4/types.rb', line 23059

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)


23071
23072
23073
# File 'lib/ovirtsdk4/types.rb', line 23071

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)


23080
23081
23082
# File 'lib/ovirtsdk4/types.rb', line 23080

def domain_entry_id=(value)
  @domain_entry_id = value
end

#emailString

Returns the value of the email attribute.

Returns:

  • (String)


23089
23090
23091
# File 'lib/ovirtsdk4/types.rb', line 23089

def email
  @email
end

#email=(value) ⇒ Object

Sets the value of the email attribute.

Parameters:

  • value (String)


23098
23099
23100
# File 'lib/ovirtsdk4/types.rb', line 23098

def email=(value)
  @email = value
end

#groupsArray<Group>

Returns the value of the groups attribute.

Returns:



23107
23108
23109
# File 'lib/ovirtsdk4/types.rb', line 23107

def groups
  @groups
end

#groups=(list) ⇒ Object

Sets the value of the groups attribute.

Parameters:



23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
# File 'lib/ovirtsdk4/types.rb', line 23116

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.



23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
# File 'lib/ovirtsdk4/types.rb', line 23466

def hash
  super +
  @department.hash +
  @domain.hash +
  @domain_entry_id.hash +
  @email.hash +
  @groups.hash +
  @last_name.hash +
  @logged_in.hash +
  @namespace.hash +
  @password.hash +
  @permissions.hash +
  @principal.hash +
  @roles.hash +
  @ssh_public_keys.hash +
  @tags.hash +
  @user_name.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


23133
23134
23135
# File 'lib/ovirtsdk4/types.rb', line 23133

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


23142
23143
23144
# File 'lib/ovirtsdk4/types.rb', line 23142

def id=(value)
  @id = value
end

#last_nameString

Returns the value of the last_name attribute.

Returns:

  • (String)


23151
23152
23153
# File 'lib/ovirtsdk4/types.rb', line 23151

def last_name
  @last_name
end

#last_name=(value) ⇒ Object

Sets the value of the last_name attribute.

Parameters:

  • value (String)


23160
23161
23162
# File 'lib/ovirtsdk4/types.rb', line 23160

def last_name=(value)
  @last_name = value
end

#logged_inBoolean

Returns the value of the logged_in attribute.

Returns:

  • (Boolean)


23169
23170
23171
# File 'lib/ovirtsdk4/types.rb', line 23169

def logged_in
  @logged_in
end

#logged_in=(value) ⇒ Object

Sets the value of the logged_in attribute.

Parameters:

  • value (Boolean)


23178
23179
23180
# File 'lib/ovirtsdk4/types.rb', line 23178

def logged_in=(value)
  @logged_in = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


23187
23188
23189
# File 'lib/ovirtsdk4/types.rb', line 23187

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


23196
23197
23198
# File 'lib/ovirtsdk4/types.rb', line 23196

def name=(value)
  @name = value
end

#namespaceString

Returns the value of the namespace attribute.

Returns:

  • (String)


23205
23206
23207
# File 'lib/ovirtsdk4/types.rb', line 23205

def namespace
  @namespace
end

#namespace=(value) ⇒ Object

Sets the value of the namespace attribute.

Parameters:

  • value (String)


23214
23215
23216
# File 'lib/ovirtsdk4/types.rb', line 23214

def namespace=(value)
  @namespace = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


23223
23224
23225
# File 'lib/ovirtsdk4/types.rb', line 23223

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


23232
23233
23234
# File 'lib/ovirtsdk4/types.rb', line 23232

def password=(value)
  @password = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:



23241
23242
23243
# File 'lib/ovirtsdk4/types.rb', line 23241

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
# File 'lib/ovirtsdk4/types.rb', line 23250

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)


23267
23268
23269
# File 'lib/ovirtsdk4/types.rb', line 23267

def principal
  @principal
end

#principal=(value) ⇒ Object

Sets the value of the principal attribute.

Parameters:

  • value (String)


23276
23277
23278
# File 'lib/ovirtsdk4/types.rb', line 23276

def principal=(value)
  @principal = value
end

#rolesArray<Role>

Returns the value of the roles attribute.

Returns:



23285
23286
23287
# File 'lib/ovirtsdk4/types.rb', line 23285

def roles
  @roles
end

#roles=(list) ⇒ Object

Sets the value of the roles attribute.

Parameters:

  • list (Array<Role>)


23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
# File 'lib/ovirtsdk4/types.rb', line 23294

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:



23311
23312
23313
# File 'lib/ovirtsdk4/types.rb', line 23311

def ssh_public_keys
  @ssh_public_keys
end

#ssh_public_keys=(list) ⇒ Object

Sets the value of the ssh_public_keys attribute.

Parameters:



23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
# File 'lib/ovirtsdk4/types.rb', line 23320

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:



23337
23338
23339
# File 'lib/ovirtsdk4/types.rb', line 23337

def tags
  @tags
end

#tags=(list) ⇒ Object

Sets the value of the tags attribute.

Parameters:

  • list (Array<Tag>)


23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
# File 'lib/ovirtsdk4/types.rb', line 23346

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)


23363
23364
23365
# File 'lib/ovirtsdk4/types.rb', line 23363

def user_name
  @user_name
end

#user_name=(value) ⇒ Object

Sets the value of the user_name attribute.

Parameters:

  • value (String)


23372
23373
23374
# File 'lib/ovirtsdk4/types.rb', line 23372

def user_name=(value)
  @user_name = value
end