Resource: Availability
Represents a user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.
| JSON representation |
|---|
{ "name": string, "state": enum ( |
| Fields | |
|---|---|
name |
Identifier. Resource name of the user's availability. Format:
The user's email address or |
state |
Output only. The user's current availability state. |
customStatus |
Optional. The user's custom status. |
Union field state_metadata. Additional metadata associated with the user's availability state. state_metadata can be only one of the following: |
|
doNotDisturbMetadata |
Output only. Metadata if the user state is set to DO_NOT_DISTURB. |
State
Represents the current availability state of the user.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
Default value. The state is unspecified. |
ACTIVE |
The user is currently active, based on recent activity. |
IDLE |
The user is currently idle. This state indicates a period of inactivity after being ACTIVE, before potentially transitioning to AWAY. |
AWAY |
The user is currently away. This can be either automatically set after a period of inactivity in ACTIVE or IDLE state, or it can be manually set by the user. When manually set via availability.markAsAway, this state persists regardless of user activity. |
DO_NOT_DISTURB |
The user is in Do Not Disturb state, which is manually set. |
DoNotDisturbMetadata
Metadata associated with the DO_NOT_DISTURB availability state, specifying when the state is set to expire.
| JSON representation |
|---|
{ "expirationTime": string } |
| Fields | |
|---|---|
expirationTime |
Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB. This can be maximum of 1 year in the future. |
CustomStatus
Represents a user's custom status in Google Chat. This includes a short text message with an optional emoji that a user sets to give more context about their availability.
| JSON representation |
|---|
{
"text": string,
"emoji": {
object ( |
| Fields | |
|---|---|
text |
Required. The text of the custom status. This will be a string with maximum length of 64. |
emoji |
Required. The emoji of the custom status. Only Unicode emojis are supported; custom emojis are not supported. |
Union field expiration. The expiration time of the custom status. It can be specified as either an absolute timestamp or a time-to-live duration. expiration can be only one of the following: |
|
expireTime |
The timestamp when the custom status expires. |
ttl |
Input only. The time-to-live duration after which the custom status expires. |
Methods |
|
|---|---|
|
Returns availability information for a human user in Google Chat. |
|
Marks user as ACTIVE in Google Chat. |
|
Marks user as AWAY in Google Chat. |
|
Marks user asDO_NOT_DISTURB in Google Chat. |
|
Updates availability information for a human user. |