code: static ListGlossariesPagedResponse listGlossary(
        String projectId, String location, String filter) {
  
      try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
  
        LocationName locationName =
            LocationName.newBuilder().setProject(projectId).setLocation(location).build();
  
        ListGlossariesPagedResponse response =
            translationServiceClient.listGlossaries(locationName.toString(), filter);
  
        // Call the API
        for (Glossary element : response.iterateAll()) {
          System.out.format("Name: %s\n", element.getName());
          System.out.format("Language Codes Set:\n");
          System.out.format(
              "Source Language Code: %s\n",
              element.getLanguageCodesSet().getLanguageCodesList().get(0));
          System.out.format(
              "Target Language Code: %s\n",
              element.getLanguageCodesSet().getLanguageCodesList().get(1));
          System.out.format("Input Uri: %s\n", element.getInputConfig().getGcsSource());
        }
        return response;
      } catch (Exception e) {
        throw new RuntimeException("Couldn't create client.", e);
      }
    }
docs: [START translate_list_glossary_beta]