code: public final ListEntityTypesPagedResponse listEntityTypes(
        ProjectAgentName parent, String languageCode) {
      ListEntityTypesRequest request =
          ListEntityTypesRequest.newBuilder()
              .setParent(parent == null ? null : parent.toString())
              .setLanguageCode(languageCode)
              .build();
      return listEntityTypes(request);
    }
docs: Returns the list of all entity types in the specified agent.
  
  <p>Sample code:
  
  <pre><code>
  try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
  ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
  String languageCode = "";
  for (EntityType element : entityTypesClient.listEntityTypes(parent, languageCode).iterateAll()) {
  // doThingsWith(element);
  }
  }
  </code></pre>
  
  @param parent Required. The agent to list all entity types from. Format: `projects/&lt;Project
  ID&gt;/agent`.
  @param languageCode Optional. The language to list entity synonyms for. If not specified, the
  agent's default language is used. [Many
  languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are
  supported. Note: languages must be enabled in the agent before they can be used.
  @throws com.google.api.gax.rpc.ApiException if the remote call fails