All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.networkservices.v1.DepServiceClient Maven / Gradle / Ivy

Go to download

Network Services API Google Cloud offers a broad portfolio of networking services built on top of planet-scale infrastructure that leverages automation, advanced AI, and programmability, enabling enterprises to connect, scale, secure, modernize and optimize their infrastructure.

The newest version!
/*
 * Copyright 2024 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.networkservices.v1;

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.networkservices.v1.stub.DepServiceStub;
import com.google.cloud.networkservices.v1.stub.DepServiceStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * Service Description: Service describing handlers for resources.
 *
 * 

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
 *   LbTrafficExtensionName name =
 *       LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]");
 *   LbTrafficExtension response = depServiceClient.getLbTrafficExtension(name);
 * }
 * }
* *

Note: close() needs to be called on the DepServiceClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Methods
MethodDescriptionMethod Variants

ListLbTrafficExtensions

Lists `LbTrafficExtension` resources in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listLbTrafficExtensions(ListLbTrafficExtensionsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listLbTrafficExtensions(LocationName parent) *

  • listLbTrafficExtensions(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listLbTrafficExtensionsPagedCallable() *

  • listLbTrafficExtensionsCallable() *

*

GetLbTrafficExtension

Gets details of the specified `LbTrafficExtension` resource.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getLbTrafficExtension(GetLbTrafficExtensionRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getLbTrafficExtension(LbTrafficExtensionName name) *

  • getLbTrafficExtension(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getLbTrafficExtensionCallable() *

*

CreateLbTrafficExtension

Creates a new `LbTrafficExtension` resource in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createLbTrafficExtensionAsync(CreateLbTrafficExtensionRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createLbTrafficExtensionAsync(LocationName parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId) *

  • createLbTrafficExtensionAsync(String parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createLbTrafficExtensionOperationCallable() *

  • createLbTrafficExtensionCallable() *

*

UpdateLbTrafficExtension

Updates the parameters of the specified `LbTrafficExtension` resource.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateLbTrafficExtensionAsync(UpdateLbTrafficExtensionRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateLbTrafficExtensionAsync(LbTrafficExtension lbTrafficExtension, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateLbTrafficExtensionOperationCallable() *

  • updateLbTrafficExtensionCallable() *

*

DeleteLbTrafficExtension

Deletes the specified `LbTrafficExtension` resource.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteLbTrafficExtensionAsync(DeleteLbTrafficExtensionRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteLbTrafficExtensionAsync(LbTrafficExtensionName name) *

  • deleteLbTrafficExtensionAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • deleteLbTrafficExtensionOperationCallable() *

  • deleteLbTrafficExtensionCallable() *

*

ListLbRouteExtensions

Lists `LbRouteExtension` resources in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listLbRouteExtensions(ListLbRouteExtensionsRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • listLbRouteExtensions(LocationName parent) *

  • listLbRouteExtensions(String parent) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listLbRouteExtensionsPagedCallable() *

  • listLbRouteExtensionsCallable() *

*

GetLbRouteExtension

Gets details of the specified `LbRouteExtension` resource.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getLbRouteExtension(GetLbRouteExtensionRequest request) *

*

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

*
    *
  • getLbRouteExtension(LbRouteExtensionName name) *

  • getLbRouteExtension(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getLbRouteExtensionCallable() *

*

CreateLbRouteExtension

Creates a new `LbRouteExtension` resource in a given project and location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • createLbRouteExtensionAsync(CreateLbRouteExtensionRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • createLbRouteExtensionAsync(LocationName parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId) *

  • createLbRouteExtensionAsync(String parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • createLbRouteExtensionOperationCallable() *

  • createLbRouteExtensionCallable() *

*

UpdateLbRouteExtension

Updates the parameters of the specified `LbRouteExtension` resource.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • updateLbRouteExtensionAsync(UpdateLbRouteExtensionRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • updateLbRouteExtensionAsync(LbRouteExtension lbRouteExtension, FieldMask updateMask) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • updateLbRouteExtensionOperationCallable() *

  • updateLbRouteExtensionCallable() *

*

DeleteLbRouteExtension

Deletes the specified `LbRouteExtension` resource.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • deleteLbRouteExtensionAsync(DeleteLbRouteExtensionRequest request) *

*

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

*
    *
  • deleteLbRouteExtensionAsync(LbRouteExtensionName name) *

  • deleteLbRouteExtensionAsync(String name) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • deleteLbRouteExtensionOperationCallable() *

  • deleteLbRouteExtensionCallable() *

*

ListLocations

Lists information about the supported locations for this service.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • listLocations(ListLocationsRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • listLocationsPagedCallable() *

  • listLocationsCallable() *

*

GetLocation

Gets information about a location.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getLocation(GetLocationRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getLocationCallable() *

*

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • setIamPolicy(SetIamPolicyRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • setIamPolicyCallable() *

*

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • getIamPolicy(GetIamPolicyRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • getIamPolicyCallable() *

*

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

*

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    *
  • testIamPermissions(TestIamPermissionsRequest request) *

*

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

*
    *
  • testIamPermissionsCallable() *

*
* *

See the individual methods for example code. * *

Many parameters require resource names to be formatted in a particular way. To assist with * these names, this class includes a format method for each type of name, and additionally a parse * method to extract the individual identifiers contained within names that are returned. * *

This class can be customized by passing in a custom instance of DepServiceSettings 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
 * DepServiceSettings depServiceSettings =
 *     DepServiceSettings.newBuilder()
 *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
 *         .build();
 * DepServiceClient depServiceClient = DepServiceClient.create(depServiceSettings);
 * }
* *

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
 * DepServiceSettings depServiceSettings =
 *     DepServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 * DepServiceClient depServiceClient = DepServiceClient.create(depServiceSettings);
 * }
* *

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
 * DepServiceSettings depServiceSettings = DepServiceSettings.newHttpJsonBuilder().build();
 * DepServiceClient depServiceClient = DepServiceClient.create(depServiceSettings);
 * }
* *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") public class DepServiceClient implements BackgroundResource { private final DepServiceSettings settings; private final DepServiceStub stub; private final OperationsClient httpJsonOperationsClient; private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of DepServiceClient with default settings. */ public static final DepServiceClient create() throws IOException { return create(DepServiceSettings.newBuilder().build()); } /** * Constructs an instance of DepServiceClient, 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 DepServiceClient create(DepServiceSettings settings) throws IOException { return new DepServiceClient(settings); } /** * Constructs an instance of DepServiceClient, using the given stub for making calls. This is for * advanced usage - prefer using create(DepServiceSettings). */ public static final DepServiceClient create(DepServiceStub stub) { return new DepServiceClient(stub); } /** * Constructs an instance of DepServiceClient, 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 DepServiceClient(DepServiceSettings settings) throws IOException { this.settings = settings; this.stub = ((DepServiceStubSettings) settings.getStubSettings()).createStub(); this.operationsClient = com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected DepServiceClient(DepServiceStub 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 DepServiceSettings getSettings() { return settings; } public DepServiceStub 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. /** * Lists `LbTrafficExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (LbTrafficExtension element :
   *       depServiceClient.listLbTrafficExtensions(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The project and location from which the `LbTrafficExtension` resources * are listed, specified in the following format: `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(LocationName parent) { ListLbTrafficExtensionsRequest request = ListLbTrafficExtensionsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listLbTrafficExtensions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbTrafficExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (LbTrafficExtension element :
   *       depServiceClient.listLbTrafficExtensions(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The project and location from which the `LbTrafficExtension` resources * are listed, specified in the following format: `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(String parent) { ListLbTrafficExtensionsRequest request = ListLbTrafficExtensionsRequest.newBuilder().setParent(parent).build(); return listLbTrafficExtensions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbTrafficExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLbTrafficExtensionsRequest request =
   *       ListLbTrafficExtensionsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (LbTrafficExtension element :
   *       depServiceClient.listLbTrafficExtensions(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 ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions( ListLbTrafficExtensionsRequest request) { return listLbTrafficExtensionsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbTrafficExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLbTrafficExtensionsRequest request =
   *       ListLbTrafficExtensionsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.listLbTrafficExtensionsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (LbTrafficExtension element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listLbTrafficExtensionsPagedCallable() { return stub.listLbTrafficExtensionsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbTrafficExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLbTrafficExtensionsRequest request =
   *       ListLbTrafficExtensionsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListLbTrafficExtensionsResponse response =
   *         depServiceClient.listLbTrafficExtensionsCallable().call(request);
   *     for (LbTrafficExtension element : response.getLbTrafficExtensionsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listLbTrafficExtensionsCallable() { return stub.listLbTrafficExtensionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LbTrafficExtensionName name =
   *       LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]");
   *   LbTrafficExtension response = depServiceClient.getLbTrafficExtension(name);
   * }
   * }
* * @param name Required. A name of the `LbTrafficExtension` resource to get. Must be in the format * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LbTrafficExtension getLbTrafficExtension(LbTrafficExtensionName name) { GetLbTrafficExtensionRequest request = GetLbTrafficExtensionRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return getLbTrafficExtension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   String name =
   *       LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]").toString();
   *   LbTrafficExtension response = depServiceClient.getLbTrafficExtension(name);
   * }
   * }
* * @param name Required. A name of the `LbTrafficExtension` resource to get. Must be in the format * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LbTrafficExtension getLbTrafficExtension(String name) { GetLbTrafficExtensionRequest request = GetLbTrafficExtensionRequest.newBuilder().setName(name).build(); return getLbTrafficExtension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   GetLbTrafficExtensionRequest request =
   *       GetLbTrafficExtensionRequest.newBuilder()
   *           .setName(
   *               LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
   *                   .toString())
   *           .build();
   *   LbTrafficExtension response = depServiceClient.getLbTrafficExtension(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 LbTrafficExtension getLbTrafficExtension(GetLbTrafficExtensionRequest request) { return getLbTrafficExtensionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   GetLbTrafficExtensionRequest request =
   *       GetLbTrafficExtensionRequest.newBuilder()
   *           .setName(
   *               LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.getLbTrafficExtensionCallable().futureCall(request);
   *   // Do something.
   *   LbTrafficExtension response = future.get();
   * }
   * }
*/ public final UnaryCallable getLbTrafficExtensionCallable() { return stub.getLbTrafficExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbTrafficExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   LbTrafficExtension lbTrafficExtension = LbTrafficExtension.newBuilder().build();
   *   String lbTrafficExtensionId = "lbTrafficExtensionId1150549907";
   *   LbTrafficExtension response =
   *       depServiceClient
   *           .createLbTrafficExtensionAsync(parent, lbTrafficExtension, lbTrafficExtensionId)
   *           .get();
   * }
   * }
