Class TargetHttpProxiesClient (1.49.0)

GitHub RepositoryProduct Reference

Service Description: The TargetHttpProxies API.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   String project = "project-309310695";
   String targetHttpProxy = "targetHttpProxy-1944074187";
   TargetHttpProxy response = targetHttpProxiesClient.get(project, targetHttpProxy);
 }
 

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

Methods
MethodDescriptionMethod Variants

AggregatedList

Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

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

  • aggregatedList(AggregatedListTargetHttpProxiesRequest request)

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

  • aggregatedList(String project)

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

  • aggregatedListPagedCallable()

  • aggregatedListCallable()

Delete

Deletes the specified TargetHttpProxy resource.

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

  • deleteAsync(DeleteTargetHttpProxyRequest request)

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

  • deleteAsync(String project, String targetHttpProxy)

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

  • deleteOperationCallable()

  • deleteCallable()

Get

Returns the specified TargetHttpProxy resource.

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

  • get(GetTargetHttpProxyRequest request)

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

  • get(String project, String targetHttpProxy)

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

  • getCallable()

Insert

Creates a TargetHttpProxy resource in the specified project using the data included in the request.

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

  • insertAsync(InsertTargetHttpProxyRequest request)

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

  • insertAsync(String project, TargetHttpProxy targetHttpProxyResource)

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

  • insertOperationCallable()

  • insertCallable()

List

Retrieves the list of TargetHttpProxy resources available to the specified project.

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

  • list(ListTargetHttpProxiesRequest request)

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

  • list(String project)

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

  • listPagedCallable()

  • listCallable()

Patch

Patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

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

  • patchAsync(PatchTargetHttpProxyRequest request)

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

  • patchAsync(String project, String targetHttpProxy, TargetHttpProxy targetHttpProxyResource)

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

  • patchOperationCallable()

  • patchCallable()

SetUrlMap

