# Class Space.Builder (0.57.0)

0.57.0 (latest) 0.55.0 0.52.0 0.51.0 0.49.0 0.47.0 0.46.0 0.45.0 0.44.0 0.42.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.34.0 0.32.0 0.31.0 0.28.0 0.27.0 0.26.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.1.0

    public static final class Space.Builder extends GeneratedMessage.Builder<Space.Builder> implements SpaceOrBuilder

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

Protobuf type `google.chat.v1.Space`

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [AbstractMessageLite.Builder\<MessageType,BuilderType\>](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html) \> [AbstractMessage.Builder\<BuilderType\>](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html) \> [GeneratedMessage.Builder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html) \> Space.Builder

## Implements

[SpaceOrBuilder](https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.SpaceOrBuilder)

## Inherited Members

[AbstractMessage.Builder.findInitializationErrors()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_findInitializationErrors__) [AbstractMessage.Builder.getInitializationErrorString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_getInitializationErrorString__) [AbstractMessage.Builder.internalMergeFrom(AbstractMessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_internalMergeFrom_com_google_protobuf_AbstractMessageLite_) [AbstractMessage.Builder.mergeFrom(byte\[\])](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___) [AbstractMessage.Builder.mergeFrom(byte\[\],ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(byte\[\],int,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___int_int_) [AbstractMessage.Builder.mergeFrom(byte\[\],int,int,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___int_int_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(ByteString)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_ByteString_) [AbstractMessage.Builder.mergeFrom(ByteString,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_ByteString_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(CodedInputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_) [AbstractMessage.Builder.mergeFrom(CodedInputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(Message)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_Message_) [AbstractMessage.Builder.mergeFrom(InputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_java_io_InputStream_) [AbstractMessage.Builder.mergeFrom(InputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.newUninitializedMessageException(Message)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_newUninitializedMessageException_com_google_protobuf_Message_) [AbstractMessage.Builder.toString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_toString__) [AbstractMessageLite.Builder.\<T\>addAll(Iterable\<T\>,Collection\<? super T\>)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder__T_addAll_java_lang_Iterable_T__java_util_Collection___super_T__) [AbstractMessageLite.Builder.\<T\>addAll(Iterable\<T\>,List\<? super T\>)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder__T_addAll_java_lang_Iterable_T__java_util_List___super_T__) [AbstractMessageLite.Builder.internalMergeFrom(MessageType)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_internalMergeFrom_MessageType_) [AbstractMessageLite.Builder.mergeDelimitedFrom(InputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeDelimitedFrom_java_io_InputStream_) [AbstractMessageLite.Builder.mergeDelimitedFrom(InputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeDelimitedFrom_java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessageLite.Builder.mergeFrom(MessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeFrom_com_google_protobuf_MessageLite_) [AbstractMessageLite.Builder.newUninitializedMessageException(MessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_newUninitializedMessageException_com_google_protobuf_MessageLite_) [GeneratedMessage.Builder.addRepeatedField(Descriptors.FieldDescriptor,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_addRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_java_lang_Object_) [GeneratedMessage.Builder.clear()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clear__) [GeneratedMessage.Builder.clearField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clearField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.clearOneof(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clearOneof_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.clone()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clone__) [GeneratedMessage.Builder.getAllFields()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getAllFields__) [GeneratedMessage.Builder.getDescriptorForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getDescriptorForType__) [GeneratedMessage.Builder.getField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.getFieldBuilder(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getFieldBuilder_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.getOneofFieldDescriptor(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getOneofFieldDescriptor_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.getParentForChildren()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getParentForChildren__) [GeneratedMessage.Builder.getRepeatedField(Descriptors.FieldDescriptor,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_int_) [GeneratedMessage.Builder.getRepeatedFieldBuilder(Descriptors.FieldDescriptor,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedFieldBuilder_com_google_protobuf_Descriptors_FieldDescriptor_int_) [GeneratedMessage.Builder.getRepeatedFieldCount(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedFieldCount_com_google_protobuf_Descriptors_FieldDescriptor_) com.google.protobuf.GeneratedMessage.Builder.getUnknownFieldSetBuilder() [GeneratedMessage.Builder.getUnknownFields()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getUnknownFields__) [GeneratedMessage.Builder.hasField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_hasField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.hasOneof(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_hasOneof_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.internalGetFieldAccessorTable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetFieldAccessorTable__) [GeneratedMessage.Builder.internalGetMapField(int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetMapField_int_) com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int) [GeneratedMessage.Builder.internalGetMutableMapField(int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetMutableMapField_int_) com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int) [GeneratedMessage.Builder.isClean()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isClean__) [GeneratedMessage.Builder.isInitialized()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isInitialized__) [GeneratedMessage.Builder.markClean()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_markClean__) [GeneratedMessage.Builder.mergeUnknownFields(UnknownFieldSet)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_mergeUnknownFields_com_google_protobuf_UnknownFieldSet_) com.google.protobuf.GeneratedMessage.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString) com.google.protobuf.GeneratedMessage.Builder.mergeUnknownVarintField(int,int) [GeneratedMessage.Builder.newBuilderForField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_newBuilderForField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.onBuilt()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_onBuilt__) [GeneratedMessage.Builder.onChanged()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_onChanged__) com.google.protobuf.GeneratedMessage.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int) [GeneratedMessage.Builder.setField(Descriptors.FieldDescriptor,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setField_com_google_protobuf_Descriptors_FieldDescriptor_java_lang_Object_) [GeneratedMessage.Builder.setRepeatedField(Descriptors.FieldDescriptor,int,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_int_java_lang_Object_) com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder) [GeneratedMessage.Builder.setUnknownFields(UnknownFieldSet)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setUnknownFields_com_google_protobuf_UnknownFieldSet_) com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldsProto3(com.google.protobuf.UnknownFieldSet) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### getDescriptor()

    public static final Descriptors.Descriptor getDescriptor()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor.html` |   |

## Methods

### build()

    public Space build()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space` |   |

### buildPartial()

    public Space buildPartial()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space` |   |

### clear()

    public Space.Builder clear()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.clear()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clear__)

### clearAccessSettings()

    public Space.Builder clearAccessSettings()

Optional. Specifies the [access
setting](https://support.google.com/chat/answer/11971020) of the space.
Only populated when the `space_type` is `SPACE`.

`
.google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### clearAdminInstalled()

    public Space.Builder clearAdminInstalled()

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.

`bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearCreateTime()

    public Space.Builder clearCreateTime()

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`.

`
.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### clearCustomer()

    public Space.Builder clearCustomer()

Optional. Immutable. The customer id of the domain of the space.
Required only when creating a space with [app
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
and `SpaceType` is `SPACE`, otherwise should not be set.

In the format `customers/{customer}`, where `customer` is the `id` from the
[Admin SDK customer
resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
Private apps can also use the `customers/my_customer` alias to create
the space in the same Google Workspace organization as the app.

This field isn't populated for direct messages (DMs) or when the space is
created by non-Google Workspace users.

`
optional string customer = 24 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearDisplayName()

    public Space.Builder clearDisplayName()

Optional. The space's display name. Required when [creating a
space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
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.

`string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearExternalUserAllowed()

    public Space.Builder clearExternalUserAllowed()

Optional. 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.

`
bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearImportMode()

    public Space.Builder clearImportMode()

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.

Creating a space in `Import Mode`requires [user
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

`bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearImportModeExpireTime()

    public Space.Builder clearImportModeExpireTime()

Output only. The time when the space will be automatically deleted by the
system if it remains in import mode.

Each space created in import mode must exit this mode before this expire
time using `spaces.completeImport`.

This field is only populated for spaces that were created with import mode.

`
.google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### clearLastActiveTime()

    public Space.Builder clearLastActiveTime()

Output only. Timestamp of the last message in the space.

`
.google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### clearMembershipCount()

    public Space.Builder clearMembershipCount()

Output only. The count of joined memberships grouped by member type.
Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
`GROUP_CHAT`.

`
.google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### clearName()

    public Space.Builder clearName()

Identifier. 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()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/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`.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearPermissionSettings()

    public Space.Builder clearPermissionSettings()

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.

Reading and updating permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` scope. Only populated and settable when the Chat app
  created the space.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### clearPredefinedPermissionSettings()

    public Space.Builder clearPredefinedPermissionSettings()

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.

Setting predefined permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` or `chat.app.spaces.create` scopes.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearSingleUserBotDm()

    public Space.Builder clearSingleUserBotDm()

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

`bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearSpaceDetails()

    public Space.Builder clearSpaceDetails()

Optional. Details about the space including description and rules.

`
.google.chat.v1.Space.SpaceDetails space_details = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### clearSpaceHistoryState()

    public Space.Builder clearSpaceHistoryState()

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

`
.google.chat.v1.HistoryState space_history_state = 13 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearSpacePermissionSettings()

    public Space.Builder clearSpacePermissionSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### clearSpaceThreadingState()

    public Space.Builder clearSpaceThreadingState()

Output only. The threading state in the Chat space.

`
.google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearSpaceType()

    public Space.Builder clearSpaceType()

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

`
.google.chat.v1.Space.SpaceType space_type = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearSpaceUri()

    public Space.Builder clearSpaceUri()

Output only. The URI for a user to access the space.

`string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearThreaded() (deprecated)

    public Space.Builder clearThreaded()

**Deprecated.** *google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=277*

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

`bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### clearType() (deprecated)

    public Space.Builder clearType()

**Deprecated.** *google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=265*

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

`
.google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### getAccessSettings()

    public Space.AccessSettings getAccessSettings()

Optional. Specifies the [access
setting](https://support.google.com/chat/answer/11971020) of the space.
Only populated when the `space_type` is `SPACE`.

`
.google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.AccessSettings` | The accessSettings. |

### getAccessSettingsBuilder()

    public Space.AccessSettings.Builder getAccessSettingsBuilder()

Optional. Specifies the [access
setting](https://support.google.com/chat/answer/11971020) of the space.
Only populated when the `space_type` is `SPACE`.

`
.google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.AccessSettings.Builder` |   |

### getAccessSettingsOrBuilder()

    public Space.AccessSettingsOrBuilder getAccessSettingsOrBuilder()

Optional. Specifies the [access
setting](https://support.google.com/chat/answer/11971020) of the space.
Only populated when the `space_type` is `SPACE`.

`
.google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.AccessSettingsOrBuilder` |   |

### getAdminInstalled()

    public boolean 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.

`bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The adminInstalled. |

### getCreateTime()

    public Timestamp 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`.

`
.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeBuilder()

    public Timestamp.Builder getCreateTimeBuilder()

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`.

`
.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.Builder.html` |   |

### getCreateTimeOrBuilder()

    public TimestampOrBuilder getCreateTimeOrBuilder()

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`.

`
.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getCustomer()

    public String getCustomer()

Optional. Immutable. The customer id of the domain of the space.
Required only when creating a space with [app
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
and `SpaceType` is `SPACE`, otherwise should not be set.

In the format `customers/{customer}`, where `customer` is the `id` from the
[Admin SDK customer
resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
Private apps can also use the `customers/my_customer` alias to create
the space in the same Google Workspace organization as the app.

This field isn't populated for direct messages (DMs) or when the space is
created by non-Google Workspace users.

`
optional string customer = 24 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The customer. |

### getCustomerBytes()

    public ByteString getCustomerBytes()

Optional. Immutable. The customer id of the domain of the space.
Required only when creating a space with [app
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
and `SpaceType` is `SPACE`, otherwise should not be set.

In the format `customers/{customer}`, where `customer` is the `id` from the
[Admin SDK customer
resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
Private apps can also use the `customers/my_customer` alias to create
the space in the same Google Workspace organization as the app.

This field isn't populated for direct messages (DMs) or when the space is
created by non-Google Workspace users.

`
optional string customer = 24 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for customer. |

### getDefaultInstanceForType()

    public Space getDefaultInstanceForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space` |   |

### getDescriptorForType()

    public Descriptors.Descriptor getDescriptorForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor.html` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.getDescriptorForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getDescriptorForType__)

### getDisplayName()

    public String getDisplayName()

Optional. The space's display name. Required when [creating a
space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
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.

`string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The displayName. |

### getDisplayNameBytes()

    public ByteString getDisplayNameBytes()

Optional. The space's display name. Required when [creating a
space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
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.

`string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for displayName. |

### getExternalUserAllowed()

    public boolean getExternalUserAllowed()

Optional. 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.

`
bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The externalUserAllowed. |

### getImportMode()

    public boolean 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.

Creating a space in `Import Mode`requires [user
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

`bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The importMode. |

### getImportModeExpireTime()

    public Timestamp getImportModeExpireTime()

Output only. The time when the space will be automatically deleted by the
system if it remains in import mode.

Each space created in import mode must exit this mode before this expire
time using `spaces.completeImport`.

This field is only populated for spaces that were created with import mode.

`
.google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The importModeExpireTime. |

### getImportModeExpireTimeBuilder()

    public Timestamp.Builder getImportModeExpireTimeBuilder()

Output only. The time when the space will be automatically deleted by the
system if it remains in import mode.

Each space created in import mode must exit this mode before this expire
time using `spaces.completeImport`.

This field is only populated for spaces that were created with import mode.

`
.google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.Builder.html` |   |

### getImportModeExpireTimeOrBuilder()

    public TimestampOrBuilder getImportModeExpireTimeOrBuilder()

Output only. The time when the space will be automatically deleted by the
system if it remains in import mode.

Each space created in import mode must exit this mode before this expire
time using `spaces.completeImport`.

This field is only populated for spaces that were created with import mode.

`
.google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getLastActiveTime()

    public Timestamp getLastActiveTime()

Output only. Timestamp of the last message in the space.

`
.google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The lastActiveTime. |

### getLastActiveTimeBuilder()

    public Timestamp.Builder getLastActiveTimeBuilder()

Output only. Timestamp of the last message in the space.

`
.google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.Builder.html` |   |

### getLastActiveTimeOrBuilder()

    public TimestampOrBuilder getLastActiveTimeOrBuilder()

Output only. Timestamp of the last message in the space.

`
.google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getMembershipCount()

    public Space.MembershipCount getMembershipCount()

Output only. The count of joined memberships grouped by member type.
Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
`GROUP_CHAT`.

`
.google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.MembershipCount` | The membershipCount. |

### getMembershipCountBuilder()

    public Space.MembershipCount.Builder getMembershipCountBuilder()

Output only. The count of joined memberships grouped by member type.
Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
`GROUP_CHAT`.

`
.google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.MembershipCount.Builder` |   |

### getMembershipCountOrBuilder()

    public Space.MembershipCountOrBuilder getMembershipCountOrBuilder()

Output only. The count of joined memberships grouped by member type.
Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
`GROUP_CHAT`.

`
.google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.MembershipCountOrBuilder` |   |

### getName()

    public String getName()

Identifier. 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()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/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`.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public ByteString getNameBytes()

Identifier. 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()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/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`.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getPermissionSettings()

    public Space.PermissionSettings 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.

Reading and updating permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` scope. Only populated and settable when the Chat app
  created the space.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.PermissionSettings` | The permissionSettings. |

### getPermissionSettingsBuilder()

    public Space.PermissionSettings.Builder getPermissionSettingsBuilder()

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.

Reading and updating permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` scope. Only populated and settable when the Chat app
  created the space.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.PermissionSettings.Builder` |   |

### getPermissionSettingsOrBuilder()

    public Space.PermissionSettingsOrBuilder getPermissionSettingsOrBuilder()

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.

Reading and updating permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` scope. Only populated and settable when the Chat app
  created the space.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.PermissionSettingsOrBuilder` |   |

### getPredefinedPermissionSettings()

    public Space.PredefinedPermissionSettings 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.

Setting predefined permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` or `chat.app.spaces.create` scopes.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.PredefinedPermissionSettings` | The predefinedPermissionSettings. |

### getPredefinedPermissionSettingsValue()

    public int getPredefinedPermissionSettingsValue()

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.

Setting predefined permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` or `chat.app.spaces.create` scopes.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for predefinedPermissionSettings. |

### getSingleUserBotDm()

    public boolean getSingleUserBotDm()

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

`bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The singleUserBotDm. |

### getSpaceDetails()

    public Space.SpaceDetails getSpaceDetails()

Optional. Details about the space including description and rules.

`
.google.chat.v1.Space.SpaceDetails space_details = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceDetails` | The spaceDetails. |

### getSpaceDetailsBuilder()

    public Space.SpaceDetails.Builder getSpaceDetailsBuilder()

Optional. Details about the space including description and rules.

`
.google.chat.v1.Space.SpaceDetails space_details = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceDetails.Builder` |   |

### getSpaceDetailsOrBuilder()

    public Space.SpaceDetailsOrBuilder getSpaceDetailsOrBuilder()

Optional. Details about the space including description and rules.

`
.google.chat.v1.Space.SpaceDetails space_details = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceDetailsOrBuilder` |   |

### getSpaceHistoryState()

    public HistoryState getSpaceHistoryState()

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

`
.google.chat.v1.HistoryState space_history_state = 13 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.HistoryState` | The spaceHistoryState. |

### getSpaceHistoryStateValue()

    public int getSpaceHistoryStateValue()

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

`
.google.chat.v1.HistoryState space_history_state = 13 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for spaceHistoryState. |

### getSpacePermissionSettingsCase()

    public Space.SpacePermissionSettingsCase getSpacePermissionSettingsCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpacePermissionSettingsCase` |   |

### getSpaceThreadingState()

    public Space.SpaceThreadingState getSpaceThreadingState()

Output only. The threading state in the Chat space.

`
.google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceThreadingState` | The spaceThreadingState. |

### getSpaceThreadingStateValue()

    public int getSpaceThreadingStateValue()

Output only. The threading state in the Chat space.

`
.google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for spaceThreadingState. |

### getSpaceType()

    public Space.SpaceType getSpaceType()

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

`
.google.chat.v1.Space.SpaceType space_type = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceType` | The spaceType. |

### getSpaceTypeValue()

    public int getSpaceTypeValue()

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

`
.google.chat.v1.Space.SpaceType space_type = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for spaceType. |

### getSpaceUri()

    public String getSpaceUri()

Output only. The URI for a user to access the space.

`string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The spaceUri. |

### getSpaceUriBytes()

    public ByteString getSpaceUriBytes()

Output only. The URI for a user to access the space.

`string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for spaceUri. |

### getThreaded() (deprecated)

    public boolean getThreaded()

**Deprecated.** *google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=277*

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

`bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The threaded. |

### getType() (deprecated)

    public Space.Type getType()

**Deprecated.** *google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=265*

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

`
.google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Type` | The type. |

### getTypeValue() (deprecated)

    public int getTypeValue()

**Deprecated.** *google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=265*

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

`
.google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for type. |

### hasAccessSettings()

    public boolean hasAccessSettings()

Optional. Specifies the [access
setting](https://support.google.com/chat/answer/11971020) of the space.
Only populated when the `space_type` is `SPACE`.

`
.google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the accessSettings field is set. |

### hasCreateTime()

    public boolean hasCreateTime()

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`.

`
.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasCustomer()

    public boolean hasCustomer()

Optional. Immutable. The customer id of the domain of the space.
Required only when creating a space with [app
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
and `SpaceType` is `SPACE`, otherwise should not be set.

In the format `customers/{customer}`, where `customer` is the `id` from the
[Admin SDK customer
resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
Private apps can also use the `customers/my_customer` alias to create
the space in the same Google Workspace organization as the app.

This field isn't populated for direct messages (DMs) or when the space is
created by non-Google Workspace users.

`
optional string customer = 24 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the customer field is set. |

### hasImportModeExpireTime()

    public boolean hasImportModeExpireTime()

Output only. The time when the space will be automatically deleted by the
system if it remains in import mode.

Each space created in import mode must exit this mode before this expire
time using `spaces.completeImport`.

This field is only populated for spaces that were created with import mode.

`
.google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the importModeExpireTime field is set. |

### hasLastActiveTime()

    public boolean hasLastActiveTime()

Output only. Timestamp of the last message in the space.

`
.google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the lastActiveTime field is set. |

### hasMembershipCount()

    public boolean hasMembershipCount()

Output only. The count of joined memberships grouped by member type.
Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
`GROUP_CHAT`.

`
.google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the membershipCount field is set. |

### hasPermissionSettings()

    public boolean hasPermissionSettings()

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.

Reading and updating permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` scope. Only populated and settable when the Chat app
  created the space.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the permissionSettings field is set. |

### hasPredefinedPermissionSettings()

    public boolean hasPredefinedPermissionSettings()

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.

Setting predefined permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` or `chat.app.spaces.create` scopes.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the predefinedPermissionSettings field is set. |

### hasSpaceDetails()

    public boolean hasSpaceDetails()

Optional. Details about the space including description and rules.

`
.google.chat.v1.Space.SpaceDetails space_details = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the spaceDetails field is set. |

### internalGetFieldAccessorTable()

    protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.FieldAccessorTable.html` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.internalGetFieldAccessorTable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetFieldAccessorTable__)

### isInitialized()

    public final boolean isInitialized()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.isInitialized()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isInitialized__)

### mergeAccessSettings(Space.AccessSettings value)

    public Space.Builder mergeAccessSettings(Space.AccessSettings value)

Optional. Specifies the [access
setting](https://support.google.com/chat/answer/11971020) of the space.
Only populated when the `space_type` is `SPACE`.

`
.google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.AccessSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### mergeCreateTime(Timestamp value)

    public Space.Builder mergeCreateTime(Timestamp value)

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`.

`
.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### mergeFrom(Space other)

    public Space.Builder mergeFrom(Space other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

    public Space.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.CodedInputStream.html` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

**Overrides** [AbstractMessage.Builder\<BuilderType\>.mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_com_google_protobuf_ExtensionRegistryLite_)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### mergeFrom(Message other)

    public Space.Builder mergeFrom(Message other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Message.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

**Overrides** [AbstractMessage.Builder\<BuilderType\>.mergeFrom(Message other)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_Message_)

### mergeImportModeExpireTime(Timestamp value)

    public Space.Builder mergeImportModeExpireTime(Timestamp value)

Output only. The time when the space will be automatically deleted by the
system if it remains in import mode.

Each space created in import mode must exit this mode before this expire
time using `spaces.completeImport`.

This field is only populated for spaces that were created with import mode.

`
.google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### mergeLastActiveTime(Timestamp value)

    public Space.Builder mergeLastActiveTime(Timestamp value)

Output only. Timestamp of the last message in the space.

`
.google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### mergeMembershipCount(Space.MembershipCount value)

    public Space.Builder mergeMembershipCount(Space.MembershipCount value)

Output only. The count of joined memberships grouped by member type.
Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
`GROUP_CHAT`.

`
.google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.MembershipCount` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### mergePermissionSettings(Space.PermissionSettings value)

    public Space.Builder mergePermissionSettings(Space.PermissionSettings value)

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.

Reading and updating permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` scope. Only populated and settable when the Chat app
  created the space.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.PermissionSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### mergeSpaceDetails(Space.SpaceDetails value)

    public Space.Builder mergeSpaceDetails(Space.SpaceDetails value)

Optional. Details about the space including description and rules.

`
.google.chat.v1.Space.SpaceDetails space_details = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceDetails` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setAccessSettings(Space.AccessSettings value)

    public Space.Builder setAccessSettings(Space.AccessSettings value)

Optional. Specifies the [access
setting](https://support.google.com/chat/answer/11971020) of the space.
Only populated when the `space_type` is `SPACE`.

`
.google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.AccessSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setAccessSettings(Space.AccessSettings.Builder builderForValue)

    public Space.Builder setAccessSettings(Space.AccessSettings.Builder builderForValue)

Optional. Specifies the [access
setting](https://support.google.com/chat/answer/11971020) of the space.
Only populated when the `space_type` is `SPACE`.

`
.google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.AccessSettings.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setAdminInstalled(boolean value)

    public Space.Builder setAdminInstalled(boolean value)

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.

`bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The adminInstalled to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setCreateTime(Timestamp value)

    public Space.Builder setCreateTime(Timestamp value)

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`.

`
.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setCreateTime(Timestamp.Builder builderForValue)

    public Space.Builder setCreateTime(Timestamp.Builder builderForValue)

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`.

`
.google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.Builder.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setCustomer(String value)

    public Space.Builder setCustomer(String value)

Optional. Immutable. The customer id of the domain of the space.
Required only when creating a space with [app
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
and `SpaceType` is `SPACE`, otherwise should not be set.

In the format `customers/{customer}`, where `customer` is the `id` from the
[Admin SDK customer
resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
Private apps can also use the `customers/my_customer` alias to create
the space in the same Google Workspace organization as the app.

This field isn't populated for direct messages (DMs) or when the space is
created by non-Google Workspace users.

`
optional string customer = 24 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The customer to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setCustomerBytes(ByteString value)

    public Space.Builder setCustomerBytes(ByteString value)

Optional. Immutable. The customer id of the domain of the space.
Required only when creating a space with [app
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
and `SpaceType` is `SPACE`, otherwise should not be set.

In the format `customers/{customer}`, where `customer` is the `id` from the
[Admin SDK customer
resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers).
Private apps can also use the `customers/my_customer` alias to create
the space in the same Google Workspace organization as the app.

This field isn't populated for direct messages (DMs) or when the space is
created by non-Google Workspace users.

`
optional string customer = 24 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for customer to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setDisplayName(String value)

    public Space.Builder setDisplayName(String value)

Optional. The space's display name. Required when [creating a
space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
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.

`string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The displayName to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setDisplayNameBytes(ByteString value)

    public Space.Builder setDisplayNameBytes(ByteString value)

Optional. The space's display name. Required when [creating a
space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
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.

`string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for displayName to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setExternalUserAllowed(boolean value)

    public Space.Builder setExternalUserAllowed(boolean value)

Optional. 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.

`
bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The externalUserAllowed to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setImportMode(boolean value)

    public Space.Builder setImportMode(boolean value)

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.

Creating a space in `Import Mode`requires [user
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

`bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The importMode to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setImportModeExpireTime(Timestamp value)

    public Space.Builder setImportModeExpireTime(Timestamp value)

Output only. The time when the space will be automatically deleted by the
system if it remains in import mode.

Each space created in import mode must exit this mode before this expire
time using `spaces.completeImport`.

This field is only populated for spaces that were created with import mode.

`
.google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setImportModeExpireTime(Timestamp.Builder builderForValue)

    public Space.Builder setImportModeExpireTime(Timestamp.Builder builderForValue)

Output only. The time when the space will be automatically deleted by the
system if it remains in import mode.

Each space created in import mode must exit this mode before this expire
time using `spaces.completeImport`.

This field is only populated for spaces that were created with import mode.

`
.google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.Builder.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setLastActiveTime(Timestamp value)

    public Space.Builder setLastActiveTime(Timestamp value)

Output only. Timestamp of the last message in the space.

`
.google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setLastActiveTime(Timestamp.Builder builderForValue)

    public Space.Builder setLastActiveTime(Timestamp.Builder builderForValue)

Output only. Timestamp of the last message in the space.

`
.google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.Builder.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setMembershipCount(Space.MembershipCount value)

    public Space.Builder setMembershipCount(Space.MembershipCount value)

Output only. The count of joined memberships grouped by member type.
Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
`GROUP_CHAT`.

`
.google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.MembershipCount` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setMembershipCount(Space.MembershipCount.Builder builderForValue)

    public Space.Builder setMembershipCount(Space.MembershipCount.Builder builderForValue)

Output only. The count of joined memberships grouped by member type.
Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
`GROUP_CHAT`.

`
.google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.MembershipCount.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setName(String value)

    public Space.Builder setName(String value)

Identifier. 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()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/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`.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The name to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setNameBytes(ByteString value)

    public Space.Builder setNameBytes(ByteString value)

Identifier. 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()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/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`.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for name to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setPermissionSettings(Space.PermissionSettings value)

    public Space.Builder setPermissionSettings(Space.PermissionSettings value)

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.

Reading and updating permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` scope. Only populated and settable when the Chat app
  created the space.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.PermissionSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setPermissionSettings(Space.PermissionSettings.Builder builderForValue)

    public Space.Builder setPermissionSettings(Space.PermissionSettings.Builder builderForValue)

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.

Reading and updating permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` scope. Only populated and settable when the Chat app
  created the space.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.PermissionSettings.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setPredefinedPermissionSettings(Space.PredefinedPermissionSettings value)

    public Space.Builder setPredefinedPermissionSettings(Space.PredefinedPermissionSettings value)

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.

Setting predefined permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` or `chat.app.spaces.create` scopes.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.PredefinedPermissionSettings` The predefinedPermissionSettings to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setPredefinedPermissionSettingsValue(int value)

    public Space.Builder setPredefinedPermissionSettingsValue(int value)

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.

Setting predefined permission settings supports:

- [App
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
  with [administrator
  approval](https://support.google.com/a?p=chat-app-auth) with the
  `chat.app.spaces` or `chat.app.spaces.create` scopes.

- [User
  authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)

`
.google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The enum numeric value on the wire for predefinedPermissionSettings to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSingleUserBotDm(boolean value)

    public Space.Builder setSingleUserBotDm(boolean value)

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

`bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The singleUserBotDm to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSpaceDetails(Space.SpaceDetails value)

    public Space.Builder setSpaceDetails(Space.SpaceDetails value)

Optional. Details about the space including description and rules.

`
.google.chat.v1.Space.SpaceDetails space_details = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceDetails` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setSpaceDetails(Space.SpaceDetails.Builder builderForValue)

    public Space.Builder setSpaceDetails(Space.SpaceDetails.Builder builderForValue)

Optional. Details about the space including description and rules.

`
.google.chat.v1.Space.SpaceDetails space_details = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceDetails.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` |   |

### setSpaceHistoryState(HistoryState value)

    public Space.Builder setSpaceHistoryState(HistoryState value)

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

`
.google.chat.v1.HistoryState space_history_state = 13 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.HistoryState` The spaceHistoryState to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSpaceHistoryStateValue(int value)

    public Space.Builder setSpaceHistoryStateValue(int value)

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

`
.google.chat.v1.HistoryState space_history_state = 13 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The enum numeric value on the wire for spaceHistoryState to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSpaceThreadingState(Space.SpaceThreadingState value)

    public Space.Builder setSpaceThreadingState(Space.SpaceThreadingState value)

Output only. The threading state in the Chat space.

`
.google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceThreadingState` The spaceThreadingState to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSpaceThreadingStateValue(int value)

    public Space.Builder setSpaceThreadingStateValue(int value)

Output only. The threading state in the Chat space.

`
.google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The enum numeric value on the wire for spaceThreadingState to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSpaceType(Space.SpaceType value)

    public Space.Builder setSpaceType(Space.SpaceType value)

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

`
.google.chat.v1.Space.SpaceType space_type = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.SpaceType` The spaceType to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSpaceTypeValue(int value)

    public Space.Builder setSpaceTypeValue(int value)

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

`
.google.chat.v1.Space.SpaceType space_type = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The enum numeric value on the wire for spaceType to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSpaceUri(String value)

    public Space.Builder setSpaceUri(String value)

Output only. The URI for a user to access the space.

`string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The spaceUri to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setSpaceUriBytes(ByteString value)

    public Space.Builder setSpaceUriBytes(ByteString value)

Output only. The URI for a user to access the space.

`string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for spaceUri to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setThreaded(boolean value) (deprecated)

    public Space.Builder setThreaded(boolean value)

**Deprecated.** *google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=277*

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

`bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The threaded to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setType(Space.Type value) (deprecated)

    public Space.Builder setType(Space.Type value)

**Deprecated.** *google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=265*

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

`
.google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Type` The type to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |

### setTypeValue(int value) (deprecated)

    public Space.Builder setTypeValue(int value)

**Deprecated.** *google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=265*

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

`
.google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The enum numeric value on the wire for type to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-chat/latest/com.google.chat.v1.Space.Builder` | This builder for chaining. |