code: static BatchTranslateResponse batchTranslateText(
        String projectId, String location, String sourceUri, String destinationUri) {
      try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
  
        LocationName locationName =
            LocationName.newBuilder().setProject(projectId).setLocation(location).build();
        GcsSource gcsSource = GcsSource.newBuilder().setInputUri(sourceUri).build();
        InputConfig inputConfig =
            InputConfig.newBuilder().setGcsSource(gcsSource).setMimeType("text/plain").build();
        GcsDestination gcsDestination =
            GcsDestination.newBuilder().setOutputUriPrefix(destinationUri).build();
        OutputConfig outputConfig =
            OutputConfig.newBuilder().setGcsDestination(gcsDestination).build();
        BatchTranslateTextRequest batchTranslateTextRequest =
            BatchTranslateTextRequest.newBuilder()
                .setParent(locationName.toString())
                .setSourceLanguageCode("en")
                .addTargetLanguageCodes("sr")
                .addInputConfigs(inputConfig)
                .setOutputConfig(outputConfig)
                .build();
  
        // Call the API
        BatchTranslateResponse response =
            translationServiceClient
                .batchTranslateTextAsync(batchTranslateTextRequest)
                .get(300, TimeUnit.SECONDS);
  
        System.out.printf("Total Characters: %d\n", response.getTotalCharacters());
        System.out.printf("Translated Characters: %d\n", response.getTranslatedCharacters());
        return response;
  
      } catch (Exception e) {
        throw new RuntimeException("Couldn't create client.", e);
      }
    }
docs: [START translate_batch_translate_text_beta]