deleteChannel
return stub.deleteChannelConnectionCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a GoogleChannelConfig
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * GoogleChannelConfigName name = GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]");
+ * GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the config to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GoogleChannelConfig getGoogleChannelConfig(GoogleChannelConfigName name) {
+ GetGoogleChannelConfigRequest request =
+ GetGoogleChannelConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getGoogleChannelConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a GoogleChannelConfig
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * String name = GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString();
+ * GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the config to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GoogleChannelConfig getGoogleChannelConfig(String name) {
+ GetGoogleChannelConfigRequest request =
+ GetGoogleChannelConfigRequest.newBuilder().setName(name).build();
+ return getGoogleChannelConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a GoogleChannelConfig
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * GetGoogleChannelConfigRequest request =
+ * GetGoogleChannelConfigRequest.newBuilder()
+ * .setName(GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * GoogleChannelConfig response = eventarcClient.getGoogleChannelConfig(request);
+ * }
+ * }
+ *
+ * @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 GoogleChannelConfig getGoogleChannelConfig(GetGoogleChannelConfigRequest request) {
+ return getGoogleChannelConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a GoogleChannelConfig
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * GetGoogleChannelConfigRequest request =
+ * GetGoogleChannelConfigRequest.newBuilder()
+ * .setName(GoogleChannelConfigName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * ApiFuture future =
+ * eventarcClient.getGoogleChannelConfigCallable().futureCall(request);
+ * // Do something.
+ * GoogleChannelConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getGoogleChannelConfigCallable() {
+ return stub.getGoogleChannelConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single GoogleChannelConfig
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * GoogleChannelConfig googleChannelConfig = GoogleChannelConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * GoogleChannelConfig response =
+ * eventarcClient.updateGoogleChannelConfig(googleChannelConfig, updateMask);
+ * }
+ * }
+ *
+ * @param googleChannelConfig Required. The config to be updated.
+ * @param updateMask The fields to be updated; only fields explicitly provided are updated. If no
+ * field mask is provided, all provided fields in the request are updated. To update all
+ * fields, provide a field mask of "*".
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GoogleChannelConfig updateGoogleChannelConfig(
+ GoogleChannelConfig googleChannelConfig, FieldMask updateMask) {
+ UpdateGoogleChannelConfigRequest request =
+ UpdateGoogleChannelConfigRequest.newBuilder()
+ .setGoogleChannelConfig(googleChannelConfig)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateGoogleChannelConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single GoogleChannelConfig
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * UpdateGoogleChannelConfigRequest request =
+ * UpdateGoogleChannelConfigRequest.newBuilder()
+ * .setGoogleChannelConfig(GoogleChannelConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * GoogleChannelConfig response = eventarcClient.updateGoogleChannelConfig(request);
+ * }
+ * }
+ *
+ * @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 GoogleChannelConfig updateGoogleChannelConfig(
+ UpdateGoogleChannelConfigRequest request) {
+ return updateGoogleChannelConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single GoogleChannelConfig
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * UpdateGoogleChannelConfigRequest request =
+ * UpdateGoogleChannelConfigRequest.newBuilder()
+ * .setGoogleChannelConfig(GoogleChannelConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * eventarcClient.updateGoogleChannelConfigCallable().futureCall(request);
+ * // Do something.
+ * GoogleChannelConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateGoogleChannelConfigCallable() {
+ return stub.updateGoogleChannelConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : eventarcClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future = eventarcClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = eventarcClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = eventarcClient.getLocation(request);
+ * }
+ * }
+ *
+ * @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 Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = eventarcClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ *
Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = eventarcClient.setIamPolicy(request);
+ * }
+ * }
+ *
+ * @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 Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ *
Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = eventarcClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable setIamPolicyCallable() {
+ return stub.setIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = eventarcClient.getIamPolicy(request);
+ * }
+ * }
+ *
+ * @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 Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ * Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = eventarcClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getIamPolicyCallable() {
+ return stub.getIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ *
Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = eventarcClient.testIamPermissions(request);
+ * }
+ * }
+ *
+ * @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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ *
Sample code:
+ *
+ *
{@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 (EventarcClient eventarcClient = EventarcClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(ChannelName.of("[PROJECT]", "[LOCATION]", "[CHANNEL]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * eventarcClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
@Override
public final void close() {
stub.close();
@@ -2864,4 +3430,80 @@ protected ListChannelConnectionsFixedSizeCollection createCollection(
return new ListChannelConnectionsFixedSizeCollection(pages, collectionSize);
}
}
+
+ public static class ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
}
diff --git a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/EventarcSettings.java b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/EventarcSettings.java
index c4047975c45f..a50feecfd4d8 100644
--- a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/EventarcSettings.java
+++ b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/EventarcSettings.java
@@ -18,6 +18,7 @@
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelConnectionsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelsPagedResponse;
+import static com.google.cloud.eventarc.v1.EventarcClient.ListLocationsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListProvidersPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListTriggersPagedResponse;
@@ -35,6 +36,15 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.eventarc.v1.stub.EventarcStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import java.io.IOException;
import java.util.List;
@@ -214,6 +224,45 @@ public UnaryCallSettings getProviderSettings() {
return ((EventarcStubSettings) getStubSettings()).deleteChannelConnectionOperationSettings();
}
+ /** Returns the object with the settings used for calls to getGoogleChannelConfig. */
+ public UnaryCallSettings
+ getGoogleChannelConfigSettings() {
+ return ((EventarcStubSettings) getStubSettings()).getGoogleChannelConfigSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateGoogleChannelConfig. */
+ public UnaryCallSettings
+ updateGoogleChannelConfigSettings() {
+ return ((EventarcStubSettings) getStubSettings()).updateGoogleChannelConfigSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return ((EventarcStubSettings) getStubSettings()).listLocationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return ((EventarcStubSettings) getStubSettings()).getLocationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((EventarcStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((EventarcStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((EventarcStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final EventarcSettings create(EventarcStubSettings stub) throws IOException {
return new EventarcSettings.Builder(stub.toBuilder()).build();
}
@@ -471,6 +520,46 @@ public UnaryCallSettings.Builder getProviderSettin
return getStubSettingsBuilder().deleteChannelConnectionOperationSettings();
}
+ /** Returns the builder for the settings used for calls to getGoogleChannelConfig. */
+ public UnaryCallSettings.Builder
+ getGoogleChannelConfigSettings() {
+ return getStubSettingsBuilder().getGoogleChannelConfigSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateGoogleChannelConfig. */
+ public UnaryCallSettings.Builder
+ updateGoogleChannelConfigSettings() {
+ return getStubSettingsBuilder().updateGoogleChannelConfigSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return getStubSettingsBuilder().listLocationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getStubSettingsBuilder().getLocationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return getStubSettingsBuilder().setIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getStubSettingsBuilder().getIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return getStubSettingsBuilder().testIamPermissionsSettings();
+ }
+
@Override
public EventarcSettings build() throws IOException {
return new EventarcSettings(this);
diff --git a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/gapic_metadata.json b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/gapic_metadata.json
index 31806784a1b9..c39073db2898 100644
--- a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/gapic_metadata.json
+++ b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/gapic_metadata.json
@@ -34,6 +34,15 @@
"GetChannelConnection": {
"methods": ["getChannelConnection", "getChannelConnection", "getChannelConnection", "getChannelConnectionCallable"]
},
+ "GetGoogleChannelConfig": {
+ "methods": ["getGoogleChannelConfig", "getGoogleChannelConfig", "getGoogleChannelConfig", "getGoogleChannelConfigCallable"]
+ },
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicyCallable"]
+ },
+ "GetLocation": {
+ "methods": ["getLocation", "getLocationCallable"]
+ },
"GetProvider": {
"methods": ["getProvider", "getProvider", "getProvider", "getProviderCallable"]
},
@@ -46,15 +55,27 @@
"ListChannels": {
"methods": ["listChannels", "listChannels", "listChannels", "listChannelsPagedCallable", "listChannelsCallable"]
},
+ "ListLocations": {
+ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ },
"ListProviders": {
"methods": ["listProviders", "listProviders", "listProviders", "listProvidersPagedCallable", "listProvidersCallable"]
},
"ListTriggers": {
"methods": ["listTriggers", "listTriggers", "listTriggers", "listTriggersPagedCallable", "listTriggersCallable"]
},
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
+ },
"UpdateChannel": {
"methods": ["updateChannelAsync", "updateChannelAsync", "updateChannelOperationCallable", "updateChannelCallable"]
},
+ "UpdateGoogleChannelConfig": {
+ "methods": ["updateGoogleChannelConfig", "updateGoogleChannelConfig", "updateGoogleChannelConfigCallable"]
+ },
"UpdateTrigger": {
"methods": ["updateTriggerAsync", "updateTriggerAsync", "updateTriggerOperationCallable", "updateTriggerCallable"]
}
diff --git a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/EventarcStub.java b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/EventarcStub.java
index cae189fa9d4e..1d5e1e334be2 100644
--- a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/EventarcStub.java
+++ b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/EventarcStub.java
@@ -18,6 +18,7 @@
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelConnectionsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelsPagedResponse;
+import static com.google.cloud.eventarc.v1.EventarcClient.ListLocationsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListProvidersPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListTriggersPagedResponse;
@@ -34,8 +35,10 @@
import com.google.cloud.eventarc.v1.DeleteTriggerRequest;
import com.google.cloud.eventarc.v1.GetChannelConnectionRequest;
import com.google.cloud.eventarc.v1.GetChannelRequest;
+import com.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest;
import com.google.cloud.eventarc.v1.GetProviderRequest;
import com.google.cloud.eventarc.v1.GetTriggerRequest;
+import com.google.cloud.eventarc.v1.GoogleChannelConfig;
import com.google.cloud.eventarc.v1.ListChannelConnectionsRequest;
import com.google.cloud.eventarc.v1.ListChannelConnectionsResponse;
import com.google.cloud.eventarc.v1.ListChannelsRequest;
@@ -48,7 +51,17 @@
import com.google.cloud.eventarc.v1.Provider;
import com.google.cloud.eventarc.v1.Trigger;
import com.google.cloud.eventarc.v1.UpdateChannelRequest;
+import com.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest;
import com.google.cloud.eventarc.v1.UpdateTriggerRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import javax.annotation.Generated;
@@ -199,6 +212,42 @@ public UnaryCallable listProvidersC
throw new UnsupportedOperationException("Not implemented: deleteChannelConnectionCallable()");
}
+ public UnaryCallable
+ getGoogleChannelConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: getGoogleChannelConfigCallable()");
+ }
+
+ public UnaryCallable
+ updateGoogleChannelConfigCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateGoogleChannelConfigCallable()");
+ }
+
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
+ }
+
+ public UnaryCallable listLocationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
+ }
+
+ public UnaryCallable getLocationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
+ }
+
+ public UnaryCallable setIamPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()");
+ }
+
+ public UnaryCallable getIamPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()");
+ }
+
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/EventarcStubSettings.java b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/EventarcStubSettings.java
index 9a1f8f5bcec5..5763313de532 100644
--- a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/EventarcStubSettings.java
+++ b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/EventarcStubSettings.java
@@ -18,6 +18,7 @@
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelConnectionsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelsPagedResponse;
+import static com.google.cloud.eventarc.v1.EventarcClient.ListLocationsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListProvidersPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListTriggersPagedResponse;
@@ -60,8 +61,10 @@
import com.google.cloud.eventarc.v1.DeleteTriggerRequest;
import com.google.cloud.eventarc.v1.GetChannelConnectionRequest;
import com.google.cloud.eventarc.v1.GetChannelRequest;
+import com.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest;
import com.google.cloud.eventarc.v1.GetProviderRequest;
import com.google.cloud.eventarc.v1.GetTriggerRequest;
+import com.google.cloud.eventarc.v1.GoogleChannelConfig;
import com.google.cloud.eventarc.v1.ListChannelConnectionsRequest;
import com.google.cloud.eventarc.v1.ListChannelConnectionsResponse;
import com.google.cloud.eventarc.v1.ListChannelsRequest;
@@ -74,11 +77,21 @@
import com.google.cloud.eventarc.v1.Provider;
import com.google.cloud.eventarc.v1.Trigger;
import com.google.cloud.eventarc.v1.UpdateChannelRequest;
+import com.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest;
import com.google.cloud.eventarc.v1.UpdateTriggerRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import java.io.IOException;
import java.util.List;
@@ -171,6 +184,18 @@ public class EventarcStubSettings extends StubSettings {
private final OperationCallSettings<
DeleteChannelConnectionRequest, ChannelConnection, OperationMetadata>
deleteChannelConnectionOperationSettings;
+ private final UnaryCallSettings
+ getGoogleChannelConfigSettings;
+ private final UnaryCallSettings
+ updateGoogleChannelConfigSettings;
+ private final PagedCallSettings<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings getLocationSettings;
+ private final UnaryCallSettings setIamPolicySettings;
+ private final UnaryCallSettings getIamPolicySettings;
+ private final UnaryCallSettings
+ testIamPermissionsSettings;
private static final PagedListDescriptor
LIST_TRIGGERS_PAGE_STR_DESC =
@@ -323,6 +348,42 @@ public Iterable extractResources(
}
};
+ private static final PagedListDescriptor
+ LIST_LOCATIONS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
+ return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
+ return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListLocationsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListLocationsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListLocationsResponse payload) {
+ return payload.getLocationsList() == null
+ ? ImmutableList.of()
+ : payload.getLocationsList();
+ }
+ };
+
private static final PagedListResponseFactory<
ListTriggersRequest, ListTriggersResponse, ListTriggersPagedResponse>
LIST_TRIGGERS_PAGE_STR_FACT =
@@ -401,6 +462,23 @@ public ApiFuture getFuturePagedResponse(
}
};
+ private static final PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ LIST_LOCATIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListLocationsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
+ return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
/** Returns the object with the settings used for calls to getTrigger. */
public UnaryCallSettings getTriggerSettings() {
return getTriggerSettings;
@@ -539,6 +617,45 @@ public UnaryCallSettings getProviderSettings() {
return deleteChannelConnectionOperationSettings;
}
+ /** Returns the object with the settings used for calls to getGoogleChannelConfig. */
+ public UnaryCallSettings
+ getGoogleChannelConfigSettings() {
+ return getGoogleChannelConfigSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateGoogleChannelConfig. */
+ public UnaryCallSettings
+ updateGoogleChannelConfigSettings() {
+ return updateGoogleChannelConfigSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return getLocationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return setIamPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return getIamPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return testIamPermissionsSettings;
+ }
+
public EventarcStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
@@ -669,6 +786,13 @@ protected EventarcStubSettings(Builder settingsBuilder) throws IOException {
deleteChannelConnectionSettings = settingsBuilder.deleteChannelConnectionSettings().build();
deleteChannelConnectionOperationSettings =
settingsBuilder.deleteChannelConnectionOperationSettings().build();
+ getGoogleChannelConfigSettings = settingsBuilder.getGoogleChannelConfigSettings().build();
+ updateGoogleChannelConfigSettings = settingsBuilder.updateGoogleChannelConfigSettings().build();
+ listLocationsSettings = settingsBuilder.listLocationsSettings().build();
+ getLocationSettings = settingsBuilder.getLocationSettings().build();
+ setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
+ getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
+ testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
}
/** Builder for EventarcStubSettings. */
@@ -721,6 +845,18 @@ public static class Builder extends StubSettings.Builder
deleteChannelConnectionOperationSettings;
+ private final UnaryCallSettings.Builder
+ getGoogleChannelConfigSettings;
+ private final UnaryCallSettings.Builder
+ updateGoogleChannelConfigSettings;
+ private final PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings.Builder getLocationSettings;
+ private final UnaryCallSettings.Builder setIamPolicySettings;
+ private final UnaryCallSettings.Builder getIamPolicySettings;
+ private final UnaryCallSettings.Builder
+ testIamPermissionsSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -773,6 +909,13 @@ protected Builder(ClientContext clientContext) {
createChannelConnectionOperationSettings = OperationCallSettings.newBuilder();
deleteChannelConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteChannelConnectionOperationSettings = OperationCallSettings.newBuilder();
+ getGoogleChannelConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateGoogleChannelConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
+ getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -791,7 +934,14 @@ protected Builder(ClientContext clientContext) {
getChannelConnectionSettings,
listChannelConnectionsSettings,
createChannelConnectionSettings,
- deleteChannelConnectionSettings);
+ deleteChannelConnectionSettings,
+ getGoogleChannelConfigSettings,
+ updateGoogleChannelConfigSettings,
+ listLocationsSettings,
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
initDefaults(this);
}
@@ -824,6 +974,13 @@ protected Builder(EventarcStubSettings settings) {
deleteChannelConnectionSettings = settings.deleteChannelConnectionSettings.toBuilder();
deleteChannelConnectionOperationSettings =
settings.deleteChannelConnectionOperationSettings.toBuilder();
+ getGoogleChannelConfigSettings = settings.getGoogleChannelConfigSettings.toBuilder();
+ updateGoogleChannelConfigSettings = settings.updateGoogleChannelConfigSettings.toBuilder();
+ listLocationsSettings = settings.listLocationsSettings.toBuilder();
+ getLocationSettings = settings.getLocationSettings.toBuilder();
+ setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
+ getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
+ testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -842,7 +999,14 @@ protected Builder(EventarcStubSettings settings) {
getChannelConnectionSettings,
listChannelConnectionsSettings,
createChannelConnectionSettings,
- deleteChannelConnectionSettings);
+ deleteChannelConnectionSettings,
+ getGoogleChannelConfigSettings,
+ updateGoogleChannelConfigSettings,
+ listLocationsSettings,
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
}
private static Builder createDefault() {
@@ -952,6 +1116,41 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ builder
+ .getGoogleChannelConfigSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .updateGoogleChannelConfigSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listLocationsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getLocationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .setIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .testIamPermissionsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.createTriggerOperationSettings()
.setInitialCallSettings(
@@ -1321,6 +1520,46 @@ public UnaryCallSettings.Builder getProviderSettin
return deleteChannelConnectionOperationSettings;
}
+ /** Returns the builder for the settings used for calls to getGoogleChannelConfig. */
+ public UnaryCallSettings.Builder
+ getGoogleChannelConfigSettings() {
+ return getGoogleChannelConfigSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateGoogleChannelConfig. */
+ public UnaryCallSettings.Builder
+ updateGoogleChannelConfigSettings() {
+ return updateGoogleChannelConfigSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getLocationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return setIamPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getIamPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return testIamPermissionsSettings;
+ }
+
@Override
public EventarcStubSettings build() throws IOException {
return new EventarcStubSettings(this);
diff --git a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/GrpcEventarcStub.java b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/GrpcEventarcStub.java
index 29a898aefd5d..907248b7ea27 100644
--- a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/GrpcEventarcStub.java
+++ b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/GrpcEventarcStub.java
@@ -18,6 +18,7 @@
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelConnectionsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelsPagedResponse;
+import static com.google.cloud.eventarc.v1.EventarcClient.ListLocationsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListProvidersPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListTriggersPagedResponse;
@@ -38,8 +39,10 @@
import com.google.cloud.eventarc.v1.DeleteTriggerRequest;
import com.google.cloud.eventarc.v1.GetChannelConnectionRequest;
import com.google.cloud.eventarc.v1.GetChannelRequest;
+import com.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest;
import com.google.cloud.eventarc.v1.GetProviderRequest;
import com.google.cloud.eventarc.v1.GetTriggerRequest;
+import com.google.cloud.eventarc.v1.GoogleChannelConfig;
import com.google.cloud.eventarc.v1.ListChannelConnectionsRequest;
import com.google.cloud.eventarc.v1.ListChannelConnectionsResponse;
import com.google.cloud.eventarc.v1.ListChannelsRequest;
@@ -52,8 +55,18 @@
import com.google.cloud.eventarc.v1.Provider;
import com.google.cloud.eventarc.v1.Trigger;
import com.google.cloud.eventarc.v1.UpdateChannelRequest;
+import com.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest;
import com.google.cloud.eventarc.v1.UpdateTriggerRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableMap;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import io.grpc.MethodDescriptor;
@@ -228,6 +241,74 @@ public class GrpcEventarcStub extends EventarcStub {
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ getGoogleChannelConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.eventarc.v1.Eventarc/GetGoogleChannelConfig")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetGoogleChannelConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(GoogleChannelConfig.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateGoogleChannelConfigMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.eventarc.v1.Eventarc/UpdateGoogleChannelConfig")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateGoogleChannelConfigRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(GoogleChannelConfig.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listLocationsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getLocationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor setIamPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy")
+ .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getIamPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ testIamPermissionsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
+ .build();
+
private final UnaryCallable getTriggerCallable;
private final UnaryCallable listTriggersCallable;
private final UnaryCallable
@@ -274,6 +355,18 @@ public class GrpcEventarcStub extends EventarcStub {
private final OperationCallable<
DeleteChannelConnectionRequest, ChannelConnection, OperationMetadata>
deleteChannelConnectionOperationCallable;
+ private final UnaryCallable
+ getGoogleChannelConfigCallable;
+ private final UnaryCallable
+ updateGoogleChannelConfigCallable;
+ private final UnaryCallable listLocationsCallable;
+ private final UnaryCallable
+ listLocationsPagedCallable;
+ private final UnaryCallable getLocationCallable;
+ private final UnaryCallable setIamPolicyCallable;
+ private final UnaryCallable getIamPolicyCallable;
+ private final UnaryCallable
+ testIamPermissionsCallable;
private final BackgroundResource backgroundResources;
private final GrpcOperationsStub operationsStub;
@@ -479,6 +572,81 @@ protected GrpcEventarcStub(
return params.build();
})
.build();
+ GrpcCallSettings
+ getGoogleChannelConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getGoogleChannelConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ updateGoogleChannelConfigTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateGoogleChannelConfigMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put(
+ "google_channel_config.name",
+ String.valueOf(request.getGoogleChannelConfig().getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings listLocationsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listLocationsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getLocationTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getLocationMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings setIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ testIamPermissionsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
this.getTriggerCallable =
callableFactory.createUnaryCallable(
@@ -598,6 +766,36 @@ protected GrpcEventarcStub(
settings.deleteChannelConnectionOperationSettings(),
clientContext,
operationsStub);
+ this.getGoogleChannelConfigCallable =
+ callableFactory.createUnaryCallable(
+ getGoogleChannelConfigTransportSettings,
+ settings.getGoogleChannelConfigSettings(),
+ clientContext);
+ this.updateGoogleChannelConfigCallable =
+ callableFactory.createUnaryCallable(
+ updateGoogleChannelConfigTransportSettings,
+ settings.updateGoogleChannelConfigSettings(),
+ clientContext);
+ this.listLocationsCallable =
+ callableFactory.createUnaryCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.listLocationsPagedCallable =
+ callableFactory.createPagedCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.getLocationCallable =
+ callableFactory.createUnaryCallable(
+ getLocationTransportSettings, settings.getLocationSettings(), clientContext);
+ this.setIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);
+ this.getIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
+ this.testIamPermissionsCallable =
+ callableFactory.createUnaryCallable(
+ testIamPermissionsTransportSettings,
+ settings.testIamPermissionsSettings(),
+ clientContext);
this.backgroundResources =
new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -761,6 +959,50 @@ public UnaryCallable listProvidersC
return deleteChannelConnectionOperationCallable;
}
+ @Override
+ public UnaryCallable
+ getGoogleChannelConfigCallable() {
+ return getGoogleChannelConfigCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ updateGoogleChannelConfigCallable() {
+ return updateGoogleChannelConfigCallable;
+ }
+
+ @Override
+ public UnaryCallable listLocationsCallable() {
+ return listLocationsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ return listLocationsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getLocationCallable() {
+ return getLocationCallable;
+ }
+
+ @Override
+ public UnaryCallable setIamPolicyCallable() {
+ return setIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable getIamPolicyCallable() {
+ return getIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ return testIamPermissionsCallable;
+ }
+
@Override
public final void close() {
try {
diff --git a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/HttpJsonEventarcStub.java b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/HttpJsonEventarcStub.java
index d16f111d7004..c268fc5b7b07 100644
--- a/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/HttpJsonEventarcStub.java
+++ b/java-eventarc/google-cloud-eventarc/src/main/java/com/google/cloud/eventarc/v1/stub/HttpJsonEventarcStub.java
@@ -18,6 +18,7 @@
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelConnectionsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelsPagedResponse;
+import static com.google.cloud.eventarc.v1.EventarcClient.ListLocationsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListProvidersPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListTriggersPagedResponse;
@@ -46,8 +47,10 @@
import com.google.cloud.eventarc.v1.DeleteTriggerRequest;
import com.google.cloud.eventarc.v1.GetChannelConnectionRequest;
import com.google.cloud.eventarc.v1.GetChannelRequest;
+import com.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest;
import com.google.cloud.eventarc.v1.GetProviderRequest;
import com.google.cloud.eventarc.v1.GetTriggerRequest;
+import com.google.cloud.eventarc.v1.GoogleChannelConfig;
import com.google.cloud.eventarc.v1.ListChannelConnectionsRequest;
import com.google.cloud.eventarc.v1.ListChannelConnectionsResponse;
import com.google.cloud.eventarc.v1.ListChannelsRequest;
@@ -60,7 +63,17 @@
import com.google.cloud.eventarc.v1.Provider;
import com.google.cloud.eventarc.v1.Trigger;
import com.google.cloud.eventarc.v1.UpdateChannelRequest;
+import com.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest;
import com.google.cloud.eventarc.v1.UpdateTriggerRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.TypeRegistry;
import java.io.IOException;
@@ -142,6 +155,7 @@ public class HttpJsonEventarcStub extends EventarcStub {
Map> fields = new HashMap<>();
ProtoRestSerializer serializer =
ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "filter", request.getFilter());
serializer.putQueryParam(fields, "orderBy", request.getOrderBy());
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
@@ -693,6 +707,262 @@ public class HttpJsonEventarcStub extends EventarcStub {
HttpJsonOperationSnapshot.create(response))
.build();
+ private static final ApiMethodDescriptor
+ getGoogleChannelConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.eventarc.v1.Eventarc/GetGoogleChannelConfig")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/googleChannelConfig}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(GoogleChannelConfig.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ updateGoogleChannelConfigMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.eventarc.v1.Eventarc/UpdateGoogleChannelConfig")
+ .setHttpMethod("PATCH")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{googleChannelConfig.name=projects/*/locations/*/googleChannelConfig}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(
+ fields,
+ "googleChannelConfig.name",
+ request.getGoogleChannelConfig().getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "googleChannelConfig",
+ request.getGoogleChannelConfig(),
+ false))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(GoogleChannelConfig.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ listLocationsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*}/locations",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListLocationsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getLocationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Location.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ setIamPolicyMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{resource=projects/*/locations/*/triggers/*}:setIamPolicy",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "resource", request.getResource());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{resource=projects/*/locations/*/channels/*}:setIamPolicy",
+ "/v1/{resource=projects/*/locations/*/channelConnections/*}:setIamPolicy")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("*", request.toBuilder().clearResource().build(), false))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Policy.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getIamPolicyMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{resource=projects/*/locations/*/triggers/*}:getIamPolicy",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "resource", request.getResource());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{resource=projects/*/locations/*/channels/*}:getIamPolicy",
+ "/v1/{resource=projects/*/locations/*/channelConnections/*}:getIamPolicy")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Policy.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ testIamPermissionsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{resource=projects/*/locations/*/triggers/*}:testIamPermissions",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "resource", request.getResource());
+ return fields;
+ })
+ .setAdditionalPaths(
+ "/v1/{resource=projects/*/locations/*/channels/*}:testIamPermissions",
+ "/v1/{resource=projects/*/locations/*/channelConnections/*}:testIamPermissions")
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("*", request.toBuilder().clearResource().build(), false))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
private final UnaryCallable getTriggerCallable;
private final UnaryCallable listTriggersCallable;
private final UnaryCallable
@@ -739,6 +1009,18 @@ public class HttpJsonEventarcStub extends EventarcStub {
private final OperationCallable<
DeleteChannelConnectionRequest, ChannelConnection, OperationMetadata>
deleteChannelConnectionOperationCallable;
+ private final UnaryCallable
+ getGoogleChannelConfigCallable;
+ private final UnaryCallable
+ updateGoogleChannelConfigCallable;
+ private final UnaryCallable listLocationsCallable;
+ private final UnaryCallable
+ listLocationsPagedCallable;
+ private final UnaryCallable getLocationCallable;
+ private final UnaryCallable setIamPolicyCallable;
+ private final UnaryCallable getIamPolicyCallable;
+ private final UnaryCallable
+ testIamPermissionsCallable;
private final BackgroundResource backgroundResources;
private final HttpJsonOperationsStub httpJsonOperationsStub;
@@ -870,6 +1152,45 @@ protected HttpJsonEventarcStub(
.setMethodDescriptor(deleteChannelConnectionMethodDescriptor)
.setTypeRegistry(typeRegistry)
.build();
+ HttpJsonCallSettings
+ getGoogleChannelConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getGoogleChannelConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ updateGoogleChannelConfigTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(updateGoogleChannelConfigMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ listLocationsTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(listLocationsMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings getLocationTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getLocationMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings setIamPolicyTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings getIamPolicyTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ testIamPermissionsTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
this.getTriggerCallable =
callableFactory.createUnaryCallable(
@@ -989,6 +1310,36 @@ protected HttpJsonEventarcStub(
settings.deleteChannelConnectionOperationSettings(),
clientContext,
httpJsonOperationsStub);
+ this.getGoogleChannelConfigCallable =
+ callableFactory.createUnaryCallable(
+ getGoogleChannelConfigTransportSettings,
+ settings.getGoogleChannelConfigSettings(),
+ clientContext);
+ this.updateGoogleChannelConfigCallable =
+ callableFactory.createUnaryCallable(
+ updateGoogleChannelConfigTransportSettings,
+ settings.updateGoogleChannelConfigSettings(),
+ clientContext);
+ this.listLocationsCallable =
+ callableFactory.createUnaryCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.listLocationsPagedCallable =
+ callableFactory.createPagedCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.getLocationCallable =
+ callableFactory.createUnaryCallable(
+ getLocationTransportSettings, settings.getLocationSettings(), clientContext);
+ this.setIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);
+ this.getIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
+ this.testIamPermissionsCallable =
+ callableFactory.createUnaryCallable(
+ testIamPermissionsTransportSettings,
+ settings.testIamPermissionsSettings(),
+ clientContext);
this.backgroundResources =
new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -1013,6 +1364,13 @@ public static List getMethodDescriptors() {
methodDescriptors.add(listChannelConnectionsMethodDescriptor);
methodDescriptors.add(createChannelConnectionMethodDescriptor);
methodDescriptors.add(deleteChannelConnectionMethodDescriptor);
+ methodDescriptors.add(getGoogleChannelConfigMethodDescriptor);
+ methodDescriptors.add(updateGoogleChannelConfigMethodDescriptor);
+ methodDescriptors.add(listLocationsMethodDescriptor);
+ methodDescriptors.add(getLocationMethodDescriptor);
+ methodDescriptors.add(setIamPolicyMethodDescriptor);
+ methodDescriptors.add(getIamPolicyMethodDescriptor);
+ methodDescriptors.add(testIamPermissionsMethodDescriptor);
return methodDescriptors;
}
@@ -1174,6 +1532,50 @@ public UnaryCallable listProvidersC
return deleteChannelConnectionOperationCallable;
}
+ @Override
+ public UnaryCallable
+ getGoogleChannelConfigCallable() {
+ return getGoogleChannelConfigCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ updateGoogleChannelConfigCallable() {
+ return updateGoogleChannelConfigCallable;
+ }
+
+ @Override
+ public UnaryCallable listLocationsCallable() {
+ return listLocationsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ return listLocationsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getLocationCallable() {
+ return getLocationCallable;
+ }
+
+ @Override
+ public UnaryCallable setIamPolicyCallable() {
+ return setIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable getIamPolicyCallable() {
+ return getIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ return testIamPermissionsCallable;
+ }
+
@Override
public final void close() {
try {
diff --git a/java-eventarc/google-cloud-eventarc/src/test/java/com/google/cloud/eventarc/v1/EventarcClientHttpJsonTest.java b/java-eventarc/google-cloud-eventarc/src/test/java/com/google/cloud/eventarc/v1/EventarcClientHttpJsonTest.java
index 752f2c4acb8e..af9056d0ab2e 100644
--- a/java-eventarc/google-cloud-eventarc/src/test/java/com/google/cloud/eventarc/v1/EventarcClientHttpJsonTest.java
+++ b/java-eventarc/google-cloud-eventarc/src/test/java/com/google/cloud/eventarc/v1/EventarcClientHttpJsonTest.java
@@ -18,6 +18,7 @@
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelConnectionsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListChannelsPagedResponse;
+import static com.google.cloud.eventarc.v1.EventarcClient.ListLocationsPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListProvidersPagedResponse;
import static com.google.cloud.eventarc.v1.EventarcClient.ListTriggersPagedResponse;
@@ -31,9 +32,22 @@
import com.google.api.gax.rpc.StatusCode;
import com.google.api.gax.rpc.testing.FakeStatusCode;
import com.google.cloud.eventarc.v1.stub.HttpJsonEventarcStub;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.Lists;
+import com.google.iam.v1.AuditConfig;
+import com.google.iam.v1.Binding;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.GetPolicyOptions;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Any;
+import com.google.protobuf.ByteString;
import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import java.io.IOException;
@@ -98,6 +112,7 @@ public void getTriggerTest() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap())
.setChannel("channel738950403")
+ .putAllConditions(new HashMap())
.setEtag("etag3123477")
.build();
mockService.addResponse(expectedResponse);
@@ -152,6 +167,7 @@ public void getTriggerTest2() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap())
.setChannel("channel738950403")
+ .putAllConditions(new HashMap())
.setEtag("etag3123477")
.build();
mockService.addResponse(expectedResponse);
@@ -306,6 +322,7 @@ public void createTriggerTest() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap())
.setChannel("channel738950403")
+ .putAllConditions(new HashMap())
.setEtag("etag3123477")
.build();
Operation resultOperation =
@@ -369,6 +386,7 @@ public void createTriggerTest2() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap())
.setChannel("channel738950403")
+ .putAllConditions(new HashMap())
.setEtag("etag3123477")
.build();
Operation resultOperation =
@@ -432,6 +450,7 @@ public void updateTriggerTest() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap())
.setChannel("channel738950403")
+ .putAllConditions(new HashMap())
.setEtag("etag3123477")
.build();
Operation resultOperation =
@@ -454,6 +473,7 @@ public void updateTriggerTest() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap())
.setChannel("channel738950403")
+ .putAllConditions(new HashMap())
.setEtag("etag3123477")
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
@@ -497,6 +517,7 @@ public void updateTriggerExceptionTest() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap())
.setChannel("channel738950403")
+ .putAllConditions(new HashMap())
.setEtag("etag3123477")
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
@@ -521,6 +542,7 @@ public void deleteTriggerTest() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap())
.setChannel("channel738950403")
+ .putAllConditions(new HashMap())
.setEtag("etag3123477")
.build();
Operation resultOperation =
@@ -582,6 +604,7 @@ public void deleteTriggerTest2() throws Exception {
.setTransport(Transport.newBuilder().build())
.putAllLabels(new HashMap