* * @param parent Required. The parent resource of the `LbTrafficExtension` resource. Must be in * the format `projects/{project}/locations/{location}`. * @param lbTrafficExtension Required. `LbTrafficExtension` resource to be created. * @param lbTrafficExtensionId Required. User-provided ID of the `LbTrafficExtension` resource to * be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createLbTrafficExtensionAsync( LocationName parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId) { CreateLbTrafficExtensionRequest request = CreateLbTrafficExtensionRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setLbTrafficExtension(lbTrafficExtension) .setLbTrafficExtensionId(lbTrafficExtensionId) .build(); return createLbTrafficExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbTrafficExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   LbTrafficExtension lbTrafficExtension = LbTrafficExtension.newBuilder().build();
   *   String lbTrafficExtensionId = "lbTrafficExtensionId1150549907";
   *   LbTrafficExtension response =
   *       depServiceClient
   *           .createLbTrafficExtensionAsync(parent, lbTrafficExtension, lbTrafficExtensionId)
   *           .get();
   * }
   * }
* * @param parent Required. The parent resource of the `LbTrafficExtension` resource. Must be in * the format `projects/{project}/locations/{location}`. * @param lbTrafficExtension Required. `LbTrafficExtension` resource to be created. * @param lbTrafficExtensionId Required. User-provided ID of the `LbTrafficExtension` resource to * be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createLbTrafficExtensionAsync( String parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId) { CreateLbTrafficExtensionRequest request = CreateLbTrafficExtensionRequest.newBuilder() .setParent(parent) .setLbTrafficExtension(lbTrafficExtension) .setLbTrafficExtensionId(lbTrafficExtensionId) .build(); return createLbTrafficExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbTrafficExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   CreateLbTrafficExtensionRequest request =
   *       CreateLbTrafficExtensionRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setLbTrafficExtensionId("lbTrafficExtensionId1150549907")
   *           .setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   LbTrafficExtension response = depServiceClient.createLbTrafficExtensionAsync(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 createLbTrafficExtensionAsync( CreateLbTrafficExtensionRequest request) { return createLbTrafficExtensionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbTrafficExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   CreateLbTrafficExtensionRequest request =
   *       CreateLbTrafficExtensionRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setLbTrafficExtensionId("lbTrafficExtensionId1150549907")
   *           .setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       depServiceClient.createLbTrafficExtensionOperationCallable().futureCall(request);
   *   // Do something.
   *   LbTrafficExtension response = future.get();
   * }
   * }
*/ public final OperationCallable< CreateLbTrafficExtensionRequest, LbTrafficExtension, OperationMetadata> createLbTrafficExtensionOperationCallable() { return stub.createLbTrafficExtensionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbTrafficExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   CreateLbTrafficExtensionRequest request =
   *       CreateLbTrafficExtensionRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setLbTrafficExtensionId("lbTrafficExtensionId1150549907")
   *           .setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.createLbTrafficExtensionCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createLbTrafficExtensionCallable() { return stub.createLbTrafficExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LbTrafficExtension lbTrafficExtension = LbTrafficExtension.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   LbTrafficExtension response =
   *       depServiceClient.updateLbTrafficExtensionAsync(lbTrafficExtension, updateMask).get();
   * }
   * }
* * @param lbTrafficExtension Required. `LbTrafficExtension` resource being updated. * @param updateMask Optional. Used to specify the fields to be overwritten in the * `LbTrafficExtension` resource by the update. The fields specified in the update_mask are * relative to the resource, not the full request. A field is overwritten if it is in the * mask. If the user does not specify a mask, then all fields are overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateLbTrafficExtensionAsync( LbTrafficExtension lbTrafficExtension, FieldMask updateMask) { UpdateLbTrafficExtensionRequest request = UpdateLbTrafficExtensionRequest.newBuilder() .setLbTrafficExtension(lbTrafficExtension) .setUpdateMask(updateMask) .build(); return updateLbTrafficExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   UpdateLbTrafficExtensionRequest request =
   *       UpdateLbTrafficExtensionRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   LbTrafficExtension response = depServiceClient.updateLbTrafficExtensionAsync(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 updateLbTrafficExtensionAsync( UpdateLbTrafficExtensionRequest request) { return updateLbTrafficExtensionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   UpdateLbTrafficExtensionRequest request =
   *       UpdateLbTrafficExtensionRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       depServiceClient.updateLbTrafficExtensionOperationCallable().futureCall(request);
   *   // Do something.
   *   LbTrafficExtension response = future.get();
   * }
   * }
*/ public final OperationCallable< UpdateLbTrafficExtensionRequest, LbTrafficExtension, OperationMetadata> updateLbTrafficExtensionOperationCallable() { return stub.updateLbTrafficExtensionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   UpdateLbTrafficExtensionRequest request =
   *       UpdateLbTrafficExtensionRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.updateLbTrafficExtensionCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateLbTrafficExtensionCallable() { return stub.updateLbTrafficExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LbTrafficExtensionName name =
   *       LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]");
   *   depServiceClient.deleteLbTrafficExtensionAsync(name).get();
   * }
   * }
* * @param name Required. The name of the `LbTrafficExtension` resource to delete. Must be in the * format * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteLbTrafficExtensionAsync( LbTrafficExtensionName name) { DeleteLbTrafficExtensionRequest request = DeleteLbTrafficExtensionRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteLbTrafficExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   String name =
   *       LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]").toString();
   *   depServiceClient.deleteLbTrafficExtensionAsync(name).get();
   * }
   * }
