Skip to content

Commit

Permalink
chore: generate libraries at Thu Apr 18 03:11:39 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-java-bot committed Apr 18, 2024
1 parent aa60404 commit 619ad23
Show file tree
Hide file tree
Showing 24 changed files with 1,977 additions and 96 deletions.
2 changes: 1 addition & 1 deletion generation_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gapic_generator_version: 2.38.1
protobuf_version: '25.2'
googleapis_commitish: 42c6f0016d1331765f99d7e51fdfb29e09335c04
googleapis_commitish: cab99b213a32bc0fc3ef76d445e09df9fa094e47
libraries_bom_version: 26.37.0
owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409
synthtool_commitish: 63cc541da2c45fcfca2136c43e638da1fbae174d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,24 @@
* </td>
* </tr>
* <tr>
* <td><p> UpdateMembership</td>
* <td><p> Updates a membership. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> updateMembership(UpdateMembershipRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li><p> updateMembership(Membership membership, FieldMask updateMask)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> updateMembershipCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> DeleteMembership</td>
* <td><p> Deletes a membership. For an example, see [Remove a user or a Google Chat app from a space](https://developers.google.com/workspace/chat/delete-members).
* <p> Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).</td>
Expand Down Expand Up @@ -3197,6 +3215,103 @@ public final UnaryCallable<CreateMembershipRequest, Membership> createMembership
return stub.createMembershipCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a membership. Requires [user
* authentication](https://developers.google.com/chat/api/guides/auth/users).
*
* <p>Sample code:
*
* <pre>{@code
* // 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
* try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
* Membership membership = Membership.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* Membership response = chatServiceClient.updateMembership(membership, updateMask);
* }
* }</pre>
*
* @param membership Required. The membership to update. Only fields specified by `update_mask`
* are updated.
* @param updateMask Required. The field paths to update. Separate multiple values with commas or
* use `&#42;` to update all field paths.
* <p>Currently supported field paths:
* <p>- `role`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Membership updateMembership(Membership membership, FieldMask updateMask) {
UpdateMembershipRequest request =
UpdateMembershipRequest.newBuilder()
.setMembership(membership)
.setUpdateMask(updateMask)
.build();
return updateMembership(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a membership. Requires [user
* authentication](https://developers.google.com/chat/api/guides/auth/users).
*
* <p>Sample code:
*
* <pre>{@code
* // 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
* try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
* UpdateMembershipRequest request =
* UpdateMembershipRequest.newBuilder()
* .setMembership(Membership.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* Membership response = chatServiceClient.updateMembership(request);
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Membership updateMembership(UpdateMembershipRequest request) {
return updateMembershipCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a membership. Requires [user
* authentication](https://developers.google.com/chat/api/guides/auth/users).
*
* <p>Sample code:
*
* <pre>{@code
* // 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
* try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
* UpdateMembershipRequest request =
* UpdateMembershipRequest.newBuilder()
* .setMembership(Membership.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<Membership> future =
* chatServiceClient.updateMembershipCallable().futureCall(request);
* // Do something.
* Membership response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<UpdateMembershipRequest, Membership> updateMembershipCallable() {
return stub.updateMembershipCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a membership. For an example, see [Remove a user or a Google Chat app from a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ public UnaryCallSettings<CreateMembershipRequest, Membership> createMembershipSe
return ((ChatServiceStubSettings) getStubSettings()).createMembershipSettings();
}

/** Returns the object with the settings used for calls to updateMembership. */
public UnaryCallSettings<UpdateMembershipRequest, Membership> updateMembershipSettings() {
return ((ChatServiceStubSettings) getStubSettings()).updateMembershipSettings();
}

/** Returns the object with the settings used for calls to deleteMembership. */
public UnaryCallSettings<DeleteMembershipRequest, Membership> deleteMembershipSettings() {
return ((ChatServiceStubSettings) getStubSettings()).deleteMembershipSettings();
Expand Down Expand Up @@ -404,6 +409,12 @@ public UnaryCallSettings.Builder<FindDirectMessageRequest, Space> findDirectMess
return getStubSettingsBuilder().createMembershipSettings();
}

/** Returns the builder for the settings used for calls to updateMembership. */
public UnaryCallSettings.Builder<UpdateMembershipRequest, Membership>
updateMembershipSettings() {
return getStubSettingsBuilder().updateMembershipSettings();
}

/** Returns the builder for the settings used for calls to deleteMembership. */
public UnaryCallSettings.Builder<DeleteMembershipRequest, Membership>
deleteMembershipSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
"SetUpSpace": {
"methods": ["setUpSpace", "setUpSpaceCallable"]
},
"UpdateMembership": {
"methods": ["updateMembership", "updateMembership", "updateMembershipCallable"]
},
"UpdateMessage": {
"methods": ["updateMessage", "updateMessage", "updateMessageCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import com.google.chat.v1.Reaction;
import com.google.chat.v1.SetUpSpaceRequest;
import com.google.chat.v1.Space;
import com.google.chat.v1.UpdateMembershipRequest;
import com.google.chat.v1.UpdateMessageRequest;
import com.google.chat.v1.UpdateSpaceRequest;
import com.google.chat.v1.UploadAttachmentRequest;
Expand Down Expand Up @@ -155,6 +156,10 @@ public UnaryCallable<CreateMembershipRequest, Membership> createMembershipCallab
throw new UnsupportedOperationException("Not implemented: createMembershipCallable()");
}

public UnaryCallable<UpdateMembershipRequest, Membership> updateMembershipCallable() {
throw new UnsupportedOperationException("Not implemented: updateMembershipCallable()");
}

public UnaryCallable<DeleteMembershipRequest, Membership> deleteMembershipCallable() {
throw new UnsupportedOperationException("Not implemented: deleteMembershipCallable()");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import com.google.chat.v1.Reaction;
import com.google.chat.v1.SetUpSpaceRequest;
import com.google.chat.v1.Space;
import com.google.chat.v1.UpdateMembershipRequest;
import com.google.chat.v1.UpdateMessageRequest;
import com.google.chat.v1.UpdateSpaceRequest;
import com.google.chat.v1.UploadAttachmentRequest;
Expand Down Expand Up @@ -173,6 +174,7 @@ public class ChatServiceStubSettings extends StubSettings<ChatServiceStubSetting
completeImportSpaceSettings;
private final UnaryCallSettings<FindDirectMessageRequest, Space> findDirectMessageSettings;
private final UnaryCallSettings<CreateMembershipRequest, Membership> createMembershipSettings;
private final UnaryCallSettings<UpdateMembershipRequest, Membership> updateMembershipSettings;
private final UnaryCallSettings<DeleteMembershipRequest, Membership> deleteMembershipSettings;
private final UnaryCallSettings<CreateReactionRequest, Reaction> createReactionSettings;
private final PagedCallSettings<
Expand Down Expand Up @@ -491,6 +493,11 @@ public UnaryCallSettings<CreateMembershipRequest, Membership> createMembershipSe
return createMembershipSettings;
}

/** Returns the object with the settings used for calls to updateMembership. */
public UnaryCallSettings<UpdateMembershipRequest, Membership> updateMembershipSettings() {
return updateMembershipSettings;
}

/** Returns the object with the settings used for calls to deleteMembership. */
public UnaryCallSettings<DeleteMembershipRequest, Membership> deleteMembershipSettings() {
return deleteMembershipSettings;
Expand Down Expand Up @@ -649,6 +656,7 @@ protected ChatServiceStubSettings(Builder settingsBuilder) throws IOException {
completeImportSpaceSettings = settingsBuilder.completeImportSpaceSettings().build();
findDirectMessageSettings = settingsBuilder.findDirectMessageSettings().build();
createMembershipSettings = settingsBuilder.createMembershipSettings().build();
updateMembershipSettings = settingsBuilder.updateMembershipSettings().build();
deleteMembershipSettings = settingsBuilder.deleteMembershipSettings().build();
createReactionSettings = settingsBuilder.createReactionSettings().build();
listReactionsSettings = settingsBuilder.listReactionsSettings().build();
Expand Down Expand Up @@ -686,6 +694,8 @@ public static class Builder extends StubSettings.Builder<ChatServiceStubSettings
findDirectMessageSettings;
private final UnaryCallSettings.Builder<CreateMembershipRequest, Membership>
createMembershipSettings;
private final UnaryCallSettings.Builder<UpdateMembershipRequest, Membership>
updateMembershipSettings;
private final UnaryCallSettings.Builder<DeleteMembershipRequest, Membership>
deleteMembershipSettings;
private final UnaryCallSettings.Builder<CreateReactionRequest, Reaction> createReactionSettings;
Expand Down Expand Up @@ -749,6 +759,7 @@ protected Builder(ClientContext clientContext) {
completeImportSpaceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
findDirectMessageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createMembershipSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
updateMembershipSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteMembershipSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createReactionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listReactionsSettings = PagedCallSettings.newBuilder(LIST_REACTIONS_PAGE_STR_FACT);
Expand All @@ -774,6 +785,7 @@ protected Builder(ClientContext clientContext) {
completeImportSpaceSettings,
findDirectMessageSettings,
createMembershipSettings,
updateMembershipSettings,
deleteMembershipSettings,
createReactionSettings,
listReactionsSettings,
Expand Down Expand Up @@ -802,6 +814,7 @@ protected Builder(ChatServiceStubSettings settings) {
completeImportSpaceSettings = settings.completeImportSpaceSettings.toBuilder();
findDirectMessageSettings = settings.findDirectMessageSettings.toBuilder();
createMembershipSettings = settings.createMembershipSettings.toBuilder();
updateMembershipSettings = settings.updateMembershipSettings.toBuilder();
deleteMembershipSettings = settings.deleteMembershipSettings.toBuilder();
createReactionSettings = settings.createReactionSettings.toBuilder();
listReactionsSettings = settings.listReactionsSettings.toBuilder();
Expand All @@ -827,6 +840,7 @@ protected Builder(ChatServiceStubSettings settings) {
completeImportSpaceSettings,
findDirectMessageSettings,
createMembershipSettings,
updateMembershipSettings,
deleteMembershipSettings,
createReactionSettings,
listReactionsSettings,
Expand Down Expand Up @@ -948,6 +962,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));

builder
.updateMembershipSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));

builder
.deleteMembershipSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
Expand Down Expand Up @@ -1084,6 +1103,12 @@ public UnaryCallSettings.Builder<FindDirectMessageRequest, Space> findDirectMess
return createMembershipSettings;
}

/** Returns the builder for the settings used for calls to updateMembership. */
public UnaryCallSettings.Builder<UpdateMembershipRequest, Membership>
updateMembershipSettings() {
return updateMembershipSettings;
}

/** Returns the builder for the settings used for calls to deleteMembership. */
public UnaryCallSettings.Builder<DeleteMembershipRequest, Membership>
deleteMembershipSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import com.google.chat.v1.Reaction;
import com.google.chat.v1.SetUpSpaceRequest;
import com.google.chat.v1.Space;
import com.google.chat.v1.UpdateMembershipRequest;
import com.google.chat.v1.UpdateMessageRequest;
import com.google.chat.v1.UpdateSpaceRequest;
import com.google.chat.v1.UploadAttachmentRequest;
Expand Down Expand Up @@ -245,6 +246,16 @@ public class GrpcChatServiceStub extends ChatServiceStub {
.setResponseMarshaller(ProtoUtils.marshaller(Membership.getDefaultInstance()))
.build();

private static final MethodDescriptor<UpdateMembershipRequest, Membership>
updateMembershipMethodDescriptor =
MethodDescriptor.<UpdateMembershipRequest, Membership>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName("google.chat.v1.ChatService/UpdateMembership")
.setRequestMarshaller(
ProtoUtils.marshaller(UpdateMembershipRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(Membership.getDefaultInstance()))
.build();

private static final MethodDescriptor<DeleteMembershipRequest, Membership>
deleteMembershipMethodDescriptor =
MethodDescriptor.<DeleteMembershipRequest, Membership>newBuilder()
Expand Down Expand Up @@ -312,6 +323,7 @@ public class GrpcChatServiceStub extends ChatServiceStub {
completeImportSpaceCallable;
private final UnaryCallable<FindDirectMessageRequest, Space> findDirectMessageCallable;
private final UnaryCallable<CreateMembershipRequest, Membership> createMembershipCallable;
private final UnaryCallable<UpdateMembershipRequest, Membership> updateMembershipCallable;
private final UnaryCallable<DeleteMembershipRequest, Membership> deleteMembershipCallable;
private final UnaryCallable<CreateReactionRequest, Reaction> createReactionCallable;
private final UnaryCallable<ListReactionsRequest, ListReactionsResponse> listReactionsCallable;
Expand Down Expand Up @@ -520,6 +532,16 @@ protected GrpcChatServiceStub(
return builder.build();
})
.build();
GrpcCallSettings<UpdateMembershipRequest, Membership> updateMembershipTransportSettings =
GrpcCallSettings.<UpdateMembershipRequest, Membership>newBuilder()
.setMethodDescriptor(updateMembershipMethodDescriptor)
.setParamsExtractor(
request -> {
RequestParamsBuilder builder = RequestParamsBuilder.create();
builder.add("membership.name", String.valueOf(request.getMembership().getName()));
return builder.build();
})
.build();
GrpcCallSettings<DeleteMembershipRequest, Membership> deleteMembershipTransportSettings =
GrpcCallSettings.<DeleteMembershipRequest, Membership>newBuilder()
.setMethodDescriptor(deleteMembershipMethodDescriptor)
Expand Down Expand Up @@ -628,6 +650,9 @@ protected GrpcChatServiceStub(
this.createMembershipCallable =
callableFactory.createUnaryCallable(
createMembershipTransportSettings, settings.createMembershipSettings(), clientContext);
this.updateMembershipCallable =
callableFactory.createUnaryCallable(
updateMembershipTransportSettings, settings.updateMembershipSettings(), clientContext);
this.deleteMembershipCallable =
callableFactory.createUnaryCallable(
deleteMembershipTransportSettings, settings.deleteMembershipSettings(), clientContext);
Expand Down Expand Up @@ -760,6 +785,11 @@ public UnaryCallable<CreateMembershipRequest, Membership> createMembershipCallab
return createMembershipCallable;
}

@Override
public UnaryCallable<UpdateMembershipRequest, Membership> updateMembershipCallable() {
return updateMembershipCallable;
}

@Override
public UnaryCallable<DeleteMembershipRequest, Membership> deleteMembershipCallable() {
return deleteMembershipCallable;
Expand Down
Loading

0 comments on commit 619ad23

Please sign in to comment.