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.

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

    The values of attribute user_options.


23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
# File 'lib/ovirtsdk4/types.rb', line 23756

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]
  self.user_options = opts[:user_options]
end

Instance Method Details

#==(other) ⇒ Object

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


23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
# File 'lib/ovirtsdk4/types.rb', line 23779

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 &&
  @user_options == other.user_options
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

23298
23299
23300
# File 'lib/ovirtsdk4/types.rb', line 23298

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

23307
23308
23309
# File 'lib/ovirtsdk4/types.rb', line 23307

def comment=(value)
  @comment = value
end

#departmentString

Returns the value of the department attribute.

Returns:

  • (String)

23316
23317
23318
# File 'lib/ovirtsdk4/types.rb', line 23316

def department
  @department
end

#department=(value) ⇒ Object

Sets the value of the department attribute.

Parameters:

  • value (String)

23325
23326
23327
# File 'lib/ovirtsdk4/types.rb', line 23325

def department=(value)
  @department = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

23334
23335
23336
# File 'lib/ovirtsdk4/types.rb', line 23334

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

23343
23344
23345
# File 'lib/ovirtsdk4/types.rb', line 23343

def description=(value)
  @description = value
end

#domainDomain

Returns the value of the domain attribute.

Returns:


23352
23353
23354
# File 'lib/ovirtsdk4/types.rb', line 23352

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:


23365
23366
23367
23368
23369
23370
# File 'lib/ovirtsdk4/types.rb', line 23365

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)

23377
23378
23379
# File 'lib/ovirtsdk4/types.rb', line 23377

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)

23386
23387
23388
# File 'lib/ovirtsdk4/types.rb', line 23386

def domain_entry_id=(value)
  @domain_entry_id = value
end

#emailString

Returns the value of the email attribute.

Returns:

  • (String)

23395
23396
23397
# File 'lib/ovirtsdk4/types.rb', line 23395

def email
  @email
end

#email=(value) ⇒ Object

Sets the value of the email attribute.

Parameters:

  • value (String)

23404
23405
23406
# File 'lib/ovirtsdk4/types.rb', line 23404

def email=(value)
  @email = value
end

#groupsArray<Group>

Returns the value of the groups attribute.

Returns:


23413
23414
23415
# File 'lib/ovirtsdk4/types.rb', line 23413

def groups
  @groups
end

#groups=(list) ⇒ Object

Sets the value of the groups attribute.

Parameters:


23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
# File 'lib/ovirtsdk4/types.rb', line 23422

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.


23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
# File 'lib/ovirtsdk4/types.rb', line 23802

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 +
  @user_options.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

23439
23440
23441
# File 'lib/ovirtsdk4/types.rb', line 23439

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

23448
23449
23450
# File 'lib/ovirtsdk4/types.rb', line 23448

def id=(value)
  @id = value
end

#last_nameString

Returns the value of the last_name attribute.

Returns:

  • (String)

23457
23458
23459
# File 'lib/ovirtsdk4/types.rb', line 23457

def last_name
  @last_name
end

#last_name=(value) ⇒ Object

Sets the value of the last_name attribute.

Parameters:

  • value (String)

23466
23467
23468
# File 'lib/ovirtsdk4/types.rb', line 23466

def last_name=(value)
  @last_name = value
end

#logged_inBoolean

Returns the value of the logged_in attribute.

Returns:

  • (Boolean)

23475
23476
23477
# File 'lib/ovirtsdk4/types.rb', line 23475

def logged_in
  @logged_in
end

#logged_in=(value) ⇒ Object

Sets the value of the logged_in attribute.

Parameters:

  • value (Boolean)

23484
23485
23486
# File 'lib/ovirtsdk4/types.rb', line 23484

def logged_in=(value)
  @logged_in = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

23493
23494
23495
# File 'lib/ovirtsdk4/types.rb', line 23493

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

23502
23503
23504
# File 'lib/ovirtsdk4/types.rb', line 23502

def name=(value)
  @name = value
end

#namespaceString

Returns the value of the namespace attribute.

Returns:

  • (String)

23511
23512
23513
# File 'lib/ovirtsdk4/types.rb', line 23511

def namespace
  @namespace
end

#namespace=(value) ⇒ Object

Sets the value of the namespace attribute.

Parameters:

  • value (String)

23520
23521
23522
# File 'lib/ovirtsdk4/types.rb', line 23520

def namespace=(value)
  @namespace = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)

23529
23530
23531
# File 'lib/ovirtsdk4/types.rb', line 23529

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

23538
23539
23540
# File 'lib/ovirtsdk4/types.rb', line 23538

def password=(value)
  @password = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:


23547
23548
23549
# File 'lib/ovirtsdk4/types.rb', line 23547

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:


23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
# File 'lib/ovirtsdk4/types.rb', line 23556

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)

23573
23574
23575
# File 'lib/ovirtsdk4/types.rb', line 23573

def principal
  @principal
end

#principal=(value) ⇒ Object

Sets the value of the principal attribute.

Parameters:

  • value (String)

23582
23583
23584
# File 'lib/ovirtsdk4/types.rb', line 23582

def principal=(value)
  @principal = value
end

#rolesArray<Role>

Returns the value of the roles attribute.

Returns:


23591
23592
23593
# File 'lib/ovirtsdk4/types.rb', line 23591

def roles
  @roles
end

#roles=(list) ⇒ Object

Sets the value of the roles attribute.

Parameters:

  • list (Array<Role>)

23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
# File 'lib/ovirtsdk4/types.rb', line 23600

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:


23617
23618
23619
# File 'lib/ovirtsdk4/types.rb', line 23617

def ssh_public_keys
  @ssh_public_keys
end

#ssh_public_keys=(list) ⇒ Object

Sets the value of the ssh_public_keys attribute.

Parameters:


23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
# File 'lib/ovirtsdk4/types.rb', line 23626

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:


23643
23644
23645
# File 'lib/ovirtsdk4/types.rb', line 23643

def tags
  @tags
end

#tags=(list) ⇒ Object

Sets the value of the tags attribute.

Parameters:

  • list (Array<Tag>)

23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
# File 'lib/ovirtsdk4/types.rb', line 23652

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)

23669
23670
23671
# File 'lib/ovirtsdk4/types.rb', line 23669

def user_name
  @user_name
end

#user_name=(value) ⇒ Object

Sets the value of the user_name attribute.

Parameters:

  • value (String)

23678
23679
23680
# File 'lib/ovirtsdk4/types.rb', line 23678

def user_name=(value)
  @user_name = value
end

#user_optionsArray<Property>

Returns the value of the user_options attribute.

Returns:


23687
23688
23689
# File 'lib/ovirtsdk4/types.rb', line 23687

def user_options
  @user_options
end

#user_options=(list) ⇒ Object

Sets the value of the user_options attribute.

Parameters:


23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
# File 'lib/ovirtsdk4/types.rb', line 23696

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