Google Chat V1 API - Class Google::Apps::Chat::V1::User (v0.31.0)

Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Chat::V1::User.

If your Chat app authenticates as a user, the output for a User resource (such as in the Messages and Memberships APIs) only populates the name and type fields for both internal and external users, unless they are members of the space or have prior affinity with the calling user.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#avatar_url

def avatar_url() -> ::String
Returns
  • (::String) — Output only. The user's avatar image URL.

    When calling the Messages and Memberships APIs with user authentication, this field is populated for both internal and external users for the sender of a message, users within annotations (such as user mentions), and within Membership resources, provided the user is a member of the space or has prior affinity with the calling user.

#display_name

def display_name() -> ::String
Returns
  • (::String) — Output only. The user's display name.

    Populated for both app authentication and user authentication. This field is always populated for requests made with app authentication. When calling the Messages and Memberships APIs with user authentication, this field is populated for both internal and external users for the sender of a message, users within annotations (such as user mentions), and within Membership resources, provided the user is a member of the space or has prior affinity with the calling user.

#domain_id

def domain_id() -> ::String
Returns
  • (::String) — Unique identifier of the user's Google Workspace domain.

#domain_id=

def domain_id=(value) -> ::String
Parameter
  • value (::String) — Unique identifier of the user's Google Workspace domain.
Returns
  • (::String) — Unique identifier of the user's Google Workspace domain.

#email

def email() -> ::String
Returns
  • (::String) — Output only. The user's email address.

    When calling the Messages and Memberships APIs with user authentication, this field is populated for both internal and external users for the sender of a message, users within annotations (such as user mentions), and within Membership resources, provided the user is a member of the space or has prior affinity with the calling user.

#is_anonymous

def is_anonymous() -> ::Boolean
Returns
  • (::Boolean) — Output only. When true, the user is deleted or their profile is not visible, such as when a user is mentioned in a space without being a member and without prior affinity with the calling user.

#name

def name() -> ::String
Returns
  • (::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.

#name=

def name=(value) -> ::String
Parameter
  • value (::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.

Returns
  • (::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.

#type

def type() -> ::Google::Apps::Chat::V1::User::Type
Returns

#type=

def type=(value) -> ::Google::Apps::Chat::V1::User::Type
Parameter
Returns