Class OnlineEvaluatorServiceClient

java.lang.Object
com.google.cloud.aiplatform.v1beta1.OnlineEvaluatorServiceClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@BetaApi @Generated("by gapic-generator-java") public class OnlineEvaluatorServiceClient extends Object implements BackgroundResource
Service Description: This service is used to create and manage Vertex AI OnlineEvaluators.

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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
     OnlineEvaluatorServiceClient.create()) {
   OnlineEvaluatorName name =
       OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]");
   OnlineEvaluator response = onlineEvaluatorServiceClient.getOnlineEvaluator(name);
 }
 

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

CreateOnlineEvaluator

Creates an OnlineEvaluator in the given project and location.

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

  • createOnlineEvaluatorAsync(CreateOnlineEvaluatorRequest request)

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

  • createOnlineEvaluatorAsync(LocationName parent, OnlineEvaluator onlineEvaluator)

  • createOnlineEvaluatorAsync(String parent, OnlineEvaluator onlineEvaluator)

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

  • createOnlineEvaluatorOperationCallable()

  • createOnlineEvaluatorCallable()

GetOnlineEvaluator

Gets details of an OnlineEvaluator.

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

  • getOnlineEvaluator(GetOnlineEvaluatorRequest request)

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

  • getOnlineEvaluator(OnlineEvaluatorName name)

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

  • getOnlineEvaluatorCallable()

UpdateOnlineEvaluator

Updates the fields of an OnlineEvaluator.

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

  • updateOnlineEvaluatorAsync(UpdateOnlineEvaluatorRequest request)

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

  • updateOnlineEvaluatorAsync(OnlineEvaluator onlineEvaluator, FieldMask updateMask)

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

  • updateOnlineEvaluatorOperationCallable()

  • updateOnlineEvaluatorCallable()

DeleteOnlineEvaluator

Deletes an OnlineEvaluator.

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

  • deleteOnlineEvaluatorAsync(DeleteOnlineEvaluatorRequest request)

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

  • deleteOnlineEvaluatorAsync(OnlineEvaluatorName name)

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

  • deleteOnlineEvaluatorOperationCallable()

  • deleteOnlineEvaluatorCallable()

ListOnlineEvaluators

Lists the OnlineEvaluators for the given project and location.

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

  • listOnlineEvaluators(ListOnlineEvaluatorsRequest request)

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

  • listOnlineEvaluators(LocationName parent)

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

  • listOnlineEvaluatorsPagedCallable()

  • listOnlineEvaluatorsCallable()

ActivateOnlineEvaluator

Activates an OnlineEvaluator.

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

  • activateOnlineEvaluatorAsync(ActivateOnlineEvaluatorRequest request)

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

  • activateOnlineEvaluatorAsync(OnlineEvaluatorName name)

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

  • activateOnlineEvaluatorOperationCallable()

  • activateOnlineEvaluatorCallable()

SuspendOnlineEvaluator

Suspends an OnlineEvaluator. When an OnlineEvaluator is suspended, it won't run any evaluations until it is activated again.

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

  • suspendOnlineEvaluatorAsync(SuspendOnlineEvaluatorRequest request)

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

  • suspendOnlineEvaluatorAsync(OnlineEvaluatorName name)

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

  • suspendOnlineEvaluatorOperationCallable()

  • suspendOnlineEvaluatorCallable()

ListLocations

Lists information about the supported locations for this service.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

SetIamPolicy

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

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

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

  • setIamPolicy(SetIamPolicyRequest request)

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

  • setIamPolicyCallable()

GetIamPolicy

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

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

  • getIamPolicy(GetIamPolicyRequest request)

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

  • getIamPolicyCallable()

TestIamPermissions

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

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

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

  • testIamPermissions(TestIamPermissionsRequest request)

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

  • testIamPermissionsCallable()

See the individual methods for example code.

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

This class can be customized by passing in a custom instance of OnlineEvaluatorServiceSettings 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
 OnlineEvaluatorServiceSettings onlineEvaluatorServiceSettings =
     OnlineEvaluatorServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
     OnlineEvaluatorServiceClient.create(onlineEvaluatorServiceSettings);
 

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
 OnlineEvaluatorServiceSettings onlineEvaluatorServiceSettings =
     OnlineEvaluatorServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
     OnlineEvaluatorServiceClient.create(onlineEvaluatorServiceSettings);
 

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

  • Constructor Details

    • OnlineEvaluatorServiceClient

      protected OnlineEvaluatorServiceClient(OnlineEvaluatorServiceSettings settings) throws IOException
      Constructs an instance of OnlineEvaluatorServiceClient, 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
    • OnlineEvaluatorServiceClient

      protected OnlineEvaluatorServiceClient(OnlineEvaluatorServiceStub stub)
  • Method Details

    • create

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

      public static final OnlineEvaluatorServiceClient create(OnlineEvaluatorServiceSettings settings) throws IOException
      Constructs an instance of OnlineEvaluatorServiceClient, 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 OnlineEvaluatorServiceClient create(OnlineEvaluatorServiceStub stub)
      Constructs an instance of OnlineEvaluatorServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(OnlineEvaluatorServiceSettings).
    • getSettings

      public final OnlineEvaluatorServiceSettings getSettings()
    • getStub

      public OnlineEvaluatorServiceStub 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.
    • createOnlineEvaluatorAsync

      public final OperationFuture<OnlineEvaluator,CreateOnlineEvaluatorOperationMetadata> createOnlineEvaluatorAsync(LocationName parent, OnlineEvaluator onlineEvaluator)
      Creates an OnlineEvaluator in the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         OnlineEvaluator onlineEvaluator = OnlineEvaluator.newBuilder().build();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.createOnlineEvaluatorAsync(parent, onlineEvaluator).get();
       }
       
      Parameters:
      parent - Required. The parent resource where the OnlineEvaluator will be created. Format: projects/{project}/locations/{location}.
      onlineEvaluator - Required. The OnlineEvaluator to create.
      Throws:
      ApiException - if the remote call fails
    • createOnlineEvaluatorAsync

      public final OperationFuture<OnlineEvaluator,CreateOnlineEvaluatorOperationMetadata> createOnlineEvaluatorAsync(String parent, OnlineEvaluator onlineEvaluator)
      Creates an OnlineEvaluator in the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         OnlineEvaluator onlineEvaluator = OnlineEvaluator.newBuilder().build();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.createOnlineEvaluatorAsync(parent, onlineEvaluator).get();
       }
       
      Parameters:
      parent - Required. The parent resource where the OnlineEvaluator will be created. Format: projects/{project}/locations/{location}.
      onlineEvaluator - Required. The OnlineEvaluator to create.
      Throws:
      ApiException - if the remote call fails
    • createOnlineEvaluatorAsync

      Creates an OnlineEvaluator in the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         CreateOnlineEvaluatorRequest request =
             CreateOnlineEvaluatorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setOnlineEvaluator(OnlineEvaluator.newBuilder().build())
                 .build();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.createOnlineEvaluatorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createOnlineEvaluatorOperationCallable

      Creates an OnlineEvaluator in the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         CreateOnlineEvaluatorRequest request =
             CreateOnlineEvaluatorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setOnlineEvaluator(OnlineEvaluator.newBuilder().build())
                 .build();
         OperationFuture<OnlineEvaluator, CreateOnlineEvaluatorOperationMetadata> future =
             onlineEvaluatorServiceClient.createOnlineEvaluatorOperationCallable().futureCall(request);
         // Do something.
         OnlineEvaluator response = future.get();
       }
       
    • createOnlineEvaluatorCallable

      public final UnaryCallable<CreateOnlineEvaluatorRequest,Operation> createOnlineEvaluatorCallable()
      Creates an OnlineEvaluator in the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         CreateOnlineEvaluatorRequest request =
             CreateOnlineEvaluatorRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setOnlineEvaluator(OnlineEvaluator.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             onlineEvaluatorServiceClient.createOnlineEvaluatorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getOnlineEvaluator

      public final OnlineEvaluator getOnlineEvaluator(OnlineEvaluatorName name)
      Gets details of an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         OnlineEvaluatorName name =
             OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]");
         OnlineEvaluator response = onlineEvaluatorServiceClient.getOnlineEvaluator(name);
       }
       
      Parameters:
      name - Required. The name of the OnlineEvaluator to retrieve. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      Throws:
      ApiException - if the remote call fails
    • getOnlineEvaluator

      public final OnlineEvaluator getOnlineEvaluator(String name)
      Gets details of an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         String name =
             OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]").toString();
         OnlineEvaluator response = onlineEvaluatorServiceClient.getOnlineEvaluator(name);
       }
       
      Parameters:
      name - Required. The name of the OnlineEvaluator to retrieve. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      Throws:
      ApiException - if the remote call fails
    • getOnlineEvaluator

      public final OnlineEvaluator getOnlineEvaluator(GetOnlineEvaluatorRequest request)
      Gets details of an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         GetOnlineEvaluatorRequest request =
             GetOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         OnlineEvaluator response = onlineEvaluatorServiceClient.getOnlineEvaluator(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getOnlineEvaluatorCallable

      public final UnaryCallable<GetOnlineEvaluatorRequest,OnlineEvaluator> getOnlineEvaluatorCallable()
      Gets details of an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         GetOnlineEvaluatorRequest request =
             GetOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         ApiFuture<OnlineEvaluator> future =
             onlineEvaluatorServiceClient.getOnlineEvaluatorCallable().futureCall(request);
         // Do something.
         OnlineEvaluator response = future.get();
       }
       
    • updateOnlineEvaluatorAsync

      public final OperationFuture<OnlineEvaluator,UpdateOnlineEvaluatorOperationMetadata> updateOnlineEvaluatorAsync(OnlineEvaluator onlineEvaluator, com.google.protobuf.FieldMask updateMask)
      Updates the fields of an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         OnlineEvaluator onlineEvaluator = OnlineEvaluator.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient
                 .updateOnlineEvaluatorAsync(onlineEvaluator, updateMask)
                 .get();
       }
       
      Parameters:
      onlineEvaluator - Required. The OnlineEvaluator to update. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      updateMask - Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated.
      Throws:
      ApiException - if the remote call fails
    • updateOnlineEvaluatorAsync

      Updates the fields of an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         UpdateOnlineEvaluatorRequest request =
             UpdateOnlineEvaluatorRequest.newBuilder()
                 .setOnlineEvaluator(OnlineEvaluator.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.updateOnlineEvaluatorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateOnlineEvaluatorOperationCallable

      Updates the fields of an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         UpdateOnlineEvaluatorRequest request =
             UpdateOnlineEvaluatorRequest.newBuilder()
                 .setOnlineEvaluator(OnlineEvaluator.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<OnlineEvaluator, UpdateOnlineEvaluatorOperationMetadata> future =
             onlineEvaluatorServiceClient.updateOnlineEvaluatorOperationCallable().futureCall(request);
         // Do something.
         OnlineEvaluator response = future.get();
       }
       
    • updateOnlineEvaluatorCallable

      public final UnaryCallable<UpdateOnlineEvaluatorRequest,Operation> updateOnlineEvaluatorCallable()
      Updates the fields of an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         UpdateOnlineEvaluatorRequest request =
             UpdateOnlineEvaluatorRequest.newBuilder()
                 .setOnlineEvaluator(OnlineEvaluator.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             onlineEvaluatorServiceClient.updateOnlineEvaluatorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteOnlineEvaluatorAsync

      public final OperationFuture<com.google.protobuf.Empty,DeleteOnlineEvaluatorOperationMetadata> deleteOnlineEvaluatorAsync(OnlineEvaluatorName name)
      Deletes an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         OnlineEvaluatorName name =
             OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]");
         onlineEvaluatorServiceClient.deleteOnlineEvaluatorAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the OnlineEvaluator to delete. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      Throws:
      ApiException - if the remote call fails
    • deleteOnlineEvaluatorAsync

      public final OperationFuture<com.google.protobuf.Empty,DeleteOnlineEvaluatorOperationMetadata> deleteOnlineEvaluatorAsync(String name)
      Deletes an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         String name =
             OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]").toString();
         onlineEvaluatorServiceClient.deleteOnlineEvaluatorAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the OnlineEvaluator to delete. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      Throws:
      ApiException - if the remote call fails
    • deleteOnlineEvaluatorAsync

      public final OperationFuture<com.google.protobuf.Empty,DeleteOnlineEvaluatorOperationMetadata> deleteOnlineEvaluatorAsync(DeleteOnlineEvaluatorRequest request)
      Deletes an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         DeleteOnlineEvaluatorRequest request =
             DeleteOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         onlineEvaluatorServiceClient.deleteOnlineEvaluatorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteOnlineEvaluatorOperationCallable

      public final OperationCallable<DeleteOnlineEvaluatorRequest,com.google.protobuf.Empty,DeleteOnlineEvaluatorOperationMetadata> deleteOnlineEvaluatorOperationCallable()
      Deletes an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         DeleteOnlineEvaluatorRequest request =
             DeleteOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         OperationFuture<Empty, DeleteOnlineEvaluatorOperationMetadata> future =
             onlineEvaluatorServiceClient.deleteOnlineEvaluatorOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteOnlineEvaluatorCallable

      public final UnaryCallable<DeleteOnlineEvaluatorRequest,Operation> deleteOnlineEvaluatorCallable()
      Deletes an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         DeleteOnlineEvaluatorRequest request =
             DeleteOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             onlineEvaluatorServiceClient.deleteOnlineEvaluatorCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listOnlineEvaluators

      Lists the OnlineEvaluators for the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (OnlineEvaluator element :
             onlineEvaluatorServiceClient.listOnlineEvaluators(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent resource of the OnlineEvaluators to list. Format: projects/{project}/locations/{location}.
      Throws:
      ApiException - if the remote call fails
    • listOnlineEvaluators

      public final OnlineEvaluatorServiceClient.ListOnlineEvaluatorsPagedResponse listOnlineEvaluators(String parent)
      Lists the OnlineEvaluators for the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (OnlineEvaluator element :
             onlineEvaluatorServiceClient.listOnlineEvaluators(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent resource of the OnlineEvaluators to list. Format: projects/{project}/locations/{location}.
      Throws:
      ApiException - if the remote call fails
    • listOnlineEvaluators

      Lists the OnlineEvaluators for the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ListOnlineEvaluatorsRequest request =
             ListOnlineEvaluatorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (OnlineEvaluator element :
             onlineEvaluatorServiceClient.listOnlineEvaluators(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
    • listOnlineEvaluatorsPagedCallable

      Lists the OnlineEvaluators for the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ListOnlineEvaluatorsRequest request =
             ListOnlineEvaluatorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<OnlineEvaluator> future =
             onlineEvaluatorServiceClient.listOnlineEvaluatorsPagedCallable().futureCall(request);
         // Do something.
         for (OnlineEvaluator element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listOnlineEvaluatorsCallable

      public final UnaryCallable<ListOnlineEvaluatorsRequest,ListOnlineEvaluatorsResponse> listOnlineEvaluatorsCallable()
      Lists the OnlineEvaluators for the 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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ListOnlineEvaluatorsRequest request =
             ListOnlineEvaluatorsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListOnlineEvaluatorsResponse response =
               onlineEvaluatorServiceClient.listOnlineEvaluatorsCallable().call(request);
           for (OnlineEvaluator element : response.getOnlineEvaluatorsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • activateOnlineEvaluatorAsync

      Activates an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         OnlineEvaluatorName name =
             OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]");
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.activateOnlineEvaluatorAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the OnlineEvaluator to activate. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      Throws:
      ApiException - if the remote call fails
    • activateOnlineEvaluatorAsync

      public final OperationFuture<OnlineEvaluator,ActivateOnlineEvaluatorOperationMetadata> activateOnlineEvaluatorAsync(String name)
      Activates an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         String name =
             OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]").toString();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.activateOnlineEvaluatorAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the OnlineEvaluator to activate. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      Throws:
      ApiException - if the remote call fails
    • activateOnlineEvaluatorAsync

      Activates an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ActivateOnlineEvaluatorRequest request =
             ActivateOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.activateOnlineEvaluatorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • activateOnlineEvaluatorOperationCallable

      Activates an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ActivateOnlineEvaluatorRequest request =
             ActivateOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         OperationFuture<OnlineEvaluator, ActivateOnlineEvaluatorOperationMetadata> future =
             onlineEvaluatorServiceClient
                 .activateOnlineEvaluatorOperationCallable()
                 .futureCall(request);
         // Do something.
         OnlineEvaluator response = future.get();
       }
       
    • activateOnlineEvaluatorCallable

      public final UnaryCallable<ActivateOnlineEvaluatorRequest,Operation> activateOnlineEvaluatorCallable()
      Activates an OnlineEvaluator.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ActivateOnlineEvaluatorRequest request =
             ActivateOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             onlineEvaluatorServiceClient.activateOnlineEvaluatorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • suspendOnlineEvaluatorAsync

      Suspends an OnlineEvaluator. When an OnlineEvaluator is suspended, it won't run any evaluations until it is activated again.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         OnlineEvaluatorName name =
             OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]");
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.suspendOnlineEvaluatorAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the OnlineEvaluator to suspend. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      Throws:
      ApiException - if the remote call fails
    • suspendOnlineEvaluatorAsync

      public final OperationFuture<OnlineEvaluator,SuspendOnlineEvaluatorOperationMetadata> suspendOnlineEvaluatorAsync(String name)
      Suspends an OnlineEvaluator. When an OnlineEvaluator is suspended, it won't run any evaluations until it is activated again.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         String name =
             OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]").toString();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.suspendOnlineEvaluatorAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the OnlineEvaluator to suspend. Format: projects/{project}/locations/{location}/onlineEvaluators/{id}.
      Throws:
      ApiException - if the remote call fails
    • suspendOnlineEvaluatorAsync

      Suspends an OnlineEvaluator. When an OnlineEvaluator is suspended, it won't run any evaluations until it is activated again.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         SuspendOnlineEvaluatorRequest request =
             SuspendOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         OnlineEvaluator response =
             onlineEvaluatorServiceClient.suspendOnlineEvaluatorAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • suspendOnlineEvaluatorOperationCallable

      Suspends an OnlineEvaluator. When an OnlineEvaluator is suspended, it won't run any evaluations until it is activated again.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         SuspendOnlineEvaluatorRequest request =
             SuspendOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         OperationFuture<OnlineEvaluator, SuspendOnlineEvaluatorOperationMetadata> future =
             onlineEvaluatorServiceClient
                 .suspendOnlineEvaluatorOperationCallable()
                 .futureCall(request);
         // Do something.
         OnlineEvaluator response = future.get();
       }
       
    • suspendOnlineEvaluatorCallable

      public final UnaryCallable<SuspendOnlineEvaluatorRequest,Operation> suspendOnlineEvaluatorCallable()
      Suspends an OnlineEvaluator. When an OnlineEvaluator is suspended, it won't run any evaluations until it is activated again.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         SuspendOnlineEvaluatorRequest request =
             SuspendOnlineEvaluatorRequest.newBuilder()
                 .setName(
                     OnlineEvaluatorName.of("[PROJECT]", "[LOCATION]", "[ONLINE_EVALUATOR]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             onlineEvaluatorServiceClient.suspendOnlineEvaluatorCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : onlineEvaluatorServiceClient.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.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             onlineEvaluatorServiceClient.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.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               onlineEvaluatorServiceClient.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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = onlineEvaluatorServiceClient.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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             onlineEvaluatorServiceClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the access control policy on the specified resource. Replacesany existing policy.

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

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     EndpointName.ofProjectLocationEndpointName(
                             "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
                         .toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = onlineEvaluatorServiceClient.setIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
      Sets the access control policy on the specified resource. Replacesany existing policy.

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

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     EndpointName.ofProjectLocationEndpointName(
                             "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
                         .toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             onlineEvaluatorServiceClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     EndpointName.ofProjectLocationEndpointName(
                             "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
                         .toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = onlineEvaluatorServiceClient.getIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      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 (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     EndpointName.ofProjectLocationEndpointName(
                             "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
                         .toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             onlineEvaluatorServiceClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     EndpointName.ofProjectLocationEndpointName(
                             "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
                         .toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response =
             onlineEvaluatorServiceClient.testIamPermissions(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (OnlineEvaluatorServiceClient onlineEvaluatorServiceClient =
           OnlineEvaluatorServiceClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     EndpointName.ofProjectLocationEndpointName(
                             "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
                         .toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             onlineEvaluatorServiceClient.testIamPermissionsCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse 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