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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
+ * Scope response = observabilityClient.getScope(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the ObservabilityClient 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 | + *
|---|---|---|
GetScope |
+ * Gets details of a single Scope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateScope |
+ * Updates the parameters of a single Scope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetBucket |
+ * Get bucket resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListBuckets |
+ * List buckets of a project in a particular location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateBucket |
+ * Create a new bucket. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateBucket |
+ * Update a bucket. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetDataset |
+ * Get a dataset. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListDatasets |
+ * List datasets of a bucket. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetView |
+ * Get a view. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListViews |
+ * List views of a dataset. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLink |
+ * Get a link. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListLinks |
+ * List links of a dataset. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateLink |
+ * Create a new link. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateLink |
+ * Update a link. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteLink |
+ * Delete a link. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetTraceScope |
+ * Get TraceScope resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListTraceScopes |
+ * List TraceScopes of a project in a particular location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateTraceScope |
+ * Create a new TraceScope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateTraceScope |
+ * Update a TraceScope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteTraceScope |
+ * Delete a TraceScope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetSettings |
+ * Get Settings |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateSettings |
+ * Update Settings |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
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. + * This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + * For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. |
+ *
+ * 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. + *
|
+ *
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 ObservabilitySettings 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
+ * ObservabilitySettings observabilitySettings =
+ * ObservabilitySettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ObservabilityClient observabilityClient = ObservabilityClient.create(observabilitySettings);
+ * }
+ *
+ * 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
+ * ObservabilitySettings observabilitySettings =
+ * ObservabilitySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ObservabilityClient observabilityClient = ObservabilityClient.create(observabilitySettings);
+ * }
+ *
+ * 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
+ * ObservabilitySettings observabilitySettings =
+ * ObservabilitySettings.newHttpJsonBuilder().build();
+ * ObservabilityClient observabilityClient = ObservabilityClient.create(observabilitySettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class ObservabilityClient implements BackgroundResource { + private final @Nullable ObservabilitySettings settings; + private final ObservabilityStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ObservabilityClient with default settings. */ + public static final ObservabilityClient create() throws IOException { + return create(ObservabilitySettings.newBuilder().build()); + } + + /** + * Constructs an instance of ObservabilityClient, 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 ObservabilityClient create(ObservabilitySettings settings) + throws IOException { + return new ObservabilityClient(settings); + } + + /** + * Constructs an instance of ObservabilityClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ObservabilitySettings). + */ + public static final ObservabilityClient create(ObservabilityStub stub) { + return new ObservabilityClient(stub); + } + + /** + * Constructs an instance of ObservabilityClient, 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 ObservabilityClient(ObservabilitySettings settings) throws IOException { + this.settings = settings; + this.stub = ((ObservabilityStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ObservabilityClient(ObservabilityStub 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 @Nullable ObservabilitySettings getSettings() { + return settings; + } + + public ObservabilityStub 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. + /** + * Gets details of a single Scope. + * + *
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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
+ * Scope response = observabilityClient.getScope(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource. The format is:
+ * projects/{project}/locations/{location}/scopes/{scope} + *
The `{location}` field must be set to `global`. The `{scope}` field must be set to + * `_Default`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Scope getScope(@Nullable ScopeName name) { + GetScopeRequest request = + GetScopeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Scope. + * + *
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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
+ * Scope response = observabilityClient.getScope(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource. The format is:
+ * projects/{project}/locations/{location}/scopes/{scope} + *
The `{location}` field must be set to `global`. The `{scope}` field must be set to + * `_Default`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Scope getScope(String name) { + GetScopeRequest request = GetScopeRequest.newBuilder().setName(name).build(); + return getScope(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Scope. + * + *
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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetScopeRequest request =
+ * GetScopeRequest.newBuilder()
+ * .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
+ * .build();
+ * Scope response = observabilityClient.getScope(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 Scope getScope(GetScopeRequest request) {
+ return getScopeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Scope.
+ *
+ * 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetScopeRequest request =
+ * GetScopeRequest.newBuilder()
+ * .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
+ * .build();
+ * ApiFuture future = observabilityClient.getScopeCallable().futureCall(request);
+ * // Do something.
+ * Scope 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * Scope scope = Scope.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Scope response = observabilityClient.updateScope(scope, updateMask);
+ * }
+ * }
+ *
+ * @param scope Required. The resource being updated.
+ * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the
+ * Scope resource by the update. The fields specified in the update_mask are relative to the
+ * resource, not the full request. A field is overwritten when it is in the mask. If the user
+ * does not provide a mask, then all fields present in the request are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Scope updateScope(Scope scope, FieldMask updateMask) {
+ UpdateScopeRequest request =
+ UpdateScopeRequest.newBuilder().setScope(scope).setUpdateMask(updateMask).build();
+ return updateScope(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a single Scope.
+ *
+ * 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateScopeRequest request =
+ * UpdateScopeRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setScope(Scope.newBuilder().build())
+ * .build();
+ * Scope response = observabilityClient.updateScope(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 Scope updateScope(UpdateScopeRequest request) {
+ return updateScopeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a single Scope.
+ *
+ * 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateScopeRequest request =
+ * UpdateScopeRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setScope(Scope.newBuilder().build())
+ * .build();
+ * ApiFuture future = observabilityClient.updateScopeCallable().futureCall(request);
+ * // Do something.
+ * Scope 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * BucketName name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]");
+ * Bucket response = observabilityClient.getBucket(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the bucket to retrieve. The format is:
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Bucket getBucket(@Nullable BucketName name) { + GetBucketRequest request = + GetBucketRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBucket(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get bucket 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString();
+ * Bucket response = observabilityClient.getBucket(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the bucket to retrieve. The format is:
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Bucket getBucket(String name) { + GetBucketRequest request = GetBucketRequest.newBuilder().setName(name).build(); + return getBucket(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get bucket 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetBucketRequest request =
+ * GetBucketRequest.newBuilder()
+ * .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+ * .build();
+ * Bucket response = observabilityClient.getBucket(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 Bucket getBucket(GetBucketRequest request) {
+ return getBucketCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get bucket 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetBucketRequest request =
+ * GetBucketRequest.newBuilder()
+ * .setName(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+ * .build();
+ * ApiFuture future = observabilityClient.getBucketCallable().futureCall(request);
+ * // Do something.
+ * Bucket 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Bucket element : observabilityClient.listBuckets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of buckets. The format is:
+ * projects/[PROJECT_ID]/locations/[LOCATION] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBucketsPagedResponse listBuckets(@Nullable LocationName parent) { + ListBucketsRequest request = + ListBucketsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBuckets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List buckets of a project in a particular 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Bucket element : observabilityClient.listBuckets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of buckets. The format is:
+ * projects/[PROJECT_ID]/locations/[LOCATION] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBucketsPagedResponse listBuckets(String parent) { + ListBucketsRequest request = ListBucketsRequest.newBuilder().setParent(parent).build(); + return listBuckets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List buckets of a project in a particular 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListBucketsRequest request =
+ * ListBucketsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * for (Bucket element : observabilityClient.listBuckets(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 ListBucketsPagedResponse listBuckets(ListBucketsRequest request) {
+ return listBucketsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List buckets of a project in a particular 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListBucketsRequest request =
+ * ListBucketsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * ApiFuture future = observabilityClient.listBucketsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Bucket 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListBucketsRequest request =
+ * ListBucketsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * while (true) {
+ * ListBucketsResponse response = observabilityClient.listBucketsCallable().call(request);
+ * for (Bucket element : response.getBucketsList()) {
+ * // 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Bucket bucket = Bucket.newBuilder().build();
+ * String bucketId = "bucketId-1603305307";
+ * Bucket response = observabilityClient.createBucketAsync(parent, bucket, bucketId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Name of the project and location for the bucket. The format is:
+ * projects/[PROJECT_ID]/locations/[LOCATION]
+ * @param bucket Required. Bucket to create.
+ * @param bucketId Required. Id of the bucket to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]
+ * @param bucket Required. Bucket to create.
+ * @param bucketId Required. Id of the bucket to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The name field of bucket identifies the resource to update.
+ * @param updateMask Optional. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Dataset getDataset(@Nullable DatasetName name) {
+ GetDatasetRequest request =
+ GetDatasetRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getDataset(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a dataset.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Dataset getDataset(String name) {
+ GetDatasetRequest request = GetDatasetRequest.newBuilder().setName(name).build();
+ return getDataset(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a dataset.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDatasetsPagedResponse listDatasets(@Nullable BucketName parent) {
+ ListDatasetsRequest request =
+ ListDatasetsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDatasets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List datasets of a bucket.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDatasetsPagedResponse listDatasets(String parent) {
+ ListDatasetsRequest request = ListDatasetsRequest.newBuilder().setParent(parent).build();
+ return listDatasets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List datasets of a bucket.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final View getView(@Nullable ViewName name) {
+ GetViewRequest request =
+ GetViewRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getView(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a view.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/views/[VIEW_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final View getView(String name) {
+ GetViewRequest request = GetViewRequest.newBuilder().setName(name).build();
+ return getView(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a view.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListViewsPagedResponse listViews(@Nullable DatasetName parent) {
+ ListViewsRequest request =
+ ListViewsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listViews(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List views of a dataset.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListViewsPagedResponse listViews(String parent) {
+ ListViewsRequest request = ListViewsRequest.newBuilder().setParent(parent).build();
+ return listViews(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List views of a dataset.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Link getLink(@Nullable LinkName name) {
+ GetLinkRequest request =
+ GetLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getLink(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a link.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Link getLink(String name) {
+ GetLinkRequest request = GetLinkRequest.newBuilder().setName(name).build();
+ return getLink(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a link.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLinksPagedResponse listLinks(@Nullable DatasetName parent) {
+ ListLinksRequest request =
+ ListLinksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listLinks(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List links of a dataset.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLinksPagedResponse listLinks(String parent) {
+ ListLinksRequest request = ListLinksRequest.newBuilder().setParent(parent).build();
+ return listLinks(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List links of a dataset.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+ * @param link Required. Link to create.
+ * @param linkId Required. Id of the link to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createLinkAsync(
+ @Nullable DatasetName parent, Link link, String linkId) {
+ CreateLinkRequest request =
+ CreateLinkRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setLink(link)
+ .setLinkId(linkId)
+ .build();
+ return createLinkAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new link.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]
+ * @param link Required. Link to create.
+ * @param linkId Required. Id of the link to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture createLinkAsync(
+ String parent, Link link, String linkId) {
+ CreateLinkRequest request =
+ CreateLinkRequest.newBuilder().setParent(parent).setLink(link).setLinkId(linkId).build();
+ return createLinkAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new link.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The name field of link identifies the resource to update.
+ * @param updateMask Optional. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture updateLinkAsync(
+ Link link, FieldMask updateMask) {
+ UpdateLinkRequest request =
+ UpdateLinkRequest.newBuilder().setLink(link).setUpdateMask(updateMask).build();
+ return updateLinkAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a link.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION]/buckets/[BUCKET_ID]/datasets/[DATASET_ID]/links/[LINK_ID]
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+ * For example:
+ * projects/my-project/locations/global/traceScopes/my-trace-scope
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TraceScope getTraceScope(@Nullable TraceScopeName name) {
+ GetTraceScopeRequest request =
+ GetTraceScopeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getTraceScope(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get TraceScope resource.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+ * For example:
+ * projects/my-project/locations/global/traceScopes/my-trace-scope
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TraceScope getTraceScope(String name) {
+ GetTraceScopeRequest request = GetTraceScopeRequest.newBuilder().setName(name).build();
+ return getTraceScope(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get TraceScope resource.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+ * For example:
+ * projects/my-project/locations/global
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTraceScopesPagedResponse listTraceScopes(@Nullable LocationName parent) {
+ ListTraceScopesRequest request =
+ ListTraceScopesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listTraceScopes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List TraceScopes of a project in a particular location.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+ * For example:
+ * projects/my-project/locations/global
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTraceScopesPagedResponse listTraceScopes(String parent) {
+ ListTraceScopesRequest request = ListTraceScopesRequest.newBuilder().setParent(parent).build();
+ return listTraceScopes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List TraceScopes of a project in a particular location.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+ * For example:
+ * projects/my-project/locations/global
+ * @param traceScope Required. The new trace scope.
+ * @param traceScopeId Required. A client-assigned identifier for the trace scope.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TraceScope createTraceScope(
+ @Nullable LocationName parent, TraceScope traceScope, String traceScopeId) {
+ CreateTraceScopeRequest request =
+ CreateTraceScopeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setTraceScope(traceScope)
+ .setTraceScopeId(traceScopeId)
+ .build();
+ return createTraceScope(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new TraceScope.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION_ID]
+ * For example:
+ * projects/my-project/locations/global
+ * @param traceScope Required. The new trace scope.
+ * @param traceScopeId Required. A client-assigned identifier for the trace scope.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TraceScope createTraceScope(
+ String parent, TraceScope traceScope, String traceScopeId) {
+ CreateTraceScopeRequest request =
+ CreateTraceScopeRequest.newBuilder()
+ .setParent(parent)
+ .setTraceScope(traceScope)
+ .setTraceScopeId(traceScopeId)
+ .build();
+ return createTraceScope(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new TraceScope.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+ * For example:
+ * projects/my-project/locations/global/traceScopes/my-trace-scope
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteTraceScope(@Nullable TraceScopeName name) {
+ DeleteTraceScopeRequest request =
+ DeleteTraceScopeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteTraceScope(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a TraceScope.
+ *
+ * Sample code:
+ *
+ * projects/[PROJECT_ID]/locations/[LOCATION_ID]/traceScopes/[TRACE_SCOPE_ID]
+ * For example:
+ * projects/my-project/locations/global/traceScopes/my-trace-scope
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteTraceScope(String name) {
+ DeleteTraceScopeRequest request = DeleteTraceScopeRequest.newBuilder().setName(name).build();
+ deleteTraceScope(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a TraceScope.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Name format:
+ * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+ * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+ * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Settings getSettings(@Nullable SettingsName name) {
+ GetSettingsRequest request =
+ GetSettingsRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSettings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get Settings
+ *
+ * Sample code:
+ *
+ * Name format:
+ * "projects/[PROJECT_ID]/locations/[LOCATION]/settings"
+ * "folders/[FOLDER_ID]/locations/[LOCATION]/settings"
+ * "organizations/[ORGANIZATION_ID]/locations/[LOCATION]/settings"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Settings getSettings(String name) {
+ GetSettingsRequest request = GetSettingsRequest.newBuilder().setName(name).build();
+ return getSettings(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get Settings
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The name field of settings is used to identify the resource to be updated.
+ * @param updateMask Optional. The field mask specifying which fields of the settings are to be
+ * updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ * For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ * Sample code:
+ *
+ * This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ * For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ * Sample code:
+ *
+ * This method lists locations based on the resource scope provided inthe
+ * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field:
+ * ***Global locations**: If `name` is empty, the method lists thepublic
+ * locations available to all projects. * **Project-specificlocations**: If
+ * `name` follows the format`projects/{project}`, the method lists locations visible to
+ * thatspecific project. This includes public, private, or otherproject-specific locations enabled
+ * for the project.
+ *
+ * For gRPC and client library implementations, the resource name ispassed as the `name` field.
+ * For direct service calls, the resourcename isincorporated into the request path based on the
+ * specific serviceimplementation and version.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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 getScope:
+ *
+ * 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 createBucket:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= ObservabilityClient =======================
+ *
+ * Service Description: Service describing handlers for resources
+ *
+ * Sample for ObservabilityClient:
+ *
+ * This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcObservabilityCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcObservabilityStub extends ObservabilityStub {
+ private static final MethodDescriptor{@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Bucket bucket = Bucket.newBuilder().build();
+ * String bucketId = "bucketId-1603305307";
+ * Bucket response = observabilityClient.createBucketAsync(parent, bucket, bucketId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Name of the project and location for the bucket. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * CreateBucketRequest request =
+ * CreateBucketRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBucketId("bucketId-1603305307")
+ * .setBucket(Bucket.newBuilder().build())
+ * .build();
+ * Bucket response = observabilityClient.createBucketAsync(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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * CreateBucketRequest request =
+ * CreateBucketRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBucketId("bucketId-1603305307")
+ * .setBucket(Bucket.newBuilder().build())
+ * .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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * CreateBucketRequest request =
+ * CreateBucketRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setBucketId("bucketId-1603305307")
+ * .setBucket(Bucket.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * Bucket bucket = Bucket.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Bucket response = observabilityClient.updateBucketAsync(bucket, updateMask).get();
+ * }
+ * }
+ *
+ * @param bucket Required. The bucket to update.
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateBucketRequest request =
+ * UpdateBucketRequest.newBuilder()
+ * .setBucket(Bucket.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Bucket response = observabilityClient.updateBucketAsync(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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateBucketRequest request =
+ * UpdateBucketRequest.newBuilder()
+ * .setBucket(Bucket.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateBucketRequest request =
+ * UpdateBucketRequest.newBuilder()
+ * .setBucket(Bucket.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]");
+ * Dataset response = observabilityClient.getDataset(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the dataset to retrieve. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString();
+ * Dataset response = observabilityClient.getDataset(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the dataset to retrieve. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetDatasetRequest request =
+ * GetDatasetRequest.newBuilder()
+ * .setName(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .build();
+ * Dataset response = observabilityClient.getDataset(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 Dataset getDataset(GetDatasetRequest request) {
+ return getDatasetCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a dataset.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetDatasetRequest request =
+ * GetDatasetRequest.newBuilder()
+ * .setName(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * BucketName parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]");
+ * for (Dataset element : observabilityClient.listDatasets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent bucket that owns this collection of datasets. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String parent = BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString();
+ * for (Dataset element : observabilityClient.listDatasets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent bucket that owns this collection of datasets. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListDatasetsRequest request =
+ * ListDatasetsRequest.newBuilder()
+ * .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * for (Dataset element : observabilityClient.listDatasets(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 ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request) {
+ return listDatasetsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List datasets of a bucket.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListDatasetsRequest request =
+ * ListDatasetsRequest.newBuilder()
+ * .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListDatasetsRequest request =
+ * ListDatasetsRequest.newBuilder()
+ * .setParent(BucketName.of("[PROJECT]", "[LOCATION]", "[BUCKET]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setShowDeleted(true)
+ * .build();
+ * while (true) {
+ * ListDatasetsResponse response = observabilityClient.listDatasetsCallable().call(request);
+ * for (Dataset element : response.getDatasetsList()) {
+ * // 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ViewName name = ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]");
+ * View response = observabilityClient.getView(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the view to retrieve. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name =
+ * ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]").toString();
+ * View response = observabilityClient.getView(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the view to retrieve. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetViewRequest request =
+ * GetViewRequest.newBuilder()
+ * .setName(
+ * ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]")
+ * .toString())
+ * .build();
+ * View response = observabilityClient.getView(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 View getView(GetViewRequest request) {
+ return getViewCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a view.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetViewRequest request =
+ * GetViewRequest.newBuilder()
+ * .setName(
+ * ViewName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[VIEW]")
+ * .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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]");
+ * for (View element : observabilityClient.listViews(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Dataset whose views are to be listed. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString();
+ * for (View element : observabilityClient.listViews(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Dataset whose views are to be listed. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListViewsRequest request =
+ * ListViewsRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (View element : observabilityClient.listViews(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 ListViewsPagedResponse listViews(ListViewsRequest request) {
+ return listViewsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List views of a dataset.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListViewsRequest request =
+ * ListViewsRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListViewsRequest request =
+ * ListViewsRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListViewsResponse response = observabilityClient.listViewsCallable().call(request);
+ * for (View element : response.getViewsList()) {
+ * // 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]");
+ * Link response = observabilityClient.getLink(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the link to retrieve. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name =
+ * LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]").toString();
+ * Link response = observabilityClient.getLink(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the link to retrieve. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetLinkRequest request =
+ * GetLinkRequest.newBuilder()
+ * .setName(
+ * LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+ * .toString())
+ * .build();
+ * Link response = observabilityClient.getLink(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 Link getLink(GetLinkRequest request) {
+ return getLinkCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a link.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetLinkRequest request =
+ * GetLinkRequest.newBuilder()
+ * .setName(
+ * LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+ * .toString())
+ * .build();
+ * ApiFuture future = observabilityClient.getLinkCallable().futureCall(request);
+ * // Do something.
+ * Link response = future.get();
+ * }
+ * }
+ */
+ 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]");
+ * for (Link element : observabilityClient.listLinks(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent dataset that owns this collection of links. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString();
+ * for (Link element : observabilityClient.listLinks(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent dataset that owns this collection of links. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListLinksRequest request =
+ * ListLinksRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Link element : observabilityClient.listLinks(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 ListLinksPagedResponse listLinks(ListLinksRequest request) {
+ return listLinksPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List links of a dataset.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListLinksRequest request =
+ * ListLinksRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future = observabilityClient.listLinksPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Link element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListLinksRequest request =
+ * ListLinksRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLinksResponse response = observabilityClient.listLinksCallable().call(request);
+ * for (Link element : response.getLinksList()) {
+ * // 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]");
+ * Link link = Link.newBuilder().build();
+ * String linkId = "linkId-1102667083";
+ * Link response = observabilityClient.createLinkAsync(parent, link, linkId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Name of the containing dataset for this link. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString();
+ * Link link = Link.newBuilder().build();
+ * String linkId = "linkId-1102667083";
+ * Link response = observabilityClient.createLinkAsync(parent, link, linkId).get();
+ * }
+ * }
+ *
+ * @param parent Required. Name of the containing dataset for this link. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * CreateLinkRequest request =
+ * CreateLinkRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .setLinkId("linkId-1102667083")
+ * .setLink(Link.newBuilder().build())
+ * .build();
+ * Link response = observabilityClient.createLinkAsync(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 createLinkAsync(CreateLinkRequest request) {
+ return createLinkOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new link.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * CreateLinkRequest request =
+ * CreateLinkRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .setLinkId("linkId-1102667083")
+ * .setLink(Link.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * observabilityClient.createLinkOperationCallable().futureCall(request);
+ * // Do something.
+ * Link response = future.get();
+ * }
+ * }
+ */
+ 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * CreateLinkRequest request =
+ * CreateLinkRequest.newBuilder()
+ * .setParent(
+ * DatasetName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]").toString())
+ * .setLinkId("linkId-1102667083")
+ * .setLink(Link.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * Link link = Link.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Link response = observabilityClient.updateLinkAsync(link, updateMask).get();
+ * }
+ * }
+ *
+ * @param link Required. Link to update.
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateLinkRequest request =
+ * UpdateLinkRequest.newBuilder()
+ * .setLink(Link.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Link response = observabilityClient.updateLinkAsync(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 updateLinkAsync(UpdateLinkRequest request) {
+ return updateLinkOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a link.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateLinkRequest request =
+ * UpdateLinkRequest.newBuilder()
+ * .setLink(Link.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * observabilityClient.updateLinkOperationCallable().futureCall(request);
+ * // Do something.
+ * Link response = future.get();
+ * }
+ * }
+ */
+ 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateLinkRequest request =
+ * UpdateLinkRequest.newBuilder()
+ * .setLink(Link.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * LinkName name = LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]");
+ * observabilityClient.deleteLinkAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the link to delete. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name =
+ * LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]").toString();
+ * observabilityClient.deleteLinkAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the link to delete. The format is:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DeleteLinkRequest request =
+ * DeleteLinkRequest.newBuilder()
+ * .setName(
+ * LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+ * .toString())
+ * .build();
+ * observabilityClient.deleteLinkAsync(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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DeleteLinkRequest request =
+ * DeleteLinkRequest.newBuilder()
+ * .setName(
+ * LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+ * .toString())
+ * .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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DeleteLinkRequest request =
+ * DeleteLinkRequest.newBuilder()
+ * .setName(
+ * LinkName.of("[PROJECT]", "[LOCATION]", "[BUCKET]", "[DATASET]", "[LINK]")
+ * .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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]");
+ * TraceScope response = observabilityClient.getTraceScope(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the trace scope:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString();
+ * TraceScope response = observabilityClient.getTraceScope(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the trace scope:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetTraceScopeRequest request =
+ * GetTraceScopeRequest.newBuilder()
+ * .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString())
+ * .build();
+ * TraceScope response = observabilityClient.getTraceScope(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 TraceScope getTraceScope(GetTraceScopeRequest request) {
+ return getTraceScopeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get TraceScope resource.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetTraceScopeRequest request =
+ * GetTraceScopeRequest.newBuilder()
+ * .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (TraceScope element : observabilityClient.listTraceScopes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The full resource name of the location to look for trace scopes:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (TraceScope element : observabilityClient.listTraceScopes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The full resource name of the location to look for trace scopes:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListTraceScopesRequest request =
+ * ListTraceScopesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (TraceScope element : observabilityClient.listTraceScopes(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 ListTraceScopesPagedResponse listTraceScopes(ListTraceScopesRequest request) {
+ return listTraceScopesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List TraceScopes of a project in a particular 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListTraceScopesRequest request =
+ * ListTraceScopesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListTraceScopesRequest request =
+ * ListTraceScopesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListTraceScopesResponse response =
+ * observabilityClient.listTraceScopesCallable().call(request);
+ * for (TraceScope element : response.getTraceScopesList()) {
+ * // 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * TraceScope traceScope = TraceScope.newBuilder().build();
+ * String traceScopeId = "traceScopeId-2107793014";
+ * TraceScope response = observabilityClient.createTraceScope(parent, traceScope, traceScopeId);
+ * }
+ * }
+ *
+ * @param parent Required. The full resource name of the location where the trace scope should be
+ * created
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * TraceScope traceScope = TraceScope.newBuilder().build();
+ * String traceScopeId = "traceScopeId-2107793014";
+ * TraceScope response = observabilityClient.createTraceScope(parent, traceScope, traceScopeId);
+ * }
+ * }
+ *
+ * @param parent Required. The full resource name of the location where the trace scope should be
+ * created
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * CreateTraceScopeRequest request =
+ * CreateTraceScopeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setTraceScopeId("traceScopeId-2107793014")
+ * .setTraceScope(TraceScope.newBuilder().build())
+ * .build();
+ * TraceScope response = observabilityClient.createTraceScope(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 TraceScope createTraceScope(CreateTraceScopeRequest request) {
+ return createTraceScopeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new TraceScope.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * CreateTraceScopeRequest request =
+ * CreateTraceScopeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setTraceScopeId("traceScopeId-2107793014")
+ * .setTraceScope(TraceScope.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * TraceScope traceScope = TraceScope.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * TraceScope response = observabilityClient.updateTraceScope(traceScope, updateMask);
+ * }
+ * }
+ *
+ * @param traceScope Required. The updated trace scope.
+ * @param updateMask Optional. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TraceScope updateTraceScope(TraceScope traceScope, FieldMask updateMask) {
+ UpdateTraceScopeRequest request =
+ UpdateTraceScopeRequest.newBuilder()
+ .setTraceScope(traceScope)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateTraceScope(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a TraceScope.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateTraceScopeRequest request =
+ * UpdateTraceScopeRequest.newBuilder()
+ * .setTraceScope(TraceScope.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * TraceScope response = observabilityClient.updateTraceScope(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 TraceScope updateTraceScope(UpdateTraceScopeRequest request) {
+ return updateTraceScopeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a TraceScope.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateTraceScopeRequest request =
+ * UpdateTraceScopeRequest.newBuilder()
+ * .setTraceScope(TraceScope.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * TraceScopeName name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]");
+ * observabilityClient.deleteTraceScope(name);
+ * }
+ * }
+ *
+ * @param name Required. The full resource name of the trace scope to delete:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name = TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString();
+ * observabilityClient.deleteTraceScope(name);
+ * }
+ * }
+ *
+ * @param name Required. The full resource name of the trace scope to delete:
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DeleteTraceScopeRequest request =
+ * DeleteTraceScopeRequest.newBuilder()
+ * .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").toString())
+ * .build();
+ * observabilityClient.deleteTraceScope(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 deleteTraceScope(DeleteTraceScopeRequest request) {
+ deleteTraceScopeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a TraceScope.
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * DeleteTraceScopeRequest request =
+ * DeleteTraceScopeRequest.newBuilder()
+ * .setName(TraceScopeName.of("[PROJECT]", "[LOCATION]", "[TRACE_SCOPE]").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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * SettingsName name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
+ * Settings response = observabilityClient.getSettings(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the settings to retrieve.
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * String name = SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString();
+ * Settings response = observabilityClient.getSettings(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the settings to retrieve.
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetSettingsRequest request =
+ * GetSettingsRequest.newBuilder()
+ * .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * Settings response = observabilityClient.getSettings(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 Settings getSettings(GetSettingsRequest request) {
+ return getSettingsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get Settings
+ *
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetSettingsRequest request =
+ * GetSettingsRequest.newBuilder()
+ * .setName(SettingsName.ofProjectLocationName("[PROJECT]", "[LOCATION]").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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * Settings settings = Settings.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Settings response = observabilityClient.updateSettingsAsync(settings, updateMask).get();
+ * }
+ * }
+ *
+ * @param settings Required. The settings to update.
+ * {@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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateSettingsRequest request =
+ * UpdateSettingsRequest.newBuilder()
+ * .setSettings(Settings.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Settings response = observabilityClient.updateSettingsAsync(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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateSettingsRequest request =
+ * UpdateSettingsRequest.newBuilder()
+ * .setSettings(Settings.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * UpdateSettingsRequest request =
+ * UpdateSettingsRequest.newBuilder()
+ * .setSettings(Settings.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : observabilityClient.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 (ObservabilityClient observabilityClient = ObservabilityClient.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = observabilityClient.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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = observabilityClient.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 (ObservabilityClient observabilityClient = ObservabilityClient.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
+ * ObservabilitySettings.Builder observabilitySettingsBuilder = ObservabilitySettings.newBuilder();
+ * observabilitySettingsBuilder
+ * .getScopeSettings()
+ * .setRetrySettings(
+ * observabilitySettingsBuilder
+ * .getScopeSettings()
+ * .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());
+ * ObservabilitySettings observabilitySettings = observabilitySettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) 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
+ * ObservabilitySettings.Builder observabilitySettingsBuilder = ObservabilitySettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * observabilitySettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class ObservabilitySettings 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 (ObservabilityClient observabilityClient = ObservabilityClient.create()) {
+ * ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
+ * Scope response = observabilityClient.getScope(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.observability.v1;
+
+import javax.annotation.Generated;
diff --git a/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityCallableFactory.java b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityCallableFactory.java
new file mode 100644
index 000000000000..e73104a6d858
--- /dev/null
+++ b/java-observability/google-cloud-observability/src/main/java/com/google/cloud/observability/v1/stub/GrpcObservabilityCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2026 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.
+ */
+
+package com.google.cloud.observability.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the Observability service API.
+ *
+ *