# Class CaseServiceClient (0.77.0)

0.77.0 (latest) 0.75.0 0.72.0 0.71.0 0.69.0 0.67.0 0.66.0 0.65.0 0.64.0 0.62.0 0.60.0 0.59.0 0.58.0 0.57.0 0.56.0 0.54.0 0.52.0 0.51.0 0.48.0 0.47.0 0.46.0 0.44.0 0.43.0 0.42.0 0.41.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.35.0 0.33.0 0.32.0 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.0 0.25.0 0.24.0 0.23.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

> [!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-cloudsupport/google-cloud-cloudsupport/src/main/java/com/google/cloud/support/v2beta/CaseServiceClient.java) | [Product Reference](https://cloud.google.com/support/docs/reference/support-api/) |

Service Description: A service to manage Google Cloud support cases.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       CaseName name = CaseName.ofProjectCaseName("[PROJECT]", "[CASE]");
       Case response = caseServiceClient.getCase(name);
     }
     
Note: close() needs to be called on the CaseServiceClient 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 |
|---|---|---|
| GetCase | Retrieve a case. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getCase(GetCaseRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getCase(CaseName name) - getCase(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. - getCaseCallable() |
| ListCases | Retrieve all cases under a parent, but not its children. For example, listing cases under an organization only returns the cases that are directly parented by that organization. To retrieve cases under an organization and its projects, use `cases.search`. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listCases(ListCasesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listCases(OrganizationName parent) - listCases(ProjectName parent) - listCases(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. - listCasesPagedCallable() - listCasesCallable() |
| SearchCases | Search for cases using a query. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - searchCases(SearchCasesRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - searchCasesPagedCallable() - searchCasesCallable() |
| CreateCase | Create a new case and associate it with a parent. It must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createCase(CreateCaseRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createCase(OrganizationName parent, Case case_) - createCase(ProjectName parent, Case case_) - createCase(String parent, Case case_) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createCaseCallable() |
| UpdateCase | Update a case. Only some fields can be updated. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateCase(UpdateCaseRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateCase(Case case_, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateCaseCallable() |
| EscalateCase | Escalate a case, starting the Google Cloud Support escalation management process. This operation is only available for some support services. Go to <https://cloud.google.com/support> and look for 'Technical support escalations' in the feature list to find out which ones let you do that. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - escalateCase(EscalateCaseRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - escalateCaseCallable() |
| CloseCase | Close a case. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - closeCase(CloseCaseRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - closeCaseCallable() |
| SearchCaseClassifications | Retrieve valid classifications to use when creating a support case. Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy separated by `" > "`. For example, `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by this endpoint are valid for at least six months. When a classification is deactivated, this endpoint immediately stops returning it. After six months, `case.create` requests using the classification will fail. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - searchCaseClassifications(SearchCaseClassificationsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - searchCaseClassificationsPagedCallable() - searchCaseClassificationsCallable() |
[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 CaseServiceSettings 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
     CaseServiceSettings caseServiceSettings =
         CaseServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     CaseServiceClient caseServiceClient = CaseServiceClient.create(caseServiceSettings);
     
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
     CaseServiceSettings caseServiceSettings =
         CaseServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     CaseServiceClient caseServiceClient = CaseServiceClient.create(caseServiceSettings);
     
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
     CaseServiceSettings caseServiceSettings = CaseServiceSettings.newHttpJsonBuilder().build();
     CaseServiceClient caseServiceClient = CaseServiceClient.create(caseServiceSettings);
     
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) \> CaseServiceClient

## Static Methods

### create()

    public static final CaseServiceClient create()

Constructs an instance of CaseServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient` |   |

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

### create(CaseServiceSettings settings)

    public static final CaseServiceClient create(CaseServiceSettings settings)

Constructs an instance of CaseServiceClient, 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-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient` |   |

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

### create(CaseServiceStub stub)

    public static final CaseServiceClient create(CaseServiceStub stub)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.stub.CaseServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient` |   |

## Constructors

### CaseServiceClient(CaseServiceSettings settings)

    protected CaseServiceClient(CaseServiceSettings settings)

Constructs an instance of CaseServiceClient, 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-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceSettings` |

### CaseServiceClient(CaseServiceStub stub)

    protected CaseServiceClient(CaseServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.stub.CaseServiceStub` |

## 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()

### closeCase(CloseCaseRequest request)

    public final Case closeCase(CloseCaseRequest request)

Close a case.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       CloseCaseRequest request =
           CloseCaseRequest.newBuilder()
               .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
               .build();
       Case response = caseServiceClient.closeCase(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CloseCaseRequest` 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-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### closeCaseCallable()

    public final UnaryCallable<CloseCaseRequest,Case> closeCaseCallable()

Close a case.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       CloseCaseRequest request =
           CloseCaseRequest.newBuilder()
               .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
               .build();
       ApiFuture<Case> future = caseServiceClient.closeCaseCallable().futureCall(request);
       // Do something.
       Case 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-cloudsupport/latest/com.google.cloud.support.v2beta.CloseCaseRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case>` |   |

### createCase(CreateCaseRequest request)

    public final Case createCase(CreateCaseRequest request)

Create a new case and associate it with a parent.

It must have the following fields set: `display_name`, `description`, `classification`, and
`priority`. If you're just testing the API and don't want to route your case to an agent, set
`testCase=true`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       CreateCaseRequest request =
           CreateCaseRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setCase(Case.newBuilder().build())
               .build();
       Case response = caseServiceClient.createCase(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CreateCaseRequest` 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-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### createCase(OrganizationName parent, Case case_)

    public final Case createCase(OrganizationName parent, Case case_)

Create a new case and associate it with a parent.

It must have the following fields set: `display_name`, `description`, `classification`, and
`priority`. If you're just testing the API and don't want to route your case to an agent, set
`testCase=true`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
       Case case_ = Case.newBuilder().build();
       Case response = caseServiceClient.createCase(parent, case_);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.OrganizationName` Required. The name of the parent under which the case should be created. |
| `case_` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` Required. The case to be created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### createCase(ProjectName parent, Case case_)

    public final Case createCase(ProjectName parent, Case case_)

Create a new case and associate it with a parent.

It must have the following fields set: `display_name`, `description`, `classification`, and
`priority`. If you're just testing the API and don't want to route your case to an agent, set
`testCase=true`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
       Case case_ = Case.newBuilder().build();
       Case response = caseServiceClient.createCase(parent, case_);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.ProjectName` Required. The name of the parent under which the case should be created. |
| `case_` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` Required. The case to be created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### createCase(String parent, Case case_)

    public final Case createCase(String parent, Case case_)

Create a new case and associate it with a parent.

It must have the following fields set: `display_name`, `description`, `classification`, and
`priority`. If you're just testing the API and don't want to route your case to an agent, set
`testCase=true`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       String parent = OrganizationName.of("[ORGANIZATION]").toString();
       Case case_ = Case.newBuilder().build();
       Case response = caseServiceClient.createCase(parent, case_);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the parent under which the case should be created. |
| `case_` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` Required. The case to be created. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### createCaseCallable()

    public final UnaryCallable<CreateCaseRequest,Case> createCaseCallable()

Create a new case and associate it with a parent.

It must have the following fields set: `display_name`, `description`, `classification`, and
`priority`. If you're just testing the API and don't want to route your case to an agent, set
`testCase=true`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       CreateCaseRequest request =
           CreateCaseRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setCase(Case.newBuilder().build())
               .build();
       ApiFuture<Case> future = caseServiceClient.createCaseCallable().futureCall(request);
       // Do something.
       Case 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-cloudsupport/latest/com.google.cloud.support.v2beta.CreateCaseRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case>` |   |

### escalateCase(EscalateCaseRequest request)

    public final Case escalateCase(EscalateCaseRequest request)

Escalate a case, starting the Google Cloud Support escalation management process.

This operation is only available for some support services. Go to
<https://cloud.google.com/support> and look for 'Technical support escalations' in the feature
list to find out which ones let you do that.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       EscalateCaseRequest request =
           EscalateCaseRequest.newBuilder()
               .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
               .setEscalation(Escalation.newBuilder().build())
               .build();
       Case response = caseServiceClient.escalateCase(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.EscalateCaseRequest` 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-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### escalateCaseCallable()

    public final UnaryCallable<EscalateCaseRequest,Case> escalateCaseCallable()

Escalate a case, starting the Google Cloud Support escalation management process.

This operation is only available for some support services. Go to
<https://cloud.google.com/support> and look for 'Technical support escalations' in the feature
list to find out which ones let you do that.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       EscalateCaseRequest request =
           EscalateCaseRequest.newBuilder()
               .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
               .setEscalation(Escalation.newBuilder().build())
               .build();
       ApiFuture<Case> future = caseServiceClient.escalateCaseCallable().futureCall(request);
       // Do something.
       Case 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-cloudsupport/latest/com.google.cloud.support.v2beta.EscalateCaseRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case>` |   |

### getCase(CaseName name)

    public final Case getCase(CaseName name)

Retrieve a case.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       CaseName name = CaseName.ofProjectCaseName("[PROJECT]", "[CASE]");
       Case response = caseServiceClient.getCase(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseName` Required. The full name of a case to be retrieved. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### getCase(GetCaseRequest request)

    public final Case getCase(GetCaseRequest request)

Retrieve a case.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       GetCaseRequest request =
           GetCaseRequest.newBuilder()
               .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
               .build();
       Case response = caseServiceClient.getCase(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.GetCaseRequest` 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-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### getCase(String name)

    public final Case getCase(String name)

Retrieve a case.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       String name = CaseName.ofOrganizationCaseName("[ORGANIZATION]", "[CASE]").toString();
       Case response = caseServiceClient.getCase(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The full name of a case to be retrieved. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### getCaseCallable()

    public final UnaryCallable<GetCaseRequest,Case> getCaseCallable()

Retrieve a case.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       GetCaseRequest request =
           GetCaseRequest.newBuilder()
               .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
               .build();
       ApiFuture<Case> future = caseServiceClient.getCaseCallable().futureCall(request);
       // Do something.
       Case 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-cloudsupport/latest/com.google.cloud.support.v2beta.GetCaseRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case>` |   |

### getSettings()

    public final CaseServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceSettings` |   |

### getStub()

    public CaseServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.stub.CaseServiceStub` |   |

### 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` |   |

### listCases(ListCasesRequest request)

    public final CaseServiceClient.ListCasesPagedResponse listCases(ListCasesRequest request)

Retrieve all cases under a parent, but not its children.

For example, listing cases under an organization only returns the cases that are directly
parented by that organization. To retrieve cases under an organization and its projects, use
`cases.search`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       ListCasesRequest request =
           ListCasesRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setProductLine(ProductLine.forNumber(0))
               .build();
       for (Case element : caseServiceClient.listCases(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.ListCasesRequest` 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-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.ListCasesPagedResponse` |   |

### listCases(OrganizationName parent)

    public final CaseServiceClient.ListCasesPagedResponse listCases(OrganizationName parent)

Retrieve all cases under a parent, but not its children.

For example, listing cases under an organization only returns the cases that are directly
parented by that organization. To retrieve cases under an organization and its projects, use
`cases.search`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
       for (Case element : caseServiceClient.listCases(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.OrganizationName` Required. The name of a parent to list cases under. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.ListCasesPagedResponse` |   |

### listCases(ProjectName parent)

    public final CaseServiceClient.ListCasesPagedResponse listCases(ProjectName parent)

Retrieve all cases under a parent, but not its children.

For example, listing cases under an organization only returns the cases that are directly
parented by that organization. To retrieve cases under an organization and its projects, use
`cases.search`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
       for (Case element : caseServiceClient.listCases(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.ProjectName` Required. The name of a parent to list cases under. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.ListCasesPagedResponse` |   |

### listCases(String parent)

    public final CaseServiceClient.ListCasesPagedResponse listCases(String parent)

Retrieve all cases under a parent, but not its children.

For example, listing cases under an organization only returns the cases that are directly
parented by that organization. To retrieve cases under an organization and its projects, use
`cases.search`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       String parent = OrganizationName.of("[ORGANIZATION]").toString();
       for (Case element : caseServiceClient.listCases(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of a parent to list cases under. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.ListCasesPagedResponse` |   |

### listCasesCallable()

    public final UnaryCallable<ListCasesRequest,ListCasesResponse> listCasesCallable()

Retrieve all cases under a parent, but not its children.

For example, listing cases under an organization only returns the cases that are directly
parented by that organization. To retrieve cases under an organization and its projects, use
`cases.search`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       ListCasesRequest request =
           ListCasesRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setProductLine(ProductLine.forNumber(0))
               .build();
       while (true) {
         ListCasesResponse response = caseServiceClient.listCasesCallable().call(request);
         for (Case element : response.getCasesList()) {
           // 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-cloudsupport/latest/com.google.cloud.support.v2beta.ListCasesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.ListCasesResponse>` |   |

### listCasesPagedCallable()

    public final UnaryCallable<ListCasesRequest,CaseServiceClient.ListCasesPagedResponse> listCasesPagedCallable()

Retrieve all cases under a parent, but not its children.

For example, listing cases under an organization only returns the cases that are directly
parented by that organization. To retrieve cases under an organization and its projects, use
`cases.search`.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       ListCasesRequest request =
           ListCasesRequest.newBuilder()
               .setParent(OrganizationName.of("[ORGANIZATION]").toString())
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setProductLine(ProductLine.forNumber(0))
               .build();
       ApiFuture<Case> future = caseServiceClient.listCasesPagedCallable().futureCall(request);
       // Do something.
       for (Case 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-cloudsupport/latest/com.google.cloud.support.v2beta.ListCasesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.ListCasesPagedResponse>` |   |

### searchCaseClassifications(SearchCaseClassificationsRequest request)

    public final CaseServiceClient.SearchCaseClassificationsPagedResponse searchCaseClassifications(SearchCaseClassificationsRequest request)

Retrieve valid classifications to use when creating a support case.

Classifications are hierarchical. Each classification is a string containing all levels of
the hierarchy separated by `" > "`. For example, `"Technical Issue > Compute > Compute
Engine"`.

Classification IDs returned by this endpoint are valid for at least six months. When a
classification is deactivated, this endpoint immediately stops returning it. After six months,
`case.create` requests using the classification will fail.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       SearchCaseClassificationsRequest request =
           SearchCaseClassificationsRequest.newBuilder()
               .setQuery("query107944136")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setProduct(Product.newBuilder().build())
               .build();
       for (CaseClassification element :
           caseServiceClient.searchCaseClassifications(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.SearchCaseClassificationsRequest` 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-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.SearchCaseClassificationsPagedResponse` |   |

### searchCaseClassificationsCallable()

    public final UnaryCallable<SearchCaseClassificationsRequest,SearchCaseClassificationsResponse> searchCaseClassificationsCallable()

Retrieve valid classifications to use when creating a support case.

Classifications are hierarchical. Each classification is a string containing all levels of
the hierarchy separated by `" > "`. For example, `"Technical Issue > Compute > Compute
Engine"`.

Classification IDs returned by this endpoint are valid for at least six months. When a
classification is deactivated, this endpoint immediately stops returning it. After six months,
`case.create` requests using the classification will fail.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       SearchCaseClassificationsRequest request =
           SearchCaseClassificationsRequest.newBuilder()
               .setQuery("query107944136")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setProduct(Product.newBuilder().build())
               .build();
       while (true) {
         SearchCaseClassificationsResponse response =
             caseServiceClient.searchCaseClassificationsCallable().call(request);
         for (CaseClassification element : response.getCaseClassificationsList()) {
           // 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-cloudsupport/latest/com.google.cloud.support.v2beta.SearchCaseClassificationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.SearchCaseClassificationsResponse>` |   |

### searchCaseClassificationsPagedCallable()

    public final UnaryCallable<SearchCaseClassificationsRequest,CaseServiceClient.SearchCaseClassificationsPagedResponse> searchCaseClassificationsPagedCallable()

Retrieve valid classifications to use when creating a support case.

Classifications are hierarchical. Each classification is a string containing all levels of
the hierarchy separated by `" > "`. For example, `"Technical Issue > Compute > Compute
Engine"`.

Classification IDs returned by this endpoint are valid for at least six months. When a
classification is deactivated, this endpoint immediately stops returning it. After six months,
`case.create` requests using the classification will fail.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       SearchCaseClassificationsRequest request =
           SearchCaseClassificationsRequest.newBuilder()
               .setQuery("query107944136")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setProduct(Product.newBuilder().build())
               .build();
       ApiFuture<CaseClassification> future =
           caseServiceClient.searchCaseClassificationsPagedCallable().futureCall(request);
       // Do something.
       for (CaseClassification 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-cloudsupport/latest/com.google.cloud.support.v2beta.SearchCaseClassificationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.SearchCaseClassificationsPagedResponse>` |   |

### searchCases(SearchCasesRequest request)

    public final CaseServiceClient.SearchCasesPagedResponse searchCases(SearchCasesRequest request)

Search for cases using a query.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       SearchCasesRequest request =
           SearchCasesRequest.newBuilder()
               .setParent("parent-995424086")
               .setQuery("query107944136")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Case element : caseServiceClient.searchCases(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.SearchCasesRequest` 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-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.SearchCasesPagedResponse` |   |

### searchCasesCallable()

    public final UnaryCallable<SearchCasesRequest,SearchCasesResponse> searchCasesCallable()

Search for cases using a query.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       SearchCasesRequest request =
           SearchCasesRequest.newBuilder()
               .setParent("parent-995424086")
               .setQuery("query107944136")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         SearchCasesResponse response = caseServiceClient.searchCasesCallable().call(request);
         for (Case element : response.getCasesList()) {
           // 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-cloudsupport/latest/com.google.cloud.support.v2beta.SearchCasesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.SearchCasesResponse>` |   |

### searchCasesPagedCallable()

    public final UnaryCallable<SearchCasesRequest,CaseServiceClient.SearchCasesPagedResponse> searchCasesPagedCallable()

Search for cases using a query.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       SearchCasesRequest request =
           SearchCasesRequest.newBuilder()
               .setParent("parent-995424086")
               .setQuery("query107944136")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Case> future = caseServiceClient.searchCasesPagedCallable().futureCall(request);
       // Do something.
       for (Case 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-cloudsupport/latest/com.google.cloud.support.v2beta.SearchCasesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.CaseServiceClient.SearchCasesPagedResponse>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updateCase(Case case_, FieldMask updateMask)

    public final Case updateCase(Case case_, FieldMask updateMask)

Update a case. Only some fields can be updated.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       Case case_ = Case.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       Case response = caseServiceClient.updateCase(case_, updateMask);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `case_` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` Required. The case to update. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` A list of attributes of the case that should be updated. Supported values are `priority`, `display_name`, and `subscriber_email_addresses`. If no fields are specified, all supported fields are updated. Be careful - if you do not provide a field mask, then you might accidentally clear some fields. For example, if you leave the field mask empty and do not provide a value for `subscriber_email_addresses`, then `subscriber_email_addresses` is updated to empty. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### updateCase(UpdateCaseRequest request)

    public final Case updateCase(UpdateCaseRequest request)

Update a case. Only some fields can be updated.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       UpdateCaseRequest request =
           UpdateCaseRequest.newBuilder()
               .setCase(Case.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Case response = caseServiceClient.updateCase(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.UpdateCaseRequest` 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-cloudsupport/latest/com.google.cloud.support.v2beta.Case` |   |

### updateCaseCallable()

    public final UnaryCallable<UpdateCaseRequest,Case> updateCaseCallable()

Update a case. Only some fields can be updated.

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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
       UpdateCaseRequest request =
           UpdateCaseRequest.newBuilder()
               .setCase(Case.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Case> future = caseServiceClient.updateCaseCallable().futureCall(request);
       // Do something.
       Case 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-cloudsupport/latest/com.google.cloud.support.v2beta.UpdateCaseRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudsupport/latest/com.google.cloud.support.v2beta.Case>` |   |