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.


23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
# File 'lib/ovirtsdk4/types.rb', line 23913

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.


23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
# File 'lib/ovirtsdk4/types.rb', line 23937

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)

23427
23428
23429
# File 'lib/ovirtsdk4/types.rb', line 23427

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

23436
23437
23438
# File 'lib/ovirtsdk4/types.rb', line 23436

def comment=(value)
  @comment = value
end

#departmentString

Returns the value of the department attribute.

Returns:

  • (String)

23445
23446
23447
# File 'lib/ovirtsdk4/types.rb', line 23445

def department
  @department
end

#department=(value) ⇒ Object

Sets the value of the department attribute.

Parameters:

  • value (String)

23454
23455
23456
# File 'lib/ovirtsdk4/types.rb', line 23454

def department=(value)
  @department = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

23463
23464
23465
# File 'lib/ovirtsdk4/types.rb', line 23463

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

23472
23473
23474
# File 'lib/ovirtsdk4/types.rb', line 23472

def description=(value)
  @description = value
end

#domainDomain

Returns the value of the domain attribute.

Returns:


23481
23482
23483
# File 'lib/ovirtsdk4/types.rb', line 23481

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:


23494
23495
23496
23497
23498
23499
# File 'lib/ovirtsdk4/types.rb', line 23494

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)

23506
23507
23508
# File 'lib/ovirtsdk4/types.rb', line 23506

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)

23515
23516
23517
# File 'lib/ovirtsdk4/types.rb', line 23515

def domain_entry_id=(value)
  @domain_entry_id = value
end

#emailString

Returns the value of the email attribute.

Returns:

  • (String)

23524
23525
23526
# File 'lib/ovirtsdk4/types.rb', line 23524

def email
  @email
end

#email=(value) ⇒ Object

Sets the value of the email attribute.

Parameters:

  • value (String)

23533
23534
23535
# File 'lib/ovirtsdk4/types.rb', line 23533

def email=(value)
  @email = value
end

#groupsArray<Group>

Returns the value of the groups attribute.

Returns:


23542
23543
23544
# File 'lib/ovirtsdk4/types.rb', line 23542

def groups
  @groups
end

#groups=(list) ⇒ Object

Sets the value of the groups attribute.

Parameters:


23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
# File 'lib/ovirtsdk4/types.rb', line 23551

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.


23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
# File 'lib/ovirtsdk4/types.rb', line 23961

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)

23568
23569
23570
# File 'lib/ovirtsdk4/types.rb', line 23568

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

23577
23578
23579
# File 'lib/ovirtsdk4/types.rb', line 23577

def id=(value)
  @id = value
end

#last_nameString

Returns the value of the last_name attribute.

Returns:

  • (String)

23586
23587
23588
# File 'lib/ovirtsdk4/types.rb', line 23586

def last_name
  @last_name
end

#last_name=(value) ⇒ Object

Sets the value of the last_name attribute.

Parameters:

  • value (String)

23595
23596
23597
# File 'lib/ovirtsdk4/types.rb', line 23595

def last_name=(value)
  @last_name = value
end

#logged_inBoolean

Returns the value of the logged_in attribute.

Returns:

  • (Boolean)

23604
23605
23606
# File 'lib/ovirtsdk4/types.rb', line 23604

def logged_in
  @logged_in
end

#logged_in=(value) ⇒ Object

Sets the value of the logged_in attribute.

Parameters:

  • value (Boolean)

23613
23614
23615
# File 'lib/ovirtsdk4/types.rb', line 23613

def logged_in=(value)
  @logged_in = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

23622
23623
23624
# File 'lib/ovirtsdk4/types.rb', line 23622

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

23631
23632
23633
# File 'lib/ovirtsdk4/types.rb', line 23631

def name=(value)
  @name = value
end

#namespaceString

Returns the value of the namespace attribute.

Returns:

  • (String)

23640
23641
23642
# File 'lib/ovirtsdk4/types.rb', line 23640

def namespace
  @namespace
end

#namespace=(value) ⇒ Object

Sets the value of the namespace attribute.

Parameters:

  • value (String)

23649
23650
23651
# File 'lib/ovirtsdk4/types.rb', line 23649

def namespace=(value)
  @namespace = value
end

#optionsArray<UserOption>

Returns the value of the options attribute.

Returns:


23658
23659
23660
# File 'lib/ovirtsdk4/types.rb', line 23658

def options
  @options
end

#options=(list) ⇒ Object

Sets the value of the options attribute.

Parameters:


23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
# File 'lib/ovirtsdk4/types.rb', line 23667

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)

23684
23685
23686
# File 'lib/ovirtsdk4/types.rb', line 23684

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

23693
23694
23695
# File 'lib/ovirtsdk4/types.rb', line 23693

def password=(value)
  @password = value
end

#permissionsArray<Permission>

Returns the value of the permissions attribute.

Returns:


23702
23703
23704
# File 'lib/ovirtsdk4/types.rb', line 23702

def permissions
  @permissions
end

#permissions=(list) ⇒ Object

Sets the value of the permissions attribute.

Parameters:


23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
# File 'lib/ovirtsdk4/types.rb', line 23711

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)

23728
23729
23730
# File 'lib/ovirtsdk4/types.rb', line 23728

def principal
  @principal
end

#principal=(value) ⇒ Object

Sets the value of the principal attribute.

Parameters:

  • value (String)

23737
23738
23739
# File 'lib/ovirtsdk4/types.rb', line 23737

def principal=(value)
  @principal = value
end

#rolesArray<Role>

Returns the value of the roles attribute.

Returns:


23746
23747
23748
# File 'lib/ovirtsdk4/types.rb', line 23746

def roles
  @roles
end

#roles=(list) ⇒ Object

Sets the value of the roles attribute.

Parameters:

  • list (Array<Role>)

23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
# File 'lib/ovirtsdk4/types.rb', line 23755

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:


23772
23773
23774
# File 'lib/ovirtsdk4/types.rb', line 23772

def ssh_public_keys
  @ssh_public_keys
end

#ssh_public_keys=(list) ⇒ Object

Sets the value of the ssh_public_keys attribute.

Parameters:


23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
# File 'lib/ovirtsdk4/types.rb', line 23781

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:


23798
23799
23800
# File 'lib/ovirtsdk4/types.rb', line 23798

def tags
  @tags
end

#tags=(list) ⇒ Object

Sets the value of the tags attribute.

Parameters:

  • list (Array<Tag>)

23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
# File 'lib/ovirtsdk4/types.rb', line 23807

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)

23824
23825
23826
# File 'lib/ovirtsdk4/types.rb', line 23824

def user_name
  @user_name
end

#user_name=(value) ⇒ Object

Sets the value of the user_name attribute.

Parameters:

  • value (String)

23833
23834
23835
# File 'lib/ovirtsdk4/types.rb', line 23833

def user_name=(value)
  @user_name = value
end

#user_optionsArray<Property>

Returns the value of the user_options attribute.

Returns:


23842
23843
23844
# File 'lib/ovirtsdk4/types.rb', line 23842

def user_options
  @user_options
end

#user_options=(list) ⇒ Object

Sets the value of the user_options attribute.

Parameters:


23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
# File 'lib/ovirtsdk4/types.rb', line 23851

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