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.



24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
# 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

Instance Method Details

#==(other) ⇒ Object

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



24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
# 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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


24170
24171
24172
# File 'lib/ovirtsdk4/types.rb', line 24170

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


24179
24180
24181
# File 'lib/ovirtsdk4/types.rb', line 24179

def comment=(value)
  @comment = value
end

#departmentString

Returns the value of the department attribute.

Returns:

  • (String)


24188
24189
24190
# File 'lib/ovirtsdk4/types.rb', line 24188

def department
  @department
end

#department=(value) ⇒ Object

Sets the value of the department attribute.

Parameters:

  • value (String)


24197
24198
24199
# File 'lib/ovirtsdk4/types.rb', line 24197

def department=(value)
  @department = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


24206
24207
24208
# File 'lib/ovirtsdk4/types.rb', line 24206

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


24215
24216
24217
# File 'lib/ovirtsdk4/types.rb', line 24215

def description=(value)
  @description = value
end

#domainDomain

Returns the value of the domain attribute.

Returns:



24224
24225
24226
# File 'lib/ovirtsdk4/types.rb', line 24224

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:



24237
24238
24239
24240
24241
24242
# File 'lib/ovirtsdk4/types.rb', line 24237

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)


24249
24250
24251
# File 'lib/ovirtsdk4/types.rb', line 24249

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)


24258
24259
24260
# File 'lib/ovirtsdk4/types.rb', line 24258

def domain_entry_id=(value)
  @domain_entry_id = value
end

#emailString

Returns the value of the email attribute.

Returns:

  • (String)


24267
24268
24269
# File 'lib/ovirtsdk4/types.rb', line 24267

def email
  @email
end

#email=(value) ⇒ Object

Sets the value of the email attribute.

Parameters:

  • value (String)


24276
24277
24278
# File 'lib/ovirtsdk4/types.rb', line 24276

def email=(value)
  @email = value
end

#groupsArray<Group>

Returns the value of the groups attribute.

Returns:



24285
24286
24287
# File 'lib/ovirtsdk4/types.rb', line 24285

def groups
  @groups
end

#groups=(list) ⇒ Object

Sets the value of the groups attribute.

Parameters:



24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
# 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

#hashObject

Generates a hash value for this object.



24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
# 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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


24311
24312
24313
# File 'lib/ovirtsdk4/types.rb', line 24311

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


24320
24321
24322
# File 'lib/ovirtsdk4/types.rb', line 24320

def id=(value)
  @id = value
end

#last_nameString

Returns the value of the last_name attribute.

Returns:

  • (String)


24329
24330
24331
# File 'lib/ovirtsdk4/types.rb', line 24329

def last_name
  @last_name
end

#last_name=(value) ⇒ Object

Sets the value of the last_name attribute.

Parameters:

  • value (String)


24338
24339
24340
# File 'lib/ovirtsdk4/types.rb', line 24338

def last_name=(value)
  @last_name = value
end

#logged_inBoolean

Returns the value of the logged_in attribute.

Returns:

  • (Boolean)


24347
24348
24349
# File 'lib/ovirtsdk4/types.rb', line 24347

def logged_in
  @logged_in
end

#logged_in=(value) ⇒ Object

Sets the value of the logged_in attribute.

Parameters:

  • value (Boolean)


24356
24357
24358
# File 'lib/ovirtsdk4/types.rb', line 24356

def logged_in=(value)
  @logged_in = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


24365
24366
24367
# File 'lib/ovirtsdk4/types.rb', line 24365

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


24374
24375
24376
# File 'lib/ovirtsdk4/types.rb', line 24374

def name=(value)
  @name = value
end

#namespaceString

Returns the value of the namespace attribute.

Returns:

  • (String)


24383
24384
24385
# File 'lib/ovirtsdk4/types.rb', line 24383

def namespace
  @namespace
end

#namespace=(value) ⇒ Object

Sets the value of the namespace attribute.

Parameters:

  • value (String)


24392
24393
24394
# File 'lib/ovirtsdk4/types.rb', line 24392

def namespace=(value)
  @namespace = value
end

#optionsArray<UserOption>

Returns the value of the options attribute.

Returns:



24401
24402
24403
# File 'lib/ovirtsdk4/types.rb', line 24401

def options
  @options
end

#options=(list) ⇒ Object

Sets the value of the options attribute.

Parameters:



24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
# 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

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


24427
24428
24429
# File 'lib/ovirtsdk4/types.rb', line 24427

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


24436
24437
24438
# File 'lib/ovirtsdk4/types.rb', line 24436

def password=(value)
  @password = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:



24445
24446
24447
# File 'lib/ovirtsdk4/types.rb', line 24445

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:



24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
# 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

#principalString

Returns the value of the principal attribute.

Returns:

  • (String)


24471
24472
24473
# File 'lib/ovirtsdk4/types.rb', line 24471

def principal
  @principal
end

#principal=(value) ⇒ Object

Sets the value of the principal attribute.

Parameters:

  • value (String)


24480
24481
24482
# File 'lib/ovirtsdk4/types.rb', line 24480

def principal=(value)
  @principal = value
end

#rolesArray<Role>

Returns the value of the roles attribute.

Returns:



24489
24490
24491
# File 'lib/ovirtsdk4/types.rb', line 24489

def roles
  @roles
end

#roles=(list) ⇒ Object

Sets the value of the roles attribute.

Parameters:

  • list (Array<Role>)


24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
# 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

#ssh_public_keysArray<SshPublicKey>

Returns the value of the ssh_public_keys attribute.

Returns:



24515
24516
24517
# File 'lib/ovirtsdk4/types.rb', line 24515

def ssh_public_keys
  @ssh_public_keys
end

#ssh_public_keys=(list) ⇒ Object

Sets the value of the ssh_public_keys attribute.

Parameters:



24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
# 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

#tagsArray<Tag>

Returns the value of the tags attribute.

Returns:



24541
24542
24543
# File 'lib/ovirtsdk4/types.rb', line 24541

def tags
  @tags
end

#tags=(list) ⇒ Object

Sets the value of the tags attribute.

Parameters:

  • list (Array<Tag>)


24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
# File 'lib/ovirtsdk4/types.rb', line 24550

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)


24567
24568
24569
# File 'lib/ovirtsdk4/types.rb', line 24567

def user_name
  @user_name
end

#user_name=(value) ⇒ Object

Sets the value of the user_name attribute.

Parameters:

  • value (String)


24576
24577
24578
# File 'lib/ovirtsdk4/types.rb', line 24576

def user_name=(value)
  @user_name = value
end

#user_optionsArray<Property>

Returns the value of the user_options attribute.

Returns:



24585
24586
24587
# File 'lib/ovirtsdk4/types.rb', line 24585

def user_options
  @user_options
end

#user_options=(list) ⇒ Object

Sets the value of the user_options attribute.

Parameters:



24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
# 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