Google Apps Chat V1 Client - Class Space (0.1.4)

Reference documentation and code samples for the Google Apps Chat V1 Client class Space.

A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.

Generated from protobuf message google.chat.v1.Space

Namespace

Google \ Apps \ Chat \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Resource name of the space. Format: spaces/{space}

↳ type int

Output only. Deprecated: Use space_type instead. The type of a space.

↳ space_type int

The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.

↳ single_user_bot_dm bool

Optional. Whether the space is a DM between a Chat app and a single human.

↳ threaded bool

Output only. Deprecated: Use spaceThreadingState instead. Whether messages are threaded in this space.

↳ display_name string

The space's display name. Required when creating a space. If you receive the error message ALREADY_EXISTS when creating a space or updating the displayName, try a different displayName. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters.

↳ external_user_allowed bool

Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. * The space is used to import data to Google Chat because import mode spaces must only permit members from the same Google Workspace organization. However, as part of the Google Workspace Developer Preview Program, import mode spaces can permit any Google Chat user so this field can then be set for import mode spaces. For existing spaces, this field is output only.

↳ space_threading_state int

Output only. The threading state in the Chat space.

↳ space_details Google\Apps\Chat\V1\Space\SpaceDetails

Details about the space including description and rules.

↳ space_history_state int

The message history state for messages and threads in this space.

↳ import_mode bool

Optional. Whether this space is created in Import Mode as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete.

↳ create_time Google\Protobuf\Timestamp

Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when spaceType is GROUP_CHAT or SPACE.

↳ admin_installed bool

Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging.

getName

Resource name of the space.

Format: spaces/{space}

Returns
Type Description
string

setName

Resource name of the space.

Format: spaces/{space}

Parameter
Name Description
var string
Returns
Type Description
$this

getType

Output only. Deprecated: Use space_type instead.

The type of a space.

Returns
Type Description
int

setType

Output only. Deprecated: Use space_type instead.

The type of a space.

Parameter
Name Description
var int
Returns
Type Description
$this

getSpaceType

The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.

Returns
Type Description
int

setSpaceType

The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.

Parameter
Name Description
var int
Returns
Type Description
$this

getSingleUserBotDm

Optional. Whether the space is a DM between a Chat app and a single human.

Returns
Type Description
bool

setSingleUserBotDm

Optional. Whether the space is a DM between a Chat app and a single human.

Parameter
Name Description
var bool
Returns
Type Description
$this

getThreaded

Output only. Deprecated: Use spaceThreadingState instead.

Whether messages are threaded in this space.

Returns
Type Description
bool

setThreaded

Output only. Deprecated: Use spaceThreadingState instead.

Whether messages are threaded in this space.

Parameter
Name Description
var bool
Returns
Type Description
$this

getDisplayName

The space's display name. Required when creating a space.

If you receive the error message ALREADY_EXISTS when creating a space or updating the displayName, try a different displayName. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters.

Returns
Type Description
string

setDisplayName

The space's display name. Required when creating a space.

If you receive the error message ALREADY_EXISTS when creating a space or updating the displayName, try a different displayName. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters.

Parameter
Name Description
var string
Returns
Type Description
$this

getExternalUserAllowed

Immutable. Whether this space permits any Google Chat user as a member.

Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions:

  • The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user.
  • The space is used to import data to Google Chat because import mode spaces must only permit members from the same Google Workspace organization. However, as part of the Google Workspace Developer Preview Program, import mode spaces can permit any Google Chat user so this field can then be set for import mode spaces. For existing spaces, this field is output only.
Returns
Type Description
bool

setExternalUserAllowed

Immutable. Whether this space permits any Google Chat user as a member.

Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions:

  • The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user.
  • The space is used to import data to Google Chat because import mode spaces must only permit members from the same Google Workspace organization. However, as part of the Google Workspace Developer Preview Program, import mode spaces can permit any Google Chat user so this field can then be set for import mode spaces. For existing spaces, this field is output only.
Parameter
Name Description
var bool
Returns
Type Description
$this

getSpaceThreadingState

Output only. The threading state in the Chat space.

Returns
Type Description
int

setSpaceThreadingState

Output only. The threading state in the Chat space.

Parameter
Name Description
var int
Returns
Type Description
$this

getSpaceDetails

Details about the space including description and rules.

Returns
Type Description
Google\Apps\Chat\V1\Space\SpaceDetails|null

hasSpaceDetails

clearSpaceDetails

setSpaceDetails

Details about the space including description and rules.

Parameter
Name Description
var Google\Apps\Chat\V1\Space\SpaceDetails
Returns
Type Description
$this

getSpaceHistoryState

The message history state for messages and threads in this space.

Returns
Type Description
int

setSpaceHistoryState

The message history state for messages and threads in this space.

Parameter
Name Description
var int
Returns
Type Description
$this

getImportMode

Optional. Whether this space is created in Import Mode as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete.

Returns
Type Description
bool

setImportMode

Optional. Whether this space is created in Import Mode as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete.

Parameter
Name Description
var bool
Returns
Type Description
$this

getCreateTime

Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces.

For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when spaceType is GROUP_CHAT or SPACE.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces.

For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when spaceType is GROUP_CHAT or SPACE.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getAdminInstalled

Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization.

To support admin install, your Chat app must feature direct messaging.

Returns
Type Description
bool

setAdminInstalled

Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization.

To support admin install, your Chat app must feature direct messaging.

Parameter
Name Description
var bool
Returns
Type Description
$this