Class InsightsConfigServiceClient

java.lang.Object
com.google.cloud.developerconnect.v1.InsightsConfigServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class InsightsConfigServiceClient extends Object implements BackgroundResource
Service Description: Creates and manages InsightsConfigs.

The InsightsConfig resource is the core configuration object to capture events from your Software Development Lifecycle. It acts as the central hub for managing how Developer Connect understands your application, its runtime environments, and the artifacts deployed within them. A user can create an InsightsConfig, list previously-requested InsightsConfigs or get InsightsConfigs by their ID to determine the status of the InsightsConfig.

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 (InsightsConfigServiceClient insightsConfigServiceClient =
     InsightsConfigServiceClient.create()) {
   InsightsConfigName name =
       InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
   InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
 }
 

Note: close() needs to be called on the InsightsConfigServiceClient 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

ListInsightsConfigs

Lists InsightsConfigs in a given project and location.

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

  • listInsightsConfigs(ListInsightsConfigsRequest request)

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

  • listInsightsConfigs(LocationName parent)

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

  • listInsightsConfigsPagedCallable()

  • listInsightsConfigsCallable()

CreateInsightsConfig

Creates a new InsightsConfig in a given project and location.

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

  • createInsightsConfigAsync(CreateInsightsConfigRequest request)

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

  • createInsightsConfigAsync(LocationName parent, InsightsConfig insightsConfig, String insightsConfigId)

  • createInsightsConfigAsync(String parent, InsightsConfig insightsConfig, String insightsConfigId)

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

  • createInsightsConfigOperationCallable()

  • createInsightsConfigCallable()

GetInsightsConfig

Gets details of a single Insight.

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

  • getInsightsConfig(GetInsightsConfigRequest request)

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

  • getInsightsConfig(InsightsConfigName name)

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

  • getInsightsConfigCallable()

UpdateInsightsConfig

Updates the parameters of a single InsightsConfig.

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

  • updateInsightsConfigAsync(UpdateInsightsConfigRequest request)

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

  • updateInsightsConfigOperationCallable()

  • updateInsightsConfigCallable()

DeleteInsightsConfig

Deletes a single Insight.

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

  • deleteInsightsConfigAsync(DeleteInsightsConfigRequest request)

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

  • deleteInsightsConfigAsync(InsightsConfigName name)

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

  • deleteInsightsConfigOperationCallable()

  • deleteInsightsConfigCallable()

GetDeploymentEvent

Gets a single Deployment Event.

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

  • getDeploymentEvent(GetDeploymentEventRequest request)

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

  • getDeploymentEvent(DeploymentEventName name)

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

  • getDeploymentEventCallable()

ListDeploymentEvents

Lists Deployment Events in a given insights config.

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

  • listDeploymentEvents(ListDeploymentEventsRequest request)

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

  • listDeploymentEvents(InsightsConfigName parent)

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

  • listDeploymentEventsPagedCallable()

  • listDeploymentEventsCallable()

ListLocations

Lists information about the supported locations for this service.This method can be called in two ways:

* **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

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 InsightsConfigServiceSettings 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
 InsightsConfigServiceSettings insightsConfigServiceSettings =
     InsightsConfigServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 InsightsConfigServiceClient insightsConfigServiceClient =
     InsightsConfigServiceClient.create(insightsConfigServiceSettings);
 

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
 InsightsConfigServiceSettings insightsConfigServiceSettings =
     InsightsConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 InsightsConfigServiceClient insightsConfigServiceClient =
     InsightsConfigServiceClient.create(insightsConfigServiceSettings);
 

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
 InsightsConfigServiceSettings insightsConfigServiceSettings =
     InsightsConfigServiceSettings.newHttpJsonBuilder().build();
 InsightsConfigServiceClient insightsConfigServiceClient =
     InsightsConfigServiceClient.create(insightsConfigServiceSettings);
 

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

  • Constructor Details

    • InsightsConfigServiceClient

      protected InsightsConfigServiceClient(InsightsConfigServiceSettings settings) throws IOException
      Constructs an instance of InsightsConfigServiceClient, 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.
      Throws:
      IOException
    • InsightsConfigServiceClient

      protected InsightsConfigServiceClient(InsightsConfigServiceStub stub)
  • Method Details

    • create

      public static final InsightsConfigServiceClient create() throws IOException
      Constructs an instance of InsightsConfigServiceClient with default settings.
      Throws:
      IOException
    • create

      public static final InsightsConfigServiceClient create(InsightsConfigServiceSettings settings) throws IOException
      Constructs an instance of InsightsConfigServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
      Throws:
      IOException
    • create

      public static final InsightsConfigServiceClient create(InsightsConfigServiceStub stub)
      Constructs an instance of InsightsConfigServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(InsightsConfigServiceSettings).
    • getSettings

      public final InsightsConfigServiceSettings getSettings()
    • getStub

      public InsightsConfigServiceStub getStub()
    • 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.
    • getHttpJsonOperationsClient

      @BetaApi 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.
    • listInsightsConfigs

      Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (InsightsConfig element :
             insightsConfigServiceClient.listInsightsConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListInsightsConfigsRequest.
      Throws:
      ApiException - if the remote call fails
    • listInsightsConfigs

      public final InsightsConfigServiceClient.ListInsightsConfigsPagedResponse listInsightsConfigs(String parent)
      Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (InsightsConfig element :
             insightsConfigServiceClient.listInsightsConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListInsightsConfigsRequest.
      Throws:
      ApiException - if the remote call fails
    • listInsightsConfigs

      Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListInsightsConfigsRequest request =
             ListInsightsConfigsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (InsightsConfig element :
             insightsConfigServiceClient.listInsightsConfigs(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listInsightsConfigsPagedCallable

      Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListInsightsConfigsRequest request =
             ListInsightsConfigsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<InsightsConfig> future =
             insightsConfigServiceClient.listInsightsConfigsPagedCallable().futureCall(request);
         // Do something.
         for (InsightsConfig element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listInsightsConfigsCallable

      public final UnaryCallable<ListInsightsConfigsRequest,ListInsightsConfigsResponse> listInsightsConfigsCallable()
      Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListInsightsConfigsRequest request =
             ListInsightsConfigsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListInsightsConfigsResponse response =
               insightsConfigServiceClient.listInsightsConfigsCallable().call(request);
           for (InsightsConfig element : response.getInsightsConfigsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createInsightsConfigAsync

      public final OperationFuture<InsightsConfig,OperationMetadata> createInsightsConfigAsync(LocationName parent, InsightsConfig insightsConfig, String insightsConfigId)
      Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         InsightsConfig insightsConfig = InsightsConfig.newBuilder().build();
         String insightsConfigId = "insightsConfigId774395128";
         InsightsConfig response =
             insightsConfigServiceClient
                 .createInsightsConfigAsync(parent, insightsConfig, insightsConfigId)
                 .get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      insightsConfig - Required. The resource being created.
      insightsConfigId - Required. ID of the requesting InsightsConfig.
      Throws:
      ApiException - if the remote call fails
    • createInsightsConfigAsync

      public final OperationFuture<InsightsConfig,OperationMetadata> createInsightsConfigAsync(String parent, InsightsConfig insightsConfig, String insightsConfigId)
      Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         InsightsConfig insightsConfig = InsightsConfig.newBuilder().build();
         String insightsConfigId = "insightsConfigId774395128";
         InsightsConfig response =
             insightsConfigServiceClient
                 .createInsightsConfigAsync(parent, insightsConfig, insightsConfigId)
                 .get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      insightsConfig - Required. The resource being created.
      insightsConfigId - Required. ID of the requesting InsightsConfig.
      Throws:
      ApiException - if the remote call fails
    • createInsightsConfigAsync

      public final OperationFuture<InsightsConfig,OperationMetadata> createInsightsConfigAsync(CreateInsightsConfigRequest request)
      Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         CreateInsightsConfigRequest request =
             CreateInsightsConfigRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInsightsConfigId("insightsConfigId774395128")
                 .setInsightsConfig(InsightsConfig.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         InsightsConfig response =
             insightsConfigServiceClient.createInsightsConfigAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createInsightsConfigOperationCallable

      public final OperationCallable<CreateInsightsConfigRequest,InsightsConfig,OperationMetadata> createInsightsConfigOperationCallable()
      Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         CreateInsightsConfigRequest request =
             CreateInsightsConfigRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInsightsConfigId("insightsConfigId774395128")
                 .setInsightsConfig(InsightsConfig.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         OperationFuture<InsightsConfig, OperationMetadata> future =
             insightsConfigServiceClient.createInsightsConfigOperationCallable().futureCall(request);
         // Do something.
         InsightsConfig response = future.get();
       }
       
    • createInsightsConfigCallable

      public final UnaryCallable<CreateInsightsConfigRequest,Operation> createInsightsConfigCallable()
      Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         CreateInsightsConfigRequest request =
             CreateInsightsConfigRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setInsightsConfigId("insightsConfigId774395128")
                 .setInsightsConfig(InsightsConfig.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future =
             insightsConfigServiceClient.createInsightsConfigCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getInsightsConfig

      public final InsightsConfig getInsightsConfig(InsightsConfigName name)
      Gets details of a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         InsightsConfigName name =
             InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
         InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getInsightsConfig

      public final InsightsConfig getInsightsConfig(String name)
      Gets details of a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         String name =
             InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString();
         InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
       }
       
      Parameters:
      name - Required. Name of the resource.
      Throws:
      ApiException - if the remote call fails
    • getInsightsConfig

      public final InsightsConfig getInsightsConfig(GetInsightsConfigRequest request)
      Gets details of a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         GetInsightsConfigRequest request =
             GetInsightsConfigRequest.newBuilder()
                 .setName(
                     InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
                 .build();
         InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getInsightsConfigCallable

      public final UnaryCallable<GetInsightsConfigRequest,InsightsConfig> getInsightsConfigCallable()
      Gets details of a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         GetInsightsConfigRequest request =
             GetInsightsConfigRequest.newBuilder()
                 .setName(
                     InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
                 .build();
         ApiFuture<InsightsConfig> future =
             insightsConfigServiceClient.getInsightsConfigCallable().futureCall(request);
         // Do something.
         InsightsConfig response = future.get();
       }
       
    • updateInsightsConfigAsync

      public final OperationFuture<InsightsConfig,OperationMetadata> updateInsightsConfigAsync(UpdateInsightsConfigRequest request)
      Updates the parameters of a single InsightsConfig.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         UpdateInsightsConfigRequest request =
             UpdateInsightsConfigRequest.newBuilder()
                 .setInsightsConfig(InsightsConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         InsightsConfig response =
             insightsConfigServiceClient.updateInsightsConfigAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateInsightsConfigOperationCallable

      public final OperationCallable<UpdateInsightsConfigRequest,InsightsConfig,OperationMetadata> updateInsightsConfigOperationCallable()
      Updates the parameters of a single InsightsConfig.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         UpdateInsightsConfigRequest request =
             UpdateInsightsConfigRequest.newBuilder()
                 .setInsightsConfig(InsightsConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         OperationFuture<InsightsConfig, OperationMetadata> future =
             insightsConfigServiceClient.updateInsightsConfigOperationCallable().futureCall(request);
         // Do something.
         InsightsConfig response = future.get();
       }
       
    • updateInsightsConfigCallable

      public final UnaryCallable<UpdateInsightsConfigRequest,Operation> updateInsightsConfigCallable()
      Updates the parameters of a single InsightsConfig.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         UpdateInsightsConfigRequest request =
             UpdateInsightsConfigRequest.newBuilder()
                 .setInsightsConfig(InsightsConfig.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .setAllowMissing(true)
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Operation> future =
             insightsConfigServiceClient.updateInsightsConfigCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteInsightsConfigAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInsightsConfigAsync(InsightsConfigName name)
      Deletes a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         InsightsConfigName name =
             InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
         insightsConfigServiceClient.deleteInsightsConfigAsync(name).get();
       }
       
      Parameters:
      name - Required. Value for parent.
      Throws:
      ApiException - if the remote call fails
    • deleteInsightsConfigAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInsightsConfigAsync(String name)
      Deletes a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         String name =
             InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString();
         insightsConfigServiceClient.deleteInsightsConfigAsync(name).get();
       }
       
      Parameters:
      name - Required. Value for parent.
      Throws:
      ApiException - if the remote call fails
    • deleteInsightsConfigAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInsightsConfigAsync(DeleteInsightsConfigRequest request)
      Deletes a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         DeleteInsightsConfigRequest request =
             DeleteInsightsConfigRequest.newBuilder()
                 .setName(
                     InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .build();
         insightsConfigServiceClient.deleteInsightsConfigAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteInsightsConfigOperationCallable

      public final OperationCallable<DeleteInsightsConfigRequest,com.google.protobuf.Empty,OperationMetadata> deleteInsightsConfigOperationCallable()
      Deletes a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         DeleteInsightsConfigRequest request =
             DeleteInsightsConfigRequest.newBuilder()
                 .setName(
                     InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             insightsConfigServiceClient.deleteInsightsConfigOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteInsightsConfigCallable

      public final UnaryCallable<DeleteInsightsConfigRequest,Operation> deleteInsightsConfigCallable()
      Deletes a single Insight.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         DeleteInsightsConfigRequest request =
             DeleteInsightsConfigRequest.newBuilder()
                 .setName(
                     InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
                 .setRequestId("requestId693933066")
                 .setValidateOnly(true)
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future =
             insightsConfigServiceClient.deleteInsightsConfigCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getDeploymentEvent

      public final DeploymentEvent getDeploymentEvent(DeploymentEventName name)
      Gets a single Deployment Event.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         DeploymentEventName name =
             DeploymentEventName.of(
                 "[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]", "[DEPLOYMENT_EVENT]");
         DeploymentEvent response = insightsConfigServiceClient.getDeploymentEvent(name);
       }
       
      Parameters:
      name - Required. The name of the deployment event to retrieve. Format: projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{uuid}
      Throws:
      ApiException - if the remote call fails
    • getDeploymentEvent

      public final DeploymentEvent getDeploymentEvent(String name)
      Gets a single Deployment Event.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         String name =
             DeploymentEventName.of(
                     "[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]", "[DEPLOYMENT_EVENT]")
                 .toString();
         DeploymentEvent response = insightsConfigServiceClient.getDeploymentEvent(name);
       }
       
      Parameters:
      name - Required. The name of the deployment event to retrieve. Format: projects/{project}/locations/{location}/insightsConfigs/{insights_config}/deploymentEvents/{uuid}
      Throws:
      ApiException - if the remote call fails
    • getDeploymentEvent

      public final DeploymentEvent getDeploymentEvent(GetDeploymentEventRequest request)
      Gets a single Deployment Event.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         GetDeploymentEventRequest request =
             GetDeploymentEventRequest.newBuilder()
                 .setName(
                     DeploymentEventName.of(
                             "[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]", "[DEPLOYMENT_EVENT]")
                         .toString())
                 .build();
         DeploymentEvent response = insightsConfigServiceClient.getDeploymentEvent(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getDeploymentEventCallable

      public final UnaryCallable<GetDeploymentEventRequest,DeploymentEvent> getDeploymentEventCallable()
      Gets a single Deployment Event.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         GetDeploymentEventRequest request =
             GetDeploymentEventRequest.newBuilder()
                 .setName(
                     DeploymentEventName.of(
                             "[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]", "[DEPLOYMENT_EVENT]")
                         .toString())
                 .build();
         ApiFuture<DeploymentEvent> future =
             insightsConfigServiceClient.getDeploymentEventCallable().futureCall(request);
         // Do something.
         DeploymentEvent response = future.get();
       }
       
    • listDeploymentEvents

      Lists Deployment Events in a given insights config.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         InsightsConfigName parent =
             InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
         for (DeploymentEvent element :
             insightsConfigServiceClient.listDeploymentEvents(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent insights config that owns this collection of deployment events. Format: projects/{project}/locations/{location}/insightsConfigs/{insights_config}
      Throws:
      ApiException - if the remote call fails
    • listDeploymentEvents

      public final InsightsConfigServiceClient.ListDeploymentEventsPagedResponse listDeploymentEvents(String parent)
      Lists Deployment Events in a given insights config.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         String parent =
             InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString();
         for (DeploymentEvent element :
             insightsConfigServiceClient.listDeploymentEvents(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent insights config that owns this collection of deployment events. Format: projects/{project}/locations/{location}/insightsConfigs/{insights_config}
      Throws:
      ApiException - if the remote call fails
    • listDeploymentEvents

      Lists Deployment Events in a given insights config.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListDeploymentEventsRequest request =
             ListDeploymentEventsRequest.newBuilder()
                 .setParent(
                     InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         for (DeploymentEvent element :
             insightsConfigServiceClient.listDeploymentEvents(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listDeploymentEventsPagedCallable

      Lists Deployment Events in a given insights config.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListDeploymentEventsRequest request =
             ListDeploymentEventsRequest.newBuilder()
                 .setParent(
                     InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         ApiFuture<DeploymentEvent> future =
             insightsConfigServiceClient.listDeploymentEventsPagedCallable().futureCall(request);
         // Do something.
         for (DeploymentEvent element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDeploymentEventsCallable

      public final UnaryCallable<ListDeploymentEventsRequest,ListDeploymentEventsResponse> listDeploymentEventsCallable()
      Lists Deployment Events in a given insights config.

      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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListDeploymentEventsRequest request =
             ListDeploymentEventsRequest.newBuilder()
                 .setParent(
                     InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         while (true) {
           ListDeploymentEventsResponse response =
               insightsConfigServiceClient.listDeploymentEventsCallable().call(request);
           for (DeploymentEvent element : response.getDeploymentEventsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listLocations

      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : insightsConfigServiceClient.listLocations(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             insightsConfigServiceClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.This method can be called in two ways:

      * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               insightsConfigServiceClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = insightsConfigServiceClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a 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 (InsightsConfigServiceClient insightsConfigServiceClient =
           InsightsConfigServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             insightsConfigServiceClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException