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 \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Resource name of the space. Format: |
↳ type |
int
Output only. Deprecated: Use |
↳ 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 |
↳ display_name |
string
The space's display name. Required when creating a space with a |
↳ 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. For existing spaces, this field is output only. |
↳ space_threading_state |
int
Output only. The threading state in the Chat space. |
↳ space_details |
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 |
↳ 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 |
↳ last_active_time |
Google\Protobuf\Timestamp
Output only. Timestamp of the last message in the 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. |
↳ membership_count |
Space\MembershipCount
Output only. The count of joined memberships grouped by member type. Populated when the |
↳ access_settings |
Space\AccessSettings
Optional. Specifies the access setting of the space. Only populated when the |
↳ space_uri |
string
Output only. The URI for a user to access the space. |
↳ predefined_permission_settings |
int
Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the |
↳ permission_settings |
Space\PermissionSettings
Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings. |
getName
Resource name of the space.
Format: spaces/{space}
Where {space}
represents the system-assigned ID for the space. You can
obtain the space ID by calling the
spaces.list()
method or from the space URL. For example, if the space URL
is https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA
, the space ID
is AAAAAAAAA
.
Returns | |
---|---|
Type | Description |
string |
setName
Resource name of the space.
Format: spaces/{space}
Where {space}
represents the system-assigned ID for the space. You can
obtain the space ID by calling the
spaces.list()
method or from the space URL. For example, if the space URL
is https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA
, the space ID
is AAAAAAAAA
.
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
with a spaceType
of 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
with a spaceType
of 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. 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. 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 |
Space\SpaceDetails|null |
hasSpaceDetails
clearSpaceDetails
setSpaceDetails
Details about the space including description and rules.
Parameter | |
---|---|
Name | Description |
var |
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 |
getLastActiveTime
Output only. Timestamp of the last message in the space.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasLastActiveTime
clearLastActiveTime
setLastActiveTime
Output only. Timestamp of the last message in the 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 |
getMembershipCount
Output only. The count of joined memberships grouped by member type.
Populated when the space_type
is SPACE
, DIRECT_MESSAGE
or
GROUP_CHAT
.
Returns | |
---|---|
Type | Description |
Space\MembershipCount|null |
hasMembershipCount
clearMembershipCount
setMembershipCount
Output only. The count of joined memberships grouped by member type.
Populated when the space_type
is SPACE
, DIRECT_MESSAGE
or
GROUP_CHAT
.
Parameter | |
---|---|
Name | Description |
var |
Space\MembershipCount
|
Returns | |
---|---|
Type | Description |
$this |
getAccessSettings
Optional. Specifies the access setting of the space.
Only populated when the space_type
is SPACE
.
Returns | |
---|---|
Type | Description |
Space\AccessSettings|null |
hasAccessSettings
clearAccessSettings
setAccessSettings
Optional. Specifies the access setting of the space.
Only populated when the space_type
is SPACE
.
Parameter | |
---|---|
Name | Description |
var |
Space\AccessSettings
|
Returns | |
---|---|
Type | Description |
$this |
getSpaceUri
Output only. The URI for a user to access the space.
Returns | |
---|---|
Type | Description |
string |
setSpaceUri
Output only. The URI for a user to access the space.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getPredefinedPermissionSettings
Optional. Input only. Predefined space permission settings, input only
when creating a space. If the field is not set, a collaboration space is
created. After you create the space, settings are populated in the
PermissionSettings
field.
Returns | |
---|---|
Type | Description |
int |
hasPredefinedPermissionSettings
setPredefinedPermissionSettings
Optional. Input only. Predefined space permission settings, input only
when creating a space. If the field is not set, a collaboration space is
created. After you create the space, settings are populated in the
PermissionSettings
field.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getPermissionSettings
Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings.
Returns | |
---|---|
Type | Description |
Space\PermissionSettings|null |
hasPermissionSettings
setPermissionSettings
Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings.
Parameter | |
---|---|
Name | Description |
var |
Space\PermissionSettings
|
Returns | |
---|---|
Type | Description |
$this |
getSpacePermissionSettings
Returns | |
---|---|
Type | Description |
string |