@Test @SuppressWarnings("all") public void addBatchJobOperationsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockBatchJobService.addException(exception); try { BatchJobName resourceName = BatchJobName.of("[CUSTOMER]", "[BATCH_JOB]"); String sequenceToken = "sequenceToken-868155397"; List<MutateOperation> mutateOperations = new ArrayList<>(); client.addBatchJobOperations(resourceName, sequenceToken, mutateOperations); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final AddBatchJobOperationsResponse addBatchJobOperations( BatchJobName resourceName, String sequenceToken, List<MutateOperation> mutateOperations) { AddBatchJobOperationsRequest request = AddBatchJobOperationsRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .setSequenceToken(sequenceToken) .addAllMutateOperations(mutateOperations) .build(); return addBatchJobOperations(request); }
BatchJobServiceClient implements BackgroundResource { public final AddBatchJobOperationsResponse addBatchJobOperations( BatchJobName resourceName, String sequenceToken, List<MutateOperation> mutateOperations) { AddBatchJobOperationsRequest request = AddBatchJobOperationsRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .setSequenceToken(sequenceToken) .addAllMutateOperations(mutateOperations) .build(); return addBatchJobOperations(request); } }
BatchJobServiceClient implements BackgroundResource { public final AddBatchJobOperationsResponse addBatchJobOperations( BatchJobName resourceName, String sequenceToken, List<MutateOperation> mutateOperations) { AddBatchJobOperationsRequest request = AddBatchJobOperationsRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .setSequenceToken(sequenceToken) .addAllMutateOperations(mutateOperations) .build(); return addBatchJobOperations(request); } protected  BatchJobServiceClient(BatchJobServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  BatchJobServiceClient(BatchJobServiceStub stub); }
BatchJobServiceClient implements BackgroundResource { public final AddBatchJobOperationsResponse addBatchJobOperations( BatchJobName resourceName, String sequenceToken, List<MutateOperation> mutateOperations) { AddBatchJobOperationsRequest request = AddBatchJobOperationsRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .setSequenceToken(sequenceToken) .addAllMutateOperations(mutateOperations) .build(); return addBatchJobOperations(request); } protected  BatchJobServiceClient(BatchJobServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  BatchJobServiceClient(BatchJobServiceStub stub); static final BatchJobServiceClient create(); static final BatchJobServiceClient create(BatchJobServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final BatchJobServiceClient create(BatchJobServiceStub stub); final BatchJobServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") BatchJobServiceStub getStub(); @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") final OperationsClient getOperationsClient(); final MutateBatchJobResponse mutateBatchJob(
      String customerId, BatchJobOperation operation); final MutateBatchJobResponse mutateBatchJob(MutateBatchJobRequest request); final UnaryCallable<MutateBatchJobRequest, MutateBatchJobResponse> mutateBatchJobCallable(); final BatchJob getBatchJob(BatchJobName resourceName); final BatchJob getBatchJob(String resourceName); final BatchJob getBatchJob(GetBatchJobRequest request); final UnaryCallable<GetBatchJobRequest, BatchJob> getBatchJobCallable(); final ListBatchJobResultsPagedResponse listBatchJobResults(BatchJobName resourceName); final ListBatchJobResultsPagedResponse listBatchJobResults(String resourceName); final ListBatchJobResultsPagedResponse listBatchJobResults(
      ListBatchJobResultsRequest request); final UnaryCallable<ListBatchJobResultsRequest, ListBatchJobResultsPagedResponse> listBatchJobResultsPagedCallable(); final UnaryCallable<ListBatchJobResultsRequest, ListBatchJobResultsResponse> listBatchJobResultsCallable(); @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") final OperationFuture<Empty, BatchJobMetadata> runBatchJobAsync(
      BatchJobName resourceName); @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") final OperationFuture<Empty, BatchJobMetadata> runBatchJobAsync(String resourceName); @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") final OperationFuture<Empty, BatchJobMetadata> runBatchJobAsync(
      RunBatchJobRequest request); @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") final OperationCallable<RunBatchJobRequest, Empty, BatchJobMetadata> runBatchJobOperationCallable(); final UnaryCallable<RunBatchJobRequest, Operation> runBatchJobCallable(); final AddBatchJobOperationsResponse addBatchJobOperations(
      BatchJobName resourceName, String sequenceToken, List<MutateOperation> mutateOperations); final AddBatchJobOperationsResponse addBatchJobOperations(
      String resourceName, String sequenceToken, List<MutateOperation> mutateOperations); final AddBatchJobOperationsResponse addBatchJobOperations(
      BatchJobName resourceName, List<MutateOperation> mutateOperations); final AddBatchJobOperationsResponse addBatchJobOperations(
      String resourceName, List<MutateOperation> mutateOperations); final AddBatchJobOperationsResponse addBatchJobOperations(
      AddBatchJobOperationsRequest request); final UnaryCallable<AddBatchJobOperationsRequest, AddBatchJobOperationsResponse> addBatchJobOperationsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
BatchJobServiceClient implements BackgroundResource { public final AddBatchJobOperationsResponse addBatchJobOperations( BatchJobName resourceName, String sequenceToken, List<MutateOperation> mutateOperations) { AddBatchJobOperationsRequest request = AddBatchJobOperationsRequest.newBuilder() .setResourceName(resourceName == null ? null : resourceName.toString()) .setSequenceToken(sequenceToken) .addAllMutateOperations(mutateOperations) .build(); return addBatchJobOperations(request); } protected  BatchJobServiceClient(BatchJobServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  BatchJobServiceClient(BatchJobServiceStub stub); static final BatchJobServiceClient create(); static final BatchJobServiceClient create(BatchJobServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final BatchJobServiceClient create(BatchJobServiceStub stub); final BatchJobServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") BatchJobServiceStub getStub(); @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") final OperationsClient getOperationsClient(); final MutateBatchJobResponse mutateBatchJob(
      String customerId, BatchJobOperation operation); final MutateBatchJobResponse mutateBatchJob(MutateBatchJobRequest request); final UnaryCallable<MutateBatchJobRequest, MutateBatchJobResponse> mutateBatchJobCallable(); final BatchJob getBatchJob(BatchJobName resourceName); final BatchJob getBatchJob(String resourceName); final BatchJob getBatchJob(GetBatchJobRequest request); final UnaryCallable<GetBatchJobRequest, BatchJob> getBatchJobCallable(); final ListBatchJobResultsPagedResponse listBatchJobResults(BatchJobName resourceName); final ListBatchJobResultsPagedResponse listBatchJobResults(String resourceName); final ListBatchJobResultsPagedResponse listBatchJobResults(
      ListBatchJobResultsRequest request); final UnaryCallable<ListBatchJobResultsRequest, ListBatchJobResultsPagedResponse> listBatchJobResultsPagedCallable(); final UnaryCallable<ListBatchJobResultsRequest, ListBatchJobResultsResponse> listBatchJobResultsCallable(); @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") final OperationFuture<Empty, BatchJobMetadata> runBatchJobAsync(
      BatchJobName resourceName); @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") final OperationFuture<Empty, BatchJobMetadata> runBatchJobAsync(String resourceName); @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") final OperationFuture<Empty, BatchJobMetadata> runBatchJobAsync(
      RunBatchJobRequest request); @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") final OperationCallable<RunBatchJobRequest, Empty, BatchJobMetadata> runBatchJobOperationCallable(); final UnaryCallable<RunBatchJobRequest, Operation> runBatchJobCallable(); final AddBatchJobOperationsResponse addBatchJobOperations(
      BatchJobName resourceName, String sequenceToken, List<MutateOperation> mutateOperations); final AddBatchJobOperationsResponse addBatchJobOperations(
      String resourceName, String sequenceToken, List<MutateOperation> mutateOperations); final AddBatchJobOperationsResponse addBatchJobOperations(
      BatchJobName resourceName, List<MutateOperation> mutateOperations); final AddBatchJobOperationsResponse addBatchJobOperations(
      String resourceName, List<MutateOperation> mutateOperations); final AddBatchJobOperationsResponse addBatchJobOperations(
      AddBatchJobOperationsRequest request); final UnaryCallable<AddBatchJobOperationsRequest, AddBatchJobOperationsResponse> addBatchJobOperationsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }