Class: Google::Apis::AdminDirectoryV1::User

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/admin_directory_v1/classes.rb,
lib/google/apis/admin_directory_v1/representations.rb,
lib/google/apis/admin_directory_v1/representations.rb

Overview

The Directory API allows you to create and manage your account's users, user aliases, and user Google profile photos. For more information about common tasks, see the User Accounts Developer's Guide and the User Aliases Developer's Guide.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ User

Returns a new instance of User.



4898
4899
4900
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4898

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#addressesObject

The list of the user's addresses. The maximum allowed data size for this field is 10KB. Corresponds to the JSON property addresses

Returns:

  • (Object)


4580
4581
4582
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4580

def addresses
  @addresses
end

#agreed_to_termsBoolean Also known as: agreed_to_terms?

Output only. This property is true if the user has completed an initial login and accepted the Terms of Service agreement. Corresponds to the JSON property agreedToTerms

Returns:

  • (Boolean)


4586
4587
4588
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4586

def agreed_to_terms
  @agreed_to_terms
end

#aliasesArray<String>

Output only. The list of the user's alias email addresses. Corresponds to the JSON property aliases

Returns:

  • (Array<String>)


4592
4593
4594
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4592

def aliases
  @aliases
end

#archival_timeString

Output only. User's account archival time. (Read-only) Corresponds to the JSON property archivalTime

Returns:

  • (String)


4597
4598
4599
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4597

def archival_time
  @archival_time
end

#archivedBoolean Also known as: archived?

Indicates if user is archived. Corresponds to the JSON property archived

Returns:

  • (Boolean)


4602
4603
4604
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4602

def archived
  @archived
end

#change_password_at_next_loginBoolean Also known as: change_password_at_next_login?

Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider. Corresponds to the JSON property changePasswordAtNextLogin

Returns:

  • (Boolean)


4610
4611
4612
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4610

def 
  @change_password_at_next_login
end

#creation_timeDateTime

User's G Suite account creation time. (Read-only) Corresponds to the JSON property creationTime

Returns:

  • (DateTime)


4616
4617
4618
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4616

def creation_time
  @creation_time
end

#custom_schemasHash<String,Hash<String,Object>>

Custom fields of the user. The key is a schema_name and its values are ' field_name': 'field_value'. Corresponds to the JSON property customSchemas

Returns:

  • (Hash<String,Hash<String,Object>>)


4622
4623
4624
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4622

def custom_schemas
  @custom_schemas
end

#customer_idString

Output only. The customer ID to retrieve all account users. You can use the alias my_customer to represent your account' s customerId. As a reseller administrator, you can use the resold customer account's customerId. To get a customerId, use the account's primary domain in the domain parameter of a users.list request. Corresponds to the JSON property customerId

Returns:

  • (String)


4633
4634
4635
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4633

def customer_id
  @customer_id
end

#deletion_timeDateTime

Corresponds to the JSON property deletionTime

Returns:

  • (DateTime)


4638
4639
4640
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4638

def deletion_time
  @deletion_time
end

#emailsObject

The list of the user's email addresses. The maximum allowed data size for this field is 10KB. This excludes publicKeyEncryptionCertificates. Corresponds to the JSON property emails

Returns:

  • (Object)


4644
4645
4646
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4644

def emails
  @emails
end

#etagString

Output only. ETag of the resource. Corresponds to the JSON property etag

Returns:

  • (String)


4649
4650
4651
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4649

def etag
  @etag
end

#external_idsObject

The list of external IDs for the user, such as an employee or network ID. The maximum allowed data size for this field is 2KB. Corresponds to the JSON property externalIds

Returns:

  • (Object)


4655
4656
4657
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4655

def external_ids
  @external_ids
end

#genderObject

The user's gender. The maximum allowed data size for this field is 1KB. Corresponds to the JSON property gender

Returns:

  • (Object)


4660
4661
4662
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4660

def gender
  @gender
end

#guest_account_infoGoogle::Apis::AdminDirectoryV1::GuestAccountInfo

Account info specific to Guest users. Corresponds to the JSON property guestAccountInfo



4665
4666
4667
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4665

def 
  @guest_account_info
end

#hash_functionString

