Close httplib2 connections.
getAvailability(name, x__xgafv=None)
Returns availability information for a human user in Google Chat. For example, this can be used to check if a user is online or away, or to retrieve their custom status message. This method only retrieves the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability.readonly` - `https://www.googleapis.com/auth/chat.users.availability`
markAsActive(name, body=None, x__xgafv=None)
Marks user as `ACTIVE` in Google Chat. Sets the user's availability state to `ACTIVE`. The `ACTIVE` state lasts until the specified expiration, at which point the user's state becomes `AWAY`. Note that if the user is actively using Chat, the `ACTIVE` state duration may extend beyond the provided expiration. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability`
markAsAway(name, body=None, x__xgafv=None)
Marks user as `AWAY` in Google Chat. Sets the user's state to away and is not affected by the user's activity. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability`
markAsDoNotDisturb(name, body=None, x__xgafv=None)
Marks user as`DO_NOT_DISTURB` in Google Chat. Sets a user's availability state to `DO_NOT_DISTURB` until a specified expiration time. When in `DO_NOT_DISTURB`, users typically won't receive notifications. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability`
updateAvailability(name, body=None, updateMask=None, x__xgafv=None)
Updates availability information for a human user. Only the `custom_status` field can be updated through this method. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability`
close()
Close httplib2 connections.
getAvailability(name, x__xgafv=None)
Returns availability information for a human user in Google Chat. For example, this can be used to check if a user is online or away, or to retrieve their custom status message. This method only retrieves the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability.readonly` - `https://www.googleapis.com/auth/chat.users.availability`
Args:
name: string, Required. The resource name of the availability to retrieve. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents a user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.
"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. # Optional. The user's custom status.
"emoji": { # An emoji that is used as a reaction to a message. # Required. The emoji of the custom status. Only Unicode emojis are supported; custom emojis are not supported.
"customEmoji": { # Represents a [custom emoji](https://support.google.com/chat/answer/12800149). # A custom emoji.
"emojiName": "A String", # Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: `:valid-emoji-name:`
"name": "A String", # Identifier. The resource name of the custom emoji, assigned by the server. Format: `customEmojis/{customEmoji}`
"payload": { # Payload data for the custom emoji. # Optional. Input only. Payload data. Required when the custom emoji is created.
"fileContent": "A String", # Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change.
"filename": "A String", # Required. Input only. The image file name. Supported file extensions: `.png`, `.jpg`, `.gif`.
},
"temporaryImageUri": "A String", # Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created.
"uid": "A String", # Output only. Unique key for the custom emoji resource.
},
"unicode": "A String", # Optional. A basic emoji represented by a unicode string.
},
"expireTime": "A String", # The timestamp when the custom status expires.
"text": "A String", # Required. The text of the custom status. This will be a string with maximum length of 64.
"ttl": "A String", # Input only. The time-to-live duration after which the custom status expires.
},
"doNotDisturbMetadata": { # Metadata associated with the `DO_NOT_DISTURB` availability state, specifying when the state is set to expire. # Output only. Metadata if the user state is set to DO_NOT_DISTURB.
"expirationTime": "A String", # Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB. This can be maximum of 1 year in the future.
},
"name": "A String", # Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`.
"state": "A String", # Output only. The user's current availability state.
}
markAsActive(name, body=None, x__xgafv=None)
Marks user as `ACTIVE` in Google Chat. Sets the user's availability state to `ACTIVE`. The `ACTIVE` state lasts until the specified expiration, at which point the user's state becomes `AWAY`. Note that if the user is actively using Chat, the `ACTIVE` state duration may extend beyond the provided expiration. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability`
Args:
name: string, Required. The resource name of the availability to mark as active. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for the `MarkAsActive` method.
"expireTime": "A String", # The absolute timestamp when the ACTIVE state expires.
"ttl": "A String", # The duration from the current time until the ACTIVE state expires. Using a short TTL can effectively reset the user's state to be based on activity after this brief duration.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents a user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.
"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. # Optional. The user's custom status.
"emoji": { # An emoji that is used as a reaction to a message. # Required. The emoji of the custom status. Only Unicode emojis are supported; custom emojis are not supported.
"customEmoji": { # Represents a [custom emoji](https://support.google.com/chat/answer/12800149). # A custom emoji.
"emojiName": "A String", # Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: `:valid-emoji-name:`
"name": "A String", # Identifier. The resource name of the custom emoji, assigned by the server. Format: `customEmojis/{customEmoji}`
"payload": { # Payload data for the custom emoji. # Optional. Input only. Payload data. Required when the custom emoji is created.
"fileContent": "A String", # Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change.
"filename": "A String", # Required. Input only. The image file name. Supported file extensions: `.png`, `.jpg`, `.gif`.
},
"temporaryImageUri": "A String", # Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created.
"uid": "A String", # Output only. Unique key for the custom emoji resource.
},
"unicode": "A String", # Optional. A basic emoji represented by a unicode string.
},
"expireTime": "A String", # The timestamp when the custom status expires.
"text": "A String", # Required. The text of the custom status. This will be a string with maximum length of 64.
"ttl": "A String", # Input only. The time-to-live duration after which the custom status expires.
},
"doNotDisturbMetadata": { # Metadata associated with the `DO_NOT_DISTURB` availability state, specifying when the state is set to expire. # Output only. Metadata if the user state is set to DO_NOT_DISTURB.
"expirationTime": "A String", # Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB. This can be maximum of 1 year in the future.
},
"name": "A String", # Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`.
"state": "A String", # Output only. The user's current availability state.
}
markAsAway(name, body=None, x__xgafv=None)
Marks user as `AWAY` in Google Chat. Sets the user's state to away and is not affected by the user's activity. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability`
Args:
name: string, Required. The resource name of the availability to mark as away. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for the `MarkAsAway` method.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents a user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.
"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. # Optional. The user's custom status.
"emoji": { # An emoji that is used as a reaction to a message. # Required. The emoji of the custom status. Only Unicode emojis are supported; custom emojis are not supported.
"customEmoji": { # Represents a [custom emoji](https://support.google.com/chat/answer/12800149). # A custom emoji.
"emojiName": "A String", # Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: `:valid-emoji-name:`
"name": "A String", # Identifier. The resource name of the custom emoji, assigned by the server. Format: `customEmojis/{customEmoji}`
"payload": { # Payload data for the custom emoji. # Optional. Input only. Payload data. Required when the custom emoji is created.
"fileContent": "A String", # Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change.
"filename": "A String", # Required. Input only. The image file name. Supported file extensions: `.png`, `.jpg`, `.gif`.
},
"temporaryImageUri": "A String", # Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created.
"uid": "A String", # Output only. Unique key for the custom emoji resource.
},
"unicode": "A String", # Optional. A basic emoji represented by a unicode string.
},
"expireTime": "A String", # The timestamp when the custom status expires.
"text": "A String", # Required. The text of the custom status. This will be a string with maximum length of 64.
"ttl": "A String", # Input only. The time-to-live duration after which the custom status expires.
},
"doNotDisturbMetadata": { # Metadata associated with the `DO_NOT_DISTURB` availability state, specifying when the state is set to expire. # Output only. Metadata if the user state is set to DO_NOT_DISTURB.
"expirationTime": "A String", # Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB. This can be maximum of 1 year in the future.
},
"name": "A String", # Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`.
"state": "A String", # Output only. The user's current availability state.
}
markAsDoNotDisturb(name, body=None, x__xgafv=None)
Marks user as`DO_NOT_DISTURB` in Google Chat. Sets a user's availability state to `DO_NOT_DISTURB` until a specified expiration time. When in `DO_NOT_DISTURB`, users typically won't receive notifications. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability`
Args:
name: string, Required. The resource name of the availability to mark as Do Not Disturb. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for the `MarkAsDoNotDisturb` method.
"expireTime": "A String", # The absolute timestamp when the DND state expires.
"ttl": "A String", # The duration from the current time until the DND state expires.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents a user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.
"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. # Optional. The user's custom status.
"emoji": { # An emoji that is used as a reaction to a message. # Required. The emoji of the custom status. Only Unicode emojis are supported; custom emojis are not supported.
"customEmoji": { # Represents a [custom emoji](https://support.google.com/chat/answer/12800149). # A custom emoji.
"emojiName": "A String", # Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: `:valid-emoji-name:`
"name": "A String", # Identifier. The resource name of the custom emoji, assigned by the server. Format: `customEmojis/{customEmoji}`
"payload": { # Payload data for the custom emoji. # Optional. Input only. Payload data. Required when the custom emoji is created.
"fileContent": "A String", # Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change.
"filename": "A String", # Required. Input only. The image file name. Supported file extensions: `.png`, `.jpg`, `.gif`.
},
"temporaryImageUri": "A String", # Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created.
"uid": "A String", # Output only. Unique key for the custom emoji resource.
},
"unicode": "A String", # Optional. A basic emoji represented by a unicode string.
},
"expireTime": "A String", # The timestamp when the custom status expires.
"text": "A String", # Required. The text of the custom status. This will be a string with maximum length of 64.
"ttl": "A String", # Input only. The time-to-live duration after which the custom status expires.
},
"doNotDisturbMetadata": { # Metadata associated with the `DO_NOT_DISTURB` availability state, specifying when the state is set to expire. # Output only. Metadata if the user state is set to DO_NOT_DISTURB.
"expirationTime": "A String", # Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB. This can be maximum of 1 year in the future.
},
"name": "A String", # Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`.
"state": "A String", # Output only. The user's current availability state.
}
updateAvailability(name, body=None, updateMask=None, x__xgafv=None)
Updates availability information for a human user. Only the `custom_status` field can be updated through this method. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability`
Args:
name: string, Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. (required)
body: object, The request body.
The object takes the form of:
{ # Represents a user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.
"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. # Optional. The user's custom status.
"emoji": { # An emoji that is used as a reaction to a message. # Required. The emoji of the custom status. Only Unicode emojis are supported; custom emojis are not supported.
"customEmoji": { # Represents a [custom emoji](https://support.google.com/chat/answer/12800149). # A custom emoji.
"emojiName": "A String", # Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: `:valid-emoji-name:`
"name": "A String", # Identifier. The resource name of the custom emoji, assigned by the server. Format: `customEmojis/{customEmoji}`
"payload": { # Payload data for the custom emoji. # Optional. Input only. Payload data. Required when the custom emoji is created.
"fileContent": "A String", # Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change.
"filename": "A String", # Required. Input only. The image file name. Supported file extensions: `.png`, `.jpg`, `.gif`.
},
"temporaryImageUri": "A String", # Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created.
"uid": "A String", # Output only. Unique key for the custom emoji resource.
},
"unicode": "A String", # Optional. A basic emoji represented by a unicode string.
},
"expireTime": "A String", # The timestamp when the custom status expires.
"text": "A String", # Required. The text of the custom status. This will be a string with maximum length of 64.
"ttl": "A String", # Input only. The time-to-live duration after which the custom status expires.
},
"doNotDisturbMetadata": { # Metadata associated with the `DO_NOT_DISTURB` availability state, specifying when the state is set to expire. # Output only. Metadata if the user state is set to DO_NOT_DISTURB.
"expirationTime": "A String", # Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB. This can be maximum of 1 year in the future.
},
"name": "A String", # Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`.
"state": "A String", # Output only. The user's current availability state.
}
updateMask: string, Required. The list of fields to update. The only field that can be updated is `custom_status`.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Represents a user's current availability information in Google Chat, including their state (for example, Active, Away, Do Not Disturb) and any custom status.
"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. # Optional. The user's custom status.
"emoji": { # An emoji that is used as a reaction to a message. # Required. The emoji of the custom status. Only Unicode emojis are supported; custom emojis are not supported.
"customEmoji": { # Represents a [custom emoji](https://support.google.com/chat/answer/12800149). # A custom emoji.
"emojiName": "A String", # Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: `:valid-emoji-name:`
"name": "A String", # Identifier. The resource name of the custom emoji, assigned by the server. Format: `customEmojis/{customEmoji}`
"payload": { # Payload data for the custom emoji. # Optional. Input only. Payload data. Required when the custom emoji is created.
"fileContent": "A String", # Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change.
"filename": "A String", # Required. Input only. The image file name. Supported file extensions: `.png`, `.jpg`, `.gif`.
},
"temporaryImageUri": "A String", # Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created.
"uid": "A String", # Output only. Unique key for the custom emoji resource.
},
"unicode": "A String", # Optional. A basic emoji represented by a unicode string.
},
"expireTime": "A String", # The timestamp when the custom status expires.
"text": "A String", # Required. The text of the custom status. This will be a string with maximum length of 64.
"ttl": "A String", # Input only. The time-to-live duration after which the custom status expires.
},
"doNotDisturbMetadata": { # Metadata associated with the `DO_NOT_DISTURB` availability state, specifying when the state is set to expire. # Output only. Metadata if the user state is set to DO_NOT_DISTURB.
"expirationTime": "A String", # Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB. This can be maximum of 1 year in the future.
},
"name": "A String", # Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`.
"state": "A String", # Output only. The user's current availability state.
}