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

com.google.cloud.apigateway.v1.ApiGatewayServiceClient Maven / Gradle / Ivy

Go to download

API Gateway enables you to provide secure access to your backend services through a well-defined REST API that is consistent across all of your services, regardless of the service implementation. Clients consume your REST APIS to implement standalone apps for a mobile device or tablet, through apps running in a browser, or through any other type of app that can make a request to an HTTP endpoint.

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.apigateway.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.apigateway.v1.stub.ApiGatewayServiceStub;
import com.google.cloud.apigateway.v1.stub.ApiGatewayServiceStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
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: The API Gateway Service is the interface for managing API Gateways.
 *
 * 

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
 *   GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
 *   Gateway response = apiGatewayServiceClient.getGateway(name);
 * }
 * }
* *

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

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

ListGateways

Lists Gateways in a given project and location.

*

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

*
    *
  • listGateways(ListGatewaysRequest request) *

*

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

*
    *
  • listGateways(LocationName parent) *

  • listGateways(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.

*
    *
  • listGatewaysPagedCallable() *

  • listGatewaysCallable() *

*

GetGateway

Gets details of a single Gateway.

*

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

*
    *
  • getGateway(GetGatewayRequest request) *

*

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

*
    *
  • getGateway(GatewayName name) *

  • getGateway(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.

*
    *
  • getGatewayCallable() *

*

CreateGateway

Creates a new Gateway in a given project and location.

*

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

*
    *
  • createGatewayAsync(CreateGatewayRequest request) *

*

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

*
    *
  • createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId) *

  • createGatewayAsync(String parent, Gateway gateway, String gatewayId) *

*

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

*
    *
  • createGatewayOperationCallable() *

  • createGatewayCallable() *

*

UpdateGateway

Updates the parameters of a single Gateway.

*

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

*
    *
  • updateGatewayAsync(UpdateGatewayRequest request) *

*

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

*
    *
  • updateGatewayAsync(Gateway gateway, 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.

*
    *
  • updateGatewayOperationCallable() *

  • updateGatewayCallable() *

*

DeleteGateway

Deletes a single Gateway.

*

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

*
    *
  • deleteGatewayAsync(DeleteGatewayRequest request) *

*

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

*
    *
  • deleteGatewayAsync(GatewayName name) *

  • deleteGatewayAsync(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.

*
    *
  • deleteGatewayOperationCallable() *

  • deleteGatewayCallable() *

*

ListApis

Lists Apis in a given project and location.

*

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

*
    *
  • listApis(ListApisRequest request) *

*

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

*
    *
  • listApis(LocationName parent) *

  • listApis(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.

*
    *
  • listApisPagedCallable() *

  • listApisCallable() *

*

GetApi

Gets details of a single Api.

*

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

*
    *
  • getApi(GetApiRequest request) *

*

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

*
    *
  • getApi(ApiName name) *

  • getApi(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.

*
    *
  • getApiCallable() *

*

CreateApi

Creates a new Api in a given project and location.

*

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

*
    *
  • createApiAsync(CreateApiRequest request) *

*

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

*
    *
  • createApiAsync(LocationName parent, Api api, String apiId) *

  • createApiAsync(String parent, Api api, String apiId) *

*

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

*
    *
  • createApiOperationCallable() *

  • createApiCallable() *

*

UpdateApi

Updates the parameters of a single Api.

*

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

*
    *
  • updateApiAsync(UpdateApiRequest request) *

*

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

*
    *
  • updateApiAsync(Api api, 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.

*
    *
  • updateApiOperationCallable() *

  • updateApiCallable() *

*

DeleteApi

Deletes a single Api.

*

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

*
    *
  • deleteApiAsync(DeleteApiRequest request) *

*

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

*
    *
  • deleteApiAsync(ApiName name) *

  • deleteApiAsync(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.

*
    *
  • deleteApiOperationCallable() *

  • deleteApiCallable() *

*

ListApiConfigs

Lists ApiConfigs in a given project and location.

*

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

*
    *
  • listApiConfigs(ListApiConfigsRequest request) *

*

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

*
    *
  • listApiConfigs(ApiName parent) *

  • listApiConfigs(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.

*
    *
  • listApiConfigsPagedCallable() *

  • listApiConfigsCallable() *

*

GetApiConfig

Gets details of a single ApiConfig.

*

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

*
    *
  • getApiConfig(GetApiConfigRequest request) *

*

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

*
    *
  • getApiConfig(ApiConfigName name) *

  • getApiConfig(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.

*
    *
  • getApiConfigCallable() *

*

CreateApiConfig

Creates a new ApiConfig in a given project and location.

*

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

*
    *
  • createApiConfigAsync(CreateApiConfigRequest request) *

*

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

*
    *
  • createApiConfigAsync(ApiName parent, ApiConfig apiConfig, String apiConfigId) *

  • createApiConfigAsync(String parent, ApiConfig apiConfig, String apiConfigId) *

*

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

*
    *
  • createApiConfigOperationCallable() *

  • createApiConfigCallable() *

*

UpdateApiConfig

Updates the parameters of a single ApiConfig.

*

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

*
    *
  • updateApiConfigAsync(UpdateApiConfigRequest request) *

*

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

*
    *
  • updateApiConfigAsync(ApiConfig apiConfig, 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.

*
    *
  • updateApiConfigOperationCallable() *

  • updateApiConfigCallable() *

*

DeleteApiConfig

Deletes a single ApiConfig.

*

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

*
    *
  • deleteApiConfigAsync(DeleteApiConfigRequest request) *

*

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

*
    *
  • deleteApiConfigAsync(ApiConfigName name) *

  • deleteApiConfigAsync(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.

*
    *
  • deleteApiConfigOperationCallable() *

  • deleteApiConfigCallable() *

*
* *

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 ApiGatewayServiceSettings 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
 * ApiGatewayServiceSettings apiGatewayServiceSettings =
 *     ApiGatewayServiceSettings.newBuilder()
 *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
 *         .build();
 * ApiGatewayServiceClient apiGatewayServiceClient =
 *     ApiGatewayServiceClient.create(apiGatewayServiceSettings);
 * }
* *

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
 * ApiGatewayServiceSettings apiGatewayServiceSettings =
 *     ApiGatewayServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 * ApiGatewayServiceClient apiGatewayServiceClient =
 *     ApiGatewayServiceClient.create(apiGatewayServiceSettings);
 * }
* *

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
 * ApiGatewayServiceSettings apiGatewayServiceSettings =
 *     ApiGatewayServiceSettings.newHttpJsonBuilder().build();
 * ApiGatewayServiceClient apiGatewayServiceClient =
 *     ApiGatewayServiceClient.create(apiGatewayServiceSettings);
 * }
* *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") public class ApiGatewayServiceClient implements BackgroundResource { private final ApiGatewayServiceSettings settings; private final ApiGatewayServiceStub stub; private final OperationsClient httpJsonOperationsClient; private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of ApiGatewayServiceClient with default settings. */ public static final ApiGatewayServiceClient create() throws IOException { return create(ApiGatewayServiceSettings.newBuilder().build()); } /** * Constructs an instance of ApiGatewayServiceClient, 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 ApiGatewayServiceClient create(ApiGatewayServiceSettings settings) throws IOException { return new ApiGatewayServiceClient(settings); } /** * Constructs an instance of ApiGatewayServiceClient, using the given stub for making calls. This * is for advanced usage - prefer using create(ApiGatewayServiceSettings). */ public static final ApiGatewayServiceClient create(ApiGatewayServiceStub stub) { return new ApiGatewayServiceClient(stub); } /** * Constructs an instance of ApiGatewayServiceClient, 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 ApiGatewayServiceClient(ApiGatewayServiceSettings settings) throws IOException { this.settings = settings; this.stub = ((ApiGatewayServiceStubSettings) settings.getStubSettings()).createStub(); this.operationsClient = com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected ApiGatewayServiceClient(ApiGatewayServiceStub 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 ApiGatewayServiceSettings getSettings() { return settings; } public ApiGatewayServiceStub 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 Gateways 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (Gateway element : apiGatewayServiceClient.listGateways(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent resource of the Gateway, of the form: * `projects/*/locations/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGatewaysPagedResponse listGateways(LocationName parent) { ListGatewaysRequest request = ListGatewaysRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listGateways(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Gateways 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (Gateway element : apiGatewayServiceClient.listGateways(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent resource of the Gateway, of the form: * `projects/*/locations/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGatewaysPagedResponse listGateways(String parent) { ListGatewaysRequest request = ListGatewaysRequest.newBuilder().setParent(parent).build(); return listGateways(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Gateways 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListGatewaysRequest request =
   *       ListGatewaysRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Gateway element : apiGatewayServiceClient.listGateways(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 ListGatewaysPagedResponse listGateways(ListGatewaysRequest request) { return listGatewaysPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Gateways 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListGatewaysRequest request =
   *       ListGatewaysRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.listGatewaysPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Gateway element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listGatewaysPagedCallable() { return stub.listGatewaysPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Gateways 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListGatewaysRequest request =
   *       ListGatewaysRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListGatewaysResponse response =
   *         apiGatewayServiceClient.listGatewaysCallable().call(request);
   *     for (Gateway element : response.getGatewaysList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listGatewaysCallable() { return stub.listGatewaysCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
   *   Gateway response = apiGatewayServiceClient.getGateway(name);
   * }
   * }
* * @param name Required. Resource name of the form: * `projects/*/locations/*/gateways/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Gateway getGateway(GatewayName name) { GetGatewayRequest request = GetGatewayRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getGateway(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString();
   *   Gateway response = apiGatewayServiceClient.getGateway(name);
   * }
   * }
* * @param name Required. Resource name of the form: * `projects/*/locations/*/gateways/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Gateway getGateway(String name) { GetGatewayRequest request = GetGatewayRequest.newBuilder().setName(name).build(); return getGateway(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   GetGatewayRequest request =
   *       GetGatewayRequest.newBuilder()
   *           .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
   *           .build();
   *   Gateway response = apiGatewayServiceClient.getGateway(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 Gateway getGateway(GetGatewayRequest request) { return getGatewayCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   GetGatewayRequest request =
   *       GetGatewayRequest.newBuilder()
   *           .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
   *           .build();
   *   ApiFuture future = apiGatewayServiceClient.getGatewayCallable().futureCall(request);
   *   // Do something.
   *   Gateway response = future.get();
   * }
   * }
*/ public final UnaryCallable getGatewayCallable() { return stub.getGatewayCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Gateway 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   Gateway gateway = Gateway.newBuilder().build();
   *   String gatewayId = "gatewayId-1354641793";
   *   Gateway response =
   *       apiGatewayServiceClient.createGatewayAsync(parent, gateway, gatewayId).get();
   * }
   * }
* * @param parent Required. Parent resource of the Gateway, of the form: * `projects/*/locations/*` * @param gateway Required. Gateway resource. * @param gatewayId Required. Identifier to assign to the Gateway. Must be unique within scope of * the parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createGatewayAsync( LocationName parent, Gateway gateway, String gatewayId) { CreateGatewayRequest request = CreateGatewayRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setGateway(gateway) .setGatewayId(gatewayId) .build(); return createGatewayAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Gateway 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   Gateway gateway = Gateway.newBuilder().build();
   *   String gatewayId = "gatewayId-1354641793";
   *   Gateway response =
   *       apiGatewayServiceClient.createGatewayAsync(parent, gateway, gatewayId).get();
   * }
   * }
* * @param parent Required. Parent resource of the Gateway, of the form: * `projects/*/locations/*` * @param gateway Required. Gateway resource. * @param gatewayId Required. Identifier to assign to the Gateway. Must be unique within scope of * the parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createGatewayAsync( String parent, Gateway gateway, String gatewayId) { CreateGatewayRequest request = CreateGatewayRequest.newBuilder() .setParent(parent) .setGateway(gateway) .setGatewayId(gatewayId) .build(); return createGatewayAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Gateway 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateGatewayRequest request =
   *       CreateGatewayRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setGatewayId("gatewayId-1354641793")
   *           .setGateway(Gateway.newBuilder().build())
   *           .build();
   *   Gateway response = apiGatewayServiceClient.createGatewayAsync(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 createGatewayAsync( CreateGatewayRequest request) { return createGatewayOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Gateway 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateGatewayRequest request =
   *       CreateGatewayRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setGatewayId("gatewayId-1354641793")
   *           .setGateway(Gateway.newBuilder().build())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.createGatewayOperationCallable().futureCall(request);
   *   // Do something.
   *   Gateway response = future.get();
   * }
   * }
*/ public final OperationCallable createGatewayOperationCallable() { return stub.createGatewayOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Gateway 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateGatewayRequest request =
   *       CreateGatewayRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setGatewayId("gatewayId-1354641793")
   *           .setGateway(Gateway.newBuilder().build())
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.createGatewayCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createGatewayCallable() { return stub.createGatewayCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   Gateway gateway = Gateway.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Gateway response = apiGatewayServiceClient.updateGatewayAsync(gateway, updateMask).get();
   * }
   * }
* * @param gateway Required. Gateway resource. * @param updateMask Field mask is used to specify the fields to be overwritten in the Gateway * resource by the update. The fields specified in the update_mask are relative to the * resource, not the full request. A field will be overwritten if it is in the mask. If the * user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateGatewayAsync( Gateway gateway, FieldMask updateMask) { UpdateGatewayRequest request = UpdateGatewayRequest.newBuilder().setGateway(gateway).setUpdateMask(updateMask).build(); return updateGatewayAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateGatewayRequest request =
   *       UpdateGatewayRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setGateway(Gateway.newBuilder().build())
   *           .build();
   *   Gateway response = apiGatewayServiceClient.updateGatewayAsync(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 updateGatewayAsync( UpdateGatewayRequest request) { return updateGatewayOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateGatewayRequest request =
   *       UpdateGatewayRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setGateway(Gateway.newBuilder().build())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.updateGatewayOperationCallable().futureCall(request);
   *   // Do something.
   *   Gateway response = future.get();
   * }
   * }
*/ public final OperationCallable updateGatewayOperationCallable() { return stub.updateGatewayOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateGatewayRequest request =
   *       UpdateGatewayRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setGateway(Gateway.newBuilder().build())
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.updateGatewayCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateGatewayCallable() { return stub.updateGatewayCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
   *   apiGatewayServiceClient.deleteGatewayAsync(name).get();
   * }
   * }
* * @param name Required. Resource name of the form: * `projects/*/locations/*/gateways/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteGatewayAsync(GatewayName name) { DeleteGatewayRequest request = DeleteGatewayRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteGatewayAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString();
   *   apiGatewayServiceClient.deleteGatewayAsync(name).get();
   * }
   * }
* * @param name Required. Resource name of the form: * `projects/*/locations/*/gateways/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteGatewayAsync(String name) { DeleteGatewayRequest request = DeleteGatewayRequest.newBuilder().setName(name).build(); return deleteGatewayAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteGatewayRequest request =
   *       DeleteGatewayRequest.newBuilder()
   *           .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
   *           .build();
   *   apiGatewayServiceClient.deleteGatewayAsync(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 deleteGatewayAsync( DeleteGatewayRequest request) { return deleteGatewayOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteGatewayRequest request =
   *       DeleteGatewayRequest.newBuilder()
   *           .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.deleteGatewayOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteGatewayOperationCallable() { return stub.deleteGatewayOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Gateway. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteGatewayRequest request =
   *       DeleteGatewayRequest.newBuilder()
   *           .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.deleteGatewayCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteGatewayCallable() { return stub.deleteGatewayCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Apis 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   for (Api element : apiGatewayServiceClient.listApis(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent resource of the API, of the form: * `projects/*/locations/global` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListApisPagedResponse listApis(LocationName parent) { ListApisRequest request = ListApisRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); return listApis(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Apis 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   for (Api element : apiGatewayServiceClient.listApis(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent resource of the API, of the form: * `projects/*/locations/global` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListApisPagedResponse listApis(String parent) { ListApisRequest request = ListApisRequest.newBuilder().setParent(parent).build(); return listApis(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Apis 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListApisRequest request =
   *       ListApisRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (Api element : apiGatewayServiceClient.listApis(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 ListApisPagedResponse listApis(ListApisRequest request) { return listApisPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Apis 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListApisRequest request =
   *       ListApisRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future = apiGatewayServiceClient.listApisPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Api element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listApisPagedCallable() { return stub.listApisPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists Apis 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListApisRequest request =
   *       ListApisRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListApisResponse response = apiGatewayServiceClient.listApisCallable().call(request);
   *     for (Api element : response.getApisList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listApisCallable() { return stub.listApisCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ApiName name = ApiName.of("[PROJECT]", "[API]");
   *   Api response = apiGatewayServiceClient.getApi(name);
   * }
   * }
* * @param name Required. Resource name of the form: `projects/*/locations/global/apis/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Api getApi(ApiName name) { GetApiRequest request = GetApiRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getApi(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String name = ApiName.of("[PROJECT]", "[API]").toString();
   *   Api response = apiGatewayServiceClient.getApi(name);
   * }
   * }
* * @param name Required. Resource name of the form: `projects/*/locations/global/apis/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Api getApi(String name) { GetApiRequest request = GetApiRequest.newBuilder().setName(name).build(); return getApi(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   GetApiRequest request =
   *       GetApiRequest.newBuilder().setName(ApiName.of("[PROJECT]", "[API]").toString()).build();
   *   Api response = apiGatewayServiceClient.getApi(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 Api getApi(GetApiRequest request) { return getApiCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   GetApiRequest request =
   *       GetApiRequest.newBuilder().setName(ApiName.of("[PROJECT]", "[API]").toString()).build();
   *   ApiFuture future = apiGatewayServiceClient.getApiCallable().futureCall(request);
   *   // Do something.
   *   Api response = future.get();
   * }
   * }
*/ public final UnaryCallable getApiCallable() { return stub.getApiCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Api 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   *   Api api = Api.newBuilder().build();
   *   String apiId = "apiId93021397";
   *   Api response = apiGatewayServiceClient.createApiAsync(parent, api, apiId).get();
   * }
   * }
* * @param parent Required. Parent resource of the API, of the form: * `projects/*/locations/global` * @param api Required. API resource. * @param apiId Required. Identifier to assign to the API. Must be unique within scope of the * parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApiAsync( LocationName parent, Api api, String apiId) { CreateApiRequest request = CreateApiRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setApi(api) .setApiId(apiId) .build(); return createApiAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Api 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   *   Api api = Api.newBuilder().build();
   *   String apiId = "apiId93021397";
   *   Api response = apiGatewayServiceClient.createApiAsync(parent, api, apiId).get();
   * }
   * }
* * @param parent Required. Parent resource of the API, of the form: * `projects/*/locations/global` * @param api Required. API resource. * @param apiId Required. Identifier to assign to the API. Must be unique within scope of the * parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApiAsync( String parent, Api api, String apiId) { CreateApiRequest request = CreateApiRequest.newBuilder().setParent(parent).setApi(api).setApiId(apiId).build(); return createApiAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Api 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateApiRequest request =
   *       CreateApiRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setApiId("apiId93021397")
   *           .setApi(Api.newBuilder().build())
   *           .build();
   *   Api response = apiGatewayServiceClient.createApiAsync(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 createApiAsync(CreateApiRequest request) { return createApiOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Api 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateApiRequest request =
   *       CreateApiRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setApiId("apiId93021397")
   *           .setApi(Api.newBuilder().build())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.createApiOperationCallable().futureCall(request);
   *   // Do something.
   *   Api response = future.get();
   * }
   * }
*/ public final OperationCallable createApiOperationCallable() { return stub.createApiOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new Api 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateApiRequest request =
   *       CreateApiRequest.newBuilder()
   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
   *           .setApiId("apiId93021397")
   *           .setApi(Api.newBuilder().build())
   *           .build();
   *   ApiFuture future = apiGatewayServiceClient.createApiCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createApiCallable() { return stub.createApiCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   Api api = Api.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Api response = apiGatewayServiceClient.updateApiAsync(api, updateMask).get();
   * }
   * }
* * @param api Required. API resource. * @param updateMask Field mask is used to specify the fields to be overwritten in the Api * resource by the update. The fields specified in the update_mask are relative to the * resource, not the full request. A field will be overwritten if it is in the mask. If the * user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApiAsync( Api api, FieldMask updateMask) { UpdateApiRequest request = UpdateApiRequest.newBuilder().setApi(api).setUpdateMask(updateMask).build(); return updateApiAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateApiRequest request =
   *       UpdateApiRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApi(Api.newBuilder().build())
   *           .build();
   *   Api response = apiGatewayServiceClient.updateApiAsync(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 updateApiAsync(UpdateApiRequest request) { return updateApiOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateApiRequest request =
   *       UpdateApiRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApi(Api.newBuilder().build())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.updateApiOperationCallable().futureCall(request);
   *   // Do something.
   *   Api response = future.get();
   * }
   * }
*/ public final OperationCallable updateApiOperationCallable() { return stub.updateApiOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateApiRequest request =
   *       UpdateApiRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApi(Api.newBuilder().build())
   *           .build();
   *   ApiFuture future = apiGatewayServiceClient.updateApiCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateApiCallable() { return stub.updateApiCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ApiName name = ApiName.of("[PROJECT]", "[API]");
   *   apiGatewayServiceClient.deleteApiAsync(name).get();
   * }
   * }
* * @param name Required. Resource name of the form: `projects/*/locations/global/apis/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApiAsync(ApiName name) { DeleteApiRequest request = DeleteApiRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteApiAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String name = ApiName.of("[PROJECT]", "[API]").toString();
   *   apiGatewayServiceClient.deleteApiAsync(name).get();
   * }
   * }
* * @param name Required. Resource name of the form: `projects/*/locations/global/apis/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApiAsync(String name) { DeleteApiRequest request = DeleteApiRequest.newBuilder().setName(name).build(); return deleteApiAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteApiRequest request =
   *       DeleteApiRequest.newBuilder()
   *           .setName(ApiName.of("[PROJECT]", "[API]").toString())
   *           .build();
   *   apiGatewayServiceClient.deleteApiAsync(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 deleteApiAsync(DeleteApiRequest request) { return deleteApiOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteApiRequest request =
   *       DeleteApiRequest.newBuilder()
   *           .setName(ApiName.of("[PROJECT]", "[API]").toString())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.deleteApiOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteApiOperationCallable() { return stub.deleteApiOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single Api. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteApiRequest request =
   *       DeleteApiRequest.newBuilder()
   *           .setName(ApiName.of("[PROJECT]", "[API]").toString())
   *           .build();
   *   ApiFuture future = apiGatewayServiceClient.deleteApiCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteApiCallable() { return stub.deleteApiCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ApiConfigs 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ApiName parent = ApiName.of("[PROJECT]", "[API]");
   *   for (ApiConfig element : apiGatewayServiceClient.listApiConfigs(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent resource of the API Config, of the form: * `projects/*/locations/global/apis/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListApiConfigsPagedResponse listApiConfigs(ApiName parent) { ListApiConfigsRequest request = ListApiConfigsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listApiConfigs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ApiConfigs 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String parent = ApiName.of("[PROJECT]", "[API]").toString();
   *   for (ApiConfig element : apiGatewayServiceClient.listApiConfigs(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. Parent resource of the API Config, of the form: * `projects/*/locations/global/apis/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListApiConfigsPagedResponse listApiConfigs(String parent) { ListApiConfigsRequest request = ListApiConfigsRequest.newBuilder().setParent(parent).build(); return listApiConfigs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ApiConfigs 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListApiConfigsRequest request =
   *       ListApiConfigsRequest.newBuilder()
   *           .setParent(ApiName.of("[PROJECT]", "[API]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   for (ApiConfig element : apiGatewayServiceClient.listApiConfigs(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 ListApiConfigsPagedResponse listApiConfigs(ListApiConfigsRequest request) { return listApiConfigsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ApiConfigs 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListApiConfigsRequest request =
   *       ListApiConfigsRequest.newBuilder()
   *           .setParent(ApiName.of("[PROJECT]", "[API]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.listApiConfigsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (ApiConfig element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listApiConfigsPagedCallable() { return stub.listApiConfigsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists ApiConfigs 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ListApiConfigsRequest request =
   *       ListApiConfigsRequest.newBuilder()
   *           .setParent(ApiName.of("[PROJECT]", "[API]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .setOrderBy("orderBy-1207110587")
   *           .build();
   *   while (true) {
   *     ListApiConfigsResponse response =
   *         apiGatewayServiceClient.listApiConfigsCallable().call(request);
   *     for (ApiConfig element : response.getApiConfigsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listApiConfigsCallable() { return stub.listApiConfigsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ApiConfigName name = ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]");
   *   ApiConfig response = apiGatewayServiceClient.getApiConfig(name);
   * }
   * }
* * @param name Required. Resource name of the form: * `projects/*/locations/global/apis/*/configs/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ApiConfig getApiConfig(ApiConfigName name) { GetApiConfigRequest request = GetApiConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getApiConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String name = ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]").toString();
   *   ApiConfig response = apiGatewayServiceClient.getApiConfig(name);
   * }
   * }
* * @param name Required. Resource name of the form: * `projects/*/locations/global/apis/*/configs/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ApiConfig getApiConfig(String name) { GetApiConfigRequest request = GetApiConfigRequest.newBuilder().setName(name).build(); return getApiConfig(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   GetApiConfigRequest request =
   *       GetApiConfigRequest.newBuilder()
   *           .setName(ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]").toString())
   *           .build();
   *   ApiConfig response = apiGatewayServiceClient.getApiConfig(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 ApiConfig getApiConfig(GetApiConfigRequest request) { return getApiConfigCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   GetApiConfigRequest request =
   *       GetApiConfigRequest.newBuilder()
   *           .setName(ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]").toString())
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.getApiConfigCallable().futureCall(request);
   *   // Do something.
   *   ApiConfig response = future.get();
   * }
   * }
*/ public final UnaryCallable getApiConfigCallable() { return stub.getApiConfigCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new ApiConfig 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ApiName parent = ApiName.of("[PROJECT]", "[API]");
   *   ApiConfig apiConfig = ApiConfig.newBuilder().build();
   *   String apiConfigId = "apiConfigId-64952265";
   *   ApiConfig response =
   *       apiGatewayServiceClient.createApiConfigAsync(parent, apiConfig, apiConfigId).get();
   * }
   * }
* * @param parent Required. Parent resource of the API Config, of the form: * `projects/*/locations/global/apis/*` * @param apiConfig Required. API resource. * @param apiConfigId Required. Identifier to assign to the API Config. Must be unique within * scope of the parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApiConfigAsync( ApiName parent, ApiConfig apiConfig, String apiConfigId) { CreateApiConfigRequest request = CreateApiConfigRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setApiConfig(apiConfig) .setApiConfigId(apiConfigId) .build(); return createApiConfigAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new ApiConfig 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String parent = ApiName.of("[PROJECT]", "[API]").toString();
   *   ApiConfig apiConfig = ApiConfig.newBuilder().build();
   *   String apiConfigId = "apiConfigId-64952265";
   *   ApiConfig response =
   *       apiGatewayServiceClient.createApiConfigAsync(parent, apiConfig, apiConfigId).get();
   * }
   * }
* * @param parent Required. Parent resource of the API Config, of the form: * `projects/*/locations/global/apis/*` * @param apiConfig Required. API resource. * @param apiConfigId Required. Identifier to assign to the API Config. Must be unique within * scope of the parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture createApiConfigAsync( String parent, ApiConfig apiConfig, String apiConfigId) { CreateApiConfigRequest request = CreateApiConfigRequest.newBuilder() .setParent(parent) .setApiConfig(apiConfig) .setApiConfigId(apiConfigId) .build(); return createApiConfigAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new ApiConfig 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateApiConfigRequest request =
   *       CreateApiConfigRequest.newBuilder()
   *           .setParent(ApiName.of("[PROJECT]", "[API]").toString())
   *           .setApiConfigId("apiConfigId-64952265")
   *           .setApiConfig(ApiConfig.newBuilder().build())
   *           .build();
   *   ApiConfig response = apiGatewayServiceClient.createApiConfigAsync(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 createApiConfigAsync( CreateApiConfigRequest request) { return createApiConfigOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new ApiConfig 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateApiConfigRequest request =
   *       CreateApiConfigRequest.newBuilder()
   *           .setParent(ApiName.of("[PROJECT]", "[API]").toString())
   *           .setApiConfigId("apiConfigId-64952265")
   *           .setApiConfig(ApiConfig.newBuilder().build())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.createApiConfigOperationCallable().futureCall(request);
   *   // Do something.
   *   ApiConfig response = future.get();
   * }
   * }
*/ public final OperationCallable createApiConfigOperationCallable() { return stub.createApiConfigOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a new ApiConfig 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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   CreateApiConfigRequest request =
   *       CreateApiConfigRequest.newBuilder()
   *           .setParent(ApiName.of("[PROJECT]", "[API]").toString())
   *           .setApiConfigId("apiConfigId-64952265")
   *           .setApiConfig(ApiConfig.newBuilder().build())
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.createApiConfigCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable createApiConfigCallable() { return stub.createApiConfigCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ApiConfig apiConfig = ApiConfig.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   ApiConfig response =
   *       apiGatewayServiceClient.updateApiConfigAsync(apiConfig, updateMask).get();
   * }
   * }
* * @param apiConfig Required. API Config resource. * @param updateMask Field mask is used to specify the fields to be overwritten in the ApiConfig * resource by the update. The fields specified in the update_mask are relative to the * resource, not the full request. A field will be overwritten if it is in the mask. If the * user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture updateApiConfigAsync( ApiConfig apiConfig, FieldMask updateMask) { UpdateApiConfigRequest request = UpdateApiConfigRequest.newBuilder() .setApiConfig(apiConfig) .setUpdateMask(updateMask) .build(); return updateApiConfigAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateApiConfigRequest request =
   *       UpdateApiConfigRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApiConfig(ApiConfig.newBuilder().build())
   *           .build();
   *   ApiConfig response = apiGatewayServiceClient.updateApiConfigAsync(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 updateApiConfigAsync( UpdateApiConfigRequest request) { return updateApiConfigOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateApiConfigRequest request =
   *       UpdateApiConfigRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApiConfig(ApiConfig.newBuilder().build())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.updateApiConfigOperationCallable().futureCall(request);
   *   // Do something.
   *   ApiConfig response = future.get();
   * }
   * }
*/ public final OperationCallable updateApiConfigOperationCallable() { return stub.updateApiConfigOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates the parameters of a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   UpdateApiConfigRequest request =
   *       UpdateApiConfigRequest.newBuilder()
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .setApiConfig(ApiConfig.newBuilder().build())
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.updateApiConfigCallable().futureCall(request);
   *   // Do something.
   *   Operation response = future.get();
   * }
   * }
*/ public final UnaryCallable updateApiConfigCallable() { return stub.updateApiConfigCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   ApiConfigName name = ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]");
   *   apiGatewayServiceClient.deleteApiConfigAsync(name).get();
   * }
   * }
* * @param name Required. Resource name of the form: * `projects/*/locations/global/apis/*/configs/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApiConfigAsync(ApiConfigName name) { DeleteApiConfigRequest request = DeleteApiConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteApiConfigAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   String name = ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]").toString();
   *   apiGatewayServiceClient.deleteApiConfigAsync(name).get();
   * }
   * }
* * @param name Required. Resource name of the form: * `projects/*/locations/global/apis/*/configs/*` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteApiConfigAsync(String name) { DeleteApiConfigRequest request = DeleteApiConfigRequest.newBuilder().setName(name).build(); return deleteApiConfigAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteApiConfigRequest request =
   *       DeleteApiConfigRequest.newBuilder()
   *           .setName(ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]").toString())
   *           .build();
   *   apiGatewayServiceClient.deleteApiConfigAsync(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 deleteApiConfigAsync( DeleteApiConfigRequest request) { return deleteApiConfigOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteApiConfigRequest request =
   *       DeleteApiConfigRequest.newBuilder()
   *           .setName(ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]").toString())
   *           .build();
   *   OperationFuture future =
   *       apiGatewayServiceClient.deleteApiConfigOperationCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final OperationCallable deleteApiConfigOperationCallable() { return stub.deleteApiConfigOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a single ApiConfig. * *

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 (ApiGatewayServiceClient apiGatewayServiceClient = ApiGatewayServiceClient.create()) {
   *   DeleteApiConfigRequest request =
   *       DeleteApiConfigRequest.newBuilder()
   *           .setName(ApiConfigName.of("[PROJECT]", "[API]", "[API_CONFIG]").toString())
   *           .build();
   *   ApiFuture future =
   *       apiGatewayServiceClient.deleteApiConfigCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }
*/ public final UnaryCallable deleteApiConfigCallable() { return stub.deleteApiConfigCallable(); } @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 ListGatewaysPagedResponse extends AbstractPagedListResponse< ListGatewaysRequest, ListGatewaysResponse, Gateway, ListGatewaysPage, ListGatewaysFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListGatewaysPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListGatewaysPagedResponse(input), MoreExecutors.directExecutor()); } private ListGatewaysPagedResponse(ListGatewaysPage page) { super(page, ListGatewaysFixedSizeCollection.createEmptyCollection()); } } public static class ListGatewaysPage extends AbstractPage { private ListGatewaysPage( PageContext context, ListGatewaysResponse response) { super(context, response); } private static ListGatewaysPage createEmptyPage() { return new ListGatewaysPage(null, null); } @Override protected ListGatewaysPage createPage( PageContext context, ListGatewaysResponse response) { return new ListGatewaysPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListGatewaysFixedSizeCollection extends AbstractFixedSizeCollection< ListGatewaysRequest, ListGatewaysResponse, Gateway, ListGatewaysPage, ListGatewaysFixedSizeCollection> { private ListGatewaysFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListGatewaysFixedSizeCollection createEmptyCollection() { return new ListGatewaysFixedSizeCollection(null, 0); } @Override protected ListGatewaysFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListGatewaysFixedSizeCollection(pages, collectionSize); } } public static class ListApisPagedResponse extends AbstractPagedListResponse< ListApisRequest, ListApisResponse, Api, ListApisPage, ListApisFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListApisPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListApisPagedResponse(input), MoreExecutors.directExecutor()); } private ListApisPagedResponse(ListApisPage page) { super(page, ListApisFixedSizeCollection.createEmptyCollection()); } } public static class ListApisPage extends AbstractPage { private ListApisPage( PageContext context, ListApisResponse response) { super(context, response); } private static ListApisPage createEmptyPage() { return new ListApisPage(null, null); } @Override protected ListApisPage createPage( PageContext context, ListApisResponse response) { return new ListApisPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListApisFixedSizeCollection extends AbstractFixedSizeCollection< ListApisRequest, ListApisResponse, Api, ListApisPage, ListApisFixedSizeCollection> { private ListApisFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListApisFixedSizeCollection createEmptyCollection() { return new ListApisFixedSizeCollection(null, 0); } @Override protected ListApisFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListApisFixedSizeCollection(pages, collectionSize); } } public static class ListApiConfigsPagedResponse extends AbstractPagedListResponse< ListApiConfigsRequest, ListApiConfigsResponse, ApiConfig, ListApiConfigsPage, ListApiConfigsFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListApiConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListApiConfigsPagedResponse(input), MoreExecutors.directExecutor()); } private ListApiConfigsPagedResponse(ListApiConfigsPage page) { super(page, ListApiConfigsFixedSizeCollection.createEmptyCollection()); } } public static class ListApiConfigsPage extends AbstractPage< ListApiConfigsRequest, ListApiConfigsResponse, ApiConfig, ListApiConfigsPage> { private ListApiConfigsPage( PageContext context, ListApiConfigsResponse response) { super(context, response); } private static ListApiConfigsPage createEmptyPage() { return new ListApiConfigsPage(null, null); } @Override protected ListApiConfigsPage createPage( PageContext context, ListApiConfigsResponse response) { return new ListApiConfigsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListApiConfigsFixedSizeCollection extends AbstractFixedSizeCollection< ListApiConfigsRequest, ListApiConfigsResponse, ApiConfig, ListApiConfigsPage, ListApiConfigsFixedSizeCollection> { private ListApiConfigsFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListApiConfigsFixedSizeCollection createEmptyCollection() { return new ListApiConfigsFixedSizeCollection(null, 0); } @Override protected ListApiConfigsFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListApiConfigsFixedSizeCollection(pages, collectionSize); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy