Class ChatServiceSettings (0.15.0)

public class ChatServiceSettings extends ClientSettings<ChatServiceSettings>

Settings class to configure an instance of ChatServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (chat.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the RetrySettings of createMessage:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 ChatServiceSettings.Builder chatServiceSettingsBuilder = ChatServiceSettings.newBuilder();
 chatServiceSettingsBuilder
     .createMessageSettings()
     .setRetrySettings(
         chatServiceSettingsBuilder
             .createMessageSettings()
             .getRetrySettings()
             .toBuilder()
             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
             .setMaxAttempts(5)
             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
             .setRetryDelayMultiplier(1.3)
             .setRpcTimeoutMultiplier(1.5)
             .setTotalTimeoutDuration(Duration.ofSeconds(300))
             .build());
 ChatServiceSettings chatServiceSettings = chatServiceSettingsBuilder.build();
 

Please refer to the Client Side Retry Guide for additional support in setting retries.

Inheritance

java.lang.Object > ClientSettings > ChatServiceSettings

Static Methods

create(ChatServiceStubSettings stub)

public static final ChatServiceSettings create(ChatServiceStubSettings stub)
Parameter
Name Description
stub ChatServiceStubSettings
Returns
Type Description
ChatServiceSettings
Exceptions
Type Description
IOException

defaultApiClientHeaderProviderBuilder()

public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
Returns
Type Description
Builder

defaultCredentialsProviderBuilder()

public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()

Returns a builder for the default credentials for this service.

Returns
Type Description
Builder

defaultExecutorProviderBuilder()

public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()

Returns a builder for the default ExecutorProvider for this service.

Returns
Type Description
Builder

defaultGrpcTransportProviderBuilder()

public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()

Returns a builder for the default gRPC ChannelProvider for this service.

Returns
Type Description
Builder

defaultHttpJsonTransportProviderBuilder()

public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()

Returns a builder for the default REST ChannelProvider for this service.

Returns
Type Description
Builder

defaultTransportChannelProvider()

public static TransportChannelProvider defaultTransportChannelProvider()
Returns
Type Description
TransportChannelProvider

getDefaultEndpoint()

public static String getDefaultEndpoint()

Returns the default service endpoint.

Returns
Type Description
String

getDefaultServiceScopes()

public static List<String> getDefaultServiceScopes()

Returns the default service scopes.

Returns
Type Description
List<String>

newBuilder()

public static ChatServiceSettings.Builder newBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description
ChatServiceSettings.Builder

newBuilder(ClientContext clientContext)

public static ChatServiceSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
ChatServiceSettings.Builder

newHttpJsonBuilder()

public static ChatServiceSettings.Builder newHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description
ChatServiceSettings.Builder

Constructors

ChatServiceSettings(ChatServiceSettings.Builder settingsBuilder)

protected ChatServiceSettings(ChatServiceSettings.Builder settingsBuilder)
Parameter
Name Description
settingsBuilder ChatServiceSettings.Builder

Methods

completeImportSpaceSettings()

public UnaryCallSettings<CompleteImportSpaceRequest,CompleteImportSpaceResponse> completeImportSpaceSettings()

Returns the object with the settings used for calls to completeImportSpace.

Returns
Type Description
UnaryCallSettings<CompleteImportSpaceRequest,CompleteImportSpaceResponse>

createMembershipSettings()

public UnaryCallSettings<CreateMembershipRequest,Membership> createMembershipSettings()

Returns the object with the settings used for calls to createMembership.

Returns
Type Description
UnaryCallSettings<CreateMembershipRequest,Membership>

createMessageSettings()

public UnaryCallSettings<CreateMessageRequest,Message> createMessageSettings()

Returns the object with the settings used for calls to createMessage.

Returns
Type Description
UnaryCallSettings<CreateMessageRequest,Message>

createReactionSettings()

public UnaryCallSettings<CreateReactionRequest,Reaction> createReactionSettings()

Returns the object with the settings used for calls to createReaction.

Returns
Type Description
UnaryCallSettings<CreateReactionRequest,Reaction>

createSpaceSettings()

public UnaryCallSettings<CreateSpaceRequest,Space> createSpaceSettings()

Returns the object with the settings used for calls to createSpace.

Returns
Type Description
UnaryCallSettings<CreateSpaceRequest,Space>

deleteMembershipSettings()

public UnaryCallSettings<DeleteMembershipRequest,Membership> deleteMembershipSettings()

Returns the object with the settings used for calls to deleteMembership.

Returns
Type Description
UnaryCallSettings<DeleteMembershipRequest,Membership>

deleteMessageSettings()

public UnaryCallSettings<DeleteMessageRequest,Empty> deleteMessageSettings()

Returns the object with the settings used for calls to deleteMessage.

Returns
Type Description
UnaryCallSettings<DeleteMessageRequest,Empty>

deleteReactionSettings()

public UnaryCallSettings<DeleteReactionRequest,Empty> deleteReactionSettings()

Returns the object with the settings used for calls to deleteReaction.

Returns
Type Description
UnaryCallSettings<DeleteReactionRequest,Empty>

deleteSpaceSettings()

public UnaryCallSettings<DeleteSpaceRequest,Empty> deleteSpaceSettings()

Returns the object with the settings used for calls to deleteSpace.

Returns
Type Description
UnaryCallSettings<DeleteSpaceRequest,Empty>

findDirectMessageSettings()

public UnaryCallSettings<FindDirectMessageRequest,Space> findDirectMessageSettings()

Returns the object with the settings used for calls to findDirectMessage.

Returns
Type Description
UnaryCallSettings<FindDirectMessageRequest,Space>

getAttachmentSettings()

public UnaryCallSettings<GetAttachmentRequest,Attachment> getAttachmentSettings()

Returns the object with the settings used for calls to getAttachment.

Returns
Type Description
UnaryCallSettings<GetAttachmentRequest,Attachment>

getMembershipSettings()

public UnaryCallSettings<GetMembershipRequest,Membership> getMembershipSettings()

Returns the object with the settings used for calls to getMembership.

Returns
Type Description
UnaryCallSettings<GetMembershipRequest,Membership>

getMessageSettings()

public UnaryCallSettings<GetMessageRequest,Message> getMessageSettings()

Returns the object with the settings used for calls to getMessage.

Returns
Type Description
UnaryCallSettings<GetMessageRequest,Message>

getSpaceEventSettings()

public UnaryCallSettings<GetSpaceEventRequest,SpaceEvent> getSpaceEventSettings()

Returns the object with the settings used for calls to getSpaceEvent.

Returns
Type Description
UnaryCallSettings<GetSpaceEventRequest,SpaceEvent>

getSpaceReadStateSettings()

public UnaryCallSettings<GetSpaceReadStateRequest,SpaceReadState> getSpaceReadStateSettings()

Returns the object with the settings used for calls to getSpaceReadState.

Returns
Type Description
UnaryCallSettings<GetSpaceReadStateRequest,SpaceReadState>

getSpaceSettings()

public UnaryCallSettings<GetSpaceRequest,Space> getSpaceSettings()

Returns the object with the settings used for calls to getSpace.

Returns
Type Description
UnaryCallSettings<GetSpaceRequest,Space>

getThreadReadStateSettings()

public UnaryCallSettings<GetThreadReadStateRequest,ThreadReadState> getThreadReadStateSettings()

Returns the object with the settings used for calls to getThreadReadState.

Returns
Type Description
UnaryCallSettings<GetThreadReadStateRequest,ThreadReadState>

listMembershipsSettings()

public PagedCallSettings<ListMembershipsRequest,ListMembershipsResponse,ChatServiceClient.ListMembershipsPagedResponse> listMembershipsSettings()

Returns the object with the settings used for calls to listMemberships.

Returns
Type Description
PagedCallSettings<ListMembershipsRequest,ListMembershipsResponse,ListMembershipsPagedResponse>

listMessagesSettings()

public PagedCallSettings<ListMessagesRequest,ListMessagesResponse,ChatServiceClient.ListMessagesPagedResponse> listMessagesSettings()

Returns the object with the settings used for calls to listMessages.

Returns
Type Description
PagedCallSettings<ListMessagesRequest,ListMessagesResponse,ListMessagesPagedResponse>

listReactionsSettings()

public PagedCallSettings<ListReactionsRequest,ListReactionsResponse,ChatServiceClient.ListReactionsPagedResponse> listReactionsSettings()

Returns the object with the settings used for calls to listReactions.

Returns
Type Description
PagedCallSettings<ListReactionsRequest,ListReactionsResponse,ListReactionsPagedResponse>

listSpaceEventsSettings()

public PagedCallSettings<ListSpaceEventsRequest,ListSpaceEventsResponse,ChatServiceClient.ListSpaceEventsPagedResponse> listSpaceEventsSettings()

Returns the object with the settings used for calls to listSpaceEvents.

Returns
Type Description
PagedCallSettings<ListSpaceEventsRequest,ListSpaceEventsResponse,ListSpaceEventsPagedResponse>

listSpacesSettings()

public PagedCallSettings<ListSpacesRequest,ListSpacesResponse,ChatServiceClient.ListSpacesPagedResponse> listSpacesSettings()

Returns the object with the settings used for calls to listSpaces.

Returns
Type Description
PagedCallSettings<ListSpacesRequest,ListSpacesResponse,ListSpacesPagedResponse>

searchSpacesSettings()

public PagedCallSettings<SearchSpacesRequest,SearchSpacesResponse,ChatServiceClient.SearchSpacesPagedResponse> searchSpacesSettings()

Returns the object with the settings used for calls to searchSpaces.

Returns
Type Description
PagedCallSettings<SearchSpacesRequest,SearchSpacesResponse,SearchSpacesPagedResponse>

setUpSpaceSettings()

public UnaryCallSettings<SetUpSpaceRequest,Space> setUpSpaceSettings()

Returns the object with the settings used for calls to setUpSpace.

Returns
Type Description
UnaryCallSettings<SetUpSpaceRequest,Space>

toBuilder()

public ChatServiceSettings.Builder toBuilder()

Returns a builder containing all the values of this settings class.

Returns
Type Description
ChatServiceSettings.Builder
Overrides

updateMembershipSettings()

public UnaryCallSettings<UpdateMembershipRequest,Membership> updateMembershipSettings()

Returns the object with the settings used for calls to updateMembership.

Returns
Type Description
UnaryCallSettings<UpdateMembershipRequest,Membership>

updateMessageSettings()

public UnaryCallSettings<UpdateMessageRequest,Message> updateMessageSettings()

Returns the object with the settings used for calls to updateMessage.

Returns
Type Description
UnaryCallSettings<UpdateMessageRequest,Message>

updateSpaceReadStateSettings()

public UnaryCallSettings<UpdateSpaceReadStateRequest,SpaceReadState> updateSpaceReadStateSettings()

Returns the object with the settings used for calls to updateSpaceReadState.

Returns
Type Description
UnaryCallSettings<UpdateSpaceReadStateRequest,SpaceReadState>

updateSpaceSettings()

public UnaryCallSettings<UpdateSpaceRequest,Space> updateSpaceSettings()

Returns the object with the settings used for calls to updateSpace.

Returns
Type Description
UnaryCallSettings<UpdateSpaceRequest,Space>

uploadAttachmentSettings()

public UnaryCallSettings<UploadAttachmentRequest,UploadAttachmentResponse> uploadAttachmentSettings()

Returns the object with the settings used for calls to uploadAttachment.

Returns
Type Description
UnaryCallSettings<UploadAttachmentRequest,UploadAttachmentResponse>