Class OfflineUserDataJobServiceClient
- java.lang.Object
-
- com.google.ads.googleads.v14.services.OfflineUserDataJobServiceClient
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource,java.lang.AutoCloseable
@Generated("by gapic-generator-java") public class OfflineUserDataJobServiceClient extends java.lang.Object implements com.google.api.gax.core.BackgroundResourceService Description: Service to manage offline user data jobs.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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { String customerId = "customerId-1581184615"; OfflineUserDataJob job = OfflineUserDataJob.newBuilder().build(); CreateOfflineUserDataJobResponse response = offlineUserDataJobServiceClient.createOfflineUserDataJob(customerId, job); }Note: close() needs to be called on the OfflineUserDataJobServiceClient 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 CreateOfflineUserDataJob
Creates an offline user data job.
List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [NotAllowlistedError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
Request object method variants only take one parameter, a request object, which must be constructed before the call.
createOfflineUserDataJob(CreateOfflineUserDataJobRequest request)
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
createOfflineUserDataJob(String customerId, OfflineUserDataJob job)
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
createOfflineUserDataJobCallable()
AddOfflineUserDataJobOperations
Adds operations to the offline user data job.
List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
Request object method variants only take one parameter, a request object, which must be constructed before the call.
addOfflineUserDataJobOperations(AddOfflineUserDataJobOperationsRequest request)
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
addOfflineUserDataJobOperations(OfflineUserDataJobName resourceName, List<OfflineUserDataJobOperation> operations)
addOfflineUserDataJobOperations(String resourceName, List<OfflineUserDataJobOperation> operations)
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
addOfflineUserDataJobOperationsCallable()
RunOfflineUserDataJob
Runs the offline user data job.
When finished, the long running operation will contain the processing result or failure information, if any.
List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [HeaderError]() [InternalError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
Request object method variants only take one parameter, a request object, which must be constructed before the call.
runOfflineUserDataJobAsync(RunOfflineUserDataJobRequest request)
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
runOfflineUserDataJobAsync(OfflineUserDataJobName resourceName)
runOfflineUserDataJobAsync(String resourceName)
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
runOfflineUserDataJobOperationCallable()
runOfflineUserDataJobCallable()
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 OfflineUserDataJobServiceSettings 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 OfflineUserDataJobServiceSettings offlineUserDataJobServiceSettings = OfflineUserDataJobServiceSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) .build(); OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create(offlineUserDataJobServiceSettings);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 OfflineUserDataJobServiceSettings offlineUserDataJobServiceSettings = OfflineUserDataJobServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create(offlineUserDataJobServiceSettings);Please refer to the GitHub repository's samples for more quickstart code snippets.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedOfflineUserDataJobServiceClient(OfflineUserDataJobServiceSettings settings)Constructs an instance of OfflineUserDataJobServiceClient, using the given settings.protectedOfflineUserDataJobServiceClient(OfflineUserDataJobServiceStub stub)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AddOfflineUserDataJobOperationsResponseaddOfflineUserDataJobOperations(OfflineUserDataJobName resourceName, java.util.List<OfflineUserDataJobOperation> operations)Adds operations to the offline user data job.AddOfflineUserDataJobOperationsResponseaddOfflineUserDataJobOperations(AddOfflineUserDataJobOperationsRequest request)Adds operations to the offline user data job.AddOfflineUserDataJobOperationsResponseaddOfflineUserDataJobOperations(java.lang.String resourceName, java.util.List<OfflineUserDataJobOperation> operations)Adds operations to the offline user data job.com.google.api.gax.rpc.UnaryCallable<AddOfflineUserDataJobOperationsRequest,AddOfflineUserDataJobOperationsResponse>addOfflineUserDataJobOperationsCallable()Adds operations to the offline user data job.booleanawaitTermination(long duration, java.util.concurrent.TimeUnit unit)voidclose()static OfflineUserDataJobServiceClientcreate()Constructs an instance of OfflineUserDataJobServiceClient with default settings.static OfflineUserDataJobServiceClientcreate(OfflineUserDataJobServiceSettings settings)Constructs an instance of OfflineUserDataJobServiceClient, using the given settings.static OfflineUserDataJobServiceClientcreate(OfflineUserDataJobServiceStub stub)Constructs an instance of OfflineUserDataJobServiceClient, using the given stub for making calls.CreateOfflineUserDataJobResponsecreateOfflineUserDataJob(CreateOfflineUserDataJobRequest request)Creates an offline user data job.CreateOfflineUserDataJobResponsecreateOfflineUserDataJob(java.lang.String customerId, OfflineUserDataJob job)Creates an offline user data job.com.google.api.gax.rpc.UnaryCallable<CreateOfflineUserDataJobRequest,CreateOfflineUserDataJobResponse>createOfflineUserDataJobCallable()Creates an offline user data job.com.google.longrunning.OperationsClientgetOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.OfflineUserDataJobServiceSettingsgetSettings()OfflineUserDataJobServiceStubgetStub()booleanisShutdown()booleanisTerminated()com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OfflineUserDataJobMetadata>runOfflineUserDataJobAsync(OfflineUserDataJobName resourceName)Runs the offline user data job.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OfflineUserDataJobMetadata>runOfflineUserDataJobAsync(RunOfflineUserDataJobRequest request)Runs the offline user data job.com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OfflineUserDataJobMetadata>runOfflineUserDataJobAsync(java.lang.String resourceName)Runs the offline user data job.com.google.api.gax.rpc.UnaryCallable<RunOfflineUserDataJobRequest,com.google.longrunning.Operation>runOfflineUserDataJobCallable()Runs the offline user data job.com.google.api.gax.rpc.OperationCallable<RunOfflineUserDataJobRequest,com.google.protobuf.Empty,OfflineUserDataJobMetadata>runOfflineUserDataJobOperationCallable()Runs the offline user data job.voidshutdown()voidshutdownNow()
-
-
-
Constructor Detail
-
OfflineUserDataJobServiceClient
protected OfflineUserDataJobServiceClient(OfflineUserDataJobServiceSettings settings) throws java.io.IOException
Constructs an instance of OfflineUserDataJobServiceClient, 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:
java.io.IOException
-
OfflineUserDataJobServiceClient
protected OfflineUserDataJobServiceClient(OfflineUserDataJobServiceStub stub)
-
-
Method Detail
-
create
public static final OfflineUserDataJobServiceClient create() throws java.io.IOException
Constructs an instance of OfflineUserDataJobServiceClient with default settings.- Throws:
java.io.IOException
-
create
public static final OfflineUserDataJobServiceClient create(OfflineUserDataJobServiceSettings settings) throws java.io.IOException
Constructs an instance of OfflineUserDataJobServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
java.io.IOException
-
create
public static final OfflineUserDataJobServiceClient create(OfflineUserDataJobServiceStub stub)
Constructs an instance of OfflineUserDataJobServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(OfflineUserDataJobServiceSettings).
-
getSettings
public final OfflineUserDataJobServiceSettings getSettings()
-
getStub
public OfflineUserDataJobServiceStub getStub()
-
getOperationsClient
public final com.google.longrunning.OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
-
createOfflineUserDataJob
public final CreateOfflineUserDataJobResponse createOfflineUserDataJob(java.lang.String customerId, OfflineUserDataJob job)
Creates an offline user data job.List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [NotAllowlistedError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { String customerId = "customerId-1581184615"; OfflineUserDataJob job = OfflineUserDataJob.newBuilder().build(); CreateOfflineUserDataJobResponse response = offlineUserDataJobServiceClient.createOfflineUserDataJob(customerId, job); }- Parameters:
customerId- Required. The ID of the customer for which to create an offline user data job.job- Required. The offline user data job to be created.- Throws:
com.google.api.gax.rpc.ApiException- if the remote call fails
-
createOfflineUserDataJob
public final CreateOfflineUserDataJobResponse createOfflineUserDataJob(CreateOfflineUserDataJobRequest request)
Creates an offline user data job.List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [NotAllowlistedError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { CreateOfflineUserDataJobRequest request = CreateOfflineUserDataJobRequest.newBuilder() .setCustomerId("customerId-1581184615") .setJob(OfflineUserDataJob.newBuilder().build()) .setValidateOnly(true) .setEnableMatchRateRangePreview(true) .build(); CreateOfflineUserDataJobResponse response = offlineUserDataJobServiceClient.createOfflineUserDataJob(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException- if the remote call fails
-
createOfflineUserDataJobCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateOfflineUserDataJobRequest,CreateOfflineUserDataJobResponse> createOfflineUserDataJobCallable()
Creates an offline user data job.List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [NotAllowlistedError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { CreateOfflineUserDataJobRequest request = CreateOfflineUserDataJobRequest.newBuilder() .setCustomerId("customerId-1581184615") .setJob(OfflineUserDataJob.newBuilder().build()) .setValidateOnly(true) .setEnableMatchRateRangePreview(true) .build(); ApiFuture<CreateOfflineUserDataJobResponse> future = offlineUserDataJobServiceClient.createOfflineUserDataJobCallable().futureCall(request); // Do something. CreateOfflineUserDataJobResponse response = future.get(); }
-
addOfflineUserDataJobOperations
public final AddOfflineUserDataJobOperationsResponse addOfflineUserDataJobOperations(OfflineUserDataJobName resourceName, java.util.List<OfflineUserDataJobOperation> operations)
Adds operations to the offline user data job.List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { OfflineUserDataJobName resourceName = OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"); List<OfflineUserDataJobOperation> operations = new ArrayList<>(); AddOfflineUserDataJobOperationsResponse response = offlineUserDataJobServiceClient.addOfflineUserDataJobOperations(resourceName, operations); }- Parameters:
resourceName- Required. The resource name of the OfflineUserDataJob.operations- Required. The list of operations to be done.- Throws:
com.google.api.gax.rpc.ApiException- if the remote call fails
-
addOfflineUserDataJobOperations
public final AddOfflineUserDataJobOperationsResponse addOfflineUserDataJobOperations(java.lang.String resourceName, java.util.List<OfflineUserDataJobOperation> operations)
Adds operations to the offline user data job.List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { String resourceName = OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]").toString(); List<OfflineUserDataJobOperation> operations = new ArrayList<>(); AddOfflineUserDataJobOperationsResponse response = offlineUserDataJobServiceClient.addOfflineUserDataJobOperations(resourceName, operations); }- Parameters:
resourceName- Required. The resource name of the OfflineUserDataJob.operations- Required. The list of operations to be done.- Throws:
com.google.api.gax.rpc.ApiException- if the remote call fails
-
addOfflineUserDataJobOperations
public final AddOfflineUserDataJobOperationsResponse addOfflineUserDataJobOperations(AddOfflineUserDataJobOperationsRequest request)
Adds operations to the offline user data job.List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { AddOfflineUserDataJobOperationsRequest request = AddOfflineUserDataJobOperationsRequest.newBuilder() .setResourceName( OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]") .toString()) .setEnablePartialFailure(true) .setEnableWarnings(true) .addAllOperations(new ArrayList<OfflineUserDataJobOperation>()) .setValidateOnly(true) .build(); AddOfflineUserDataJobOperationsResponse response = offlineUserDataJobServiceClient.addOfflineUserDataJobOperations(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException- if the remote call fails
-
addOfflineUserDataJobOperationsCallable
public final com.google.api.gax.rpc.UnaryCallable<AddOfflineUserDataJobOperationsRequest,AddOfflineUserDataJobOperationsResponse> addOfflineUserDataJobOperationsCallable()
Adds operations to the offline user data job.List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [FieldError]() [HeaderError]() [InternalError]() [MutateError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { AddOfflineUserDataJobOperationsRequest request = AddOfflineUserDataJobOperationsRequest.newBuilder() .setResourceName( OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]") .toString()) .setEnablePartialFailure(true) .setEnableWarnings(true) .addAllOperations(new ArrayList<OfflineUserDataJobOperation>()) .setValidateOnly(true) .build(); ApiFuture<AddOfflineUserDataJobOperationsResponse> future = offlineUserDataJobServiceClient .addOfflineUserDataJobOperationsCallable() .futureCall(request); // Do something. AddOfflineUserDataJobOperationsResponse response = future.get(); }
-
runOfflineUserDataJobAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OfflineUserDataJobMetadata> runOfflineUserDataJobAsync(OfflineUserDataJobName resourceName)
Runs the offline user data job.When finished, the long running operation will contain the processing result or failure information, if any.
List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [HeaderError]() [InternalError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { OfflineUserDataJobName resourceName = OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]"); offlineUserDataJobServiceClient.runOfflineUserDataJobAsync(resourceName).get(); }- Parameters:
resourceName- Required. The resource name of the OfflineUserDataJob to run.- Throws:
com.google.api.gax.rpc.ApiException- if the remote call fails
-
runOfflineUserDataJobAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OfflineUserDataJobMetadata> runOfflineUserDataJobAsync(java.lang.String resourceName)
Runs the offline user data job.When finished, the long running operation will contain the processing result or failure information, if any.
List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [HeaderError]() [InternalError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { String resourceName = OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]").toString(); offlineUserDataJobServiceClient.runOfflineUserDataJobAsync(resourceName).get(); }- Parameters:
resourceName- Required. The resource name of the OfflineUserDataJob to run.- Throws:
com.google.api.gax.rpc.ApiException- if the remote call fails
-
runOfflineUserDataJobAsync
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OfflineUserDataJobMetadata> runOfflineUserDataJobAsync(RunOfflineUserDataJobRequest request)
Runs the offline user data job.When finished, the long running operation will contain the processing result or failure information, if any.
List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [HeaderError]() [InternalError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { RunOfflineUserDataJobRequest request = RunOfflineUserDataJobRequest.newBuilder() .setResourceName( OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]") .toString()) .setValidateOnly(true) .build(); offlineUserDataJobServiceClient.runOfflineUserDataJobAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException- if the remote call fails
-
runOfflineUserDataJobOperationCallable
public final com.google.api.gax.rpc.OperationCallable<RunOfflineUserDataJobRequest,com.google.protobuf.Empty,OfflineUserDataJobMetadata> runOfflineUserDataJobOperationCallable()
Runs the offline user data job.When finished, the long running operation will contain the processing result or failure information, if any.
List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [HeaderError]() [InternalError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { RunOfflineUserDataJobRequest request = RunOfflineUserDataJobRequest.newBuilder() .setResourceName( OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]") .toString()) .setValidateOnly(true) .build(); OperationFuture<Empty, OfflineUserDataJobMetadata> future = offlineUserDataJobServiceClient .runOfflineUserDataJobOperationCallable() .futureCall(request); // Do something. future.get(); }
-
runOfflineUserDataJobCallable
public final com.google.api.gax.rpc.UnaryCallable<RunOfflineUserDataJobRequest,com.google.longrunning.Operation> runOfflineUserDataJobCallable()
Runs the offline user data job.When finished, the long running operation will contain the processing result or failure information, if any.
List of thrown errors: [AuthenticationError]() [AuthorizationError]() [DatabaseError]() [HeaderError]() [InternalError]() [OfflineUserDataJobError]() [QuotaError]() [RequestError]()
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 (OfflineUserDataJobServiceClient offlineUserDataJobServiceClient = OfflineUserDataJobServiceClient.create()) { RunOfflineUserDataJobRequest request = RunOfflineUserDataJobRequest.newBuilder() .setResourceName( OfflineUserDataJobName.of("[CUSTOMER_ID]", "[OFFLINE_USER_DATA_UPDATE_ID]") .toString()) .setValidateOnly(true) .build(); ApiFuture<Operation> future = offlineUserDataJobServiceClient.runOfflineUserDataJobCallable().futureCall(request); // Do something. future.get(); }
-
close
public final void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfacecom.google.api.gax.core.BackgroundResource
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdownin interfacecom.google.api.gax.core.BackgroundResource
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfacecom.google.api.gax.core.BackgroundResource
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNowin interfacecom.google.api.gax.core.BackgroundResource
-
awaitTermination
public boolean awaitTermination(long duration, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException- Specified by:
awaitTerminationin interfacecom.google.api.gax.core.BackgroundResource- Throws:
java.lang.InterruptedException
-
-