public static final class ChatServiceGrpc.ChatServiceFutureStub extends AbstractFutureStub<ChatServiceGrpc.ChatServiceFutureStub>
A stub to allow clients to do ListenableFuture-style rpc calls to service ChatService.
Enables developers to build Chat apps and
integrations on Google Chat Platform.
Inheritance
java.lang.Object >
io.grpc.stub.AbstractStub >
io.grpc.stub.AbstractFutureStub >
ChatServiceGrpc.ChatServiceFutureStub
Inherited Members
io.grpc.stub.AbstractFutureStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel)
io.grpc.stub.AbstractFutureStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.<T>withOption(io.grpc.CallOptions.Key<T>,T)
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.getCallOptions()
io.grpc.stub.AbstractStub.getChannel()
io.grpc.stub.AbstractStub.withCallCredentials(io.grpc.CallCredentials)
io.grpc.stub.AbstractStub.withChannel(io.grpc.Channel)
io.grpc.stub.AbstractStub.withCompression(java.lang.String)
io.grpc.stub.AbstractStub.withDeadline(io.grpc.Deadline)
io.grpc.stub.AbstractStub.withDeadlineAfter(long,java.util.concurrent.TimeUnit)
io.grpc.stub.AbstractStub.withExecutor(java.util.concurrent.Executor)
io.grpc.stub.AbstractStub.withInterceptors(io.grpc.ClientInterceptor...)
io.grpc.stub.AbstractStub.withMaxInboundMessageSize(int)
io.grpc.stub.AbstractStub.withMaxOutboundMessageSize(int)
io.grpc.stub.AbstractStub.withWaitForReady()
Methods
build(Channel channel, CallOptions callOptions)
protected ChatServiceGrpc.ChatServiceFutureStub build(Channel channel, CallOptions callOptions)
Parameters |
Name |
Description |
channel |
io.grpc.Channel
|
callOptions |
io.grpc.CallOptions
|
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
completeImportSpace(CompleteImportSpaceRequest request)
public ListenableFuture<CompleteImportSpaceResponse> completeImportSpace(CompleteImportSpaceRequest request)
createMembership(CreateMembershipRequest request)
public ListenableFuture<Membership> createMembership(CreateMembershipRequest request)
Creates a human membership or app membership for the calling app. Creating
memberships for other apps isn't supported. For an example, see
Invite or add a user or a Google Chat app to a
space.
When creating a membership, if the specified member has their auto-accept
policy turned off, then they're invited, and must accept the space
invitation before joining. Otherwise, creating a membership adds the member
directly to the specified space. Requires user
authentication.
To specify the member to add, set the membership.member.name
for the
human or app member.
- To add the calling app to a space or a direct message between two human
users, use
users/app
. Unable to add other
apps to the space.
- To add a human user, use
users/{user}
, where {user}
can be the email
address for the user. For users in the same Workspace organization {user}
can also be the id
for the person from the People API, or the id
for
the user in the Directory API. For example, if the People API Person
profile ID for user@example.com
is 123456789
, you can add the user to
the space by setting the membership.member.name
to
users/user@example.com
or users/123456789
.
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Membership> |
|
createMessage(CreateMessageRequest request)
public ListenableFuture<Message> createMessage(CreateMessageRequest request)
Creates a message in a Google Chat space. The maximum message size,
including text and cards, is 32,000 bytes. For an example, see Send a
message.
Calling this method requires
authentication
and supports the following authentication types:
- For text messages, user authentication or app authentication are
supported.
- For card messages, only app authentication is supported. (Only Chat apps
can create card messages.)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Message> |
|
createReaction(CreateReactionRequest request)
public ListenableFuture<Reaction> createReaction(CreateReactionRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Reaction> |
|
createSpace(CreateSpaceRequest request)
public ListenableFuture<Space> createSpace(CreateSpaceRequest request)
Creates a named space. Spaces grouped by topics aren't supported. For an
example, see Create a
space.
If you receive the error message ALREADY_EXISTS
when creating
a space, try a different displayName
. An existing space within
the Google Workspace organization might already use this display name.
Requires user
authentication.
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Space> |
|
deleteMembership(DeleteMembershipRequest request)
public ListenableFuture<Membership> deleteMembership(DeleteMembershipRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Membership> |
|
deleteMessage(DeleteMessageRequest request)
public ListenableFuture<Empty> deleteMessage(DeleteMessageRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Empty> |
|
deleteReaction(DeleteReactionRequest request)
public ListenableFuture<Empty> deleteReaction(DeleteReactionRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Empty> |
|
deleteSpace(DeleteSpaceRequest request)
public ListenableFuture<Empty> deleteSpace(DeleteSpaceRequest request)
Deletes a named space. Always performs a cascading delete, which means
that the space's child resources—like messages posted in the space and
memberships in the space—are also deleted. For an example, see
Delete a
space.
Requires user
authentication
from a user who has permission to delete the space.
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Empty> |
|
findDirectMessage(FindDirectMessageRequest request)
public ListenableFuture<Space> findDirectMessage(FindDirectMessageRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Space> |
|
getAttachment(GetAttachmentRequest request)
public ListenableFuture<Attachment> getAttachment(GetAttachmentRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Attachment> |
|
getMembership(GetMembershipRequest request)
public ListenableFuture<Membership> getMembership(GetMembershipRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Membership> |
|
getMessage(GetMessageRequest request)
public ListenableFuture<Message> getMessage(GetMessageRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Message> |
|
getSpace(GetSpaceRequest request)
public ListenableFuture<Space> getSpace(GetSpaceRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Space> |
|
getSpaceReadState(GetSpaceReadStateRequest request)
public ListenableFuture<SpaceReadState> getSpaceReadState(GetSpaceReadStateRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<SpaceReadState> |
|
getThreadReadState(GetThreadReadStateRequest request)
public ListenableFuture<ThreadReadState> getThreadReadState(GetThreadReadStateRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<ThreadReadState> |
|
listMemberships(ListMembershipsRequest request)
public ListenableFuture<ListMembershipsResponse> listMemberships(ListMembershipsRequest request)
listMessages(ListMessagesRequest request)
public ListenableFuture<ListMessagesResponse> listMessages(ListMessagesRequest request)
Lists messages in a space that the caller is a member of, including
messages from blocked members and spaces. For an example, see
List messages.
Requires user
authentication.
listReactions(ListReactionsRequest request)
public ListenableFuture<ListReactionsResponse> listReactions(ListReactionsRequest request)
listSpaces(ListSpacesRequest request)
public ListenableFuture<ListSpacesResponse> listSpaces(ListSpacesRequest request)
Lists spaces the caller is a member of. Group chats and DMs aren't listed
until the first message is sent. For an example, see
List
spaces.
Requires
authentication.
Supports
app
authentication
and user
authentication.
Lists spaces visible to the caller or authenticated user. Group chats
and DMs aren't listed until the first message is sent.
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<ListSpacesResponse> |
|
setUpSpace(SetUpSpaceRequest request)
public ListenableFuture<Space> setUpSpace(SetUpSpaceRequest request)
Creates a space and adds specified users to it. The calling user is
automatically added to the space, and shouldn't be specified as a
membership in the request. For an example, see
Set up a space with initial
members.
To specify the human members to add, add memberships with the appropriate
membership.member.name
. To add a human user, use users/{user}
, where
{user}
can be the email address for the user. For users in the same
Workspace organization {user}
can also be the id
for the person from
the People API, or the id
for the user in the Directory API. For example,
if the People API Person profile ID for user@example.com
is 123456789
,
you can add the user to the space by setting the membership.member.name
to users/user@example.com
or users/123456789
.
For a named space or group chat, if the caller blocks, or is blocked
by some members, or doesn't have permission to add some members, then
those members aren't added to the created space.
To create a direct message (DM) between the calling user and another human
user, specify exactly one membership to represent the human user. If
one user blocks the other, the request fails and the DM isn't created.
To create a DM between the calling user and the calling app, set
Space.singleUserBotDm
to true
and don't specify any memberships. You
can only use this method to set up a DM with the calling app. To add the
calling app as a member of a space or an existing DM between two human
users, see
Invite or add a user or app to a
space.
If a DM already exists between two users, even when one user blocks the
other at the time a request is made, then the existing DM is returned.
Spaces with threaded replies aren't supported. 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.
Requires user
authentication.
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Space> |
|
updateMembership(UpdateMembershipRequest request)
public ListenableFuture<Membership> updateMembership(UpdateMembershipRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Membership> |
|
updateMessage(UpdateMessageRequest request)
public ListenableFuture<Message> updateMessage(UpdateMessageRequest request)
Updates a message. There's a difference between the patch
and update
methods. The patch
method uses a patch
request while the update
method uses a put
request. We recommend using the patch
method. For an example, see
Update a
message.
Requires
authentication.
Supports
app
authentication
and user
authentication.
When using app authentication, requests can only update messages
created by the calling Chat app.
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Message> |
|
updateSpace(UpdateSpaceRequest request)
public ListenableFuture<Space> updateSpace(UpdateSpaceRequest request)
Updates a space. For an example, see
Update a
space.
If you're updating the displayName
field and receive the error message
ALREADY_EXISTS
, try a different display name.. An existing space within
the Google Workspace organization might already use this display name.
Requires user
authentication.
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<Space> |
|
updateSpaceReadState(UpdateSpaceReadStateRequest request)
public ListenableFuture<SpaceReadState> updateSpaceReadState(UpdateSpaceReadStateRequest request)
Returns |
Type |
Description |
com.google.common.util.concurrent.ListenableFuture<SpaceReadState> |
|
uploadAttachment(UploadAttachmentRequest request)
public ListenableFuture<UploadAttachmentResponse> uploadAttachment(UploadAttachmentRequest request)