# Class CompanyServiceClient (2.94.0)

2.94.0 (latest) 2.92.0 2.89.0 2.88.0 2.86.0 2.84.0 2.83.0 2.81.0 2.79.0 2.77.0 2.76.0 2.75.0 2.74.0 2.73.0 2.71.0 2.69.0 2.68.0 2.65.0 2.64.0 2.63.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.0 2.56.0 2.55.0 2.54.0 2.53.0 2.52.0 2.50.0 2.49.0 2.48.0 2.47.0 2.46.0 2.45.0 2.44.0 2.43.0 2.42.0 2.41.0 2.40.0 2.38.0 2.37.0 2.36.0 2.35.0 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.0 2.28.0 2.25.0 2.24.0 2.23.0 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.6 2.2.9

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-talent/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceClient.java) | [Product Reference](https://cloud.google.com/solutions/talent-solution/) |

Service Description: A service that handles company management, including CRUD and enumeration.

This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:


     // 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()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
       Company company = Company.newBuilder().build();
       Company response = companyServiceClient.createCompany(parent, company);
     }
     
Note: close() needs to be called on the CompanyServiceClient object to clean up resources such
as threads. In the example above, try-with-resources is used, which automatically calls close().

| Method | Description | Method Variants |
|---|---|---|
| CreateCompany | Creates a new company entity. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createCompany(CreateCompanyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createCompany(ProjectName parent, Company company) - createCompany(TenantName parent, Company company) - createCompany(String parent, Company company) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createCompanyCallable() |
| GetCompany | Retrieves specified company. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getCompany(GetCompanyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getCompany(CompanyName name) - getCompany(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getCompanyCallable() |
| UpdateCompany | Updates specified company. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateCompany(UpdateCompanyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateCompany(Company company) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateCompanyCallable() |
| DeleteCompany | Deletes specified company. Prerequisite: The company has no jobs associated with it. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteCompany(DeleteCompanyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteCompany(CompanyName name) - deleteCompany(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteCompanyCallable() |
| ListCompanies | Lists all companies associated with the project. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listCompanies(ListCompaniesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listCompanies(ProjectName parent) - listCompanies(TenantName parent) - listCompanies(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listCompaniesPagedCallable() - listCompaniesCallable() |
[Methods]

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with
these names, this class includes a format method for each type of name, and additionally a parse
method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of CompanyServiceSettings to
create(). For example:

To customize credentials:


     // 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
     CompanyServiceSettings companyServiceSettings =
         CompanyServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
     
To customize the endpoint:


     // 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
     CompanyServiceSettings companyServiceSettings =
         CompanyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
     
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
the wire:


     // 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
     CompanyServiceSettings companyServiceSettings =
         CompanyServiceSettings.newHttpJsonBuilder().build();
     CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> CompanyServiceClient

## Static Methods

### create()

    public static final CompanyServiceClient create()

Constructs an instance of CompanyServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(CompanyServiceSettings settings)

    public static final CompanyServiceClient create(CompanyServiceSettings settings)

Constructs an instance of CompanyServiceClient, using the given settings. The channels are
created based on the settings passed in, or defaults for any settings that are not set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(CompanyServiceStub stub)

    public static final CompanyServiceClient create(CompanyServiceStub stub)

Constructs an instance of CompanyServiceClient, using the given stub for making calls. This is
for advanced usage - prefer using create(CompanyServiceSettings).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.stub.CompanyServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceClient` |   |

## Constructors

### CompanyServiceClient(CompanyServiceSettings settings)

    protected CompanyServiceClient(CompanyServiceSettings settings)

Constructs an instance of CompanyServiceClient, using the given settings. This is protected so
that it is easy to make a subclass, but otherwise, the static factory methods should be
preferred.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceSettings` |

### CompanyServiceClient(CompanyServiceStub stub)

    protected CompanyServiceClient(CompanyServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.stub.CompanyServiceStub` |

## Methods

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### close()

    public final void close()

### createCompany(CreateCompanyRequest request)

    public final Company createCompany(CreateCompanyRequest request)

Creates a new company entity.

Sample 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()) {
       CreateCompanyRequest request =
           CreateCompanyRequest.newBuilder()
               .setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
               .setCompany(Company.newBuilder().build())
               .build();
       Company response = companyServiceClient.createCompany(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CreateCompanyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### createCompany(ProjectName parent, Company company)

    public final Company createCompany(ProjectName parent, Company company)

Creates a new company entity.

Sample 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()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
       Company company = Company.newBuilder().build();
       Company response = companyServiceClient.createCompany(parent, company);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.ProjectName` Required. Resource name of the tenant under which the company is created. The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created, for example, "projects/foo". |
| `company` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` Required. The company to be created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### createCompany(TenantName parent, Company company)

    public final Company createCompany(TenantName parent, Company company)

Creates a new company entity.

Sample 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]");
       Company company = Company.newBuilder().build();
       Company response = companyServiceClient.createCompany(parent, company);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.TenantName` Required. Resource name of the tenant under which the company is created. The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created, for example, "projects/foo". |
| `company` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` Required. The company to be created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### createCompany(String parent, Company company)

    public final Company createCompany(String parent, Company company)

Creates a new company entity.

Sample 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()) {
       String parent = TenantName.of("[PROJECT]", "[TENANT]").toString();
       Company company = Company.newBuilder().build();
       Company response = companyServiceClient.createCompany(parent, company);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Resource name of the tenant under which the company is created. The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenant/bar". If tenant id is unspecified, a default tenant is created, for example, "projects/foo". |
| `company` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` Required. The company to be created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### createCompanyCallable()

    public final UnaryCallable<CreateCompanyRequest,Company> createCompanyCallable()

Creates a new company entity.

Sample 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()) {
       CreateCompanyRequest request =
           CreateCompanyRequest.newBuilder()
               .setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
               .setCompany(Company.newBuilder().build())
               .build();
       ApiFuture<Company> future = companyServiceClient.createCompanyCallable().futureCall(request);
       // Do something.
       Company response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CreateCompanyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company>` |   |

### deleteCompany(CompanyName name)

    public final void deleteCompany(CompanyName name)

Deletes specified company. Prerequisite: The company has no jobs associated with it.

Sample 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()) {
       CompanyName name =
           CompanyName.ofProjectTenantCompanyName("[PROJECT]", "[TENANT]", "[COMPANY]");
       companyServiceClient.deleteCompany(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyName` Required. The resource name of the company to be deleted. The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for example, "projects/foo/tenants/bar/companies/baz". If tenant id is unspecified, the default tenant is used, for example, "projects/foo/companies/bar". |

### deleteCompany(DeleteCompanyRequest request)

    public final void deleteCompany(DeleteCompanyRequest request)

Deletes specified company. Prerequisite: The company has no jobs associated with it.

Sample 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()) {
       DeleteCompanyRequest request =
           DeleteCompanyRequest.newBuilder()
               .setName(
                   CompanyName.ofProjectTenantCompanyName("[PROJECT]", "[TENANT]", "[COMPANY]")
                       .toString())
               .build();
       companyServiceClient.deleteCompany(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.DeleteCompanyRequest` The request object containing all of the parameters for the API call. |

### deleteCompany(String name)

    public final void deleteCompany(String name)

Deletes specified company. Prerequisite: The company has no jobs associated with it.

Sample 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()) {
       String name =
           CompanyName.ofProjectTenantCompanyName("[PROJECT]", "[TENANT]", "[COMPANY]").toString();
       companyServiceClient.deleteCompany(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the company to be deleted. The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for example, "projects/foo/tenants/bar/companies/baz". If tenant id is unspecified, the default tenant is used, for example, "projects/foo/companies/bar". |

### deleteCompanyCallable()

    public final UnaryCallable<DeleteCompanyRequest,Empty> deleteCompanyCallable()

Deletes specified company. Prerequisite: The company has no jobs associated with it.

Sample 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()) {
       DeleteCompanyRequest request =
           DeleteCompanyRequest.newBuilder()
               .setName(
                   CompanyName.ofProjectTenantCompanyName("[PROJECT]", "[TENANT]", "[COMPANY]")
                       .toString())
               .build();
       ApiFuture<Empty> future = companyServiceClient.deleteCompanyCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.DeleteCompanyRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### getCompany(CompanyName name)

    public final Company getCompany(CompanyName name)

Retrieves specified company.

Sample 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()) {
       CompanyName name =
           CompanyName.ofProjectTenantCompanyName("[PROJECT]", "[TENANT]", "[COMPANY]");
       Company response = companyServiceClient.getCompany(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyName` Required. The resource name of the company to be retrieved. The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for example, "projects/api-test-project/tenants/foo/companies/bar". If tenant id is unspecified, the default tenant is used, for example, "projects/api-test-project/companies/bar". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### getCompany(GetCompanyRequest request)

    public final Company getCompany(GetCompanyRequest request)

Retrieves specified company.

Sample 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()) {
       GetCompanyRequest request =
           GetCompanyRequest.newBuilder()
               .setName(
                   CompanyName.ofProjectTenantCompanyName("[PROJECT]", "[TENANT]", "[COMPANY]")
                       .toString())
               .build();
       Company response = companyServiceClient.getCompany(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.GetCompanyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### getCompany(String name)

    public final Company getCompany(String name)

Retrieves specified company.

Sample 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()) {
       String name =
           CompanyName.ofProjectTenantCompanyName("[PROJECT]", "[TENANT]", "[COMPANY]").toString();
       Company response = companyServiceClient.getCompany(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The resource name of the company to be retrieved. The format is "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for example, "projects/api-test-project/tenants/foo/companies/bar". If tenant id is unspecified, the default tenant is used, for example, "projects/api-test-project/companies/bar". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### getCompanyCallable()

    public final UnaryCallable<GetCompanyRequest,Company> getCompanyCallable()

Retrieves specified company.

Sample 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()) {
       GetCompanyRequest request =
           GetCompanyRequest.newBuilder()
               .setName(
                   CompanyName.ofProjectTenantCompanyName("[PROJECT]", "[TENANT]", "[COMPANY]")
                       .toString())
               .build();
       ApiFuture<Company> future = companyServiceClient.getCompanyCallable().futureCall(request);
       // Do something.
       Company response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.GetCompanyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company>` |   |

### getSettings()

    public final CompanyServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceSettings` |   |

### getStub()

    public CompanyServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.stub.CompanyServiceStub` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### listCompanies(ListCompaniesRequest request)

    public final CompanyServiceClient.ListCompaniesPagedResponse listCompanies(ListCompaniesRequest request)

Lists all companies associated with the project.

Sample 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()) {
       ListCompaniesRequest request =
           ListCompaniesRequest.newBuilder()
               .setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
               .setPageToken("pageToken873572522")
               .setPageSize(883849137)
               .setRequireOpenJobs(true)
               .build();
       for (Company element : companyServiceClient.listCompanies(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.ListCompaniesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceClient.ListCompaniesPagedResponse` |   |

### listCompanies(ProjectName parent)

    public final CompanyServiceClient.ListCompaniesPagedResponse listCompanies(ProjectName parent)

Lists all companies associated with the project.

Sample 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()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
       for (Company element : companyServiceClient.listCompanies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.ProjectName` Required. Resource name of the tenant under which the company is created. The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenant/bar". If tenant id is unspecified, the default tenant will be used, for example, "projects/foo". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceClient.ListCompaniesPagedResponse` |   |

### listCompanies(TenantName parent)

    public final CompanyServiceClient.ListCompaniesPagedResponse listCompanies(TenantName parent)

Lists all companies associated with the project.

Sample 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);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.TenantName` Required. Resource name of the tenant under which the company is created. The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenant/bar". If tenant id is unspecified, the default tenant will be used, for example, "projects/foo". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceClient.ListCompaniesPagedResponse` |   |

### listCompanies(String parent)

    public final CompanyServiceClient.ListCompaniesPagedResponse listCompanies(String parent)

Lists all companies associated with the project.

Sample 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()) {
       String parent = TenantName.of("[PROJECT]", "[TENANT]").toString();
       for (Company element : companyServiceClient.listCompanies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Resource name of the tenant under which the company is created. The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenant/bar". If tenant id is unspecified, the default tenant will be used, for example, "projects/foo". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceClient.ListCompaniesPagedResponse` |   |

### listCompaniesCallable()

    public final UnaryCallable<ListCompaniesRequest,ListCompaniesResponse> listCompaniesCallable()

Lists all companies associated with the project.

Sample 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()) {
       ListCompaniesRequest request =
           ListCompaniesRequest.newBuilder()
               .setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
               .setPageToken("pageToken873572522")
               .setPageSize(883849137)
               .setRequireOpenJobs(true)
               .build();
       while (true) {
         ListCompaniesResponse response = companyServiceClient.listCompaniesCallable().call(request);
         for (Company element : response.getCompaniesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.ListCompaniesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.ListCompaniesResponse>` |   |

### listCompaniesPagedCallable()

    public final UnaryCallable<ListCompaniesRequest,CompanyServiceClient.ListCompaniesPagedResponse> listCompaniesPagedCallable()

Lists all companies associated with the project.

Sample 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()) {
       ListCompaniesRequest request =
           ListCompaniesRequest.newBuilder()
               .setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
               .setPageToken("pageToken873572522")
               .setPageSize(883849137)
               .setRequireOpenJobs(true)
               .build();
       ApiFuture<Company> future =
           companyServiceClient.listCompaniesPagedCallable().futureCall(request);
       // Do something.
       for (Company element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.ListCompaniesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.CompanyServiceClient.ListCompaniesPagedResponse>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updateCompany(Company company)

    public final Company updateCompany(Company company)

Updates specified company.

Sample 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()) {
       Company company = Company.newBuilder().build();
       Company response = companyServiceClient.updateCompany(company);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `company` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` Required. The company resource to replace the current resource in the system. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### updateCompany(UpdateCompanyRequest request)

    public final Company updateCompany(UpdateCompanyRequest request)

Updates specified company.

Sample 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()) {
       UpdateCompanyRequest request =
           UpdateCompanyRequest.newBuilder()
               .setCompany(Company.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Company response = companyServiceClient.updateCompany(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.UpdateCompanyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company` |   |

### updateCompanyCallable()

    public final UnaryCallable<UpdateCompanyRequest,Company> updateCompanyCallable()

Updates specified company.

Sample 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()) {
       UpdateCompanyRequest request =
           UpdateCompanyRequest.newBuilder()
               .setCompany(Company.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Company> future = companyServiceClient.updateCompanyCallable().futureCall(request);
       // Do something.
       Company response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.UpdateCompanyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-talent/latest/com.google.cloud.talent.v4beta1.Company>` |   |