getLocationCallable() {
return stub.getLocationCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any 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 (ComplianceClient complianceClient = ComplianceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = complianceClient.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. Replaces any 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 (ComplianceClient complianceClient = ComplianceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = complianceClient.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 policy if 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 (ComplianceClient complianceClient = ComplianceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = complianceClient.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 policy if 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 (ComplianceClient complianceClient = ComplianceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = complianceClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (ComplianceClient complianceClient = ComplianceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = complianceClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (ComplianceClient complianceClient = ComplianceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * complianceClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceSettings.java
index 3e3a4beaa5..050afe24dd 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceSettings.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/ComplianceSettings.java
@@ -35,6 +35,11 @@
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.showcase.v1beta1.stub.ComplianceStubSettings;
import java.io.IOException;
import java.util.List;
@@ -141,6 +146,22 @@ public UnaryCallSettings getLocationSettings() {
return ((ComplianceStubSettings) getStubSettings()).getLocationSettings();
}
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((ComplianceStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((ComplianceStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((ComplianceStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final ComplianceSettings create(ComplianceStubSettings stub) throws IOException {
return new ComplianceSettings.Builder(stub.toBuilder()).build();
}
@@ -319,6 +340,22 @@ public UnaryCallSettings.Builder getLocationSettin
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 ComplianceSettings build() throws IOException {
return new ComplianceSettings(this);
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java
index 7eae457785..270edd3f81 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoClient.java
@@ -36,6 +36,11 @@
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
+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.showcase.v1beta1.stub.EchoStub;
import com.google.showcase.v1beta1.stub.EchoStubSettings;
@@ -957,6 +962,209 @@ public final UnaryCallable getLocationCallable() {
return stub.getLocationCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any 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 (EchoClient echoClient = EchoClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = echoClient.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. Replaces any 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 (EchoClient echoClient = EchoClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = echoClient.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 policy if 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 (EchoClient echoClient = EchoClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = echoClient.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 policy if 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 (EchoClient echoClient = EchoClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = echoClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (EchoClient echoClient = EchoClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = echoClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (EchoClient echoClient = EchoClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * echoClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoSettings.java
index dfac5477a8..7725d2cdd2 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoSettings.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/EchoSettings.java
@@ -40,6 +40,11 @@
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.showcase.v1beta1.stub.EchoStubSettings;
import java.io.IOException;
@@ -151,6 +156,22 @@ public UnaryCallSettings getLocationSettings() {
return ((EchoStubSettings) getStubSettings()).getLocationSettings();
}
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((EchoStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((EchoStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((EchoStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final EchoSettings create(EchoStubSettings stub) throws IOException {
return new EchoSettings.Builder(stub.toBuilder()).build();
}
@@ -335,6 +356,22 @@ public UnaryCallSettings.Builder getLocationSettin
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 EchoSettings build() throws IOException {
return new EchoSettings(this);
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentityClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentityClient.java
index e9d0a348b7..2641382e45 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentityClient.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentityClient.java
@@ -30,6 +30,11 @@
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
+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.protobuf.Empty;
import com.google.showcase.v1beta1.stub.IdentityStub;
import com.google.showcase.v1beta1.stub.IdentityStubSettings;
@@ -835,6 +840,209 @@ public final UnaryCallable getLocationCallable() {
return stub.getLocationCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any 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 (IdentityClient identityClient = IdentityClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = identityClient.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. Replaces any 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 (IdentityClient identityClient = IdentityClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = identityClient.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 policy if 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 (IdentityClient identityClient = IdentityClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = identityClient.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 policy if 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 (IdentityClient identityClient = IdentityClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = identityClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (IdentityClient identityClient = IdentityClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = identityClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (IdentityClient identityClient = IdentityClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * identityClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentitySettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentitySettings.java
index 0cf54dacbc..81d98ff0c1 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentitySettings.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/IdentitySettings.java
@@ -36,6 +36,11 @@
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.protobuf.Empty;
import com.google.showcase.v1beta1.stub.IdentityStubSettings;
import java.io.IOException;
@@ -119,6 +124,22 @@ public UnaryCallSettings getLocationSettings() {
return ((IdentityStubSettings) getStubSettings()).getLocationSettings();
}
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((IdentityStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((IdentityStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((IdentityStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final IdentitySettings create(IdentityStubSettings stub) throws IOException {
return new IdentitySettings.Builder(stub.toBuilder()).build();
}
@@ -271,6 +292,22 @@ public UnaryCallSettings.Builder getLocationSettin
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 IdentitySettings build() throws IOException {
return new IdentitySettings(this);
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingClient.java
index d2476e05ee..01e09e2257 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingClient.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingClient.java
@@ -36,6 +36,11 @@
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
+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.ByteString;
import com.google.protobuf.Empty;
@@ -2105,6 +2110,209 @@ public final UnaryCallable getLocationCallable() {
return stub.getLocationCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any 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 (MessagingClient messagingClient = MessagingClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = messagingClient.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. Replaces any 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 (MessagingClient messagingClient = MessagingClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = messagingClient.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 policy if 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 (MessagingClient messagingClient = MessagingClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = messagingClient.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 policy if 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 (MessagingClient messagingClient = MessagingClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = messagingClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (MessagingClient messagingClient = MessagingClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = messagingClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (MessagingClient messagingClient = MessagingClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * messagingClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingSettings.java
index 9b699b6e94..102ec93cd4 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingSettings.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/MessagingSettings.java
@@ -40,6 +40,11 @@
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.Empty;
import com.google.showcase.v1beta1.stub.MessagingStubSettings;
@@ -177,6 +182,22 @@ public UnaryCallSettings getLocationSettings() {
return ((MessagingStubSettings) getStubSettings()).getLocationSettings();
}
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((MessagingStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((MessagingStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((MessagingStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final MessagingSettings create(MessagingStubSettings stub) throws IOException {
return new MessagingSettings.Builder(stub.toBuilder()).build();
}
@@ -384,6 +405,22 @@ public UnaryCallSettings.Builder getLocationSettin
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 MessagingSettings build() throws IOException {
return new MessagingSettings(this);
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java
index 378bc855b3..54faf59462 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceClient.java
@@ -31,6 +31,11 @@
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
+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.protobuf.Empty;
import com.google.showcase.v1beta1.stub.SequenceServiceStub;
import com.google.showcase.v1beta1.stub.SequenceServiceStubSettings;
@@ -865,6 +870,209 @@ public final UnaryCallable getLocationCallable() {
return stub.getLocationCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any 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 (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = sequenceServiceClient.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. Replaces any 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 (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = sequenceServiceClient.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 policy if 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 (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = sequenceServiceClient.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 policy if 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 (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = sequenceServiceClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = sequenceServiceClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (SequenceServiceClient sequenceServiceClient = SequenceServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * sequenceServiceClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceSettings.java
index 4b1de81967..1d14057c11 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceSettings.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/SequenceServiceSettings.java
@@ -36,6 +36,11 @@
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.protobuf.Empty;
import com.google.showcase.v1beta1.stub.SequenceServiceStubSettings;
import java.io.IOException;
@@ -128,6 +133,22 @@ public UnaryCallSettings getLocationSettings() {
return ((SequenceServiceStubSettings) getStubSettings()).getLocationSettings();
}
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((SequenceServiceStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((SequenceServiceStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((SequenceServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final SequenceServiceSettings create(SequenceServiceStubSettings stub)
throws IOException {
return new SequenceServiceSettings.Builder(stub.toBuilder()).build();
@@ -290,6 +311,22 @@ public UnaryCallSettings.Builder getLocationSettin
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 SequenceServiceSettings build() throws IOException {
return new SequenceServiceSettings(this);
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingClient.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingClient.java
index a0cacc1455..acb13d6b68 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingClient.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingClient.java
@@ -30,6 +30,11 @@
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
+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.protobuf.Empty;
import com.google.showcase.v1beta1.stub.TestingStub;
import com.google.showcase.v1beta1.stub.TestingStubSettings;
@@ -866,6 +871,209 @@ public final UnaryCallable getLocationCallable() {
return stub.getLocationCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any 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 (TestingClient testingClient = TestingClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = testingClient.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. Replaces any 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 (TestingClient testingClient = TestingClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = testingClient.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 policy if 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 (TestingClient testingClient = TestingClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = testingClient.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 policy if 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 (TestingClient testingClient = TestingClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = testingClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (TestingClient testingClient = TestingClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = testingClient.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 the resource does not
+ * exist, this will return an empty set of permissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. 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 (TestingClient testingClient = TestingClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * testingClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingSettings.java
index 7fb5f25b5b..7c864ae4eb 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingSettings.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/TestingSettings.java
@@ -37,6 +37,11 @@
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.protobuf.Empty;
import com.google.showcase.v1beta1.stub.TestingStubSettings;
import java.io.IOException;
@@ -136,6 +141,22 @@ public UnaryCallSettings getLocationSettings() {
return ((TestingStubSettings) getStubSettings()).getLocationSettings();
}
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((TestingStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((TestingStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((TestingStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final TestingSettings create(TestingStubSettings stub) throws IOException {
return new TestingSettings.Builder(stub.toBuilder()).build();
}
@@ -306,6 +327,22 @@ public UnaryCallSettings.Builder getLocationSettin
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 TestingSettings build() throws IOException {
return new TestingSettings(this);
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json
index b79bfb905f..3d10c53f8d 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/gapic_metadata.json
@@ -13,6 +13,9 @@
"GetEnum": {
"methods": ["getEnum", "getEnumCallable"]
},
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicyCallable"]
+ },
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
@@ -43,6 +46,12 @@
"RepeatDataSimplePath": {
"methods": ["repeatDataSimplePath", "repeatDataSimplePathCallable"]
},
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
+ },
"VerifyEnum": {
"methods": ["verifyEnum", "verifyEnumCallable"]
}
@@ -70,6 +79,9 @@
"Expand": {
"methods": ["expandCallable"]
},
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicyCallable"]
+ },
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
@@ -85,6 +97,12 @@
"PagedExpandLegacyMapped": {
"methods": ["pagedExpandLegacyMapped", "pagedExpandLegacyMappedPagedCallable", "pagedExpandLegacyMappedCallable"]
},
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
+ },
"Wait": {
"methods": ["waitAsync", "waitOperationCallable", "waitCallable"]
}
@@ -103,6 +121,9 @@
"DeleteUser": {
"methods": ["deleteUser", "deleteUser", "deleteUser", "deleteUserCallable"]
},
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicyCallable"]
+ },
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
@@ -115,6 +136,12 @@
"ListUsers": {
"methods": ["listUsers", "listUsersPagedCallable", "listUsersCallable"]
},
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
+ },
"UpdateUser": {
"methods": ["updateUser", "updateUserCallable"]
}
@@ -145,6 +172,9 @@
"GetBlurb": {
"methods": ["getBlurb", "getBlurb", "getBlurb", "getBlurbCallable"]
},
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicyCallable"]
+ },
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
@@ -166,9 +196,15 @@
"SendBlurbs": {
"methods": ["sendBlurbsCallable"]
},
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
"StreamBlurbs": {
"methods": ["streamBlurbsCallable"]
},
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
+ },
"UpdateBlurb": {
"methods": ["updateBlurb", "updateBlurbCallable"]
},
@@ -196,6 +232,9 @@
"CreateStreamingSequence": {
"methods": ["createStreamingSequence", "createStreamingSequence", "createStreamingSequenceCallable"]
},
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicyCallable"]
+ },
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
@@ -207,6 +246,12 @@
},
"ListLocations": {
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ },
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
}
}
}
@@ -226,6 +271,9 @@
"DeleteTest": {
"methods": ["deleteTest", "deleteTestCallable"]
},
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicyCallable"]
+ },
"GetLocation": {
"methods": ["getLocation", "getLocationCallable"]
},
@@ -244,6 +292,12 @@
"ReportSession": {
"methods": ["reportSession", "reportSessionCallable"]
},
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
+ },
"VerifyTest": {
"methods": ["verifyTest", "verifyTestCallable"]
}
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStub.java
index 1ad896afb3..033e6024fc 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStub.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStub.java
@@ -25,6 +25,11 @@
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.showcase.v1beta1.EnumRequest;
import com.google.showcase.v1beta1.EnumResponse;
import com.google.showcase.v1beta1.RepeatRequest;
@@ -95,6 +100,19 @@ 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/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStubSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStubSettings.java
index 6cb3ac63de..2fb7b2745c 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStubSettings.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/ComplianceStubSettings.java
@@ -51,6 +51,11 @@
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.showcase.v1beta1.EnumRequest;
import com.google.showcase.v1beta1.EnumResponse;
import com.google.showcase.v1beta1.RepeatRequest;
@@ -117,6 +122,10 @@ public class ComplianceStubSettings extends StubSettings
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_LOCATIONS_PAGE_STR_DESC =
@@ -232,6 +241,22 @@ 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 ComplianceStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
@@ -351,6 +376,9 @@ protected ComplianceStubSettings(Builder settingsBuilder) throws IOException {
verifyEnumSettings = settingsBuilder.verifyEnumSettings().build();
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
getLocationSettings = settingsBuilder.getLocationSettings().build();
+ setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
+ getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
+ testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
}
/** Builder for ComplianceStubSettings. */
@@ -376,6 +404,10 @@ public static class Builder extends StubSettings.Builder
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;
@@ -415,6 +447,9 @@ protected Builder(ClientContext clientContext) {
verifyEnumSettings = 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(
@@ -429,7 +464,10 @@ protected Builder(ClientContext clientContext) {
getEnumSettings,
verifyEnumSettings,
listLocationsSettings,
- getLocationSettings);
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
initDefaults(this);
}
@@ -449,6 +487,9 @@ protected Builder(ComplianceStubSettings settings) {
verifyEnumSettings = settings.verifyEnumSettings.toBuilder();
listLocationsSettings = settings.listLocationsSettings.toBuilder();
getLocationSettings = settings.getLocationSettings.toBuilder();
+ setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
+ getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
+ testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -463,7 +504,10 @@ protected Builder(ComplianceStubSettings settings) {
getEnumSettings,
verifyEnumSettings,
listLocationsSettings,
- getLocationSettings);
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
}
private static Builder createDefault() {
@@ -553,6 +597,21 @@ private static Builder initDefaults(Builder builder) {
.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"));
+
return builder;
}
@@ -635,6 +694,22 @@ public UnaryCallSettings.Builder getLocationSettin
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 ComplianceStubSettings build() throws IOException {
return new ComplianceStubSettings(this);
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/EchoStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/EchoStub.java
index 04316a20cf..a2aca8c1a0 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/EchoStub.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/EchoStub.java
@@ -31,6 +31,11 @@
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 com.google.showcase.v1beta1.BlockRequest;
@@ -129,6 +134,19 @@ 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/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/EchoStubSettings.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/EchoStubSettings.java
index 8228740686..8e1d7bb5e2 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/EchoStubSettings.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/EchoStubSettings.java
@@ -59,6 +59,11 @@
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 com.google.showcase.v1beta1.BlockRequest;
import com.google.showcase.v1beta1.BlockResponse;
@@ -142,6 +147,10 @@ public class EchoStubSettings extends StubSettings {
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
private final UnaryCallSettings getLocationSettings;
+ private final UnaryCallSettings setIamPolicySettings;
+ private final UnaryCallSettings getIamPolicySettings;
+ private final UnaryCallSettings
+ testIamPermissionsSettings;
private static final PagedListDescriptor
PAGED_EXPAND_PAGE_STR_DESC =
@@ -381,6 +390,22 @@ 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 EchoStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
@@ -497,6 +522,9 @@ protected EchoStubSettings(Builder settingsBuilder) throws IOException {
blockSettings = settingsBuilder.blockSettings().build();
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
getLocationSettings = settingsBuilder.getLocationSettings().build();
+ setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
+ getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
+ testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
}
/** Builder for EchoStubSettings. */
@@ -524,6 +552,10 @@ public static class Builder extends StubSettings.Builder
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;
@@ -587,6 +619,9 @@ protected Builder(ClientContext clientContext) {
blockSettings = 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(
@@ -597,7 +632,10 @@ protected Builder(ClientContext clientContext) {
waitSettings,
blockSettings,
listLocationsSettings,
- getLocationSettings);
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
initDefaults(this);
}
@@ -616,6 +654,9 @@ protected Builder(EchoStubSettings settings) {
blockSettings = settings.blockSettings.toBuilder();
listLocationsSettings = settings.listLocationsSettings.toBuilder();
getLocationSettings = settings.getLocationSettings.toBuilder();
+ setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
+ getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
+ testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -626,7 +667,10 @@ protected Builder(EchoStubSettings settings) {
waitSettings,
blockSettings,
listLocationsSettings,
- getLocationSettings);
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
}
private static Builder createDefault() {
@@ -701,6 +745,21 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+ builder
+ .setIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+
+ builder
+ .getIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+
+ builder
+ .testIamPermissionsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params"));
+
builder
.waitOperationSettings()
.setInitialCallSettings(
@@ -814,6 +873,22 @@ public UnaryCallSettings.Builder getLocationSettin
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 EchoStubSettings build() throws IOException {
return new EchoStubSettings(this);
diff --git a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcComplianceStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcComplianceStub.java
index c6dcf25bf3..876e5f3eef 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcComplianceStub.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcComplianceStub.java
@@ -30,6 +30,11 @@
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.stub.GrpcOperationsStub;
import com.google.showcase.v1beta1.EnumRequest;
import com.google.showcase.v1beta1.EnumResponse;
@@ -159,6 +164,33 @@ public class GrpcComplianceStub extends ComplianceStub {
.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 repeatDataBodyCallable;
private final UnaryCallable repeatDataBodyInfoCallable;
private final UnaryCallable repeatDataQueryCallable;
@@ -173,6 +205,10 @@ public class GrpcComplianceStub extends ComplianceStub {
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;
@@ -306,6 +342,37 @@ protected GrpcComplianceStub(
return builder.build();
})
.build();
+ GrpcCallSettings setIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ testIamPermissionsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
this.repeatDataBodyCallable =
callableFactory.createUnaryCallable(
@@ -358,6 +425,17 @@ protected GrpcComplianceStub(
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());
@@ -433,6 +511,22 @@ 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/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java
index 36c6e630d5..fdaf681056 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java
@@ -37,6 +37,11 @@
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.GrpcOperationsStub;
import com.google.showcase.v1beta1.BlockRequest;
@@ -165,6 +170,33 @@ public class GrpcEchoStub extends EchoStub {
.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 echoCallable;
private final ServerStreamingCallable expandCallable;
private final ClientStreamingCallable collectCallable;
@@ -185,6 +217,10 @@ public class GrpcEchoStub extends EchoStub {
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;
@@ -309,6 +345,37 @@ protected GrpcEchoStub(
return builder.build();
})
.build();
+ GrpcCallSettings setIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ testIamPermissionsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
this.echoCallable =
callableFactory.createUnaryCallable(
@@ -361,6 +428,17 @@ protected GrpcEchoStub(
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());
@@ -448,6 +526,22 @@ 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/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcIdentityStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcIdentityStub.java
index 1e2c7c0b4c..facfb04c0d 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcIdentityStub.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcIdentityStub.java
@@ -31,6 +31,11 @@
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.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import com.google.showcase.v1beta1.CreateUserRequest;
@@ -116,6 +121,33 @@ public class GrpcIdentityStub extends IdentityStub {
.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 createUserCallable;
private final UnaryCallable getUserCallable;
private final UnaryCallable updateUserCallable;
@@ -126,6 +158,10 @@ public class GrpcIdentityStub extends IdentityStub {
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;
@@ -224,6 +260,37 @@ protected GrpcIdentityStub(
return builder.build();
})
.build();
+ GrpcCallSettings setIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ testIamPermissionsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
this.createUserCallable =
callableFactory.createUnaryCallable(
@@ -252,6 +319,17 @@ protected GrpcIdentityStub(
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());
@@ -307,6 +385,22 @@ 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/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcMessagingStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcMessagingStub.java
index 52bc2b8c36..8846164182 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcMessagingStub.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcMessagingStub.java
@@ -36,6 +36,11 @@
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.GrpcOperationsStub;
import com.google.protobuf.Empty;
@@ -215,6 +220,33 @@ public class GrpcMessagingStub extends MessagingStub {
.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 createRoomCallable;
private final UnaryCallable getRoomCallable;
private final UnaryCallable updateRoomCallable;
@@ -238,6 +270,10 @@ public class GrpcMessagingStub extends MessagingStub {
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;
@@ -422,6 +458,37 @@ protected GrpcMessagingStub(
return builder.build();
})
.build();
+ GrpcCallSettings setIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ testIamPermissionsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("resource", String.valueOf(request.getResource()));
+ return builder.build();
+ })
+ .build();
this.createRoomCallable =
callableFactory.createUnaryCallable(
@@ -486,6 +553,17 @@ protected GrpcMessagingStub(
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());
@@ -597,6 +675,22 @@ 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/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java
index e2c47d1117..422fada24a 100644
--- a/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java
+++ b/showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java
@@ -31,6 +31,11 @@
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.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import com.google.showcase.v1beta1.AttemptSequenceRequest;
@@ -144,6 +149,33 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub {
.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