diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 8c982c5d4d..94dbb9e623 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -310,6 +310,13 @@ jobs:
-P enable-integration-tests \
--batch-mode \
--no-transfer-progress
+ - name: Showcase integration tests - Protobuf gen code 3.21.0
+ working-directory: java-showcase-3.21.0
+ run: |
+ mvn verify \
+ -P enable-integration-tests \
+ --batch-mode \
+ --no-transfer-progress
showcase:
runs-on: ubuntu-22.04
strategy:
diff --git a/java-showcase-3.21.0/README.md b/java-showcase-3.21.0/README.md
new file mode 100644
index 0000000000..736f5d1cf0
--- /dev/null
+++ b/java-showcase-3.21.0/README.md
@@ -0,0 +1,2 @@
+This is a copy of [GAPIC Showcase](https://github.com/googleapis/gapic-showcase) with protobuf 3.21.0 gen code.
+This is intended to test the compatibility between protobuf-java runtime v4.33.0 and gen code 3.21.0.
\ No newline at end of file
diff --git a/java-showcase-3.21.0/gapic-showcase-extended/proto/BUILD.bazel b/java-showcase-3.21.0/gapic-showcase-extended/proto/BUILD.bazel
new file mode 100644
index 0000000000..bc57596d1b
--- /dev/null
+++ b/java-showcase-3.21.0/gapic-showcase-extended/proto/BUILD.bazel
@@ -0,0 +1,34 @@
+# Copyright 2023 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""
+Provides proto_library target
+Exports grpc service config
+"""
+load ("@rules_proto//proto:defs.bzl", "proto_library")
+
+# This is an API workspace, having public visibility by default makes perfect sense.
+package(default_visibility = ["//visibility:public"])
+
+# This BUILD file is the framework for gapic-showcase-extended (an extension to the existing gapic-showcase)
+# It serves to augment the existing showcase project with generic protos not *yet* suited to the upstream project
+#
+# gapic-showcase project is used to test the generated client behavior with a showcase server
+# gapic-showcase-extension project is used to test the generator's behavior
+
+#proto_library(
+# name = "showcase_proto_extended",
+# srcs = [],
+# deps = []
+#)
\ No newline at end of file
diff --git a/java-showcase-3.21.0/gapic-showcase-extended/proto/wicked.proto b/java-showcase-3.21.0/gapic-showcase-extended/proto/wicked.proto
new file mode 100644
index 0000000000..ea45fee918
--- /dev/null
+++ b/java-showcase-3.21.0/gapic-showcase-extended/proto/wicked.proto
@@ -0,0 +1,49 @@
+// Copyright 2023 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+import "google/api/client.proto";
+
+package google.showcase.v1beta1;
+
+option go_package = "github.com/googleapis/gapic-showcase/server/genproto";
+option java_package = "com.google.showcase.v1beta1";
+option java_multiple_files = true;
+option ruby_package = "Google::Showcase::V1beta1";
+
+// This service is used to show a Service with either non-enabled or non-eligible
+// RPCs for HttpJson (Http 1.1).
+// Non-Enabled: Missing the (google.api.http) annotation to enabled it
+// Non-Eligible: BIDI and Client side streaming are not supported with Http 1.1
+// Service name is reference to `No REST for the Wicked`
+service Wicked {
+ // This service is meant to only run locally on the port 7469 (keypad digits
+ // for "show").
+ option (google.api.default_host) = "localhost:7469";
+
+ rpc CraftEvilPlan(EvilRequest) returns (EvilResponse);
+
+ rpc BrainstormEvilPlans(stream EvilRequest) returns (stream EvilResponse);
+
+ rpc PersuadeEvilPlan(stream EvilRequest) returns (EvilResponse);
+}
+
+message EvilRequest {
+ string malicious_idea = 1;
+}
+
+message EvilResponse {
+ string malicious_plan = 1;
+}
\ No newline at end of file
diff --git a/java-showcase-3.21.0/gapic-showcase/pom.xml b/java-showcase-3.21.0/gapic-showcase/pom.xml
new file mode 100644
index 0000000000..a9e4de22fe
--- /dev/null
+++ b/java-showcase-3.21.0/gapic-showcase/pom.xml
@@ -0,0 +1,366 @@
+
+
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataBody(request);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the ComplianceClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
RepeatDataBody |
+ * This method echoes the ComplianceData request. This method exercises sending the entire request object in the REST body. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
RepeatDataBodyInfo |
+ * This method echoes the ComplianceData request. This method exercises sending the a message-type field in the REST body. Per AIP-127, only top-level, non-repeated fields can be sent this way. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
RepeatDataQuery |
+ * This method echoes the ComplianceData request. This method exercises sending all request fields as query parameters. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
RepeatDataSimplePath |
+ * This method echoes the ComplianceData request. This method exercises sending some parameters as "simple" path variables (i.e., of the form "/bar/{foo}" rather than "/{foo=bar/*}"), and the rest as query parameters. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
RepeatDataPathResource |
+ * Same as RepeatDataSimplePath, but with a path resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
RepeatDataPathTrailingResource |
+ * Same as RepeatDataSimplePath, but with a trailing resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
RepeatDataBodyPut |
+ * This method echoes the ComplianceData request, using the HTTP PUT method. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
RepeatDataBodyPatch |
+ * This method echoes the ComplianceData request, using the HTTP PATCH method. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetEnum |
+ * This method requests an enum value from the server. Depending on the contents of EnumRequest, the enum value returned will be a known enum declared in the .proto file, or a made-up enum value the is unknown to the client. To verify that clients can round-trip unknown enum values they receive, use the response from this RPC as the request to VerifyEnum() + * The values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run (this is needed for VerifyEnum() to work) but are not guaranteed to be the same across separate Showcase server runs. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
VerifyEnum |
+ * This method is used to verify that clients can round-trip enum values, which is particularly important for unknown enum values over REST. VerifyEnum() verifies that its request, which is presumably the response that the client previously got to a GetEnum(), contains the correct data. If so, it responds with the same EnumResponse; otherwise, the RPC errors. + * This works because the values of enums sent by the server when a known or unknown value is requested will be the same within a single Showcase server run, although they are not guaranteed to be the same across separate Showcase server runs. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListLocations |
+ * Lists information about the supported locations for this service. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SetIamPolicy |
+ * Sets the access control policy on the specified resource. Replaces any existing policy. + * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetIamPolicy |
+ * Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
TestIamPermissions |
+ * 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. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of ComplianceSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@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
+ * ComplianceSettings complianceSettings =
+ * ComplianceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ComplianceClient complianceClient = ComplianceClient.create(complianceSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@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
+ * ComplianceSettings complianceSettings =
+ * ComplianceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ComplianceClient complianceClient = ComplianceClient.create(complianceSettings);
+ * }
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@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
+ * ComplianceSettings complianceSettings = ComplianceSettings.newHttpJsonBuilder().build();
+ * ComplianceClient complianceClient = ComplianceClient.create(complianceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ComplianceClient implements BackgroundResource { + private final ComplianceSettings settings; + private final ComplianceStub stub; + + /** Constructs an instance of ComplianceClient with default settings. */ + public static final ComplianceClient create() throws IOException { + return create(ComplianceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ComplianceClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ComplianceClient create(ComplianceSettings settings) throws IOException { + return new ComplianceClient(settings); + } + + /** + * Constructs an instance of ComplianceClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ComplianceSettings). + */ + public static final ComplianceClient create(ComplianceStub stub) { + return new ComplianceClient(stub); + } + + /** + * Constructs an instance of ComplianceClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected ComplianceClient(ComplianceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ComplianceStubSettings) settings.getStubSettings()).createStub(); + } + + protected ComplianceClient(ComplianceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ComplianceSettings getSettings() { + return settings; + } + + public ComplianceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method echoes the ComplianceData request. This method exercises sending the entire request + * object in the REST body. + * + *
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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataBody(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 RepeatResponse repeatDataBody(RepeatRequest request) {
+ return repeatDataBodyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method echoes the ComplianceData request. This method exercises sending the entire request
+ * object in the REST body.
+ *
+ * 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * ApiFuture future =
+ * complianceClient.repeatDataBodyCallable().futureCall(request);
+ * // Do something.
+ * RepeatResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataBodyInfo(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 RepeatResponse repeatDataBodyInfo(RepeatRequest request) {
+ return repeatDataBodyInfoCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method echoes the ComplianceData request. This method exercises sending the a message-type
+ * field in the REST body. Per AIP-127, only top-level, non-repeated fields can be sent this way.
+ *
+ * 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * ApiFuture future =
+ * complianceClient.repeatDataBodyInfoCallable().futureCall(request);
+ * // Do something.
+ * RepeatResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataQuery(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 RepeatResponse repeatDataQuery(RepeatRequest request) {
+ return repeatDataQueryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method echoes the ComplianceData request. This method exercises sending all request fields
+ * as query parameters.
+ *
+ * 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * ApiFuture future =
+ * complianceClient.repeatDataQueryCallable().futureCall(request);
+ * // Do something.
+ * RepeatResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataSimplePath(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 RepeatResponse repeatDataSimplePath(RepeatRequest request) {
+ return repeatDataSimplePathCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method echoes the ComplianceData request. This method exercises sending some parameters as
+ * "simple" path variables (i.e., of the form "/bar/{foo}" rather than "/{foo=bar/*}"), and
+ * the rest as query parameters.
+ *
+ * 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * ApiFuture future =
+ * complianceClient.repeatDataSimplePathCallable().futureCall(request);
+ * // Do something.
+ * RepeatResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataPathResource(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 RepeatResponse repeatDataPathResource(RepeatRequest request) {
+ return repeatDataPathResourceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Same as RepeatDataSimplePath, but with a path resource.
+ *
+ * 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * ApiFuture future =
+ * complianceClient.repeatDataPathResourceCallable().futureCall(request);
+ * // Do something.
+ * RepeatResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataPathTrailingResource(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 RepeatResponse repeatDataPathTrailingResource(RepeatRequest request) {
+ return repeatDataPathTrailingResourceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Same as RepeatDataSimplePath, but with a trailing resource.
+ *
+ * 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * ApiFuture future =
+ * complianceClient.repeatDataPathTrailingResourceCallable().futureCall(request);
+ * // Do something.
+ * RepeatResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataBodyPut(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 RepeatResponse repeatDataBodyPut(RepeatRequest request) {
+ return repeatDataBodyPutCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method echoes the ComplianceData request, using the HTTP PUT method.
+ *
+ * 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * ApiFuture future =
+ * complianceClient.repeatDataBodyPutCallable().futureCall(request);
+ * // Do something.
+ * RepeatResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * RepeatResponse response = complianceClient.repeatDataBodyPatch(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 RepeatResponse repeatDataBodyPatch(RepeatRequest request) {
+ return repeatDataBodyPatchCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method echoes the ComplianceData request, using the HTTP PATCH method.
+ *
+ * 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()) {
+ * RepeatRequest request =
+ * RepeatRequest.newBuilder()
+ * .setName("name3373707")
+ * .setInfo(ComplianceData.newBuilder().build())
+ * .setServerVerify(true)
+ * .setIntendedBindingUri("intendedBindingUri780142386")
+ * .setFInt32(-1143775883)
+ * .setFInt64(-1143775788)
+ * .setFDouble(-1239459382)
+ * .setPInt32(-858673665)
+ * .setPInt64(-858673570)
+ * .setPDouble(-991225216)
+ * .build();
+ * ApiFuture future =
+ * complianceClient.repeatDataBodyPatchCallable().futureCall(request);
+ * // Do something.
+ * RepeatResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe values of enums sent by the server when a known or unknown value is requested will be + * the same within a single Showcase server run (this is needed for VerifyEnum() to work) but are + * not guaranteed to be the same across separate Showcase server runs. + * + *
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()) {
+ * EnumRequest request = EnumRequest.newBuilder().setUnknownEnum(true).build();
+ * EnumResponse response = complianceClient.getEnum(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 EnumResponse getEnum(EnumRequest request) {
+ return getEnumCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method requests an enum value from the server. Depending on the contents of EnumRequest,
+ * the enum value returned will be a known enum declared in the .proto file, or a made-up enum
+ * value the is unknown to the client. To verify that clients can round-trip unknown enum values
+ * they receive, use the response from this RPC as the request to VerifyEnum()
+ *
+ * The values of enums sent by the server when a known or unknown value is requested will be + * the same within a single Showcase server run (this is needed for VerifyEnum() to work) but are + * not guaranteed to be the same across separate Showcase server runs. + * + *
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()) {
+ * EnumRequest request = EnumRequest.newBuilder().setUnknownEnum(true).build();
+ * ApiFuture future = complianceClient.getEnumCallable().futureCall(request);
+ * // Do something.
+ * EnumResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThis works because the values of enums sent by the server when a known or unknown value is + * requested will be the same within a single Showcase server run, although they are not + * guaranteed to be the same across separate Showcase server runs. + * + *
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()) {
+ * EnumResponse request =
+ * EnumResponse.newBuilder()
+ * .setRequest(EnumRequest.newBuilder().build())
+ * .setContinent(Continent.forNumber(0))
+ * .build();
+ * EnumResponse response = complianceClient.verifyEnum(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 EnumResponse verifyEnum(EnumResponse request) {
+ return verifyEnumCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method is used to verify that clients can round-trip enum values, which is particularly
+ * important for unknown enum values over REST. VerifyEnum() verifies that its request, which is
+ * presumably the response that the client previously got to a GetEnum(), contains the correct
+ * data. If so, it responds with the same EnumResponse; otherwise, the RPC errors.
+ *
+ * This works because the values of enums sent by the server when a known or unknown value is + * requested will be the same within a single Showcase server run, although they are not + * guaranteed to be the same across separate Showcase server runs. + * + *
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()) {
+ * EnumResponse request =
+ * EnumResponse.newBuilder()
+ * .setRequest(EnumRequest.newBuilder().build())
+ * .setContinent(Continent.forNumber(0))
+ * .build();
+ * ApiFuture future = complianceClient.verifyEnumCallable().futureCall(request);
+ * // Do something.
+ * EnumResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : complianceClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ComplianceClient complianceClient = ComplianceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * complianceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = complianceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = complianceClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ComplianceClient complianceClient = ComplianceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = complianceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableCan 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.ofRoomBlurbName("[ROOM]", "[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.ofRoomBlurbName("[ROOM]", "[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 UnaryCallableSample 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.ofRoomBlurbName("[ROOM]", "[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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = complianceClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableNote: 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.ofRoomBlurbName("[ROOM]", "[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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * complianceClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of repeatDataBody: + * + *
{@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
+ * ComplianceSettings.Builder complianceSettingsBuilder = ComplianceSettings.newBuilder();
+ * complianceSettingsBuilder
+ * .repeatDataBodySettings()
+ * .setRetrySettings(
+ * complianceSettingsBuilder
+ * .repeatDataBodySettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ComplianceSettings complianceSettings = complianceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class ComplianceSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the EchoClient object to clean up resources such as
+ * threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * Echo This method simply echoes the request. This method showcases unary RPCs. Request object method variants only take one parameter, a request object, which must be constructed before the call. echo(EchoRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. echoCallable()
+ * EchoErrorDetails This method returns error details in a repeated "google.protobuf.Any" field. This method showcases handling errors thus encoded, particularly over REST transport. Note that GAPICs only allow the type "google.protobuf.Any" for field paths ending in "error.details", and, at run-time, the actual types for these fields must be one of the types in google/rpc/error_details.proto. Request object method variants only take one parameter, a request object, which must be constructed before the call. echoErrorDetails(EchoErrorDetailsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. echoErrorDetailsCallable()
+ * FailEchoWithDetails This method always fails with a gRPC "Aborted" error status that contains multiple error details. These include one instance of each of the standard ones in error_details.proto (https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto) plus a custom, Showcase-defined PoetryError. The intent of this RPC is to verify that GAPICs can process these various error details and surface them to the user in an idiomatic form. Request object method variants only take one parameter, a request object, which must be constructed before the call. failEchoWithDetails(FailEchoWithDetailsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. failEchoWithDetailsCallable()
+ * Expand This method splits the given content into words and will pass each word back through the stream. This method showcases server-side streaming RPCs. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. expandCallable()
+ * Collect This method will collect the words given to it. When the stream is closed by the client, this method will return the a concatenation of the strings passed to it. This method showcases client-side streaming RPCs. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. collectCallable()
+ * Chat This method, upon receiving a request on the stream, will pass the same content back on the stream. This method showcases bidirectional streaming RPCs. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. chatCallable()
+ * PagedExpand This is similar to the Expand method but instead of returning a stream of expanded words, this method returns a paged list of expanded words. Request object method variants only take one parameter, a request object, which must be constructed before the call. pagedExpand(PagedExpandRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. pagedExpandPagedCallable()
+ * pagedExpandCallable()
+ * PagedExpandLegacy This is similar to the PagedExpand except that it uses max_results instead of page_size, as some legacy APIs still do. New APIs should NOT use this pattern. Request object method variants only take one parameter, a request object, which must be constructed before the call. pagedExpandLegacy(PagedExpandLegacyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. pagedExpandLegacyCallable()
+ * PagedExpandLegacyMapped This method returns a map containing lists of words that appear in the input, keyed by their initial character. The only words returned are the ones included in the current page, as determined by page_token and page_size, which both refer to the word indices in the input. This paging result consisting of a map of lists is a pattern used by some legacy APIs. New APIs should NOT use this pattern. Request object method variants only take one parameter, a request object, which must be constructed before the call. pagedExpandLegacyMapped(PagedExpandRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. pagedExpandLegacyMappedPagedCallable()
+ * pagedExpandLegacyMappedCallable()
+ * Wait This method will wait for the requested amount of time and then return. This method showcases how a client handles a request timeout. Request object method variants only take one parameter, a request object, which must be constructed before the call. waitAsync(WaitRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. waitOperationCallable()
+ * waitCallable()
+ * Block This method will block (wait) for the requested amount of time and then return the response or error. This method showcases how a client handles delays or retries. Request object method variants only take one parameter, a request object, which must be constructed before the call. block(BlockRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. blockCallable()
+ * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * SetIamPolicy Sets the access control policy on the specified resource. Replaces any existing policy.
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * GetIamPolicy Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * TestIamPermissions 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. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of EchoSettings to create(). For
+ * example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class EchoClient implements BackgroundResource {
+ private final EchoSettings settings;
+ private final EchoStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of EchoClient with default settings. */
+ public static final EchoClient create() throws IOException {
+ return create(EchoSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of EchoClient, using the given settings. The channels are created based
+ * on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final EchoClient create(EchoSettings settings) throws IOException {
+ return new EchoClient(settings);
+ }
+
+ /**
+ * Constructs an instance of EchoClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(EchoSettings).
+ */
+ public static final EchoClient create(EchoStub stub) {
+ return new EchoClient(stub);
+ }
+
+ /**
+ * Constructs an instance of EchoClient, using the given settings. This is protected so that it is
+ * easy to make a subclass, but otherwise, the static factory methods should be preferred.
+ */
+ protected EchoClient(EchoSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((EchoStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected EchoClient(EchoStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ public final EchoSettings getSettings() {
+ return settings;
+ }
+
+ public EchoStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method simply echoes the request. This method showcases unary RPCs.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of echo:
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for wait:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the IdentityClient object to clean up resources such as
+ * threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * CreateUser Creates a user. Request object method variants only take one parameter, a request object, which must be constructed before the call. createUser(CreateUserRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createUser(String displayName, String email)
+ * createUser(String displayName, String email, int age, String nickname, boolean enableNotifications, double heightFeet)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createUserCallable()
+ * GetUser Retrieves the User with the given uri. Request object method variants only take one parameter, a request object, which must be constructed before the call. getUser(GetUserRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getUser(UserName name)
+ * getUser(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getUserCallable()
+ * UpdateUser Updates a user. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateUser(UpdateUserRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateUserCallable()
+ * DeleteUser Deletes a user, their profile, and all of their authored messages. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteUser(DeleteUserRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteUser(UserName name)
+ * deleteUser(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteUserCallable()
+ * ListUsers Lists all users. Request object method variants only take one parameter, a request object, which must be constructed before the call. listUsers(ListUsersRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listUsersPagedCallable()
+ * listUsersCallable()
+ * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * SetIamPolicy Sets the access control policy on the specified resource. Replaces any existing policy.
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * GetIamPolicy Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * TestIamPermissions 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. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of IdentitySettings to create().
+ * For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class IdentityClient implements BackgroundResource {
+ private final IdentitySettings settings;
+ private final IdentityStub stub;
+
+ /** Constructs an instance of IdentityClient with default settings. */
+ public static final IdentityClient create() throws IOException {
+ return create(IdentitySettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of IdentityClient, using the given settings. The channels are created
+ * based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final IdentityClient create(IdentitySettings settings) throws IOException {
+ return new IdentityClient(settings);
+ }
+
+ /**
+ * Constructs an instance of IdentityClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(IdentitySettings).
+ */
+ public static final IdentityClient create(IdentityStub stub) {
+ return new IdentityClient(stub);
+ }
+
+ /**
+ * Constructs an instance of IdentityClient, using the given settings. This is protected so that
+ * it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
+ */
+ protected IdentityClient(IdentitySettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((IdentityStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected IdentityClient(IdentityStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final IdentitySettings getSettings() {
+ return settings;
+ }
+
+ public IdentityStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * (-- aip.dev/not-precedent: An empty string is a valid nickname. Ordinarily,
+ * proto3_optional should not be used on a `string` field. --)
+ * @param enableNotifications Enables the receiving of notifications. The default is true if
+ * unset.
+ * (-- aip.dev/not-precedent: The default for the feature is true. Ordinarily, the default
+ * for a `bool` field should be false. --)
+ * @param heightFeet The height of the user in feet.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final User createUser(
+ String displayName,
+ String email,
+ int age,
+ String nickname,
+ boolean enableNotifications,
+ double heightFeet) {
+ CreateUserRequest request =
+ CreateUserRequest.newBuilder()
+ .setUser(
+ User.newBuilder()
+ .setDisplayName(displayName)
+ .setEmail(email)
+ .setAge(age)
+ .setNickname(nickname)
+ .setEnableNotifications(enableNotifications)
+ .setHeightFeet(heightFeet)
+ .build())
+ .build();
+ return createUser(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of createUser:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This messaging service showcases the features that API clients generated by gapic-generators
+ * implement.
+ *
+ * This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the MessagingClient object to clean up resources such as
+ * threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * CreateRoom Creates a room. Request object method variants only take one parameter, a request object, which must be constructed before the call. createRoom(CreateRoomRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createRoom(String displayName, String description)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createRoomCallable()
+ * GetRoom Retrieves the Room with the given resource name. Request object method variants only take one parameter, a request object, which must be constructed before the call. getRoom(GetRoomRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getRoom(RoomName name)
+ * getRoom(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getRoomCallable()
+ * UpdateRoom Updates a room. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateRoom(UpdateRoomRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateRoomCallable()
+ * DeleteRoom Deletes a room and all of its blurbs. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteRoom(DeleteRoomRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteRoom(RoomName name)
+ * deleteRoom(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteRoomCallable()
+ * ListRooms Lists all chat rooms. Request object method variants only take one parameter, a request object, which must be constructed before the call. listRooms(ListRoomsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listRoomsPagedCallable()
+ * listRoomsCallable()
+ * CreateBlurb Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room. If the parent is a profile, the blurb is understood to be a post on the profile. Request object method variants only take one parameter, a request object, which must be constructed before the call. createBlurb(CreateBlurbRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createBlurb(ProfileName parent, UserName user, ByteString image)
+ * createBlurb(ProfileName parent, UserName user, String text)
+ * createBlurb(ProfileName parent, String user, ByteString image)
+ * createBlurb(ProfileName parent, String user, String text)
+ * createBlurb(RoomName parent, UserName user, ByteString image)
+ * createBlurb(RoomName parent, UserName user, String text)
+ * createBlurb(RoomName parent, String user, ByteString image)
+ * createBlurb(RoomName parent, String user, String text)
+ * createBlurb(String parent, UserName user, ByteString image)
+ * createBlurb(String parent, UserName user, String text)
+ * createBlurb(String parent, String user, ByteString image)
+ * createBlurb(String parent, String user, String text)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createBlurbCallable()
+ * GetBlurb Retrieves the Blurb with the given resource name. Request object method variants only take one parameter, a request object, which must be constructed before the call. getBlurb(GetBlurbRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getBlurb(BlurbName name)
+ * getBlurb(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getBlurbCallable()
+ * UpdateBlurb Updates a blurb. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateBlurb(UpdateBlurbRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateBlurbCallable()
+ * DeleteBlurb Deletes a blurb. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteBlurb(DeleteBlurbRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteBlurb(BlurbName name)
+ * deleteBlurb(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteBlurbCallable()
+ * ListBlurbs Lists blurbs for a specific chat room or user profile depending on the parent resource name. Request object method variants only take one parameter, a request object, which must be constructed before the call. listBlurbs(ListBlurbsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listBlurbs(ProfileName parent)
+ * listBlurbs(RoomName parent)
+ * listBlurbs(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listBlurbsPagedCallable()
+ * listBlurbsCallable()
+ * SearchBlurbs This method searches through all blurbs across all rooms and profiles for blurbs containing to words found in the query. Only posts that contain an exact match of a queried word will be returned. Request object method variants only take one parameter, a request object, which must be constructed before the call. searchBlurbsAsync(SearchBlurbsRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. searchBlurbsAsync(ProfileName parent, String query)
+ * searchBlurbsAsync(RoomName parent, String query)
+ * searchBlurbsAsync(String parent, String query)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. searchBlurbsOperationCallable()
+ * searchBlurbsCallable()
+ * StreamBlurbs This returns a stream that emits the blurbs that are created for a particular chat room or user profile. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. streamBlurbsCallable()
+ * SendBlurbs This is a stream to create multiple blurbs. If an invalid blurb is requested to be created, the stream will close with an error. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. sendBlurbsCallable()
+ * Connect This method starts a bidirectional stream that receives all blurbs that are being created after the stream has started and sends requests to create blurbs. If an invalid blurb is requested to be created, the stream will close with an error. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. connectCallable()
+ * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * SetIamPolicy Sets the access control policy on the specified resource. Replaces any existing policy.
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * GetIamPolicy Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * TestIamPermissions 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. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of MessagingSettings to create().
+ * For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class MessagingClient implements BackgroundResource {
+ private final MessagingSettings settings;
+ private final MessagingStub stub;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
+
+ /** Constructs an instance of MessagingClient with default settings. */
+ public static final MessagingClient create() throws IOException {
+ return create(MessagingSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of MessagingClient, using the given settings. The channels are created
+ * based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final MessagingClient create(MessagingSettings settings) throws IOException {
+ return new MessagingClient(settings);
+ }
+
+ /**
+ * Constructs an instance of MessagingClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(MessagingSettings).
+ */
+ public static final MessagingClient create(MessagingStub stub) {
+ return new MessagingClient(stub);
+ }
+
+ /**
+ * Constructs an instance of MessagingClient, using the given settings. This is protected so that
+ * it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
+ */
+ protected MessagingClient(MessagingSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((MessagingStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ protected MessagingClient(MessagingStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
+ }
+
+ public final MessagingSettings getSettings() {
+ return settings;
+ }
+
+ public MessagingStub getStub() {
+ return stub;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ /**
+ * Returns the OperationsClient that can be used to query the status of a long-running operation
+ * returned by another API method call.
+ */
+ @BetaApi
+ public final OperationsClient getHttpJsonOperationsClient() {
+ return httpJsonOperationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a room.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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:
+ *
+ * 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()) {
+ * EchoRequest request =
+ * EchoRequest.newBuilder()
+ * .setSeverity(Severity.forNumber(0))
+ * .setHeader("header-1221270899")
+ * .setOtherHeader("otherHeader-2026585667")
+ * .setRequestId("requestId693933066")
+ * .setOtherRequestId("otherRequestId1248995034")
+ * .build();
+ * EchoResponse response = echoClient.echo(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * EchoSettings echoSettings =
+ * EchoSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * EchoClient echoClient = EchoClient.create(echoSettings);
+ * }
+ *
+ * {@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
+ * EchoSettings echoSettings = EchoSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * EchoClient echoClient = EchoClient.create(echoSettings);
+ * }
+ *
+ * {@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
+ * EchoSettings echoSettings = EchoSettings.newHttpJsonBuilder().build();
+ * EchoClient echoClient = EchoClient.create(echoSettings);
+ * }
+ *
+ * {@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()) {
+ * EchoRequest request =
+ * EchoRequest.newBuilder()
+ * .setSeverity(Severity.forNumber(0))
+ * .setHeader("header-1221270899")
+ * .setOtherHeader("otherHeader-2026585667")
+ * .setRequestId("requestId693933066")
+ * .setOtherRequestId("otherRequestId1248995034")
+ * .build();
+ * EchoResponse response = echoClient.echo(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 EchoResponse echo(EchoRequest request) {
+ return echoCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method simply echoes the request. This method showcases unary RPCs.
+ *
+ * {@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()) {
+ * EchoRequest request =
+ * EchoRequest.newBuilder()
+ * .setSeverity(Severity.forNumber(0))
+ * .setHeader("header-1221270899")
+ * .setOtherHeader("otherHeader-2026585667")
+ * .setRequestId("requestId693933066")
+ * .setOtherRequestId("otherRequestId1248995034")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * EchoErrorDetailsRequest request =
+ * EchoErrorDetailsRequest.newBuilder()
+ * .setSingleDetailText("singleDetailText1774380934")
+ * .addAllMultiDetailText(new ArrayList
+ *
+ * @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 EchoErrorDetailsResponse echoErrorDetails(EchoErrorDetailsRequest request) {
+ return echoErrorDetailsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method returns error details in a repeated "google.protobuf.Any" field. This method
+ * showcases handling errors thus encoded, particularly over REST transport. Note that GAPICs only
+ * allow the type "google.protobuf.Any" for field paths ending in "error.details", and, at
+ * run-time, the actual types for these fields must be one of the types in
+ * google/rpc/error_details.proto.
+ *
+ * {@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()) {
+ * EchoErrorDetailsRequest request =
+ * EchoErrorDetailsRequest.newBuilder()
+ * .setSingleDetailText("singleDetailText1774380934")
+ * .addAllMultiDetailText(new ArrayList
+ */
+ public final UnaryCallable{@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()) {
+ * FailEchoWithDetailsRequest request =
+ * FailEchoWithDetailsRequest.newBuilder().setMessage("message954925063").build();
+ * FailEchoWithDetailsResponse response = echoClient.failEchoWithDetails(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 FailEchoWithDetailsResponse failEchoWithDetails(FailEchoWithDetailsRequest request) {
+ return failEchoWithDetailsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method always fails with a gRPC "Aborted" error status that contains multiple error
+ * details. These include one instance of each of the standard ones in error_details.proto
+ * (https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto) plus a
+ * custom, Showcase-defined PoetryError. The intent of this RPC is to verify that GAPICs can
+ * process these various error details and surface them to the user in an idiomatic form.
+ *
+ * {@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()) {
+ * FailEchoWithDetailsRequest request =
+ * FailEchoWithDetailsRequest.newBuilder().setMessage("message954925063").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ExpandRequest request =
+ * ExpandRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setError(Status.newBuilder().build())
+ * .setStreamWaitTime(Duration.newBuilder().build())
+ * .build();
+ * ServerStream
+ */
+ public final ServerStreamingCallable{@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()) {
+ * ApiStreamObserver
+ */
+ public final ClientStreamingCallable{@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()) {
+ * BidiStream
+ */
+ public final BidiStreamingCallable{@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()) {
+ * PagedExpandRequest request =
+ * PagedExpandRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (EchoResponse element : echoClient.pagedExpand(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PagedExpandPagedResponse pagedExpand(PagedExpandRequest request) {
+ return pagedExpandPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This is similar to the Expand method but instead of returning a stream of expanded words, this
+ * method returns a paged list of expanded words.
+ *
+ * {@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()) {
+ * PagedExpandRequest request =
+ * PagedExpandRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * PagedExpandRequest request =
+ * PagedExpandRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * PagedExpandResponse response = echoClient.pagedExpandCallable().call(request);
+ * for (EchoResponse element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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()) {
+ * PagedExpandLegacyRequest request =
+ * PagedExpandLegacyRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setMaxResults(1128457243)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * PagedExpandResponse response = echoClient.pagedExpandLegacy(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 PagedExpandResponse pagedExpandLegacy(PagedExpandLegacyRequest request) {
+ return pagedExpandLegacyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This is similar to the PagedExpand except that it uses max_results instead of page_size, as
+ * some legacy APIs still do. New APIs should NOT use this pattern.
+ *
+ * {@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()) {
+ * PagedExpandLegacyRequest request =
+ * PagedExpandLegacyRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setMaxResults(1128457243)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * PagedExpandRequest request =
+ * PagedExpandRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Map.Entry
+ *
+ * @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 PagedExpandLegacyMappedPagedResponse pagedExpandLegacyMapped(
+ PagedExpandRequest request) {
+ return pagedExpandLegacyMappedPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method returns a map containing lists of words that appear in the input, keyed by their
+ * initial character. The only words returned are the ones included in the current page, as
+ * determined by page_token and page_size, which both refer to the word indices in the input. This
+ * paging result consisting of a map of lists is a pattern used by some legacy APIs. New APIs
+ * should NOT use this pattern.
+ *
+ * {@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()) {
+ * PagedExpandRequest request =
+ * PagedExpandRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * PagedExpandRequest request =
+ * PagedExpandRequest.newBuilder()
+ * .setContent("content951530617")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * PagedExpandLegacyMappedResponse response =
+ * echoClient.pagedExpandLegacyMappedCallable().call(request);
+ * for (Map.Entry
+ */
+ public final UnaryCallable{@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()) {
+ * WaitRequest request = WaitRequest.newBuilder().build();
+ * WaitResponse response = echoClient.waitAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFuture{@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()) {
+ * WaitRequest request = WaitRequest.newBuilder().build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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()) {
+ * WaitRequest request = WaitRequest.newBuilder().build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * BlockRequest request =
+ * BlockRequest.newBuilder().setResponseDelay(Duration.newBuilder().build()).build();
+ * BlockResponse response = echoClient.block(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 BlockResponse block(BlockRequest request) {
+ return blockCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * This method will block (wait) for the requested amount of time and then return the response or
+ * error. This method showcases how a client handles delays or retries.
+ *
+ * {@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()) {
+ * BlockRequest request =
+ * BlockRequest.newBuilder().setResponseDelay(Duration.newBuilder().build()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : echoClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = echoClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = echoClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@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()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .addAllPermissions(new ArrayList
+ *
+ * @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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .addAllPermissions(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * EchoSettings.Builder echoSettingsBuilder = EchoSettings.newBuilder();
+ * echoSettingsBuilder
+ * .echoSettings()
+ * .setRetrySettings(
+ * echoSettingsBuilder
+ * .echoSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * EchoSettings echoSettings = echoSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * {@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
+ * EchoSettings.Builder echoSettingsBuilder = EchoSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * echoSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class EchoSettings extends ClientSettings{@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()) {
+ * String displayName = "displayName1714148973";
+ * String email = "email96619420";
+ * User response = identityClient.createUser(displayName, email);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * IdentitySettings identitySettings =
+ * IdentitySettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * IdentityClient identityClient = IdentityClient.create(identitySettings);
+ * }
+ *
+ * {@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
+ * IdentitySettings identitySettings =
+ * IdentitySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * IdentityClient identityClient = IdentityClient.create(identitySettings);
+ * }
+ *
+ * {@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
+ * IdentitySettings identitySettings = IdentitySettings.newHttpJsonBuilder().build();
+ * IdentityClient identityClient = IdentityClient.create(identitySettings);
+ * }
+ *
+ * {@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()) {
+ * String displayName = "displayName1714148973";
+ * String email = "email96619420";
+ * User response = identityClient.createUser(displayName, email);
+ * }
+ * }
+ *
+ * @param displayName The display_name of the user.
+ * @param email The email address of the user.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final User createUser(String displayName, String email) {
+ CreateUserRequest request =
+ CreateUserRequest.newBuilder()
+ .setUser(User.newBuilder().setDisplayName(displayName).setEmail(email).build())
+ .build();
+ return createUser(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user.
+ *
+ * {@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()) {
+ * String displayName = "displayName1714148973";
+ * String email = "email96619420";
+ * int age = 96511;
+ * String nickname = "nickname70690926";
+ * boolean enableNotifications = true;
+ * double heightFeet = -1032737338;
+ * User response =
+ * identityClient.createUser(
+ * displayName, email, age, nickname, enableNotifications, heightFeet);
+ * }
+ * }
+ *
+ * @param displayName The display_name of the user.
+ * @param email The email address of the user.
+ * @param age The age of the user in years.
+ * @param nickname The nickname of the user.
+ * {@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()) {
+ * CreateUserRequest request =
+ * CreateUserRequest.newBuilder().setUser(User.newBuilder().build()).build();
+ * User response = identityClient.createUser(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 User createUser(CreateUserRequest request) {
+ return createUserCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user.
+ *
+ * {@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()) {
+ * CreateUserRequest request =
+ * CreateUserRequest.newBuilder().setUser(User.newBuilder().build()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * UserName name = UserName.of("[USER]");
+ * User response = identityClient.getUser(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested user.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final User getUser(UserName name) {
+ GetUserRequest request =
+ GetUserRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getUser(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the User with the given uri.
+ *
+ * {@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()) {
+ * String name = UserName.of("[USER]").toString();
+ * User response = identityClient.getUser(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested user.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final User getUser(String name) {
+ GetUserRequest request = GetUserRequest.newBuilder().setName(name).build();
+ return getUser(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the User with the given uri.
+ *
+ * {@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()) {
+ * GetUserRequest request =
+ * GetUserRequest.newBuilder().setName(UserName.of("[USER]").toString()).build();
+ * User response = identityClient.getUser(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 User getUser(GetUserRequest request) {
+ return getUserCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the User with the given uri.
+ *
+ * {@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()) {
+ * GetUserRequest request =
+ * GetUserRequest.newBuilder().setName(UserName.of("[USER]").toString()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * UpdateUserRequest request =
+ * UpdateUserRequest.newBuilder()
+ * .setUser(User.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * User response = identityClient.updateUser(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 User updateUser(UpdateUserRequest request) {
+ return updateUserCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a user.
+ *
+ * {@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()) {
+ * UpdateUserRequest request =
+ * UpdateUserRequest.newBuilder()
+ * .setUser(User.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * UserName name = UserName.of("[USER]");
+ * identityClient.deleteUser(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the user to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUser(UserName name) {
+ DeleteUserRequest request =
+ DeleteUserRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteUser(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user, their profile, and all of their authored messages.
+ *
+ * {@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()) {
+ * String name = UserName.of("[USER]").toString();
+ * identityClient.deleteUser(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the user to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUser(String name) {
+ DeleteUserRequest request = DeleteUserRequest.newBuilder().setName(name).build();
+ deleteUser(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user, their profile, and all of their authored messages.
+ *
+ * {@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()) {
+ * DeleteUserRequest request =
+ * DeleteUserRequest.newBuilder().setName(UserName.of("[USER]").toString()).build();
+ * identityClient.deleteUser(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 void deleteUser(DeleteUserRequest request) {
+ deleteUserCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user, their profile, and all of their authored messages.
+ *
+ * {@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()) {
+ * DeleteUserRequest request =
+ * DeleteUserRequest.newBuilder().setName(UserName.of("[USER]").toString()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListUsersRequest request =
+ * ListUsersRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (User element : identityClient.listUsers(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUsersPagedResponse listUsers(ListUsersRequest request) {
+ return listUsersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all users.
+ *
+ * {@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()) {
+ * ListUsersRequest request =
+ * ListUsersRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListUsersRequest request =
+ * ListUsersRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListUsersResponse response = identityClient.listUsersCallable().call(request);
+ * for (User element : response.getUsersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : identityClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = identityClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = identityClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@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()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .addAllPermissions(new ArrayList
+ *
+ * @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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .addAllPermissions(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@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
+ * IdentitySettings.Builder identitySettingsBuilder = IdentitySettings.newBuilder();
+ * identitySettingsBuilder
+ * .createUserSettings()
+ * .setRetrySettings(
+ * identitySettingsBuilder
+ * .createUserSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * IdentitySettings identitySettings = identitySettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class IdentitySettings extends ClientSettings{@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()) {
+ * String displayName = "displayName1714148973";
+ * String description = "description-1724546052";
+ * Room response = messagingClient.createRoom(displayName, description);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * MessagingSettings messagingSettings =
+ * MessagingSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * MessagingClient messagingClient = MessagingClient.create(messagingSettings);
+ * }
+ *
+ * {@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
+ * MessagingSettings messagingSettings =
+ * MessagingSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * MessagingClient messagingClient = MessagingClient.create(messagingSettings);
+ * }
+ *
+ * {@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
+ * MessagingSettings messagingSettings = MessagingSettings.newHttpJsonBuilder().build();
+ * MessagingClient messagingClient = MessagingClient.create(messagingSettings);
+ * }
+ *
+ * {@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()) {
+ * String displayName = "displayName1714148973";
+ * String description = "description-1724546052";
+ * Room response = messagingClient.createRoom(displayName, description);
+ * }
+ * }
+ *
+ * @param displayName The human readable name of the chat room.
+ * @param description The description of the chat room.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Room createRoom(String displayName, String description) {
+ CreateRoomRequest request =
+ CreateRoomRequest.newBuilder()
+ .setRoom(
+ Room.newBuilder().setDisplayName(displayName).setDescription(description).build())
+ .build();
+ return createRoom(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a room.
+ *
+ * {@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()) {
+ * CreateRoomRequest request =
+ * CreateRoomRequest.newBuilder().setRoom(Room.newBuilder().build()).build();
+ * Room response = messagingClient.createRoom(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 Room createRoom(CreateRoomRequest request) {
+ return createRoomCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a room.
+ *
+ * {@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()) {
+ * CreateRoomRequest request =
+ * CreateRoomRequest.newBuilder().setRoom(Room.newBuilder().build()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * RoomName name = RoomName.of("[ROOM]");
+ * Room response = messagingClient.getRoom(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested room.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Room getRoom(RoomName name) {
+ GetRoomRequest request =
+ GetRoomRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRoom(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the Room with the given resource name.
+ *
+ * {@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()) {
+ * String name = RoomName.of("[ROOM]").toString();
+ * Room response = messagingClient.getRoom(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested room.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Room getRoom(String name) {
+ GetRoomRequest request = GetRoomRequest.newBuilder().setName(name).build();
+ return getRoom(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the Room with the given resource name.
+ *
+ * {@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()) {
+ * GetRoomRequest request =
+ * GetRoomRequest.newBuilder().setName(RoomName.of("[ROOM]").toString()).build();
+ * Room response = messagingClient.getRoom(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 Room getRoom(GetRoomRequest request) {
+ return getRoomCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the Room with the given resource name.
+ *
+ * {@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()) {
+ * GetRoomRequest request =
+ * GetRoomRequest.newBuilder().setName(RoomName.of("[ROOM]").toString()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * UpdateRoomRequest request =
+ * UpdateRoomRequest.newBuilder()
+ * .setRoom(Room.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Room response = messagingClient.updateRoom(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 Room updateRoom(UpdateRoomRequest request) {
+ return updateRoomCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a room.
+ *
+ * {@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()) {
+ * UpdateRoomRequest request =
+ * UpdateRoomRequest.newBuilder()
+ * .setRoom(Room.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * RoomName name = RoomName.of("[ROOM]");
+ * messagingClient.deleteRoom(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested room.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRoom(RoomName name) {
+ DeleteRoomRequest request =
+ DeleteRoomRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteRoom(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a room and all of its blurbs.
+ *
+ * {@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()) {
+ * String name = RoomName.of("[ROOM]").toString();
+ * messagingClient.deleteRoom(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested room.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRoom(String name) {
+ DeleteRoomRequest request = DeleteRoomRequest.newBuilder().setName(name).build();
+ deleteRoom(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a room and all of its blurbs.
+ *
+ * {@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()) {
+ * DeleteRoomRequest request =
+ * DeleteRoomRequest.newBuilder().setName(RoomName.of("[ROOM]").toString()).build();
+ * messagingClient.deleteRoom(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 void deleteRoom(DeleteRoomRequest request) {
+ deleteRoomCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a room and all of its blurbs.
+ *
+ * {@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()) {
+ * DeleteRoomRequest request =
+ * DeleteRoomRequest.newBuilder().setName(RoomName.of("[ROOM]").toString()).build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListRoomsRequest request =
+ * ListRoomsRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Room element : messagingClient.listRooms(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRoomsPagedResponse listRooms(ListRoomsRequest request) {
+ return listRoomsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all chat rooms.
+ *
+ * {@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()) {
+ * ListRoomsRequest request =
+ * ListRoomsRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListRoomsRequest request =
+ * ListRoomsRequest.newBuilder()
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListRoomsResponse response = messagingClient.listRoomsCallable().call(request);
+ * for (Room element : response.getRoomsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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()) {
+ * ProfileName parent = ProfileName.of("[USER]");
+ * UserName user = UserName.of("[USER]");
+ * ByteString image = ByteString.EMPTY;
+ * Blurb response = messagingClient.createBlurb(parent, user, image);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param image The image content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(ProfileName parent, UserName user, ByteString image) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBlurb(
+ Blurb.newBuilder()
+ .setUser(user == null ? null : user.toString())
+ .setImage(image)
+ .build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * ProfileName parent = ProfileName.of("[USER]");
+ * UserName user = UserName.of("[USER]");
+ * String text = "text3556653";
+ * Blurb response = messagingClient.createBlurb(parent, user, text);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param text The textual content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(ProfileName parent, UserName user, String text) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBlurb(
+ Blurb.newBuilder()
+ .setUser(user == null ? null : user.toString())
+ .setText(text)
+ .build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * ProfileName parent = ProfileName.of("[USER]");
+ * String user = UserName.of("[USER]").toString();
+ * ByteString image = ByteString.EMPTY;
+ * Blurb response = messagingClient.createBlurb(parent, user, image);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param image The image content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(ProfileName parent, String user, ByteString image) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBlurb(Blurb.newBuilder().setUser(user).setImage(image).build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * ProfileName parent = ProfileName.of("[USER]");
+ * String user = UserName.of("[USER]").toString();
+ * String text = "text3556653";
+ * Blurb response = messagingClient.createBlurb(parent, user, text);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param text The textual content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(ProfileName parent, String user, String text) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBlurb(Blurb.newBuilder().setUser(user).setText(text).build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * RoomName parent = RoomName.of("[ROOM]");
+ * UserName user = UserName.of("[USER]");
+ * ByteString image = ByteString.EMPTY;
+ * Blurb response = messagingClient.createBlurb(parent, user, image);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param image The image content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(RoomName parent, UserName user, ByteString image) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBlurb(
+ Blurb.newBuilder()
+ .setUser(user == null ? null : user.toString())
+ .setImage(image)
+ .build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * RoomName parent = RoomName.of("[ROOM]");
+ * UserName user = UserName.of("[USER]");
+ * String text = "text3556653";
+ * Blurb response = messagingClient.createBlurb(parent, user, text);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param text The textual content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(RoomName parent, UserName user, String text) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBlurb(
+ Blurb.newBuilder()
+ .setUser(user == null ? null : user.toString())
+ .setText(text)
+ .build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * RoomName parent = RoomName.of("[ROOM]");
+ * String user = UserName.of("[USER]").toString();
+ * ByteString image = ByteString.EMPTY;
+ * Blurb response = messagingClient.createBlurb(parent, user, image);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param image The image content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(RoomName parent, String user, ByteString image) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBlurb(Blurb.newBuilder().setUser(user).setImage(image).build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * RoomName parent = RoomName.of("[ROOM]");
+ * String user = UserName.of("[USER]").toString();
+ * String text = "text3556653";
+ * Blurb response = messagingClient.createBlurb(parent, user, text);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param text The textual content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(RoomName parent, String user, String text) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setBlurb(Blurb.newBuilder().setUser(user).setText(text).build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * String parent = ProfileName.of("[USER]").toString();
+ * UserName user = UserName.of("[USER]");
+ * ByteString image = ByteString.EMPTY;
+ * Blurb response = messagingClient.createBlurb(parent, user, image);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param image The image content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(String parent, UserName user, ByteString image) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent)
+ .setBlurb(
+ Blurb.newBuilder()
+ .setUser(user == null ? null : user.toString())
+ .setImage(image)
+ .build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * String parent = ProfileName.of("[USER]").toString();
+ * UserName user = UserName.of("[USER]");
+ * String text = "text3556653";
+ * Blurb response = messagingClient.createBlurb(parent, user, text);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param text The textual content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(String parent, UserName user, String text) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent)
+ .setBlurb(
+ Blurb.newBuilder()
+ .setUser(user == null ? null : user.toString())
+ .setText(text)
+ .build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * String parent = ProfileName.of("[USER]").toString();
+ * String user = UserName.of("[USER]").toString();
+ * ByteString image = ByteString.EMPTY;
+ * Blurb response = messagingClient.createBlurb(parent, user, image);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param image The image content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(String parent, String user, ByteString image) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent)
+ .setBlurb(Blurb.newBuilder().setUser(user).setImage(image).build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * String parent = ProfileName.of("[USER]").toString();
+ * String user = UserName.of("[USER]").toString();
+ * String text = "text3556653";
+ * Blurb response = messagingClient.createBlurb(parent, user, text);
+ * }
+ * }
+ *
+ * @param parent The resource name of the chat room or user profile that this blurb will be tied
+ * to.
+ * @param user The resource name of the blurb's author.
+ * @param text The textual content of this blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb createBlurb(String parent, String user, String text) {
+ CreateBlurbRequest request =
+ CreateBlurbRequest.newBuilder()
+ .setParent(parent)
+ .setBlurb(Blurb.newBuilder().setUser(user).setText(text).build())
+ .build();
+ return createBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * CreateBlurbRequest request =
+ * CreateBlurbRequest.newBuilder()
+ * .setParent(ProfileName.of("[USER]").toString())
+ * .setBlurb(Blurb.newBuilder().build())
+ * .build();
+ * Blurb response = messagingClient.createBlurb(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 Blurb createBlurb(CreateBlurbRequest request) {
+ return createBlurbCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a blurb. If the parent is a room, the blurb is understood to be a message in that room.
+ * If the parent is a profile, the blurb is understood to be a post on the profile.
+ *
+ * {@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()) {
+ * CreateBlurbRequest request =
+ * CreateBlurbRequest.newBuilder()
+ * .setParent(ProfileName.of("[USER]").toString())
+ * .setBlurb(Blurb.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * BlurbName name = BlurbName.ofRoomBlurbName("[ROOM]", "[BLURB]");
+ * Blurb response = messagingClient.getBlurb(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb getBlurb(BlurbName name) {
+ GetBlurbRequest request =
+ GetBlurbRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the Blurb with the given resource name.
+ *
+ * {@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()) {
+ * String name =
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]").toString();
+ * Blurb response = messagingClient.getBlurb(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Blurb getBlurb(String name) {
+ GetBlurbRequest request = GetBlurbRequest.newBuilder().setName(name).build();
+ return getBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the Blurb with the given resource name.
+ *
+ * {@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()) {
+ * GetBlurbRequest request =
+ * GetBlurbRequest.newBuilder()
+ * .setName(BlurbName.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .build();
+ * Blurb response = messagingClient.getBlurb(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 Blurb getBlurb(GetBlurbRequest request) {
+ return getBlurbCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the Blurb with the given resource name.
+ *
+ * {@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()) {
+ * GetBlurbRequest request =
+ * GetBlurbRequest.newBuilder()
+ * .setName(BlurbName.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * UpdateBlurbRequest request =
+ * UpdateBlurbRequest.newBuilder()
+ * .setBlurb(Blurb.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Blurb response = messagingClient.updateBlurb(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 Blurb updateBlurb(UpdateBlurbRequest request) {
+ return updateBlurbCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a blurb.
+ *
+ * {@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()) {
+ * UpdateBlurbRequest request =
+ * UpdateBlurbRequest.newBuilder()
+ * .setBlurb(Blurb.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * BlurbName name = BlurbName.ofRoomBlurbName("[ROOM]", "[BLURB]");
+ * messagingClient.deleteBlurb(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteBlurb(BlurbName name) {
+ DeleteBlurbRequest request =
+ DeleteBlurbRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a blurb.
+ *
+ * {@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()) {
+ * String name =
+ * BlurbName.ofUserLegacyUserBlurbName("[USER]", "[LEGACY_USER]", "[BLURB]").toString();
+ * messagingClient.deleteBlurb(name);
+ * }
+ * }
+ *
+ * @param name The resource name of the requested blurb.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteBlurb(String name) {
+ DeleteBlurbRequest request = DeleteBlurbRequest.newBuilder().setName(name).build();
+ deleteBlurb(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a blurb.
+ *
+ * {@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()) {
+ * DeleteBlurbRequest request =
+ * DeleteBlurbRequest.newBuilder()
+ * .setName(BlurbName.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .build();
+ * messagingClient.deleteBlurb(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 void deleteBlurb(DeleteBlurbRequest request) {
+ deleteBlurbCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a blurb.
+ *
+ * {@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()) {
+ * DeleteBlurbRequest request =
+ * DeleteBlurbRequest.newBuilder()
+ * .setName(BlurbName.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ProfileName parent = ProfileName.of("[USER]");
+ * for (Blurb element : messagingClient.listBlurbs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent The resource name of the requested room or profile who blurbs to list.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBlurbsPagedResponse listBlurbs(ProfileName parent) {
+ ListBlurbsRequest request =
+ ListBlurbsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listBlurbs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists blurbs for a specific chat room or user profile depending on the parent resource name.
+ *
+ * {@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()) {
+ * RoomName parent = RoomName.of("[ROOM]");
+ * for (Blurb element : messagingClient.listBlurbs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent The resource name of the requested room or profile who blurbs to list.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBlurbsPagedResponse listBlurbs(RoomName parent) {
+ ListBlurbsRequest request =
+ ListBlurbsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listBlurbs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists blurbs for a specific chat room or user profile depending on the parent resource name.
+ *
+ * {@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()) {
+ * String parent = ProfileName.of("[USER]").toString();
+ * for (Blurb element : messagingClient.listBlurbs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent The resource name of the requested room or profile who blurbs to list.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBlurbsPagedResponse listBlurbs(String parent) {
+ ListBlurbsRequest request = ListBlurbsRequest.newBuilder().setParent(parent).build();
+ return listBlurbs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists blurbs for a specific chat room or user profile depending on the parent resource name.
+ *
+ * {@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()) {
+ * ListBlurbsRequest request =
+ * ListBlurbsRequest.newBuilder()
+ * .setParent(ProfileName.of("[USER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Blurb element : messagingClient.listBlurbs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListBlurbsPagedResponse listBlurbs(ListBlurbsRequest request) {
+ return listBlurbsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists blurbs for a specific chat room or user profile depending on the parent resource name.
+ *
+ * {@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()) {
+ * ListBlurbsRequest request =
+ * ListBlurbsRequest.newBuilder()
+ * .setParent(ProfileName.of("[USER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListBlurbsRequest request =
+ * ListBlurbsRequest.newBuilder()
+ * .setParent(ProfileName.of("[USER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListBlurbsResponse response = messagingClient.listBlurbsCallable().call(request);
+ * for (Blurb element : response.getBlurbsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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()) {
+ * ProfileName parent = ProfileName.of("[USER]");
+ * String query = "query107944136";
+ * SearchBlurbsResponse response = messagingClient.searchBlurbsAsync(parent, query).get();
+ * }
+ * }
+ *
+ * @param parent The rooms or profiles to search. If unset, `SearchBlurbs` will search all rooms
+ * and all profiles.
+ * @param query The query used to search for blurbs containing to words of this string. Only posts
+ * that contain an exact match of a queried word will be returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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()) {
+ * RoomName parent = RoomName.of("[ROOM]");
+ * String query = "query107944136";
+ * SearchBlurbsResponse response = messagingClient.searchBlurbsAsync(parent, query).get();
+ * }
+ * }
+ *
+ * @param parent The rooms or profiles to search. If unset, `SearchBlurbs` will search all rooms
+ * and all profiles.
+ * @param query The query used to search for blurbs containing to words of this string. Only posts
+ * that contain an exact match of a queried word will be returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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()) {
+ * String parent = ProfileName.of("[USER]").toString();
+ * String query = "query107944136";
+ * SearchBlurbsResponse response = messagingClient.searchBlurbsAsync(parent, query).get();
+ * }
+ * }
+ *
+ * @param parent The rooms or profiles to search. If unset, `SearchBlurbs` will search all rooms
+ * and all profiles.
+ * @param query The query used to search for blurbs containing to words of this string. Only posts
+ * that contain an exact match of a queried word will be returned.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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()) {
+ * SearchBlurbsRequest request =
+ * SearchBlurbsRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setParent(ProfileName.of("[USER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * SearchBlurbsResponse response = messagingClient.searchBlurbsAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFuture{@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()) {
+ * SearchBlurbsRequest request =
+ * SearchBlurbsRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setParent(ProfileName.of("[USER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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()) {
+ * SearchBlurbsRequest request =
+ * SearchBlurbsRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setParent(ProfileName.of("[USER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * StreamBlurbsRequest request =
+ * StreamBlurbsRequest.newBuilder()
+ * .setName(ProfileName.of("[USER]").toString())
+ * .setExpireTime(Timestamp.newBuilder().build())
+ * .build();
+ * ServerStream
+ */
+ public final ServerStreamingCallable{@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()) {
+ * ApiStreamObserver
+ */
+ public final ClientStreamingCallable{@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()) {
+ * BidiStream
+ */
+ public final BidiStreamingCallable{@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : messagingClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = messagingClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = messagingClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@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()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .addAllPermissions(new ArrayList
+ *
+ * @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.
+ *
+ * {@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.ofRoomBlurbName("[ROOM]", "[BLURB]").toString())
+ * .addAllPermissions(new ArrayList
+ */
+ public final UnaryCallable