Reference documentation and code samples for the Google Apps Chat V1 Client class User.
A user in Google Chat.
When returned as an output from a request, if your Chat app authenticates as
a
user
,
the output for a User
resource only populates the user's name
and type
.
Generated from protobuf message google.chat.v1.User
Namespace
Google \ Apps \ Chat \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Resource name for a Google Chat user
. Format: users/{user}
. users/app
can be used as an alias for the calling app bot
user. For human users
, {user}
is the same user identifier as: - the id
for the Person
in the People API. For example, users/123456789
in Chat API represents the same person as the 123456789
Person profile ID in People API. - the id
for a user
in the Admin SDK Directory API. - the user's email address can be used as an alias for {user}
in API requests. For example, if the People API Person profile ID for user@example.com
is 123456789
, you can use users/user@example.com
as an alias to reference users/123456789
. Only the canonical resource name (for example users/123456789
) will be returned from the API.
↳ display_name
string
Output only. The user's display name.
↳ domain_id
string
Unique identifier of the user's Google Workspace domain.
↳ type
int
User type.
↳ is_anonymous
bool
Output only. When true
, the user is deleted or their profile is not visible.
getName
Resource name for a Google Chat user .
Format: users/{user}
. users/app
can be used as an alias for the calling
app bot
user.
For human users
, {user}
is the same
user identifier as:
- the
id
for the Person in the People API. For example,users/123456789
in Chat API represents the same person as the123456789
Person profile ID in People API. - the
id
for a user in the Admin SDK Directory API. - the user's email address can be used as an alias for
{user}
in API requests. For example, if the People API Person profile ID foruser@example.com
is123456789
, you can useusers/user@example.com
as an alias to referenceusers/123456789
. Only the canonical resource name (for exampleusers/123456789
) will be returned from the API.
string
setName
Resource name for a Google Chat user .
Format: users/{user}
. users/app
can be used as an alias for the calling
app bot
user.
For human users
, {user}
is the same
user identifier as:
- the
id
for the Person in the People API. For example,users/123456789
in Chat API represents the same person as the123456789
Person profile ID in People API. - the
id
for a user in the Admin SDK Directory API. - the user's email address can be used as an alias for
{user}
in API requests. For example, if the People API Person profile ID foruser@example.com
is123456789
, you can useusers/user@example.com
as an alias to referenceusers/123456789
. Only the canonical resource name (for exampleusers/123456789
) will be returned from the API.
var
string
$this
getDisplayName
Output only. The user's display name.
string
setDisplayName
Output only. The user's display name.
var
string
$this
getDomainId
Unique identifier of the user's Google Workspace domain.
string
setDomainId
Unique identifier of the user's Google Workspace domain.
var
string
$this
getType
User type.
int
setType
User type.
var
int
$this
getIsAnonymous
Output only. When true
, the user is deleted or their profile is not
visible.
bool
setIsAnonymous
Output only. When true
, the user is deleted or their profile is not
visible.
var
bool
$this