Class SetUpSpaceRequest.Builder (0.5.0)

public static final class SetUpSpaceRequest.Builder extends GeneratedMessageV3.Builder<SetUpSpaceRequest.Builder> implements SetUpSpaceRequestOrBuilder

Protobuf type google.chat.v1.SetUpSpaceRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllMemberships(Iterable<? extends Membership> values)

public SetUpSpaceRequest.Builder addAllMemberships(Iterable<? extends Membership> values)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<? extends com.google.chat.v1.Membership>
Returns
TypeDescription
SetUpSpaceRequest.Builder

addMemberships(Membership value)

public SetUpSpaceRequest.Builder addMemberships(Membership value)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueMembership
Returns
TypeDescription
SetUpSpaceRequest.Builder

addMemberships(Membership.Builder builderForValue)

public SetUpSpaceRequest.Builder addMemberships(Membership.Builder builderForValue)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueMembership.Builder
Returns
TypeDescription
SetUpSpaceRequest.Builder

addMemberships(int index, Membership value)

public SetUpSpaceRequest.Builder addMemberships(int index, Membership value)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueMembership
Returns
TypeDescription
SetUpSpaceRequest.Builder

addMemberships(int index, Membership.Builder builderForValue)

public SetUpSpaceRequest.Builder addMemberships(int index, Membership.Builder builderForValue)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
builderForValueMembership.Builder
Returns
TypeDescription
SetUpSpaceRequest.Builder

addMembershipsBuilder()

public Membership.Builder addMembershipsBuilder()

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
Membership.Builder

addMembershipsBuilder(int index)

public Membership.Builder addMembershipsBuilder(int index)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
Membership.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SetUpSpaceRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

build()

public SetUpSpaceRequest build()
Returns
TypeDescription
SetUpSpaceRequest

buildPartial()

public SetUpSpaceRequest buildPartial()
Returns
TypeDescription
SetUpSpaceRequest

clear()

public SetUpSpaceRequest.Builder clear()
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public SetUpSpaceRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

clearMemberships()

public SetUpSpaceRequest.Builder clearMemberships()

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SetUpSpaceRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public SetUpSpaceRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

clearRequestId()

public SetUpSpaceRequest.Builder clearRequestId()

Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
SetUpSpaceRequest.Builder

This builder for chaining.

clearSpace()

public SetUpSpaceRequest.Builder clearSpace()

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT. Don't set Space.displayName.

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false. Don't set Space.displayName or Space.spaceDetails.

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true. Don't set Space.displayName or Space.spaceDetails.

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SetUpSpaceRequest.Builder

clone()

public SetUpSpaceRequest.Builder clone()
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

getDefaultInstanceForType()

public SetUpSpaceRequest getDefaultInstanceForType()
Returns
TypeDescription
SetUpSpaceRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMemberships(int index)

public Membership getMemberships(int index)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
Membership

getMembershipsBuilder(int index)

public Membership.Builder getMembershipsBuilder(int index)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
Membership.Builder

getMembershipsBuilderList()

public List<Membership.Builder> getMembershipsBuilderList()

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<Builder>

getMembershipsCount()

public int getMembershipsCount()

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

getMembershipsList()

public List<Membership> getMembershipsList()

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<Membership>

getMembershipsOrBuilder(int index)

public MembershipOrBuilder getMembershipsOrBuilder(int index)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
MembershipOrBuilder

getMembershipsOrBuilderList()

public List<? extends MembershipOrBuilder> getMembershipsOrBuilderList()

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<? extends com.google.chat.v1.MembershipOrBuilder>

getRequestId()

public String getRequestId()

Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The requestId.

getRequestIdBytes()

public ByteString getRequestIdBytes()

Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for requestId.

getSpace()

public Space getSpace()

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT. Don't set Space.displayName.

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false. Don't set Space.displayName or Space.spaceDetails.

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true. Don't set Space.displayName or Space.spaceDetails.

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Space

The space.

getSpaceBuilder()

public Space.Builder getSpaceBuilder()

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT. Don't set Space.displayName.

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false. Don't set Space.displayName or Space.spaceDetails.

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true. Don't set Space.displayName or Space.spaceDetails.

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Space.Builder

getSpaceOrBuilder()

public SpaceOrBuilder getSpaceOrBuilder()

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT. Don't set Space.displayName.

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false. Don't set Space.displayName or Space.spaceDetails.

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true. Don't set Space.displayName or Space.spaceDetails.

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SpaceOrBuilder

hasSpace()

public boolean hasSpace()

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT. Don't set Space.displayName.

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false. Don't set Space.displayName or Space.spaceDetails.

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true. Don't set Space.displayName or Space.spaceDetails.

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the space field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SetUpSpaceRequest other)

public SetUpSpaceRequest.Builder mergeFrom(SetUpSpaceRequest other)
Parameter
NameDescription
otherSetUpSpaceRequest
Returns
TypeDescription
SetUpSpaceRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SetUpSpaceRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SetUpSpaceRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

mergeSpace(Space value)

public SetUpSpaceRequest.Builder mergeSpace(Space value)

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT. Don't set Space.displayName.

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false. Don't set Space.displayName or Space.spaceDetails.

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true. Don't set Space.displayName or Space.spaceDetails.

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueSpace
Returns
TypeDescription
SetUpSpaceRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SetUpSpaceRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

removeMemberships(int index)

public SetUpSpaceRequest.Builder removeMemberships(int index)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint
Returns
TypeDescription
SetUpSpaceRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public SetUpSpaceRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

setMemberships(int index, Membership value)

public SetUpSpaceRequest.Builder setMemberships(int index, Membership value)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
valueMembership
Returns
TypeDescription
SetUpSpaceRequest.Builder

setMemberships(int index, Membership.Builder builderForValue)

public SetUpSpaceRequest.Builder setMemberships(int index, Membership.Builder builderForValue)

Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically.

The set currently allows up to 20 memberships (in addition to the caller).

The Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com." To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user}.

Optional when setting Space.spaceType to SPACE.

Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true).

repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint
builderForValueMembership.Builder
Returns
TypeDescription
SetUpSpaceRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SetUpSpaceRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides

setRequestId(String value)

public SetUpSpaceRequest.Builder setRequestId(String value)

Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The requestId to set.

Returns
TypeDescription
SetUpSpaceRequest.Builder

This builder for chaining.

setRequestIdBytes(ByteString value)

public SetUpSpaceRequest.Builder setRequestIdBytes(ByteString value)

Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.

string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for requestId to set.

Returns
TypeDescription
SetUpSpaceRequest.Builder

This builder for chaining.

setSpace(Space value)

public SetUpSpaceRequest.Builder setSpace(Space value)

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT. Don't set Space.displayName.

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false. Don't set Space.displayName or Space.spaceDetails.

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true. Don't set Space.displayName or Space.spaceDetails.

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueSpace
Returns
TypeDescription
SetUpSpaceRequest.Builder

setSpace(Space.Builder builderForValue)

public SetUpSpaceRequest.Builder setSpace(Space.Builder builderForValue)

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName. If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName. An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT. Don't set Space.displayName.

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false. Don't set Space.displayName or Space.spaceDetails.

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true. Don't set Space.displayName or Space.spaceDetails.

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

.google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueSpace.Builder
Returns
TypeDescription
SetUpSpaceRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final SetUpSpaceRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SetUpSpaceRequest.Builder
Overrides