* * @param name Required. The name of the `LbTrafficExtension` resource to delete. Must be in the * format * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteLbTrafficExtensionAsync( String name) { DeleteLbTrafficExtensionRequest request = DeleteLbTrafficExtensionRequest.newBuilder().setName(name).build(); return deleteLbTrafficExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   DeleteLbTrafficExtensionRequest request =
   *       DeleteLbTrafficExtensionRequest.newBuilder()
   *           .setName(
   *               LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   depServiceClient.deleteLbTrafficExtensionAsync(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 deleteLbTrafficExtensionAsync( DeleteLbTrafficExtensionRequest request) { return deleteLbTrafficExtensionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   DeleteLbTrafficExtensionRequest request =
   *       DeleteLbTrafficExtensionRequest.newBuilder()
   *           .setName(
   *               LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       depServiceClient.deleteLbTrafficExtensionOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteLbTrafficExtensionOperationCallable() { return stub.deleteLbTrafficExtensionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbTrafficExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   DeleteLbTrafficExtensionRequest request =
   *       DeleteLbTrafficExtensionRequest.newBuilder()
   *           .setName(
   *               LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.deleteLbTrafficExtensionCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteLbTrafficExtensionCallable() { return stub.deleteLbTrafficExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbRouteExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (LbRouteExtension element : depServiceClient.listLbRouteExtensions(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The project and location from which the `LbRouteExtension` resources * are listed, specified in the following format: `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLbRouteExtensionsPagedResponse listLbRouteExtensions(LocationName parent) { ListLbRouteExtensionsRequest request = ListLbRouteExtensionsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listLbRouteExtensions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbRouteExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (LbRouteExtension element : depServiceClient.listLbRouteExtensions(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The project and location from which the `LbRouteExtension` resources * are listed, specified in the following format: `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLbRouteExtensionsPagedResponse listLbRouteExtensions(String parent) { ListLbRouteExtensionsRequest request = ListLbRouteExtensionsRequest.newBuilder().setParent(parent).build(); return listLbRouteExtensions(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbRouteExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLbRouteExtensionsRequest request =
   *       ListLbRouteExtensionsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (LbRouteExtension element :
   *       depServiceClient.listLbRouteExtensions(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 ListLbRouteExtensionsPagedResponse listLbRouteExtensions( ListLbRouteExtensionsRequest request) { return listLbRouteExtensionsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbRouteExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLbRouteExtensionsRequest request =
   *       ListLbRouteExtensionsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.listLbRouteExtensionsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (LbRouteExtension element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listLbRouteExtensionsPagedCallable() { return stub.listLbRouteExtensionsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists `LbRouteExtension` resources in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLbRouteExtensionsRequest request =
   *       ListLbRouteExtensionsRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListLbRouteExtensionsResponse response =
   *         depServiceClient.listLbRouteExtensionsCallable().call(request);
   *     for (LbRouteExtension element : response.getLbRouteExtensionsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listLbRouteExtensionsCallable() { return stub.listLbRouteExtensionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LbRouteExtensionName name =
   *       LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]");
   *   LbRouteExtension response = depServiceClient.getLbRouteExtension(name);
   * }
   * }
* * @param name Required. A name of the `LbRouteExtension` resource to get. Must be in the format * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LbRouteExtension getLbRouteExtension(LbRouteExtensionName name) { GetLbRouteExtensionRequest request = GetLbRouteExtensionRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return getLbRouteExtension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   String name =
   *       LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]").toString();
   *   LbRouteExtension response = depServiceClient.getLbRouteExtension(name);
   * }
   * }
* * @param name Required. A name of the `LbRouteExtension` resource to get. Must be in the format * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LbRouteExtension getLbRouteExtension(String name) { GetLbRouteExtensionRequest request = GetLbRouteExtensionRequest.newBuilder().setName(name).build(); return getLbRouteExtension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   GetLbRouteExtensionRequest request =
   *       GetLbRouteExtensionRequest.newBuilder()
   *           .setName(
   *               LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
   *                   .toString())
   *           .build();
   *   LbRouteExtension response = depServiceClient.getLbRouteExtension(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 LbRouteExtension getLbRouteExtension(GetLbRouteExtensionRequest request) { return getLbRouteExtensionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   GetLbRouteExtensionRequest request =
   *       GetLbRouteExtensionRequest.newBuilder()
   *           .setName(
   *               LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
   *                   .toString())
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.getLbRouteExtensionCallable().futureCall(request);
   *   // Do something.
   *   LbRouteExtension response = future.get();
   * }
   * }
*/ public final UnaryCallable getLbRouteExtensionCallable() { return stub.getLbRouteExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbRouteExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   LbRouteExtension lbRouteExtension = LbRouteExtension.newBuilder().build();
   *   String lbRouteExtensionId = "lbRouteExtensionId-1336830649";
   *   LbRouteExtension response =
   *       depServiceClient
   *           .createLbRouteExtensionAsync(parent, lbRouteExtension, lbRouteExtensionId)
   *           .get();
   * }
   * }
* * @param parent Required. The parent resource of the `LbRouteExtension` resource. Must be in the * format `projects/{project}/locations/{location}`. * @param lbRouteExtension Required. `LbRouteExtension` resource to be created. * @param lbRouteExtensionId Required. User-provided ID of the `LbRouteExtension` resource to be * created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createLbRouteExtensionAsync( LocationName parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId) { CreateLbRouteExtensionRequest request = CreateLbRouteExtensionRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setLbRouteExtension(lbRouteExtension) .setLbRouteExtensionId(lbRouteExtensionId) .build(); return createLbRouteExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbRouteExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   LbRouteExtension lbRouteExtension = LbRouteExtension.newBuilder().build();
   *   String lbRouteExtensionId = "lbRouteExtensionId-1336830649";
   *   LbRouteExtension response =
   *       depServiceClient
   *           .createLbRouteExtensionAsync(parent, lbRouteExtension, lbRouteExtensionId)
   *           .get();
   * }
   * }
* * @param parent Required. The parent resource of the `LbRouteExtension` resource. Must be in the * format `projects/{project}/locations/{location}`. * @param lbRouteExtension Required. `LbRouteExtension` resource to be created. * @param lbRouteExtensionId Required. User-provided ID of the `LbRouteExtension` resource to be * created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createLbRouteExtensionAsync( String parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId) { CreateLbRouteExtensionRequest request = CreateLbRouteExtensionRequest.newBuilder() .setParent(parent) .setLbRouteExtension(lbRouteExtension) .setLbRouteExtensionId(lbRouteExtensionId) .build(); return createLbRouteExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbRouteExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   CreateLbRouteExtensionRequest request =
   *       CreateLbRouteExtensionRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setLbRouteExtensionId("lbRouteExtensionId-1336830649")
   *           .setLbRouteExtension(LbRouteExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   LbRouteExtension response = depServiceClient.createLbRouteExtensionAsync(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 createLbRouteExtensionAsync( CreateLbRouteExtensionRequest request) { return createLbRouteExtensionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbRouteExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   CreateLbRouteExtensionRequest request =
   *       CreateLbRouteExtensionRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setLbRouteExtensionId("lbRouteExtensionId-1336830649")
   *           .setLbRouteExtension(LbRouteExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       depServiceClient.createLbRouteExtensionOperationCallable().futureCall(request);
   *   // Do something.
   *   LbRouteExtension response = future.get();
   * }
   * }
*/ public final OperationCallable createLbRouteExtensionOperationCallable() { return stub.createLbRouteExtensionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new `LbRouteExtension` resource in a given project and 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   CreateLbRouteExtensionRequest request =
   *       CreateLbRouteExtensionRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setLbRouteExtensionId("lbRouteExtensionId-1336830649")
   *           .setLbRouteExtension(LbRouteExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.createLbRouteExtensionCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createLbRouteExtensionCallable() { return stub.createLbRouteExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LbRouteExtension lbRouteExtension = LbRouteExtension.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   LbRouteExtension response =
   *       depServiceClient.updateLbRouteExtensionAsync(lbRouteExtension, updateMask).get();
   * }
   * }
* * @param lbRouteExtension Required. `LbRouteExtension` resource being updated. * @param updateMask Optional. Used to specify the fields to be overwritten in the * `LbRouteExtension` resource by the update. The fields specified in the update_mask are * relative to the resource, not the full request. A field is overwritten if it is in the * mask. If the user does not specify a mask, then all fields are overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateLbRouteExtensionAsync( LbRouteExtension lbRouteExtension, FieldMask updateMask) { UpdateLbRouteExtensionRequest request = UpdateLbRouteExtensionRequest.newBuilder() .setLbRouteExtension(lbRouteExtension) .setUpdateMask(updateMask) .build(); return updateLbRouteExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   UpdateLbRouteExtensionRequest request =
   *       UpdateLbRouteExtensionRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setLbRouteExtension(LbRouteExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   LbRouteExtension response = depServiceClient.updateLbRouteExtensionAsync(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 updateLbRouteExtensionAsync( UpdateLbRouteExtensionRequest request) { return updateLbRouteExtensionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   UpdateLbRouteExtensionRequest request =
   *       UpdateLbRouteExtensionRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setLbRouteExtension(LbRouteExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       depServiceClient.updateLbRouteExtensionOperationCallable().futureCall(request);
   *   // Do something.
   *   LbRouteExtension response = future.get();
   * }
   * }
*/ public final OperationCallable updateLbRouteExtensionOperationCallable() { return stub.updateLbRouteExtensionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   UpdateLbRouteExtensionRequest request =
   *       UpdateLbRouteExtensionRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setLbRouteExtension(LbRouteExtension.newBuilder().build())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.updateLbRouteExtensionCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateLbRouteExtensionCallable() { return stub.updateLbRouteExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   LbRouteExtensionName name =
   *       LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]");
   *   depServiceClient.deleteLbRouteExtensionAsync(name).get();
   * }
   * }
* * @param name Required. The name of the `LbRouteExtension` resource to delete. Must be in the * format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteLbRouteExtensionAsync( LbRouteExtensionName name) { DeleteLbRouteExtensionRequest request = DeleteLbRouteExtensionRequest.newBuilder() .setName(name == null ? null : name.toString()) .build(); return deleteLbRouteExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   String name =
   *       LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]").toString();
   *   depServiceClient.deleteLbRouteExtensionAsync(name).get();
   * }
   * }
* * @param name Required. The name of the `LbRouteExtension` resource to delete. Must be in the * format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteLbRouteExtensionAsync(String name) { DeleteLbRouteExtensionRequest request = DeleteLbRouteExtensionRequest.newBuilder().setName(name).build(); return deleteLbRouteExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   DeleteLbRouteExtensionRequest request =
   *       DeleteLbRouteExtensionRequest.newBuilder()
   *           .setName(
   *               LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   depServiceClient.deleteLbRouteExtensionAsync(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 deleteLbRouteExtensionAsync( DeleteLbRouteExtensionRequest request) { return deleteLbRouteExtensionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   DeleteLbRouteExtensionRequest request =
   *       DeleteLbRouteExtensionRequest.newBuilder()
   *           .setName(
   *               LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   OperationFuture future =
   *       depServiceClient.deleteLbRouteExtensionOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteLbRouteExtensionOperationCallable() { return stub.deleteLbRouteExtensionOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes the specified `LbRouteExtension` 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   DeleteLbRouteExtensionRequest request =
   *       DeleteLbRouteExtensionRequest.newBuilder()
   *           .setName(
   *               LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
   *                   .toString())
   *           .setRequestId("requestId693933066")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.deleteLbRouteExtensionCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteLbRouteExtensionCallable() { return stub.deleteLbRouteExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   for (Location element : depServiceClient.listLocations(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { return listLocationsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.listLocationsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Location element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listLocationsPagedCallable() { return stub.listLocationsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   ListLocationsRequest request =
   *       ListLocationsRequest.newBuilder()
   *           .setName("name3373707")
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   while (true) {
   *     ListLocationsResponse response = depServiceClient.listLocationsCallable().call(request);
   *     for (Location element : response.getLocationsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listLocationsCallable() { return stub.listLocationsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about a location. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   *   Location response = depServiceClient.getLocation(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Location getLocation(GetLocationRequest request) { return getLocationCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about a location. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   *   ApiFuture future = depServiceClient.getLocationCallable().futureCall(request);
   *   // Do something.
   *   Location response = future.get();
   * }
   * }
*/ public final UnaryCallable getLocationCallable() { return stub.getLocationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Sets the access control policy on the specified resource. Replacesany existing policy. * *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   SetIamPolicyRequest request =
   *       SetIamPolicyRequest.newBuilder()
   *           .setResource(
   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
   *           .setPolicy(Policy.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .build();
   *   Policy response = depServiceClient.setIamPolicy(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy setIamPolicy(SetIamPolicyRequest request) { return setIamPolicyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Sets the access control policy on the specified resource. Replacesany existing policy. * *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   SetIamPolicyRequest request =
   *       SetIamPolicyRequest.newBuilder()
   *           .setResource(
   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
   *           .setPolicy(Policy.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .build();
   *   ApiFuture future = depServiceClient.setIamPolicyCallable().futureCall(request);
   *   // Do something.
   *   Policy response = future.get();
   * }
   * }
*/ public final UnaryCallable setIamPolicyCallable() { return stub.setIamPolicyCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the access control policy for a resource. Returns an empty policyif the resource exists * and does not have a policy set. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   GetIamPolicyRequest request =
   *       GetIamPolicyRequest.newBuilder()
   *           .setResource(
   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
   *           .setOptions(GetPolicyOptions.newBuilder().build())
   *           .build();
   *   Policy response = depServiceClient.getIamPolicy(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Policy getIamPolicy(GetIamPolicyRequest request) { return getIamPolicyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the access control policy for a resource. Returns an empty policyif the resource exists * and does not have a policy set. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   GetIamPolicyRequest request =
   *       GetIamPolicyRequest.newBuilder()
   *           .setResource(
   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
   *           .setOptions(GetPolicyOptions.newBuilder().build())
   *           .build();
   *   ApiFuture future = depServiceClient.getIamPolicyCallable().futureCall(request);
   *   // Do something.
   *   Policy response = future.get();
   * }
   * }
*/ public final UnaryCallable getIamPolicyCallable() { return stub.getIamPolicyCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns permissions that a caller has on the specified resource. If theresource does not exist, * this will return an empty set ofpermissions, not a `NOT_FOUND` error. * *

Note: This operation is designed to be used for buildingpermission-aware UIs and * command-line tools, not for authorizationchecking. This operation may "fail open" without * warning. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   TestIamPermissionsRequest request =
   *       TestIamPermissionsRequest.newBuilder()
   *           .setResource(
   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
   *           .addAllPermissions(new ArrayList())
   *           .build();
   *   TestIamPermissionsResponse response = depServiceClient.testIamPermissions(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { return testIamPermissionsCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns permissions that a caller has on the specified resource. If theresource does not exist, * this will return an empty set ofpermissions, not a `NOT_FOUND` error. * *

Note: This operation is designed to be used for buildingpermission-aware UIs and * command-line tools, not for authorizationchecking. This operation may "fail open" without * warning. * *

Sample code: * *

{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (DepServiceClient depServiceClient = DepServiceClient.create()) {
   *   TestIamPermissionsRequest request =
   *       TestIamPermissionsRequest.newBuilder()
   *           .setResource(
   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
   *           .addAllPermissions(new ArrayList())
   *           .build();
   *   ApiFuture future =
   *       depServiceClient.testIamPermissionsCallable().futureCall(request);
   *   // Do something.
   *   TestIamPermissionsResponse response = future.get();
   * }
   * }
*/ public final UnaryCallable testIamPermissionsCallable() { return stub.testIamPermissionsCallable(); } @Override public final void close() { stub.close(); } @Override public void shutdown() { stub.shutdown(); } @Override public boolean isShutdown() { return stub.isShutdown(); } @Override public boolean isTerminated() { return stub.isTerminated(); } @Override public void shutdownNow() { stub.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return stub.awaitTermination(duration, unit); } public static class ListLbTrafficExtensionsPagedResponse extends AbstractPagedListResponse< ListLbTrafficExtensionsRequest, ListLbTrafficExtensionsResponse, LbTrafficExtension, ListLbTrafficExtensionsPage, ListLbTrafficExtensionsFixedSizeCollection> { public static ApiFuture createAsync( PageContext< ListLbTrafficExtensionsRequest, ListLbTrafficExtensionsResponse, LbTrafficExtension> context, ApiFuture futureResponse) { ApiFuture futurePage = ListLbTrafficExtensionsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListLbTrafficExtensionsPagedResponse(input), MoreExecutors.directExecutor()); } private ListLbTrafficExtensionsPagedResponse(ListLbTrafficExtensionsPage page) { super(page, ListLbTrafficExtensionsFixedSizeCollection.createEmptyCollection()); } } public static class ListLbTrafficExtensionsPage extends AbstractPage< ListLbTrafficExtensionsRequest, ListLbTrafficExtensionsResponse, LbTrafficExtension, ListLbTrafficExtensionsPage> { private ListLbTrafficExtensionsPage( PageContext< ListLbTrafficExtensionsRequest, ListLbTrafficExtensionsResponse, LbTrafficExtension> context, ListLbTrafficExtensionsResponse response) { super(context, response); } private static ListLbTrafficExtensionsPage createEmptyPage() { return new ListLbTrafficExtensionsPage(null, null); } @Override protected ListLbTrafficExtensionsPage createPage( PageContext< ListLbTrafficExtensionsRequest, ListLbTrafficExtensionsResponse, LbTrafficExtension> context, ListLbTrafficExtensionsResponse response) { return new ListLbTrafficExtensionsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext< ListLbTrafficExtensionsRequest, ListLbTrafficExtensionsResponse, LbTrafficExtension> context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListLbTrafficExtensionsFixedSizeCollection extends AbstractFixedSizeCollection< ListLbTrafficExtensionsRequest, ListLbTrafficExtensionsResponse, LbTrafficExtension, ListLbTrafficExtensionsPage, ListLbTrafficExtensionsFixedSizeCollection> { private ListLbTrafficExtensionsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListLbTrafficExtensionsFixedSizeCollection createEmptyCollection() { return new ListLbTrafficExtensionsFixedSizeCollection(null, 0); } @Override protected ListLbTrafficExtensionsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListLbTrafficExtensionsFixedSizeCollection(pages, collectionSize); } } public static class ListLbRouteExtensionsPagedResponse extends AbstractPagedListResponse< ListLbRouteExtensionsRequest, ListLbRouteExtensionsResponse, LbRouteExtension, ListLbRouteExtensionsPage, ListLbRouteExtensionsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListLbRouteExtensionsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListLbRouteExtensionsPagedResponse(input), MoreExecutors.directExecutor()); } private ListLbRouteExtensionsPagedResponse(ListLbRouteExtensionsPage page) { super(page, ListLbRouteExtensionsFixedSizeCollection.createEmptyCollection()); } } public static class ListLbRouteExtensionsPage extends AbstractPage< ListLbRouteExtensionsRequest, ListLbRouteExtensionsResponse, LbRouteExtension, ListLbRouteExtensionsPage> { private ListLbRouteExtensionsPage( PageContext context, ListLbRouteExtensionsResponse response) { super(context, response); } private static ListLbRouteExtensionsPage createEmptyPage() { return new ListLbRouteExtensionsPage(null, null); } @Override protected ListLbRouteExtensionsPage createPage( PageContext context, ListLbRouteExtensionsResponse response) { return new ListLbRouteExtensionsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListLbRouteExtensionsFixedSizeCollection extends AbstractFixedSizeCollection< ListLbRouteExtensionsRequest, ListLbRouteExtensionsResponse, LbRouteExtension, ListLbRouteExtensionsPage, ListLbRouteExtensionsFixedSizeCollection> { private ListLbRouteExtensionsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static ListLbRouteExtensionsFixedSizeCollection createEmptyCollection() { return new ListLbRouteExtensionsFixedSizeCollection(null, 0); } @Override protected ListLbRouteExtensionsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListLbRouteExtensionsFixedSizeCollection(pages, collectionSize); } } public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, ListLocationsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListLocationsPagedResponse(input), MoreExecutors.directExecutor()); } private ListLocationsPagedResponse(ListLocationsPage page) { super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); } } public static class ListLocationsPage extends AbstractPage< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { private ListLocationsPage( PageContext context, ListLocationsResponse response) { super(context, response); } private static ListLocationsPage createEmptyPage() { return new ListLocationsPage(null, null); } @Override protected ListLocationsPage createPage( PageContext context, ListLocationsResponse response) { return new ListLocationsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListLocationsFixedSizeCollection extends AbstractFixedSizeCollection< ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage, ListLocationsFixedSizeCollection> { private ListLocationsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListLocationsFixedSizeCollection createEmptyCollection() { return new ListLocationsFixedSizeCollection(null, 0); } @Override protected ListLocationsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListLocationsFixedSizeCollection(pages, collectionSize); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy