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.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Resource name for a Google Chat user. Format: |
↳ 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 |
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.
Returns | |
---|---|
Type | Description |
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.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDisplayName
Output only. The user's display name.
Returns | |
---|---|
Type | Description |
string |
setDisplayName
Output only. The user's display name.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDomainId
Unique identifier of the user's Google Workspace domain.
Returns | |
---|---|
Type | Description |
string |
setDomainId
Unique identifier of the user's Google Workspace domain.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getType
User type.
Returns | |
---|---|
Type | Description |
int |
setType
User type.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getIsAnonymous
Output only. When true
, the user is deleted or their profile is not
visible.
Returns | |
---|---|
Type | Description |
bool |
setIsAnonymous
Output only. When true
, the user is deleted or their profile is not
visible.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |