public static final class SetUpSpaceRequest.Builder extends GeneratedMessage.Builder<SetUpSpaceRequest.Builder> implements SetUpSpaceRequestOrBuilderRequest to create a space and add specified users to it.
Protobuf type google.chat.v1.SetUpSpaceRequest
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > SetUpSpaceRequest.BuilderImplements
SetUpSpaceRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllMemberships(Iterable<? extends Membership> values)
public SetUpSpaceRequest.Builder addAllMemberships(Iterable<? extends Membership> values)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.chat.v1.Membership> |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
addMemberships(Membership value)
public SetUpSpaceRequest.Builder addMemberships(Membership value)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
value |
Membership |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
addMemberships(Membership.Builder builderForValue)
public SetUpSpaceRequest.Builder addMemberships(Membership.Builder builderForValue)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
builderForValue |
Membership.Builder |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
addMemberships(int index, Membership value)
public SetUpSpaceRequest.Builder addMemberships(int index, Membership value)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
value |
Membership |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
addMemberships(int index, Membership.Builder builderForValue)
public SetUpSpaceRequest.Builder addMemberships(int index, Membership.Builder builderForValue)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Membership.Builder |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
addMembershipsBuilder()
public Membership.Builder addMembershipsBuilder()Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Type | Description |
Membership.Builder |
|
addMembershipsBuilder(int index)
public Membership.Builder addMembershipsBuilder(int index)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Membership.Builder |
|
build()
public SetUpSpaceRequest build()| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest |
|
buildPartial()
public SetUpSpaceRequest buildPartial()| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest |
|
clear()
public SetUpSpaceRequest.Builder clear()| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
clearMemberships()
public SetUpSpaceRequest.Builder clearMemberships()Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
clearRequestId()
public SetUpSpaceRequest.Builder clearRequestId()Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.
To use this field effectively:
- Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
- If a space was already created with the provided request ID, the request
returns that space. Note that the returned space might not be fully
populated; the API echoes the space in your request with the
system-assigned resource name populated. To retrieve the latest metadata
for the space, call
GetSpace. - Reusing an existing request ID with a different authenticated user results in an error.
string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
getDefaultInstanceForType()
public SetUpSpaceRequest getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getMemberships(int index)
public Membership getMemberships(int index)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Membership |
|
getMembershipsBuilder(int index)
public Membership.Builder getMembershipsBuilder(int index)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Membership.Builder |
|
getMembershipsBuilderList()
public List<Membership.Builder> getMembershipsBuilderList()Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Type | Description |
List<Builder> |
|
getMembershipsCount()
public int getMembershipsCount()Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Type | Description |
int |
|
getMembershipsList()
public List<Membership> getMembershipsList()Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Type | Description |
List<Membership> |
|
getMembershipsOrBuilder(int index)
public MembershipOrBuilder getMembershipsOrBuilder(int index)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
MembershipOrBuilder |
|
getMembershipsOrBuilderList()
public List<? extends MembershipOrBuilder> getMembershipsOrBuilderList()Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Type | Description |
List<? extends com.google.chat.v1.MembershipOrBuilder> |
|
getRequestId()
public String getRequestId()Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.
To use this field effectively:
- Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
- If a space was already created with the provided request ID, the request
returns that space. Note that the returned space might not be fully
populated; the API echoes the space in your request with the
system-assigned resource name populated. To retrieve the latest metadata
for the space, call
GetSpace. - Reusing an existing request ID with a different authenticated user results in an error.
string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The requestId. |
getRequestIdBytes()
public ByteString getRequestIdBytes()Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.
To use this field effectively:
- Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
- If a space was already created with the provided request ID, the request
returns that space. Note that the returned space might not be fully
populated; the API echoes the space in your request with the
system-assigned resource name populated. To retrieve the latest metadata
for the space, call
GetSpace. - Reusing an existing request ID with a different authenticated user results in an error.
string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
boolean |
Whether the space field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(SetUpSpaceRequest other)
public SetUpSpaceRequest.Builder mergeFrom(SetUpSpaceRequest other)| Parameter | |
|---|---|
| Name | Description |
other |
SetUpSpaceRequest |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SetUpSpaceRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public SetUpSpaceRequest.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
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 | |
|---|---|
| Name | Description |
value |
Space |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
removeMemberships(int index)
public SetUpSpaceRequest.Builder removeMemberships(int index)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
setMemberships(int index, Membership value)
public SetUpSpaceRequest.Builder setMemberships(int index, Membership value)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
value |
Membership |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
setMemberships(int index, Membership.Builder builderForValue)
public SetUpSpaceRequest.Builder setMemberships(int index, Membership.Builder builderForValue)Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically.
The set currently allows up to 49 memberships (in addition to the caller).
For human membership, 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}.
For Google group membership, the Membership.group_member field must
contain a group with name populated (format groups/{group}). You
can only add Google groups when setting Space.spaceType to SPACE.
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 | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Membership.Builder |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|
setRequestId(String value)
public SetUpSpaceRequest.Builder setRequestId(String value)Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.
To use this field effectively:
- Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
- If a space was already created with the provided request ID, the request
returns that space. Note that the returned space might not be fully
populated; the API echoes the space in your request with the
system-assigned resource name populated. To retrieve the latest metadata
for the space, call
GetSpace. - Reusing an existing request ID with a different authenticated user results in an error.
string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe requestId to set. |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
This builder for chaining. |
setRequestIdBytes(ByteString value)
public SetUpSpaceRequest.Builder setRequestIdBytes(ByteString value)Optional. A unique ID for this request. A random UUID is recommended. Specifying a request ID makes the request idempotent, which ensures that multiple identical requests with the same request ID result in only a single space being created. Subsequent requests with the same request ID return the existing space and do not update the space, even if the requested details differ from the current state.
To use this field effectively:
- Ensure that subsequent requests are identical and use the same authentication credentials as the original request.
- If a space was already created with the provided request ID, the request
returns that space. Note that the returned space might not be fully
populated; the API echoes the space in your request with the
system-assigned resource name populated. To retrieve the latest metadata
for the space, call
GetSpace. - Reusing an existing request ID with a different authenticated user results in an error.
string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for requestId to set. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
value |
Space |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
builderForValue |
Space.Builder |
| Returns | |
|---|---|
| Type | Description |
SetUpSpaceRequest.Builder |
|