User class

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.

Constructors

User.new({Object? addresses, bool? agreedToTerms, List<String>? aliases, bool? archived, bool? changePasswordAtNextLogin, DateTime? creationTime, Map<String, UserCustomProperties>? customSchemas, String? customerId, DateTime? deletionTime, Object? emails, String? etag, Object? externalIds, Object? gender, String? hashFunction, String? id, Object? ims, bool? includeInGlobalAddressList, bool? ipWhitelisted, bool? isAdmin, bool? isDelegatedAdmin, bool? isEnforcedIn2Sv, bool? isEnrolledIn2Sv, bool? isMailboxSetup, Object? keywords, String? kind, Object? languages, DateTime? lastLoginTime, Object? locations, UserName? name, List<String>? nonEditableAliases, Object? notes, String? orgUnitPath, Object? organizations, String? password, Object? phones, Object? posixAccounts, String? primaryEmail, String? recoveryEmail, String? recoveryPhone, Object? relations, Object? sshPublicKeys, bool? suspended, String? suspensionReason, String? thumbnailPhotoEtag, String? thumbnailPhotoUrl, Object? websites})
User.fromJson(Map json_)

Properties

addresses Object?
The list of the user's addresses.
getter/setter pair
agreedToTerms bool?
This property is true if the user has completed an initial login and accepted the Terms of Service agreement.
getter/setter pair
aliases List<String>?
The list of the user's alias email addresses.
getter/setter pair
archived bool?
Indicates if user is archived.
getter/setter pair
changePasswordAtNextLogin bool?
Indicates if the user is forced to change their password at next login.
getter/setter pair
creationTime DateTime?
User's G Suite account creation time.
getter/setter pair
customerId String?
The customer ID to retrieve all account users.
getter/setter pair
customSchemas Map<String, UserCustomProperties>?
Custom fields of the user.
getter/setter pair
deletionTime DateTime?
getter/setter pair
emails Object?
The list of the user's email addresses.
getter/setter pair
etag String?
ETag of the resource.
getter/setter pair
externalIds Object?
The list of external IDs for the user, such as an employee or network ID.
getter/setter pair
gender Object?
The user's gender.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hashFunction String?
Stores the hash format of the password property.
getter/setter pair
id String?
The unique ID for the user.
getter/setter pair
ims Object?
The list of the user's Instant Messenger (IM) accounts.
getter/setter pair
includeInGlobalAddressList bool?
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.
getter/setter pair
ipWhitelisted bool?
If true, the user's IP address is subject to a deprecated IP address [allowlist](https://support.google.com/a/answer/60752) configuration.
getter/setter pair
isAdmin bool?
Indicates a user with super administrator privileges.
getter/setter pair
isDelegatedAdmin bool?
Indicates if the user is a delegated administrator.
getter/setter pair
isEnforcedIn2Sv bool?
Is 2-step verification enforced (Read-only)
getter/setter pair
isEnrolledIn2Sv bool?
Is enrolled in 2-step verification (Read-only)
getter/setter pair
isMailboxSetup bool?
Indicates if the user's Google mailbox is created.
getter/setter pair
keywords Object?
The list of the user's keywords.
getter/setter pair
kind String?
The type of the API resource.
getter/setter pair
languages Object?
The user's languages.
getter/setter pair
lastLoginTime DateTime?
User's last login time.
getter/setter pair
locations Object?
The user's locations.
getter/setter pair
name UserName?
Holds the given and family names of the user, and the read-only fullName value.
getter/setter pair
nonEditableAliases List<String>?
The list of the user's non-editable alias email addresses.
getter/setter pair
notes Object?
Notes for the user.
getter/setter pair
organizations Object?
The list of organizations the user belongs to.
getter/setter pair
orgUnitPath String?
The full path of the parent organization associated with the user.
getter/setter pair
password String?
User's password
getter/setter pair
phones Object?
The list of the user's phone numbers.
getter/setter pair
posixAccounts Object?
The list of POSIX account information for the user.
getter/setter pair
primaryEmail String?
The user's primary email address.
getter/setter pair
recoveryEmail String?
Recovery email of the user.
getter/setter pair
recoveryPhone String?
Recovery phone of the user.
getter/setter pair
relations Object?
The list of the user's relationships to other users.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sshPublicKeys Object?
A list of SSH public keys.
getter/setter pair
suspended bool?
Indicates if user is suspended.
getter/setter pair
suspensionReason String?
Has the reason a user account is suspended either by the administrator or by Google at the time of suspension.
getter/setter pair
thumbnailPhotoEtag String?
ETag of the user's photo (Read-only)
getter/setter pair
thumbnailPhotoUrl String?
The URL of the user's profile photo.
getter/setter pair
websites Object?
The user's websites.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited