Google Apps Chat V1 Client - Class User (0.12.0)

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 \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
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 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
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 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.
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
Create a Mobile Website
View Site in Mobile | Classic
Share by: