public final ListCompaniesPagedResponse listCompanies(TenantName parent) {
    ListCompaniesRequest request =
        ListCompaniesRequest.newBuilder()
            .setParent(parent == null ? null : parent.toString())
            .build();
    return listCompanies(request);
  }
Lists all companies associated with the project.

<p>Sample code:

<pre>{@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 (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
  TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
  for (Company element : companyServiceClient.listCompanies(parent).iterateAll()) {
    // doThingsWith(element);
  }
}
}</pre>

@param parent Required. Resource name of the tenant under which the company is created.
    <p>The format is "projects/{project_id}/tenants/{tenant_id}", for example,
    "projects/foo/tenant/bar".
    <p>If tenant id is unspecified, the default tenant will be used, for example,
    "projects/foo".
@throws com.google.api.gax.rpc.ApiException if the remote call fails
java-talent/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceClient.java