Changes the URL map for TargetHttpProxy.

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

  • setUrlMapAsync(SetUrlMapTargetHttpProxyRequest request)

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

  • setUrlMapAsync(String project, String targetHttpProxy, UrlMapReference urlMapReferenceResource)

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

  • setUrlMapOperationCallable()

  • setUrlMapCallable()

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 TargetHttpProxiesSettings 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
 TargetHttpProxiesSettings targetHttpProxiesSettings =
     TargetHttpProxiesSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 TargetHttpProxiesClient targetHttpProxiesClient =
     TargetHttpProxiesClient.create(targetHttpProxiesSettings);
 

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
 TargetHttpProxiesSettings targetHttpProxiesSettings =
     TargetHttpProxiesSettings.newBuilder().setEndpoint(myEndpoint).build();
 TargetHttpProxiesClient targetHttpProxiesClient =
     TargetHttpProxiesClient.create(targetHttpProxiesSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > TargetHttpProxiesClient

Static Methods

create()

public static final TargetHttpProxiesClient create()

Constructs an instance of TargetHttpProxiesClient with default settings.

Returns
TypeDescription
TargetHttpProxiesClient
Exceptions
TypeDescription
IOException

create(TargetHttpProxiesSettings settings)

public static final TargetHttpProxiesClient create(TargetHttpProxiesSettings settings)

Constructs an instance of TargetHttpProxiesClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsTargetHttpProxiesSettings
Returns
TypeDescription
TargetHttpProxiesClient
Exceptions
TypeDescription
IOException

create(TargetHttpProxiesStub stub)

public static final TargetHttpProxiesClient create(TargetHttpProxiesStub stub)

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

Parameter
NameDescription
stubTargetHttpProxiesStub
Returns
TypeDescription
TargetHttpProxiesClient

Constructors

TargetHttpProxiesClient(TargetHttpProxiesSettings settings)

protected TargetHttpProxiesClient(TargetHttpProxiesSettings settings)

Constructs an instance of TargetHttpProxiesClient, 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
NameDescription
settingsTargetHttpProxiesSettings

TargetHttpProxiesClient(TargetHttpProxiesStub stub)

protected TargetHttpProxiesClient(TargetHttpProxiesStub stub)
Parameter
NameDescription
stubTargetHttpProxiesStub

Methods

aggregatedList(AggregatedListTargetHttpProxiesRequest request)

public final TargetHttpProxiesClient.AggregatedListPagedResponse aggregatedList(AggregatedListTargetHttpProxiesRequest request)

Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   AggregatedListTargetHttpProxiesRequest request =
       AggregatedListTargetHttpProxiesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setServiceProjectNumber(-1293855239)
           .build();
   for (Map.Entry<String, TargetHttpProxiesScopedList> element :
       targetHttpProxiesClient.aggregatedList(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestAggregatedListTargetHttpProxiesRequest

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

Returns
TypeDescription
TargetHttpProxiesClient.AggregatedListPagedResponse

aggregatedList(String project)

public final TargetHttpProxiesClient.AggregatedListPagedResponse aggregatedList(String project)

Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   String project = "project-309310695";
   for (Map.Entry<String, TargetHttpProxiesScopedList> element :
       targetHttpProxiesClient.aggregatedList(project).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
projectString

Name of the project scoping this request.

Returns
TypeDescription
TargetHttpProxiesClient.AggregatedListPagedResponse

aggregatedListCallable()

public final UnaryCallable<AggregatedListTargetHttpProxiesRequest,TargetHttpProxyAggregatedList> aggregatedListCallable()

Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   AggregatedListTargetHttpProxiesRequest request =
       AggregatedListTargetHttpProxiesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setServiceProjectNumber(-1293855239)
           .build();
   while (true) {
     TargetHttpProxyAggregatedList response =
         targetHttpProxiesClient.aggregatedListCallable().call(request);
     for (Map.Entry<String, TargetHttpProxiesScopedList> element : response.getItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<AggregatedListTargetHttpProxiesRequest,TargetHttpProxyAggregatedList>

aggregatedListPagedCallable()

public final UnaryCallable<AggregatedListTargetHttpProxiesRequest,TargetHttpProxiesClient.AggregatedListPagedResponse> aggregatedListPagedCallable()

Retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   AggregatedListTargetHttpProxiesRequest request =
       AggregatedListTargetHttpProxiesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setServiceProjectNumber(-1293855239)
           .build();
   ApiFuture<Map.Entry<String, TargetHttpProxiesScopedList>> future =
       targetHttpProxiesClient.aggregatedListPagedCallable().futureCall(request);
   // Do something.
   for (Map.Entry<String, TargetHttpProxiesScopedList> element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<AggregatedListTargetHttpProxiesRequest,AggregatedListPagedResponse>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

deleteAsync(DeleteTargetHttpProxyRequest request)

public final OperationFuture<Operation,Operation> deleteAsync(DeleteTargetHttpProxyRequest request)

Deletes the specified TargetHttpProxy resource.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   DeleteTargetHttpProxyRequest request =
       DeleteTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .build();
   Operation response = targetHttpProxiesClient.deleteAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteTargetHttpProxyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteAsync(String project, String targetHttpProxy)

public final OperationFuture<Operation,Operation> deleteAsync(String project, String targetHttpProxy)

Deletes the specified TargetHttpProxy resource.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   String project = "project-309310695";
   String targetHttpProxy = "targetHttpProxy-1944074187";
   Operation response = targetHttpProxiesClient.deleteAsync(project, targetHttpProxy).get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

targetHttpProxyString

Name of the TargetHttpProxy resource to delete.

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteCallable()

public final UnaryCallable<DeleteTargetHttpProxyRequest,Operation> deleteCallable()

Deletes the specified TargetHttpProxy resource.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   DeleteTargetHttpProxyRequest request =
       DeleteTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .build();
   ApiFuture<Operation> future = targetHttpProxiesClient.deleteCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteTargetHttpProxyRequest,Operation>

deleteOperationCallable()

public final OperationCallable<DeleteTargetHttpProxyRequest,Operation,Operation> deleteOperationCallable()

Deletes the specified TargetHttpProxy resource.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   DeleteTargetHttpProxyRequest request =
       DeleteTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .build();
   OperationFuture<Operation, Operation> future =
       targetHttpProxiesClient.deleteOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteTargetHttpProxyRequest,Operation,Operation>

get(GetTargetHttpProxyRequest request)

public final TargetHttpProxy get(GetTargetHttpProxyRequest request)

Returns the specified TargetHttpProxy resource.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   GetTargetHttpProxyRequest request =
       GetTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .build();
   TargetHttpProxy response = targetHttpProxiesClient.get(request);
 }
 
Parameter
NameDescription
requestGetTargetHttpProxyRequest

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

Returns
TypeDescription
TargetHttpProxy

get(String project, String targetHttpProxy)

public final TargetHttpProxy get(String project, String targetHttpProxy)

Returns the specified TargetHttpProxy resource.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   String project = "project-309310695";
   String targetHttpProxy = "targetHttpProxy-1944074187";
   TargetHttpProxy response = targetHttpProxiesClient.get(project, targetHttpProxy);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

targetHttpProxyString

Name of the TargetHttpProxy resource to return.

Returns
TypeDescription
TargetHttpProxy

getCallable()

public final UnaryCallable<GetTargetHttpProxyRequest,TargetHttpProxy> getCallable()

Returns the specified TargetHttpProxy resource.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   GetTargetHttpProxyRequest request =
       GetTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .build();
   ApiFuture<TargetHttpProxy> future = targetHttpProxiesClient.getCallable().futureCall(request);
   // Do something.
   TargetHttpProxy response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetTargetHttpProxyRequest,TargetHttpProxy>

getSettings()

public final TargetHttpProxiesSettings getSettings()
Returns
TypeDescription
TargetHttpProxiesSettings

getStub()

public TargetHttpProxiesStub getStub()
Returns
TypeDescription
TargetHttpProxiesStub

insertAsync(InsertTargetHttpProxyRequest request)

public final OperationFuture<Operation,Operation> insertAsync(InsertTargetHttpProxyRequest request)

Creates a TargetHttpProxy resource in the specified project using the data included in the request.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   InsertTargetHttpProxyRequest request =
       InsertTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build())
           .build();
   Operation response = targetHttpProxiesClient.insertAsync(request).get();
 }
 
Parameter
NameDescription
requestInsertTargetHttpProxyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertAsync(String project, TargetHttpProxy targetHttpProxyResource)

public final OperationFuture<Operation,Operation> insertAsync(String project, TargetHttpProxy targetHttpProxyResource)

Creates a TargetHttpProxy resource in the specified project using the data included in the request.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   String project = "project-309310695";
   TargetHttpProxy targetHttpProxyResource = TargetHttpProxy.newBuilder().build();
   Operation response =
       targetHttpProxiesClient.insertAsync(project, targetHttpProxyResource).get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

targetHttpProxyResourceTargetHttpProxy

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertCallable()

public final UnaryCallable<InsertTargetHttpProxyRequest,Operation> insertCallable()

Creates a TargetHttpProxy resource in the specified project using the data included in the request.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   InsertTargetHttpProxyRequest request =
       InsertTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build())
           .build();
   ApiFuture<Operation> future = targetHttpProxiesClient.insertCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<InsertTargetHttpProxyRequest,Operation>

insertOperationCallable()

public final OperationCallable<InsertTargetHttpProxyRequest,Operation,Operation> insertOperationCallable()

Creates a TargetHttpProxy resource in the specified project using the data included in the request.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   InsertTargetHttpProxyRequest request =
       InsertTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build())
           .build();
   OperationFuture<Operation, Operation> future =
       targetHttpProxiesClient.insertOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<InsertTargetHttpProxyRequest,Operation,Operation>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

list(ListTargetHttpProxiesRequest request)

public final TargetHttpProxiesClient.ListPagedResponse list(ListTargetHttpProxiesRequest request)

Retrieves the list of TargetHttpProxy resources available to the specified project.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   ListTargetHttpProxiesRequest request =
       ListTargetHttpProxiesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .build();
   for (TargetHttpProxy element : targetHttpProxiesClient.list(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListTargetHttpProxiesRequest

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

Returns
TypeDescription
TargetHttpProxiesClient.ListPagedResponse

list(String project)

public final TargetHttpProxiesClient.ListPagedResponse list(String project)

Retrieves the list of TargetHttpProxy resources available to the specified project.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   String project = "project-309310695";
   for (TargetHttpProxy element : targetHttpProxiesClient.list(project).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
projectString

Project ID for this request.

Returns
TypeDescription
TargetHttpProxiesClient.ListPagedResponse

listCallable()

public final UnaryCallable<ListTargetHttpProxiesRequest,TargetHttpProxyList> listCallable()

Retrieves the list of TargetHttpProxy resources available to the specified project.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   ListTargetHttpProxiesRequest request =
       ListTargetHttpProxiesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     TargetHttpProxyList response = targetHttpProxiesClient.listCallable().call(request);
     for (TargetHttpProxy element : response.getItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListTargetHttpProxiesRequest,TargetHttpProxyList>

listPagedCallable()

public final UnaryCallable<ListTargetHttpProxiesRequest,TargetHttpProxiesClient.ListPagedResponse> listPagedCallable()

Retrieves the list of TargetHttpProxy resources available to the specified project.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   ListTargetHttpProxiesRequest request =
       ListTargetHttpProxiesRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<TargetHttpProxy> future =
       targetHttpProxiesClient.listPagedCallable().futureCall(request);
   // Do something.
   for (TargetHttpProxy element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListTargetHttpProxiesRequest,ListPagedResponse>

patchAsync(PatchTargetHttpProxyRequest request)

public final OperationFuture<Operation,Operation> patchAsync(PatchTargetHttpProxyRequest request)

Patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   PatchTargetHttpProxyRequest request =
       PatchTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build())
           .build();
   Operation response = targetHttpProxiesClient.patchAsync(request).get();
 }
 
Parameter
NameDescription
requestPatchTargetHttpProxyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchAsync(String project, String targetHttpProxy, TargetHttpProxy targetHttpProxyResource)

public final OperationFuture<Operation,Operation> patchAsync(String project, String targetHttpProxy, TargetHttpProxy targetHttpProxyResource)

Patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   String project = "project-309310695";
   String targetHttpProxy = "targetHttpProxy-1944074187";
   TargetHttpProxy targetHttpProxyResource = TargetHttpProxy.newBuilder().build();
   Operation response =
       targetHttpProxiesClient
           .patchAsync(project, targetHttpProxy, targetHttpProxyResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

targetHttpProxyString

Name of the TargetHttpProxy resource to patch.

targetHttpProxyResourceTargetHttpProxy

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchCallable()

public final UnaryCallable<PatchTargetHttpProxyRequest,Operation> patchCallable()

Patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   PatchTargetHttpProxyRequest request =
       PatchTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build())
           .build();
   ApiFuture<Operation> future = targetHttpProxiesClient.patchCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<PatchTargetHttpProxyRequest,Operation>

patchOperationCallable()

public final OperationCallable<PatchTargetHttpProxyRequest,Operation,Operation> patchOperationCallable()

Patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   PatchTargetHttpProxyRequest request =
       PatchTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .setTargetHttpProxyResource(TargetHttpProxy.newBuilder().build())
           .build();
   OperationFuture<Operation, Operation> future =
       targetHttpProxiesClient.patchOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<PatchTargetHttpProxyRequest,Operation,Operation>

setUrlMapAsync(SetUrlMapTargetHttpProxyRequest request)

public final OperationFuture<Operation,Operation> setUrlMapAsync(SetUrlMapTargetHttpProxyRequest request)

Changes the URL map for TargetHttpProxy.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   SetUrlMapTargetHttpProxyRequest request =
       SetUrlMapTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .setUrlMapReferenceResource(UrlMapReference.newBuilder().build())
           .build();
   Operation response = targetHttpProxiesClient.setUrlMapAsync(request).get();
 }
 
Parameter
NameDescription
requestSetUrlMapTargetHttpProxyRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

setUrlMapAsync(String project, String targetHttpProxy, UrlMapReference urlMapReferenceResource)

public final OperationFuture<Operation,Operation> setUrlMapAsync(String project, String targetHttpProxy, UrlMapReference urlMapReferenceResource)

Changes the URL map for TargetHttpProxy.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   String project = "project-309310695";
   String targetHttpProxy = "targetHttpProxy-1944074187";
   UrlMapReference urlMapReferenceResource = UrlMapReference.newBuilder().build();
   Operation response =
       targetHttpProxiesClient
           .setUrlMapAsync(project, targetHttpProxy, urlMapReferenceResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

targetHttpProxyString

Name of the TargetHttpProxy to set a URL map for.

urlMapReferenceResourceUrlMapReference

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

setUrlMapCallable()

public final UnaryCallable<SetUrlMapTargetHttpProxyRequest,Operation> setUrlMapCallable()

Changes the URL map for TargetHttpProxy.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   SetUrlMapTargetHttpProxyRequest request =
       SetUrlMapTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .setUrlMapReferenceResource(UrlMapReference.newBuilder().build())
           .build();
   ApiFuture<Operation> future = targetHttpProxiesClient.setUrlMapCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SetUrlMapTargetHttpProxyRequest,Operation>

setUrlMapOperationCallable()

public final OperationCallable<SetUrlMapTargetHttpProxyRequest,Operation,Operation> setUrlMapOperationCallable()

Changes the URL map for TargetHttpProxy.

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 (TargetHttpProxiesClient targetHttpProxiesClient = TargetHttpProxiesClient.create()) {
   SetUrlMapTargetHttpProxyRequest request =
       SetUrlMapTargetHttpProxyRequest.newBuilder()
           .setProject("project-309310695")
           .setRequestId("requestId693933066")
           .setTargetHttpProxy("targetHttpProxy-1944074187")
           .setUrlMapReferenceResource(UrlMapReference.newBuilder().build())
           .build();
   OperationFuture<Operation, Operation> future =
       targetHttpProxiesClient.setUrlMapOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<SetUrlMapTargetHttpProxyRequest,Operation,Operation>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()