Stores the hash format of the password property. The following hashFunction values are allowed: * MD5 - Accepts simple hex-encoded values. * SHA-1 - Accepts simple hex-encoded values. * crypt - Compliant with the C crypt library. Supports the DES, MD5 ( hash prefix $1$), SHA-256 (hash prefix $5$), and SHA-512 (hash prefix $6$ ) hash algorithms. If rounds are specified as part of the prefix, they must be 10,000 or fewer. Corresponds to the JSON property hashFunction

Returns:

  • (String)


4676
4677
4678
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4676

def hash_function
  @hash_function
end

#idString

The unique ID for the user. A user id can be used as a user request URI's userKey. Corresponds to the JSON property id

Returns:

  • (String)


4682
4683
4684
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4682

def id
  @id
end

#imsObject

The list of the user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size for this field is 2KB. Corresponds to the JSON property ims

Returns:

  • (Object)


4689
4690
4691
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4689

def ims
  @ims
end

#include_in_global_address_listBoolean Also known as: include_in_global_address_list?

Indicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain. For more information about excluding user profiles, see the administration help center. Corresponds to the JSON property includeInGlobalAddressList

Returns:

  • (Boolean)


4697
4698
4699
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4697

def include_in_global_address_list
  @include_in_global_address_list
end

#ip_whitelistedBoolean Also known as: ip_whitelisted?

If true, the user's IP address is subject to a deprecated IP address allowlist configuration. Corresponds to the JSON property ipWhitelisted

Returns:

  • (Boolean)


4704
4705
4706
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4704

def ip_whitelisted
  @ip_whitelisted
end

#is_adminBoolean Also known as: is_admin?

Output only. Indicates a user with super administrator privileges. The isAdmin property can only be edited in the Make a user an administrator operation ( makeAdmin method). If edited in the user insert or update methods, the edit is ignored by the API service. Corresponds to the JSON property isAdmin

Returns:

  • (Boolean)


4718
4719
4720
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4718

def is_admin
  @is_admin
end

#is_delegated_adminBoolean Also known as: is_delegated_admin?

Output only. Indicates if the user is a delegated administrator. Delegated administrators are supported by the API but cannot create or undelete users, or make users administrators. These requests are ignored by the API service. Roles and privileges for administrators are assigned using the Admin console. Corresponds to the JSON property isDelegatedAdmin

Returns:

  • (Boolean)


4728
4729
4730
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4728

def is_delegated_admin
  @is_delegated_admin
end

#is_enforced_in2_svBoolean Also known as: is_enforced_in2_sv?

Output only. Is 2-step verification enforced (Read-only) Corresponds to the JSON property isEnforcedIn2Sv

Returns:

  • (Boolean)


4734
4735
4736
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4734

def is_enforced_in2_sv
  @is_enforced_in2_sv
end

#is_enrolled_in2_svBoolean Also known as: is_enrolled_in2_sv?

Output only. Is enrolled in 2-step verification (Read-only) Corresponds to the JSON property isEnrolledIn2Sv

Returns:

  • (Boolean)


4740
4741
4742
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4740

def is_enrolled_in2_sv
  @is_enrolled_in2_sv
end

#is_guest_userBoolean Also known as: is_guest_user?

Immutable. Indicates if the inserted user is a guest. Corresponds to the JSON property isGuestUser

Returns:

  • (Boolean)


4746
4747
4748
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4746

def is_guest_user
  @is_guest_user
end

#is_mailbox_setupBoolean Also known as: is_mailbox_setup?

Output only. Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license. Corresponds to the JSON property isMailboxSetup

Returns:

  • (Boolean)


4753
4754
4755
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4753

def is_mailbox_setup
  @is_mailbox_setup
end

#keywordsObject

The list of the user's keywords. The maximum allowed data size for this field is 1KB. Corresponds to the JSON property keywords

Returns:

  • (Object)


4760
4761
4762
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4760

def keywords
  @keywords
end

#kindString

Output only. The type of the API resource. For Users resources, the value is admin#directory#user. Corresponds to the JSON property kind

Returns:

  • (String)


4766
4767
4768
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4766

def kind
  @kind
end

#languagesObject

The user's languages. The maximum allowed data size for this field is 1KB. Corresponds to the JSON property languages

Returns:

  • (Object)


4771
4772
4773
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4771

def languages
  @languages
end

#last_login_timeDateTime

User's last login time. (Read-only) Corresponds to the JSON property lastLoginTime

Returns:

  • (DateTime)


4776
4777
4778
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4776

def 
  @last_login_time
end

#locationsObject

The user's locations. The maximum allowed data size for this field is 10KB. Corresponds to the JSON property locations

Returns:

  • (Object)


4781
4782
4783
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4781

def locations
  @locations
end

#nameGoogle::Apis::AdminDirectoryV1::UserName

Holds the given and family names of the user, and the read-only fullName value. The maximum number of characters in the givenName and in the familyName values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). For more information about character usage rules, see the administration help center. Maximum allowed data size for this field is 1KB. Corresponds to the JSON property name



4792
4793
4794
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4792

def name
  @name
end

#non_editable_aliasesArray<String>

Output only. The list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain. Corresponds to the JSON property nonEditableAliases

Returns:

  • (Array<String>)


4798
4799
4800
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4798

def non_editable_aliases
  @non_editable_aliases
end

#notesObject

Notes for the user. Corresponds to the JSON property notes

Returns:

  • (Object)


4803
4804
4805
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4803

def notes
  @notes
end

#org_unit_pathString

The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/ ). Corresponds to the JSON property orgUnitPath

Returns:

  • (String)


4810
4811
4812
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4810

def org_unit_path
  @org_unit_path
end

#organizationsObject

The list of organizations the user belongs to. The maximum allowed data size for this field is 10KB. Corresponds to the JSON property organizations

Returns:

  • (Object)


4816
4817
4818
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4816

def organizations
  @organizations
end

#passwordString

User's password Corresponds to the JSON property password

Returns:

  • (String)


4821
4822
4823
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4821

def password
  @password
end

#phonesObject

The list of the user's phone numbers. The maximum allowed data size for this field is 1KB. Corresponds to the JSON property phones

Returns:

  • (Object)


4827
4828
4829
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4827

def phones
  @phones
end

#posix_accountsObject

The list of POSIX account information for the user. Corresponds to the JSON property posixAccounts

Returns:

  • (Object)


4833
4834
4835
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4833

def posix_accounts
  @posix_accounts
end

#primary_emailString

The user's primary email address. This property is required in a request to create a user account. The primaryEmail must be unique and cannot be an alias of another user. Corresponds to the JSON property primaryEmail

Returns:

  • (String)


4840
4841
4842
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4840

def primary_email
  @primary_email
end

#recovery_emailString

Recovery email of the user. Corresponds to the JSON property recoveryEmail

Returns:

  • (String)


4845
4846
4847
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4845

def recovery_email
  @recovery_email
end

#recovery_phoneString

Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212. Corresponds to the JSON property recoveryPhone

Returns:

  • (String)


4851
4852
4853
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4851

def recovery_phone
  @recovery_phone
end

#relationsObject

The list of the user's relationships to other users. The maximum allowed data size for this field is 2KB. Corresponds to the JSON property relations

Returns:

  • (Object)


4857
4858
4859
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4857

def relations
  @relations
end

#ssh_public_keysObject

A list of SSH public keys. Corresponds to the JSON property sshPublicKeys

Returns:

  • (Object)


4862
4863
4864
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4862

def ssh_public_keys
  @ssh_public_keys
end

#suspendedBoolean Also known as: suspended?

Indicates if user is suspended. Corresponds to the JSON property suspended

Returns:

  • (Boolean)


4867
4868
4869
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4867

def suspended
  @suspended
end

#suspension_reasonString

Output only. Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the suspended property is true. Corresponds to the JSON property suspensionReason

Returns:

  • (String)


4875
4876
4877
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4875

def suspension_reason
  @suspension_reason
end

#suspension_timeString

Output only. User's account suspension time. (Read-only) Corresponds to the JSON property suspensionTime

Returns:

  • (String)


4880
4881
4882
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4880

def suspension_time
  @suspension_time
end

#thumbnail_photo_etagString

Output only. ETag of the user's photo (Read-only) Corresponds to the JSON property thumbnailPhotoEtag

Returns:

  • (String)


4885
4886
4887
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4885

def thumbnail_photo_etag
  @thumbnail_photo_etag
end

#thumbnail_photo_urlString

Output only. The URL of the user's profile photo. The URL might be temporary or private. Corresponds to the JSON property thumbnailPhotoUrl

Returns:

  • (String)


4891
4892
4893
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4891

def thumbnail_photo_url
  @thumbnail_photo_url
end

#websitesObject

The user's websites. The maximum allowed data size for this field is 2KB. Corresponds to the JSON property websites

Returns:

  • (Object)


4896
4897
4898
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4896

def websites
  @websites
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4903

def update!(**args)
  @addresses = args[:addresses] if args.key?(:addresses)
  @agreed_to_terms = args[:agreed_to_terms] if args.key?(:agreed_to_terms)
  @aliases = args[:aliases] if args.key?(:aliases)
  @archival_time = args[:archival_time] if args.key?(:archival_time)
  @archived = args[:archived] if args.key?(:archived)
  @change_password_at_next_login = args[:change_password_at_next_login] if args.key?(:change_password_at_next_login)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @custom_schemas = args[:custom_schemas] if args.key?(:custom_schemas)
  @customer_id = args[:customer_id] if args.key?(:customer_id)
  @deletion_time = args[:deletion_time] if args.key?(:deletion_time)
  @emails = args[:emails] if args.key?(:emails)
  @etag = args[:etag] if args.key?(:etag)
  @external_ids = args[:external_ids] if args.key?(:external_ids)
  @gender = args[:gender] if args.key?(:gender)
  @guest_account_info = args[:guest_account_info] if args.key?(:guest_account_info)
  @hash_function = args[:hash_function] if args.key?(:hash_function)
  @id = args[:id] if args.key?(:id)
  @ims = args[:ims] if args.key?(:ims)
  @include_in_global_address_list = args[:include_in_global_address_list] if args.key?(:include_in_global_address_list)
  @ip_whitelisted = args[:ip_whitelisted] if args.key?(:ip_whitelisted)
  @is_admin = args[:is_admin] if args.key?(:is_admin)
  @is_delegated_admin = args[:is_delegated_admin] if args.key?(:is_delegated_admin)
  @is_enforced_in2_sv = args[:is_enforced_in2_sv] if args.key?(:is_enforced_in2_sv)
  @is_enrolled_in2_sv = args[:is_enrolled_in2_sv] if args.key?(:is_enrolled_in2_sv)
  @is_guest_user = args[:is_guest_user] if args.key?(:is_guest_user)
  @is_mailbox_setup = args[:is_mailbox_setup] if args.key?(:is_mailbox_setup)
  @keywords = args[:keywords] if args.key?(:keywords)
  @kind = args[:kind] if args.key?(:kind)
  @languages = args[:languages] if args.key?(:languages)
  @last_login_time = args[:last_login_time] if args.key?(:last_login_time)
  @locations = args[:locations] if args.key?(:locations)
  @name = args[:name] if args.key?(:name)
  @non_editable_aliases = args[:non_editable_aliases] if args.key?(:non_editable_aliases)
  @notes = args[:notes] if args.key?(:notes)
  @org_unit_path = args[:org_unit_path] if args.key?(:org_unit_path)
  @organizations = args[:organizations] if args.key?(:organizations)
  @password = args[:password] if args.key?(:password)
  @phones = args[:phones] if args.key?(:phones)
  @posix_accounts = args[:posix_accounts] if args.key?(:posix_accounts)
  @primary_email = args[:primary_email] if args.key?(:primary_email)
  @recovery_email = args[:recovery_email] if args.key?(:recovery_email)
  @recovery_phone = args[:recovery_phone] if args.key?(:recovery_phone)
  @relations = args[:relations] if args.key?(:relations)
  @ssh_public_keys = args[:ssh_public_keys] if args.key?(:ssh_public_keys)
  @suspended = args[:suspended] if args.key?(:suspended)
  @suspension_reason = args[:suspension_reason] if args.key?(:suspension_reason)
  @suspension_time = args[:suspension_time] if args.key?(:suspension_time)
  @thumbnail_photo_etag = args[:thumbnail_photo_etag] if args.key?(:thumbnail_photo_etag)
  @thumbnail_photo_url = args[:thumbnail_photo_url] if args.key?(:thumbnail_photo_url)
  @websites = args[:websites] if args.key?(:websites)
end