Class ApiGatewayServiceClient (2.53.0)

GitHub RepositoryProduct ReferenceREST Documentation

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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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
Method Description Method 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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require 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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require 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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require 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.

Inheritance

java.lang.Object > ApiGatewayServiceClient

Static Methods

create()

public static final ApiGatewayServiceClient create()

Constructs an instance of ApiGatewayServiceClient with default settings.

Returns
Type Description
ApiGatewayServiceClient
Exceptions
Type Description
IOException

create(ApiGatewayServiceSettings settings)

public static final ApiGatewayServiceClient create(ApiGatewayServiceSettings settings)

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.

Parameter
Name Description
settings ApiGatewayServiceSettings
Returns
Type Description
ApiGatewayServiceClient
Exceptions
Type Description
IOException

create(ApiGatewayServiceStub stub)

public static final ApiGatewayServiceClient create(ApiGatewayServiceStub stub)

Constructs an instance of ApiGatewayServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(ApiGatewayServiceSettings).

Parameter
Name Description
stub ApiGatewayServiceStub
Returns
Type Description
ApiGatewayServiceClient

Constructors

ApiGatewayServiceClient(ApiGatewayServiceSettings settings)

protected ApiGatewayServiceClient(ApiGatewayServiceSettings settings)

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.

Parameter
Name Description
settings ApiGatewayServiceSettings

ApiGatewayServiceClient(ApiGatewayServiceStub stub)

protected ApiGatewayServiceClient(ApiGatewayServiceStub stub)
Parameter
Name Description
stub ApiGatewayServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createApiAsync(CreateApiRequest request)

public final OperationFuture<Api,OperationMetadata> createApiAsync(CreateApiRequest request)

Creates a new Api in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request CreateApiRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Api,OperationMetadata>

createApiAsync(LocationName parent, Api api, String apiId)

public final OperationFuture<Api,OperationMetadata> createApiAsync(LocationName parent, Api api, String apiId)

Creates a new Api in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
parent LocationName

Required. Parent resource of the API, of the form: projects/*/locations/global

api Api

Required. API resource.

apiId String

Required. Identifier to assign to the API. Must be unique within scope of the parent resource.

Returns
Type Description
OperationFuture<Api,OperationMetadata>

createApiAsync(String parent, Api api, String apiId)

public final OperationFuture<Api,OperationMetadata> createApiAsync(String parent, Api api, String apiId)

Creates a new Api in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
parent String

Required. Parent resource of the API, of the form: projects/*/locations/global

api Api

Required. API resource.

apiId String

Required. Identifier to assign to the API. Must be unique within scope of the parent resource.

Returns
Type Description
OperationFuture<Api,OperationMetadata>

createApiCallable()

public final UnaryCallable<CreateApiRequest,Operation> createApiCallable()

Creates a new Api in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future = apiGatewayServiceClient.createApiCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateApiRequest,Operation>

createApiConfigAsync(ApiName parent, ApiConfig apiConfig, String apiConfigId)

public final OperationFuture<ApiConfig,OperationMetadata> createApiConfigAsync(ApiName parent, ApiConfig apiConfig, String apiConfigId)

Creates a new ApiConfig in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
parent ApiName

