class Google::Apis::AdminDirectoryV1::User

The Directory API allows you to create and manage your account's users, user aliases, and user Gmail chat profile photos. For more information about common tasks, see the [User Accounts Developer's Guide](/admin-sdk/directory/v1/ guides/manage-users.html) and the [User Aliases Developer's Guide](/admin-sdk/ directory/v1/guides/manage-user-aliases.html).

Attributes

addresses[RW]

A list of the user's addresses. The maximum allowed data size for this field is 10Kb. Corresponds to the JSON property `addresses` @return [Object]

agreed_to_terms[RW]

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` @return [Boolean]

agreed_to_terms?[RW]

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` @return [Boolean]

aliases[RW]

Output only. A list of the user's alias email addresses. Corresponds to the JSON property `aliases` @return [Array<String>]

archived[RW]

Indicates if user is archived. Corresponds to the JSON property `archived` @return [Boolean]

archived?[RW]

Indicates if user is archived. Corresponds to the JSON property `archived` @return [Boolean]

change_password_at_next_login[RW]

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](support.google.com/a/answer/60224). Corresponds to the JSON property `changePasswordAtNextLogin` @return [Boolean]

change_password_at_next_login?[RW]

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](support.google.com/a/answer/60224). Corresponds to the JSON property `changePasswordAtNextLogin` @return [Boolean]

creation_time[RW]

User's G Suite account creation time. (Read-only) Corresponds to the JSON property `creationTime` @return [DateTime]

custom_schemas[RW]

Custom fields of the user. Corresponds to the JSON property `customSchemas` @return [Hash<String,Hash<String,Object>>]

customer_id[RW]

Output only. The customer ID to [retrieve all account users](/admin-sdk/ directory/v1/guides/manage-users.html#get_all_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](/admin-sdk/directory/v1/reference/users/list) request. Corresponds to the JSON property `customerId` @return [String]

deletion_time[RW]

Corresponds to the JSON property `deletionTime` @return [DateTime]

emails[RW]

A list of the user's email addresses. The maximum allowed data size for this field is 10Kb. Corresponds to the JSON property `emails` @return [Object]

etag[RW]

Output only. ETag of the resource. Corresponds to the JSON property `etag` @return [String]

external_ids[RW]

A 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` @return [Object]

gender[RW]

The user's gender. The maximum allowed data size for this field is 1Kb. Corresponds to the JSON property `gender` @return [Object]

hash_function[RW]

Stores the hash format of the password property. We recommend sending the ` password` property value as a base 16 bit hexadecimal-encoded hash value. Set the `hashFunction` values as either the [SHA-1](wikipedia.org/wiki/SHA- 1), [MD5](wikipedia.org/wiki/MD5), or [crypt](en.wikipedia.org/ wiki/Crypt_(C)) hash format. Corresponds to the JSON property `hashFunction` @return [String]

id[RW]

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` @return [String]

ims[RW]

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` @return [Object]

include_in_global_address_list[RW]

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](support.google.com/a/answer/1285988). Corresponds to the JSON property `includeInGlobalAddressList` @return [Boolean]

include_in_global_address_list?[RW]

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](support.google.com/a/answer/1285988). Corresponds to the JSON property `includeInGlobalAddressList` @return [Boolean]

ip_whitelisted[RW]

If `true`, the user's IP address is [whitelisted](support.google.com/a/ answer/60752). Corresponds to the JSON property `ipWhitelisted` @return [Boolean]

ip_whitelisted?[RW]

If `true`, the user's IP address is [whitelisted](support.google.com/a/ answer/60752). Corresponds to the JSON property `ipWhitelisted` @return [Boolean]

is_admin[RW]

Output only. Indicates a user with super admininistrator privileges. The ` isAdmin` property can only be edited in the [Make a user an administrator](/ admin-sdk/directory/v1/guides/manage-users.html#make_admin) operation ( [ makeAdmin](/admin-sdk/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](/admin-sdk/directory/v1/reference/users/insert. html) or [update](/admin-sdk/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service. Corresponds to the JSON property `isAdmin` @return [Boolean]

is_admin?[RW]

Output only. Indicates a user with super admininistrator privileges. The ` isAdmin` property can only be edited in the [Make a user an administrator](/ admin-sdk/directory/v1/guides/manage-users.html#make_admin) operation ( [ makeAdmin](/admin-sdk/directory/v1/reference/users/makeAdmin.html) method). If edited in the user [insert](/admin-sdk/directory/v1/reference/users/insert. html) or [update](/admin-sdk/directory/v1/reference/users/update.html) methods, the edit is ignored by the API service. Corresponds to the JSON property `isAdmin` @return [Boolean]

is_delegated_admin[RW]

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]( support.google.com/a/answer/33325). Corresponds to the JSON property `isDelegatedAdmin` @return [Boolean]

is_delegated_admin?[RW]

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]( support.google.com/a/answer/33325). Corresponds to the JSON property `isDelegatedAdmin` @return [Boolean]

is_enforced_in2_sv[RW]

Output only. Is 2-step verification enforced (Read-only) Corresponds to the JSON property `isEnforcedIn2Sv` @return [Boolean]

is_enforced_in2_sv?[RW]

Output only. Is 2-step verification enforced (Read-only) Corresponds to the JSON property `isEnforcedIn2Sv` @return [Boolean]

is_enrolled_in2_sv[RW]

Output only. Is enrolled in 2-step verification (Read-only) Corresponds to the JSON property `isEnrolledIn2Sv` @return [Boolean]

is_enrolled_in2_sv?[RW]

Output only. Is enrolled in 2-step verification (Read-only) Corresponds to the JSON property `isEnrolledIn2Sv` @return [Boolean]

is_mailbox_setup[RW]

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` @return [Boolean]

is_mailbox_setup?[RW]

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` @return [Boolean]

keywords[RW]

The user's keywords. The maximum allowed data size for this field is 1Kb. Corresponds to the JSON property `keywords` @return [Object]

kind[RW]

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

languages[RW]

The user's languages. The maximum allowed data size for this field is 1Kb. Corresponds to the JSON property `languages` @return [Object]

last_login_time[RW]

User's last login time. (Read-only) Corresponds to the JSON property `lastLoginTime` @return [DateTime]

locations[RW]

The user's locations. The maximum allowed data size for this field is 10Kb. Corresponds to the JSON property `locations` @return [Object]

name[RW]

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](support.google.com/a/ answer/9193374). Maximum allowed data size for this field is 1Kb. Corresponds to the JSON property `name` @return [Google::Apis::AdminDirectoryV1::UserName]

non_editable_aliases[RW]

Output only. 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` @return [Array<String>]

notes[RW]

Notes for the user. Corresponds to the JSON property `notes` @return [Object]

org_unit_path[RW]

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` @return [String]

organizations[RW]

A list of organizations the user belongs to. The maximum allowed data size for this field is 10Kb. Corresponds to the JSON property `organizations` @return [Object]

password[RW]

User's password Corresponds to the JSON property `password` @return [String]

phones[RW]

A list of the user's phone numbers. The maximum allowed data size for this field is 1Kb. Corresponds to the JSON property `phones` @return [Object]

posix_accounts[RW]

A list of [POSIX](www.opengroup.org/austin/papers/posix_faq.html) account information for the user. Corresponds to the JSON property `posixAccounts` @return [Object]

primary_email[RW]

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` @return [String]

recovery_email[RW]

Recovery email of the user. Corresponds to the JSON property `recoveryEmail` @return [String]

recovery_phone[RW]

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` @return [String]

relations[RW]

A 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` @return [Object]

ssh_public_keys[RW]

A list of SSH public keys. Corresponds to the JSON property `sshPublicKeys` @return [Object]

suspended[RW]

Indicates if user is suspended. Corresponds to the JSON property `suspended` @return [Boolean]

suspended?[RW]

Indicates if user is suspended. Corresponds to the JSON property `suspended` @return [Boolean]

suspension_reason[RW]

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` @return [String]

thumbnail_photo_etag[RW]

Output only. ETag of the user's photo (Read-only) Corresponds to the JSON property `thumbnailPhotoEtag` @return [String]

thumbnail_photo_url[RW]

Output only. Photo Url of the user (Read-only) Corresponds to the JSON property `thumbnailPhotoUrl` @return [String]

websites[RW]

The user's websites. The maximum allowed data size for this field is 2Kb. Corresponds to the JSON property `websites` @return [Object]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/admin_directory_v1/classes.rb, line 3906
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/admin_directory_v1/classes.rb, line 3911
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)
  @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)
  @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_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)
  @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