Class: Google::Apis::AdminDirectoryV1::User
- Inherits:
-
Object
- Object
- Google::Apis::AdminDirectoryV1::User
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/admin_directory_v1/classes.rb,
generated/google/apis/admin_directory_v1/representations.rb,
generated/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 Gmail chat 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
-
#addresses ⇒ Object
A list of the user's addresses.
-
#agreed_to_terms ⇒ Boolean
(also: #agreed_to_terms?)
Output only.
-
#aliases ⇒ Array<String>
Output only.
-
#archived ⇒ Boolean
(also: #archived?)
Indicates if user is archived.
-
#change_password_at_next_login ⇒ Boolean
(also: #change_password_at_next_login?)
Indicates if the user is forced to change their password at next login.
-
#creation_time ⇒ DateTime
User's G Suite account creation time.
-
#custom_schemas ⇒ Hash<String,Hash<String,Object>>
Custom fields of the user.
-
#customer_id ⇒ String
Output only.
-
#deletion_time ⇒ DateTime
Corresponds to the JSON property
deletionTime
. -
#emails ⇒ Object
A list of the user's email addresses.
-
#etag ⇒ String
Output only.
-
#external_ids ⇒ Object
A list of external IDs for the user, such as an employee or network ID.
-
#gender ⇒ Object
The user's gender.
-
#hash_function ⇒ String
Stores the hash format of the password property.
-
#id ⇒ String
The unique ID for the user.
-
#ims ⇒ Object
The user's Instant Messenger (IM) accounts.
-
#include_in_global_address_list ⇒ Boolean
(also: #include_in_global_address_list?)
Indicates if the user's profile is visible in the G Suite global address list when the contact sharing feature is enabled for the domain.
-
#ip_whitelisted ⇒ Boolean
(also: #ip_whitelisted?)
If
true
, the user's IP address is white listed. -
#is_admin ⇒ Boolean
(also: #is_admin?)
Output only.
-
#is_delegated_admin ⇒ Boolean
(also: #is_delegated_admin?)
Output only.
-
#is_enforced_in2_sv ⇒ Boolean
(also: #is_enforced_in2_sv?)
Output only.
-
#is_enrolled_in2_sv ⇒ Boolean
(also: #is_enrolled_in2_sv?)
Output only.
-
#is_mailbox_setup ⇒ Boolean
(also: #is_mailbox_setup?)
Output only.
-
#keywords ⇒ Object
The user's keywords.
-
#kind ⇒ String
Output only.
-
#languages ⇒ Object
The user's languages.
-
#last_login_time ⇒ DateTime
User's last login time.
-
#locations ⇒ Object
The user's locations.
-
#name ⇒ Google::Apis::AdminDirectoryV1::UserName
Holds the given and family names of the user, and the read-only
fullName
value. -
#non_editable_aliases ⇒ Array<String>
Output only.
-
#notes ⇒ Object
Notes for the user.
-
#org_unit_path ⇒ String
The full path of the parent organization associated with the user.
-
#organizations ⇒ Object
A list of organizations the user belongs to.
-
#password ⇒ String
User's password Corresponds to the JSON property
password
. -
#phones ⇒ Object
A list of the user's phone numbers.
-
#posix_accounts ⇒ Object
A list of POSIX account information for the user.
-
#primary_email ⇒ String
The user's primary email address.
-
#recovery_email ⇒ String
Recovery email of the user.
-
#recovery_phone ⇒ String
Recovery phone of the user.
-
#relations ⇒ Object
A list of the user's relationships to other users.
-
#ssh_public_keys ⇒ Object
A list of SSH public keys.
-
#suspended ⇒ Boolean
(also: #suspended?)
Indicates if user is suspended.
-
#suspension_reason ⇒ String
Output only.
-
#thumbnail_photo_etag ⇒ String
Output only.
-
#thumbnail_photo_url ⇒ String
Output only.
-
#websites ⇒ Object
The user's websites.
Instance Method Summary collapse
-
#initialize(**args) ⇒ User
constructor
A new instance of User.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ User
Returns a new instance of User.
3498 3499 3500 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3498 def initialize(**args) update!(**args) end |
Instance Attribute Details
#addresses ⇒ Object
A list of the user's addresses. The maximum allowed data size for this field
is 10Kb.
Corresponds to the JSON property addresses
3209 3210 3211 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3209 def addresses @addresses end |
#agreed_to_terms ⇒ Boolean 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
3215 3216 3217 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3215 def agreed_to_terms @agreed_to_terms end |
#aliases ⇒ Array<String>
Output only. List of the user's alias email addresses.
Corresponds to the JSON property aliases
3221 3222 3223 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3221 def aliases @aliases end |
#archived ⇒ Boolean Also known as: archived?
Indicates if user is archived.
Corresponds to the JSON property archived
3226 3227 3228 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3226 def archived @archived end |
#change_password_at_next_login ⇒ Boolean 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
3234 3235 3236 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3234 def change_password_at_next_login @change_password_at_next_login end |
#creation_time ⇒ DateTime
User's G Suite account creation time. (Read-only)
Corresponds to the JSON property creationTime
3240 3241 3242 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3240 def creation_time @creation_time end |
#custom_schemas ⇒ Hash<String,Hash<String,Object>>
Custom fields of the user.
Corresponds to the JSON property customSchemas
3245 3246 3247 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3245 def custom_schemas @custom_schemas end |
#customer_id ⇒ String
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
3255 3256 3257 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3255 def customer_id @customer_id end |
#deletion_time ⇒ DateTime
Corresponds to the JSON property deletionTime
3260 3261 3262 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3260 def deletion_time @deletion_time end |
#emails ⇒ Object
A list of the user's email addresses. The maximum allowed data size for this
field is 10Kb.
Corresponds to the JSON property emails
3266 3267 3268 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3266 def emails @emails end |
#etag ⇒ String
Output only. ETag of the resource.
Corresponds to the JSON property etag
3271 3272 3273 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3271 def etag @etag end |
#external_ids ⇒ Object
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
3277 3278 3279 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3277 def external_ids @external_ids end |
#gender ⇒ Object
The user's gender. The maximum allowed data size for this field is 1Kb.
Corresponds to the JSON property gender
3282 3283 3284 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3282 def gender @gender end |
#hash_function ⇒ String
3291 3292 3293 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3291 def hash_function @hash_function end |
#id ⇒ String
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
3297 3298 3299 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3297 def id @id end |
#ims ⇒ Object
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
3304 3305 3306 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3304 def ims @ims end |
#include_in_global_address_list ⇒ Boolean Also known as: include_in_global_address_list?
Indicates if the user's profile is visible in the G Suite 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
3312 3313 3314 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3312 def include_in_global_address_list @include_in_global_address_list end |
#ip_whitelisted ⇒ Boolean Also known as: ip_whitelisted?
If true
, the user's IP address is white listed.
Corresponds to the JSON property ipWhitelisted
3319 3320 3321 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3319 def ip_whitelisted @ip_whitelisted end |
#is_admin ⇒ Boolean Also known as: is_admin?
Output only. Indicates a user with super admininistrator 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
3331 3332 3333 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3331 def is_admin @is_admin end |
#is_delegated_admin ⇒ Boolean 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
3341 3342 3343 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3341 def is_delegated_admin @is_delegated_admin end |
#is_enforced_in2_sv ⇒ Boolean Also known as: is_enforced_in2_sv?
Output only. Is 2-step verification enforced (Read-only)
Corresponds to the JSON property isEnforcedIn2Sv
3347 3348 3349 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3347 def is_enforced_in2_sv @is_enforced_in2_sv end |
#is_enrolled_in2_sv ⇒ Boolean Also known as: is_enrolled_in2_sv?
Output only. Is enrolled in 2-step verification (Read-only)
Corresponds to the JSON property isEnrolledIn2Sv
3353 3354 3355 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3353 def is_enrolled_in2_sv @is_enrolled_in2_sv end |
#is_mailbox_setup ⇒ Boolean 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
3360 3361 3362 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3360 def is_mailbox_setup @is_mailbox_setup end |
#keywords ⇒ Object
The user's keywords. The maximum allowed data size for this field is 1Kb.
Corresponds to the JSON property keywords
3366 3367 3368 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3366 def keywords @keywords end |
#kind ⇒ String
Output only. The type of the API resource. For Users resources, the value is
admin#directory#user
.
Corresponds to the JSON property kind
3372 3373 3374 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3372 def kind @kind end |
#languages ⇒ Object
The user's languages. The maximum allowed data size for this field is 1Kb.
Corresponds to the JSON property languages
3377 3378 3379 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3377 def languages @languages end |
#last_login_time ⇒ DateTime
User's last login time. (Read-only)
Corresponds to the JSON property lastLoginTime
3382 3383 3384 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3382 def last_login_time @last_login_time end |
#locations ⇒ Object
The user's locations. The maximum allowed data size for this field is 10Kb.
Corresponds to the JSON property locations
3387 3388 3389 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3387 def locations @locations end |
#name ⇒ Google::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
3398 3399 3400 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3398 def name @name end |
#non_editable_aliases ⇒ Array<String>
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
3404 3405 3406 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3404 def non_editable_aliases @non_editable_aliases end |
#notes ⇒ Object
Notes for the user.
Corresponds to the JSON property notes
3409 3410 3411 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3409 def notes @notes end |
#org_unit_path ⇒ String
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
3416 3417 3418 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3416 def org_unit_path @org_unit_path end |
#organizations ⇒ Object
A list of organizations the user belongs to. The maximum allowed data size for
this field is 10Kb.
Corresponds to the JSON property organizations
3422 3423 3424 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3422 def organizations @organizations end |
#password ⇒ String
User's password
Corresponds to the JSON property password
3427 3428 3429 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3427 def password @password end |
#phones ⇒ Object
A list of the user's phone numbers. The maximum allowed data size for this
field is 1Kb.
Corresponds to the JSON property phones
3433 3434 3435 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3433 def phones @phones end |
#posix_accounts ⇒ Object
A list of POSIX
account information for the user.
Corresponds to the JSON property posixAccounts
3439 3440 3441 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3439 def posix_accounts @posix_accounts end |
#primary_email ⇒ String
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
3446 3447 3448 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3446 def primary_email @primary_email end |
#recovery_email ⇒ String
Recovery email of the user.
Corresponds to the JSON property recoveryEmail
3451 3452 3453 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3451 def recovery_email @recovery_email end |
#recovery_phone ⇒ String
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
3457 3458 3459 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3457 def recovery_phone @recovery_phone end |
#relations ⇒ Object
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
3463 3464 3465 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3463 def relations @relations end |
#ssh_public_keys ⇒ Object
A list of SSH public keys.
Corresponds to the JSON property sshPublicKeys
3468 3469 3470 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3468 def ssh_public_keys @ssh_public_keys end |
#suspended ⇒ Boolean Also known as: suspended?
Indicates if user is suspended.
Corresponds to the JSON property suspended
3473 3474 3475 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3473 def suspended @suspended end |
#suspension_reason ⇒ String
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
3481 3482 3483 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3481 def suspension_reason @suspension_reason end |
#thumbnail_photo_etag ⇒ String
Output only. ETag of the user's photo (Read-only)
Corresponds to the JSON property thumbnailPhotoEtag
3486 3487 3488 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3486 def thumbnail_photo_etag @thumbnail_photo_etag end |
#thumbnail_photo_url ⇒ String
Output only. Photo Url of the user (Read-only)
Corresponds to the JSON property thumbnailPhotoUrl
3491 3492 3493 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3491 def thumbnail_photo_url @thumbnail_photo_url end |
#websites ⇒ Object
The user's websites. The maximum allowed data size for this field is 2Kb.
Corresponds to the JSON property websites
3496 3497 3498 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3496 def websites @websites end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 |
# File 'generated/google/apis/admin_directory_v1/classes.rb', line 3503 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 |