Required. Parent resource of the API Config, of the form: projects/*/locations/global/apis/*

apiConfig ApiConfig

Required. API resource.

apiConfigId String

Required. Identifier to assign to the API Config. Must be unique within scope of the parent resource.

Returns
Type Description
OperationFuture<ApiConfig,OperationMetadata>

createApiConfigAsync(CreateApiConfigRequest request)

public final OperationFuture<ApiConfig,OperationMetadata> createApiConfigAsync(CreateApiConfigRequest request)

Creates a new ApiConfig in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request CreateApiConfigRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<ApiConfig,OperationMetadata>

createApiConfigAsync(String parent, ApiConfig apiConfig, String apiConfigId)

public final OperationFuture<ApiConfig,OperationMetadata> createApiConfigAsync(String parent, ApiConfig apiConfig, String apiConfigId)

Creates a new ApiConfig in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
parent String

Required. Parent resource of the API Config, of the form: projects/*/locations/global/apis/*

apiConfig ApiConfig

Required. API resource.

apiConfigId String

Required. Identifier to assign to the API Config. Must be unique within scope of the parent resource.

Returns
Type Description
OperationFuture<ApiConfig,OperationMetadata>

createApiConfigCallable()

public final UnaryCallable<CreateApiConfigRequest,Operation> createApiConfigCallable()

Creates a new ApiConfig in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future =
       apiGatewayServiceClient.createApiConfigCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateApiConfigRequest,Operation>

createApiConfigOperationCallable()

public final OperationCallable<CreateApiConfigRequest,ApiConfig,OperationMetadata> createApiConfigOperationCallable()

Creates a new ApiConfig in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<ApiConfig, OperationMetadata> future =
       apiGatewayServiceClient.createApiConfigOperationCallable().futureCall(request);
   // Do something.
   ApiConfig response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateApiConfigRequest,ApiConfig,OperationMetadata>

createApiOperationCallable()

public final OperationCallable<CreateApiRequest,Api,OperationMetadata> createApiOperationCallable()

Creates a new Api in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Api, OperationMetadata> future =
       apiGatewayServiceClient.createApiOperationCallable().futureCall(request);
   // Do something.
   Api response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateApiRequest,Api,OperationMetadata>

createGatewayAsync(CreateGatewayRequest request)

public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(CreateGatewayRequest request)

Creates a new Gateway in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request CreateGatewayRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId)

public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId)

Creates a new Gateway in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
parent LocationName

Required. Parent resource of the Gateway, of the form: projects/*/locations/*

gateway Gateway

Required. Gateway resource.

gatewayId String

Required. Identifier to assign to the Gateway. Must be unique within scope of the parent resource.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

createGatewayAsync(String parent, Gateway gateway, String gatewayId)

public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(String parent, Gateway gateway, String gatewayId)

Creates a new Gateway in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
parent String

Required. Parent resource of the Gateway, of the form: projects/*/locations/*

gateway Gateway

Required. Gateway resource.

gatewayId String

Required. Identifier to assign to the Gateway. Must be unique within scope of the parent resource.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

createGatewayCallable()

public final UnaryCallable<CreateGatewayRequest,Operation> createGatewayCallable()

Creates a new Gateway in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future =
       apiGatewayServiceClient.createGatewayCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateGatewayRequest,Operation>

createGatewayOperationCallable()

public final OperationCallable<CreateGatewayRequest,Gateway,OperationMetadata> createGatewayOperationCallable()

Creates a new Gateway in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Gateway, OperationMetadata> future =
       apiGatewayServiceClient.createGatewayOperationCallable().futureCall(request);
   // Do something.
   Gateway response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateGatewayRequest,Gateway,OperationMetadata>

deleteApiAsync(ApiName name)

public final OperationFuture<Empty,OperationMetadata> deleteApiAsync(ApiName name)

Deletes a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
name ApiName

Required. Resource name of the form: projects/*/locations/global/apis/*

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteApiAsync(DeleteApiRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteApiAsync(DeleteApiRequest request)

Deletes a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request DeleteApiRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteApiAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteApiAsync(String name)

Deletes a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
name String

Required. Resource name of the form: projects/*/locations/global/apis/*

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteApiCallable()

public final UnaryCallable<DeleteApiRequest,Operation> deleteApiCallable()

Deletes a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future = apiGatewayServiceClient.deleteApiCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteApiRequest,Operation>

deleteApiConfigAsync(ApiConfigName name)

public final OperationFuture<Empty,OperationMetadata> deleteApiConfigAsync(ApiConfigName name)

Deletes a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
name ApiConfigName

Required. Resource name of the form: projects/*/locations/global/apis/*/configs/*

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteApiConfigAsync(DeleteApiConfigRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteApiConfigAsync(DeleteApiConfigRequest request)

Deletes a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request DeleteApiConfigRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteApiConfigAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteApiConfigAsync(String name)

Deletes a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
name String

Required. Resource name of the form: projects/*/locations/global/apis/*/configs/*

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteApiConfigCallable()

public final UnaryCallable<DeleteApiConfigRequest,Operation> deleteApiConfigCallable()

Deletes a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future =
       apiGatewayServiceClient.deleteApiConfigCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteApiConfigRequest,Operation>

deleteApiConfigOperationCallable()

public final OperationCallable<DeleteApiConfigRequest,Empty,OperationMetadata> deleteApiConfigOperationCallable()

Deletes a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Empty, OperationMetadata> future =
       apiGatewayServiceClient.deleteApiConfigOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteApiConfigRequest,Empty,OperationMetadata>

deleteApiOperationCallable()

public final OperationCallable<DeleteApiRequest,Empty,OperationMetadata> deleteApiOperationCallable()

Deletes a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Empty, OperationMetadata> future =
       apiGatewayServiceClient.deleteApiOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteApiRequest,Empty,OperationMetadata>

deleteGatewayAsync(DeleteGatewayRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteGatewayAsync(DeleteGatewayRequest request)

Deletes a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request DeleteGatewayRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGatewayAsync(GatewayName name)

public final OperationFuture<Empty,OperationMetadata> deleteGatewayAsync(GatewayName name)

Deletes a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
name GatewayName

Required. Resource name of the form: projects/*/locations/*/gateways/*

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGatewayAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteGatewayAsync(String name)

Deletes a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
name String

Required. Resource name of the form: projects/*/locations/*/gateways/*

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGatewayCallable()

public final UnaryCallable<DeleteGatewayRequest,Operation> deleteGatewayCallable()

Deletes a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future =
       apiGatewayServiceClient.deleteGatewayCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteGatewayRequest,Operation>

deleteGatewayOperationCallable()

public final OperationCallable<DeleteGatewayRequest,Empty,OperationMetadata> deleteGatewayOperationCallable()

Deletes a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Empty, OperationMetadata> future =
       apiGatewayServiceClient.deleteGatewayOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteGatewayRequest,Empty,OperationMetadata>

getApi(ApiName name)

public final Api getApi(ApiName name)

Gets details of a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
name ApiName

Required. Resource name of the form: projects/*/locations/global/apis/*

Returns
Type Description
Api

getApi(GetApiRequest request)

public final Api getApi(GetApiRequest request)

Gets details of a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
request GetApiRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Api

getApi(String name)

public final Api getApi(String name)

Gets details of a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
name String

Required. Resource name of the form: projects/*/locations/global/apis/*

Returns
Type Description
Api

getApiCallable()

public final UnaryCallable<GetApiRequest,Api> getApiCallable()

Gets details of a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Api> future = apiGatewayServiceClient.getApiCallable().futureCall(request);
   // Do something.
   Api response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetApiRequest,Api>

getApiConfig(ApiConfigName name)

public final ApiConfig getApiConfig(ApiConfigName name)

Gets details of a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
name ApiConfigName

Required. Resource name of the form: projects/*/locations/global/apis/*/configs/*

Returns
Type Description
ApiConfig

getApiConfig(GetApiConfigRequest request)

public final ApiConfig getApiConfig(GetApiConfigRequest request)

Gets details of a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
request GetApiConfigRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ApiConfig

getApiConfig(String name)

public final ApiConfig getApiConfig(String name)

Gets details of a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
name String

Required. Resource name of the form: projects/*/locations/global/apis/*/configs/*

Returns
Type Description
ApiConfig

getApiConfigCallable()

public final UnaryCallable<GetApiConfigRequest,ApiConfig> getApiConfigCallable()

Gets details of a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<ApiConfig> future =
       apiGatewayServiceClient.getApiConfigCallable().futureCall(request);
   // Do something.
   ApiConfig response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetApiConfigRequest,ApiConfig>

getGateway(GatewayName name)

public final Gateway getGateway(GatewayName name)

Gets details of a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
name GatewayName

Required. Resource name of the form: projects/*/locations/*/gateways/*

Returns
Type Description
Gateway

getGateway(GetGatewayRequest request)

public final Gateway getGateway(GetGatewayRequest request)

Gets details of a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
request GetGatewayRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Gateway

getGateway(String name)

public final Gateway getGateway(String name)

Gets details of a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
name String

Required. Resource name of the form: projects/*/locations/*/gateways/*

Returns
Type Description
Gateway

getGatewayCallable()

public final UnaryCallable<GetGatewayRequest,Gateway> getGatewayCallable()

Gets details of a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Gateway> future = apiGatewayServiceClient.getGatewayCallable().futureCall(request);
   // Do something.
   Gateway response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetGatewayRequest,Gateway>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getSettings()

public final ApiGatewayServiceSettings getSettings()
Returns
Type Description
ApiGatewayServiceSettings

getStub()

public ApiGatewayServiceStub getStub()
Returns
Type Description
ApiGatewayServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listApiConfigs(ApiName parent)

public final ApiGatewayServiceClient.ListApiConfigsPagedResponse listApiConfigs(ApiName parent)

Lists ApiConfigs in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
parent ApiName

Required. Parent resource of the API Config, of the form: projects/*/locations/global/apis/*

Returns
Type Description
ApiGatewayServiceClient.ListApiConfigsPagedResponse

listApiConfigs(ListApiConfigsRequest request)

public final ApiGatewayServiceClient.ListApiConfigsPagedResponse listApiConfigs(ListApiConfigsRequest request)

Lists ApiConfigs in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
request ListApiConfigsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ApiGatewayServiceClient.ListApiConfigsPagedResponse

listApiConfigs(String parent)

public final ApiGatewayServiceClient.ListApiConfigsPagedResponse listApiConfigs(String parent)

Lists ApiConfigs in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent resource of the API Config, of the form: projects/*/locations/global/apis/*

Returns
Type Description
ApiGatewayServiceClient.ListApiConfigsPagedResponse

listApiConfigsCallable()

public final UnaryCallable<ListApiConfigsRequest,ListApiConfigsResponse> listApiConfigsCallable()

Lists ApiConfigs in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListApiConfigsRequest,ListApiConfigsResponse>

listApiConfigsPagedCallable()

public final UnaryCallable<ListApiConfigsRequest,ApiGatewayServiceClient.ListApiConfigsPagedResponse> listApiConfigsPagedCallable()

Lists ApiConfigs in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<ApiConfig> future =
       apiGatewayServiceClient.listApiConfigsPagedCallable().futureCall(request);
   // Do something.
   for (ApiConfig element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListApiConfigsRequest,ListApiConfigsPagedResponse>

listApis(ListApisRequest request)

public final ApiGatewayServiceClient.ListApisPagedResponse listApis(ListApisRequest request)

Lists Apis in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
request ListApisRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ApiGatewayServiceClient.ListApisPagedResponse

listApis(LocationName parent)

public final ApiGatewayServiceClient.ListApisPagedResponse listApis(LocationName parent)

Lists Apis in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. Parent resource of the API, of the form: projects/*/locations/global

Returns
Type Description
ApiGatewayServiceClient.ListApisPagedResponse

listApis(String parent)

public final ApiGatewayServiceClient.ListApisPagedResponse listApis(String parent)

Lists Apis in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent resource of the API, of the form: projects/*/locations/global

Returns
Type Description
ApiGatewayServiceClient.ListApisPagedResponse

listApisCallable()

public final UnaryCallable<ListApisRequest,ListApisResponse> listApisCallable()

Lists Apis in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListApisRequest,ListApisResponse>

listApisPagedCallable()

public final UnaryCallable<ListApisRequest,ApiGatewayServiceClient.ListApisPagedResponse> listApisPagedCallable()

Lists Apis in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Api> future = apiGatewayServiceClient.listApisPagedCallable().futureCall(request);
   // Do something.
   for (Api element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListApisRequest,ListApisPagedResponse>

listGateways(ListGatewaysRequest request)

public final ApiGatewayServiceClient.ListGatewaysPagedResponse listGateways(ListGatewaysRequest request)

Lists Gateways in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
request ListGatewaysRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ApiGatewayServiceClient.ListGatewaysPagedResponse

listGateways(LocationName parent)

public final ApiGatewayServiceClient.ListGatewaysPagedResponse listGateways(LocationName parent)

Lists Gateways in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. Parent resource of the Gateway, of the form: projects/*/locations/*

Returns
Type Description
ApiGatewayServiceClient.ListGatewaysPagedResponse

listGateways(String parent)

public final ApiGatewayServiceClient.ListGatewaysPagedResponse listGateways(String parent)

Lists Gateways in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
   }
 }
 
Parameter
Name Description
parent String

Required. Parent resource of the Gateway, of the form: projects/*/locations/*

Returns
Type Description
ApiGatewayServiceClient.ListGatewaysPagedResponse

listGatewaysCallable()

public final UnaryCallable<ListGatewaysRequest,ListGatewaysResponse> listGatewaysCallable()

Lists Gateways in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListGatewaysRequest,ListGatewaysResponse>

listGatewaysPagedCallable()

public final UnaryCallable<ListGatewaysRequest,ApiGatewayServiceClient.ListGatewaysPagedResponse> listGatewaysPagedCallable()

Lists Gateways in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Gateway> future =
       apiGatewayServiceClient.listGatewaysPagedCallable().futureCall(request);
   // Do something.
   for (Gateway element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListGatewaysRequest,ListGatewaysPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateApiAsync(Api api, FieldMask updateMask)

public final OperationFuture<Api,OperationMetadata> updateApiAsync(Api api, FieldMask updateMask)

Updates the parameters of a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
api Api

Required. API resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Api,OperationMetadata>

updateApiAsync(UpdateApiRequest request)

public final OperationFuture<Api,OperationMetadata> updateApiAsync(UpdateApiRequest request)

Updates the parameters of a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request UpdateApiRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Api,OperationMetadata>

updateApiCallable()

public final UnaryCallable<UpdateApiRequest,Operation> updateApiCallable()

Updates the parameters of a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future = apiGatewayServiceClient.updateApiCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateApiRequest,Operation>

updateApiConfigAsync(ApiConfig apiConfig, FieldMask updateMask)

public final OperationFuture<ApiConfig,OperationMetadata> updateApiConfigAsync(ApiConfig apiConfig, FieldMask updateMask)

Updates the parameters of a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
apiConfig ApiConfig

Required. API Config resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<ApiConfig,OperationMetadata>

updateApiConfigAsync(UpdateApiConfigRequest request)

public final OperationFuture<ApiConfig,OperationMetadata> updateApiConfigAsync(UpdateApiConfigRequest request)

Updates the parameters of a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request UpdateApiConfigRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<ApiConfig,OperationMetadata>

updateApiConfigCallable()

public final UnaryCallable<UpdateApiConfigRequest,Operation> updateApiConfigCallable()

Updates the parameters of a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future =
       apiGatewayServiceClient.updateApiConfigCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateApiConfigRequest,Operation>

updateApiConfigOperationCallable()

public final OperationCallable<UpdateApiConfigRequest,ApiConfig,OperationMetadata> updateApiConfigOperationCallable()

Updates the parameters of a single ApiConfig.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<ApiConfig, OperationMetadata> future =
       apiGatewayServiceClient.updateApiConfigOperationCallable().futureCall(request);
   // Do something.
   ApiConfig response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateApiConfigRequest,ApiConfig,OperationMetadata>

updateApiOperationCallable()

public final OperationCallable<UpdateApiRequest,Api,OperationMetadata> updateApiOperationCallable()

Updates the parameters of a single Api.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Api, OperationMetadata> future =
       apiGatewayServiceClient.updateApiOperationCallable().futureCall(request);
   // Do something.
   Api response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateApiRequest,Api,OperationMetadata>

updateGatewayAsync(Gateway gateway, FieldMask updateMask)

public final OperationFuture<Gateway,OperationMetadata> updateGatewayAsync(Gateway gateway, FieldMask updateMask)

Updates the parameters of a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameters
Name Description
gateway Gateway

Required. Gateway resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

updateGatewayAsync(UpdateGatewayRequest request)

public final OperationFuture<Gateway,OperationMetadata> updateGatewayAsync(UpdateGatewayRequest request)

Updates the parameters of a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Parameter
Name Description
request UpdateGatewayRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

updateGatewayCallable()

public final UnaryCallable<UpdateGatewayRequest,Operation> updateGatewayCallable()

Updates the parameters of a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Operation> future =
       apiGatewayServiceClient.updateGatewayCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateGatewayRequest,Operation>

updateGatewayOperationCallable()

public final OperationCallable<UpdateGatewayRequest,Gateway,OperationMetadata> updateGatewayOperationCallable()

Updates the parameters of a single Gateway.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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<Gateway, OperationMetadata> future =
       apiGatewayServiceClient.updateGatewayOperationCallable().futureCall(request);
   // Do something.
   Gateway response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateGatewayRequest,Gateway,OperationMetadata>